/* book.headsquarter.com — warmes Grau wie headsquarter.com, keine Akzentfarbe (Rot nur für Fehler), die Fotos tragen.
   Leicht statt kantig (Wunsch Dani 11.11.2026): weiche Radien, leichte Schrift, wenig Schatten, viel Luft.
   Ruhig: eine Frage, ein Feld, das Foto. Bewegung kritisch gedämpft; reduzierte Bewegung = Überblenden. */

:root {
  --text: #403e37;
  --dunkel: #26241c;
  --gedaempft: #858379;
  --linie: #e5e4e0;
  --linie-2: #d9d8d4;
  --flaeche: #fafaf8;
  --flaeche-2: #f1f0ed;
  --weiss: #ffffff;
  --fehler: #b3261e;
  --schrift: "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif;
  --feder: cubic-bezier(.2, .8, .2, 1);
  --spalte: 600px;
  --r-gross: 28px;   /* Foto, Zusammenfassung */
  --r-mittel: 18px;  /* Karten, Eingabe */
  --r-klein: 999px;  /* Vorschläge, Knöpfe */
  color-scheme: light;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body { margin: 0; background: var(--flaeche); color: var(--text); font: 400 1rem/1.55 var(--schrift);
       -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
button, textarea { font: inherit; color: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--dunkel); outline-offset: 3px; }
.unsichtbar { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.app { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 6fr); height: 100dvh; padding: 14px; gap: 14px; }

/* ── Bühne ─────────────────────────────────────────────────────────────── */
.buehne { position: relative; overflow: hidden; background: var(--flaeche-2); color: var(--weiss); border-radius: var(--r-gross); }
.buehne-bild { position: absolute; inset: 0; background: center / cover no-repeat; opacity: 0; transform: scale(1.03);
               transition: opacity 800ms var(--feder), transform 1600ms var(--feder); will-change: opacity, transform; }
.buehne-bild.sichtbar { opacity: 1; transform: none; }
.buehne-schleier { position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(38,36,28,.22) 0%, rgba(38,36,28,0) 16%, rgba(38,36,28,0) 58%, rgba(38,36,28,.5) 100%); }
.marke { position: absolute; top: 24px; left: 28px; font-weight: 600; font-size: 1rem; letter-spacing: -0.01em; }
.buehne-unten { position: absolute; left: 28px; right: 28px; bottom: 28px; }
.titel { margin: 0; font-weight: 600; font-size: clamp(2rem, 3vw, 2.75rem); line-height: 1.05; letter-spacing: -0.03em; }
.untertitel { margin: .4rem 0 0; font-size: 1.0625rem; letter-spacing: -0.005em; color: rgba(255,255,255,.88); }
.buehne-raum { margin: 0 0 .6rem; min-height: 1.4em; font-size: .875rem; color: rgba(255,255,255,.85); }

/* ── Chat ──────────────────────────────────────────────────────────────── */
.chat { position: relative; display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.kopf { flex: none; display: flex; align-items: center; justify-content: flex-end; height: 56px; padding: 0 14px; }
.marke-klein { display: none; position: static; }
.kopf-knoepfe { display: flex; gap: .25rem; }
.leise { border: 0; background: none; padding: .45rem .85rem; border-radius: var(--r-klein); font-size: .875rem; color: var(--gedaempft);
         transition: color 120ms ease-out, background 120ms ease-out, transform 100ms ease-out; }
.leise:hover { color: var(--dunkel); background: var(--flaeche-2); }
.leise:active { transform: scale(.97); }

.verlauf { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 0 28px 24px;
           mask-image: linear-gradient(180deg, transparent 0, #000 20px, #000 calc(100% - 20px), transparent 100%); }
.verlauf > * { max-width: var(--spalte); margin-left: auto; margin-right: auto; }
.unten { flex: none; padding: 0 28px 20px; }
.unten > * { max-width: var(--spalte); margin-left: auto; margin-right: auto; }

/* Vor dem ersten Satz: Begrüssung, Feld und Vorschläge stehen zusammen in der Mitte. */
.chat:not(.laeuft) .verlauf { flex: 0 0 auto; overflow: visible; mask-image: none; margin-top: auto; }
.chat:not(.laeuft) .unten { margin-bottom: auto; padding-bottom: 12vh; }
.leer { padding: 0 0 1.75rem; }
.gruss { margin: 0; font-size: clamp(1.75rem, 2.4vw, 2.25rem); font-weight: 600; line-height: 1.1; letter-spacing: -0.025em; color: var(--dunkel); }
.frage { margin: .45rem 0 0; font-size: 1.0625rem; line-height: 1.45; color: var(--gedaempft); }

.vorschlaege { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .9rem; }
.chat.laeuft .vorschlaege { display: none; }
.chip { border: 0; background: var(--flaeche-2); padding: .5rem .95rem; border-radius: var(--r-klein); font-size: .875rem; color: var(--text);
        transition: background 120ms ease-out, transform 100ms ease-out; }
.chip:hover { background: var(--linie); }
.chip:active { transform: scale(.97); }

/* Nachrichten: der Assistent schreibt ohne Blase, der Gast rechts in einem ruhigen grauen Feld. */
.nachricht { margin-top: 1.75rem; animation: auf 420ms var(--feder) both; }
.nachricht.gast { display: flex; justify-content: flex-end; }
.nachricht.gast .inhalt { background: var(--flaeche-2); color: var(--dunkel); padding: .6rem 1rem; border-radius: 20px 20px 6px 20px; max-width: 78%; white-space: pre-wrap; }
.nachricht.bot .inhalt { font-size: 1rem; line-height: 1.65; color: var(--text); white-space: pre-wrap; }
.nachricht.fehler .inhalt { color: var(--fehler); }
@keyframes auf { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.status { margin-top: 1.25rem; font-size: .875rem; color: var(--gedaempft); display: flex; align-items: center; gap: .6rem; }
.status:empty { display: none; }
.punkte { display: inline-flex; gap: 4px; }
.punkte i { width: 4px; height: 4px; border-radius: 50%; background: currentColor; animation: puls 1.1s infinite ease-in-out; }
.punkte i:nth-child(2) { animation-delay: .15s; } .punkte i:nth-child(3) { animation-delay: .3s; }
@keyframes puls { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }

/* ── Raumkarten ────────────────────────────────────────────────────────── */
.karten { display: grid; grid-auto-flow: column; grid-auto-columns: calc(50% - 6px); gap: 12px; overflow-x: auto;
          scroll-snap-type: x mandatory; margin-top: 1.25rem; padding: 1px 1px 6px; scrollbar-width: none;
          animation: auf 480ms var(--feder) both; }
.karten::-webkit-scrollbar { display: none; }
.karte { scroll-snap-align: start; display: flex; flex-direction: column; text-align: left; border: 0; padding: 0;
         background: var(--weiss); border-radius: var(--r-mittel); overflow: hidden; box-shadow: 0 1px 2px rgba(38,36,28,.06);
         transition: box-shadow 220ms var(--feder), transform 100ms ease-out; }
.karte:hover { box-shadow: 0 10px 30px -14px rgba(38,36,28,.22); }
.karte:active { transform: scale(.985); }
.karte-bild { aspect-ratio: 3 / 2; background: var(--flaeche-2) center / cover no-repeat; }
.karte-text { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: .1rem 1rem; padding: .85rem 1rem 1rem; }
.karte-oben { grid-column: 1 / -1; font-size: .75rem; color: var(--gedaempft); min-height: 1em; }
.karte-name { font-weight: 600; color: var(--dunkel); }
.karte-meta { font-size: .8125rem; color: var(--gedaempft); }
.karte-preis { grid-row: 2 / span 2; grid-column: 2; text-align: right; }
.preis { font-size: 1.0625rem; font-weight: 600; color: var(--dunkel); letter-spacing: -0.01em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tarif { font-size: .75rem; color: var(--gedaempft); }

/* ── Zusammenfassung ──────────────────────────────────────────────────── */
.auswahl { margin-top: 1.25rem; background: var(--weiss); border-radius: var(--r-gross); overflow: hidden; box-shadow: 0 1px 2px rgba(38,36,28,.06), 0 18px 40px -24px rgba(38,36,28,.2);
           animation: auf 480ms var(--feder) both; }
.auswahl-bild { aspect-ratio: 21 / 9; background: var(--flaeche-2) center / cover no-repeat; }
.auswahl-text { padding: 1.25rem 1.5rem 1.5rem; }
.auswahl h3 { margin: 0; font-size: 1.25rem; font-weight: 600; letter-spacing: -0.02em; color: var(--dunkel); }
.auswahl .ort { margin: .15rem 0 0; color: var(--gedaempft); font-size: .9375rem; }
.auswahl dl { margin: 1.1rem 0 0; display: grid; grid-auto-flow: column; grid-template-rows: auto auto; justify-content: start; gap: .1rem 2.5rem; }
.auswahl dt { font-size: .75rem; color: var(--gedaempft); }
.auswahl dd { margin: 0; font-weight: 500; color: var(--dunkel); }
.summe { display: flex; justify-content: space-between; align-items: baseline; margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid var(--linie); }
.summe span:first-child { color: var(--gedaempft); font-size: .9375rem; }
.summe .preis { font-size: 1.375rem; }
.knopf { display: flex; align-items: center; justify-content: center; width: 100%; margin-top: 1.1rem; border: 0; border-radius: var(--r-klein);
         background: var(--dunkel); color: var(--weiss); padding: .85rem 1.25rem; font-weight: 600;
         transition: transform 100ms ease-out, background 120ms ease-out; }
.knopf:hover { background: #000; }
.knopf:active { transform: scale(.985); }
.knopf[disabled] { background: var(--flaeche-2); color: var(--gedaempft); cursor: default; transform: none; }
.hinweis { margin: .7rem 0 0; font-size: .8125rem; color: var(--gedaempft); text-align: center; }

/* ── Eingabe ──────────────────────────────────────────────────────────── */
.eingabe { display: flex; align-items: flex-end; gap: .5rem; padding: .4rem .4rem .4rem 1.25rem; background: var(--weiss); border-radius: 26px;
           box-shadow: 0 0 0 1px var(--linie), 0 8px 24px -16px rgba(38,36,28,.25); transition: box-shadow 160ms ease-out; }
.eingabe:focus-within { box-shadow: 0 0 0 1px var(--linie-2), 0 10px 28px -14px rgba(38,36,28,.3); }
.eingabe textarea { flex: 1; border: 0; outline: 0; resize: none; background: none; padding: .6rem 0; line-height: 1.45; max-height: 9rem; font-size: 1rem; }
.eingabe textarea::placeholder { color: var(--gedaempft); opacity: .8; }
.senden { flex: none; width: 40px; height: 40px; border: 0; border-radius: 50%; background: var(--dunkel); color: var(--weiss); display: grid; place-items: center;
          transition: transform 100ms ease-out, opacity 160ms ease-out; }
.senden:active { transform: scale(.92); }
.senden:disabled { opacity: .3; cursor: default; }
.fuss { margin: .85rem auto 0; text-align: center; font-size: .75rem; color: var(--gedaempft); }
.chat:not(.laeuft) .fuss { text-align: left; }

/* ── Dialog und Tablet ────────────────────────────────────────────────── */
.dialog { border: 0; padding: 0; max-width: 400px; width: calc(100% - 32px); border-radius: var(--r-gross); background: var(--weiss); color: var(--text);
          box-shadow: 0 30px 80px -30px rgba(38,36,28,.6); }
.dialog::backdrop { background: rgba(38,36,28,.3); backdrop-filter: blur(4px); }
.dialog[open] { animation: auf 380ms var(--feder) both; }
.dialog form { padding: 1.75rem; }
.dialog h2 { margin: 0; font-size: 1.25rem; font-weight: 600; letter-spacing: -0.02em; color: var(--dunkel); }
.dialog p { margin: .5rem 0 1rem; color: var(--gedaempft); }
.zeile { display: block; padding: .85rem 0; border-top: 1px solid var(--linie); text-decoration: none; font-weight: 600; color: var(--dunkel); }
.zeile:empty { display: none; }
.kiosk-hinweis { position: fixed; inset: 0; z-index: 10; display: grid; place-content: center; text-align: center;
                 background: rgba(250,250,248,.9); backdrop-filter: blur(16px); font-size: 1.5rem; color: var(--dunkel); }
.kiosk-hinweis p { margin: 0; }
.kiosk-hinweis .klein { margin-top: .4rem; font-size: 1rem; color: var(--gedaempft); }
.kiosk-hinweis .knopf { width: auto; min-width: 220px; margin: 1.5rem auto 0; }
body.kiosk { font-size: 1.125rem; }
body.kiosk .chip { padding: .9rem 1.2rem; font-size: 1rem; }
body.kiosk .senden { width: 52px; height: 52px; }

/* ── Schmal ───────────────────────────────────────────────────────────── */
@media (max-width: 980px) {
  .app { grid-template-columns: minmax(0, 1fr); padding: 0; gap: 0; }
  .buehne { display: none; }
  .kopf { justify-content: space-between; padding: 0 16px; }
  .marke-klein { display: block; }
  .verlauf { padding: 0 16px 16px; }
  .unten { padding: 0 16px calc(12px + env(safe-area-inset-bottom)); }
  .karten { grid-auto-columns: 82%; }
  .auswahl dl { gap: .1rem 1.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; }
  .buehne-bild { transition: opacity 300ms linear; transform: none !important; }
  .nachricht, .karten, .auswahl, .dialog[open] { animation: einblenden 200ms linear both !important; }
  @keyframes einblenden { from { opacity: 0; } to { opacity: 1; } }
}
@media (prefers-reduced-transparency: reduce) {
  .kiosk-hinweis, .dialog::backdrop { background: var(--flaeche); backdrop-filter: none; }
}
