/* Anleitung für Premium-Erfassung: nur die Regie, die Bühne für Angebot und Schlusskarte und die
   Startseite. Chat und Erfassung kommen unverändert aus erfassung.css, damit die Anleitung aussieht wie
   der Dienst. Eigene Klassen tragen die Vorsilbe demo-. */

:root { --regie-h: 118px; --glut: #3FB68B; }

/* ------------------------------------------------ Kopf */
.demo-kopfmarke b { color: var(--warn) !important; }
.demo-seite .fuss { display: none; }

/* ------------------------------------------------ Start */
.demo-hero { background: var(--petrol); color: #fff; padding: clamp(2.2rem, 5.5vw, 4rem) 0 clamp(2.4rem, 6vw, 4.2rem); position: relative; overflow: hidden; }
.demo-hero::after {
  content: ""; position: absolute; inset: auto -10% -70% 40%; height: 130%;
  background: radial-gradient(closest-side, rgba(12,119,189,.28), transparent 70%); pointer-events: none;
}
.demo-hero .huelle { position: relative; z-index: 1; }
.demo-braue { text-transform: uppercase; letter-spacing: .14em; font-size: .76rem; font-weight: 700; color: #F2C27B; margin-bottom: .8rem; }
.demo-hero h1 { max-width: 18ch; margin-bottom: .6rem; }
.demo-hero h1 em { font-style: normal; color: #6FB8E8; }
.demo-lead { max-width: 60ch; font-size: 1.08rem; color: rgba(255,255,255,.86); margin-bottom: 1.6rem; }
.demo-regeln { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .8rem; max-width: 1000px; }
.demo-regeln li { background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.14); border-radius: var(--radius-s); padding: .75rem .9rem; font-size: .9rem; line-height: 1.45; color: rgba(255,255,255,.8); }
.demo-regeln b { display: block; color: #fff; font-size: .95rem; margin-bottom: .15rem; }

.demo-faelle-abschnitt { padding: 2.4rem 0 .6rem; }
.demo-faelle-abschnitt h2, .demo-bedienung h2 { font-size: 1.45rem; margin-bottom: .3rem; }
.demo-unterzeile { color: var(--grau); margin-bottom: 1.2rem; }
.demo-faelle { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 1.2rem; }
.demo-fall {
  background: #fff; border-radius: var(--radius); box-shadow: var(--schatten); overflow: hidden; display: flex; flex-direction: column;
  border-top: 3px solid var(--warn);
}
.demo-fall-bilder { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2px; background: var(--grau-hell); }
.demo-fall-bilder img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; }
.demo-fall-koerper { padding: 1.1rem 1.25rem 1.25rem; display: flex; flex-direction: column; flex: 1; }
.demo-fall-wer { font-size: .74rem; text-transform: uppercase; letter-spacing: .12em; font-weight: 700; color: var(--akzent-tief); }
.demo-fall h3 { font-size: 1.3rem; margin: .2rem 0 .45rem; display: flex; align-items: center; gap: .5rem; }
.demo-fall p { font-size: .95rem; color: var(--navy); margin-bottom: .7rem; }
.demo-fall ul { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; gap: .25rem; font-size: .9rem; }
.demo-fall li::before { content: "✓"; color: #2E7D5B; font-weight: 700; margin-right: .45rem; }
.demo-fall-fuss { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: .8rem; flex-wrap: wrap; border-top: 1px solid var(--grau-hell); padding-top: .9rem; }
.demo-fall-ergebnis { font-size: .85rem; color: var(--grau); line-height: 1.35; }
.demo-fall-ergebnis b { display: block; color: var(--navy); font-size: 1.05rem; }

.demo-bedienung { padding: 2rem 0 3rem; }
.demo-bed-raster { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; margin: 1rem 0 1.4rem; }
.demo-bed-raster > div { background: #fff; border: 1px solid var(--grau-hell); border-radius: var(--radius-s); padding: .9rem 1rem; font-size: .9rem; }
.demo-bed-raster b { display: block; margin: .35rem 0 .2rem; }
.demo-bed-raster p { margin: 0; color: var(--grau); line-height: 1.45; }
.demo-bed-symbol { display: inline-grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%; background: var(--akzent-hell); color: var(--akzent-tief); font-size: .95rem; }
.demo-ehrlich { font-size: .88rem; color: var(--grau); max-width: 85ch; background: #fff; border-left: 4px solid var(--warn); border-radius: 0 var(--radius-s) var(--radius-s) 0; padding: .8rem 1rem; }
.demo-ehrlich b { color: var(--navy); }

/* ------------------------------------------------ Regie (über dem Chat) */
.demo-regie { background: var(--petrol); color: #fff; box-shadow: 0 6px 18px rgba(11,35,52,.18); position: relative; z-index: 5; }
.demo-regie-innen { width: min(1180px, 94vw); margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1.2rem; align-items: center; padding: .7rem 0 .75rem; }
.demo-regie-meta { display: flex; align-items: center; gap: .6rem; font-size: .78rem; color: rgba(255,255,255,.7); }
.demo-regie-heim { color: #fff; text-decoration: none; width: 1.6rem; height: 1.6rem; display: inline-grid; place-items: center; border-radius: 50%; border: 1px solid rgba(255,255,255,.25); font-size: .85rem; }
.demo-regie-heim:hover { background: rgba(255,255,255,.1); }
.demo-fallmarke { text-transform: uppercase; letter-spacing: .1em; font-weight: 700; color: #F2C27B; }
.demo-schrittzahl { font-variant-numeric: tabular-nums; }
.demo-nur-klein { display: none; }
.demo-fortschritt { display: flex; gap: 3px; margin: .4rem 0 .45rem; max-width: 520px; }
.demo-fortschritt button { flex: 1; height: 6px; border: 0; padding: 0; border-radius: 3px; background: rgba(255,255,255,.18); cursor: pointer; }
.demo-fortschritt button[aria-current="step"] { background: #F2C27B; }
.demo-fortschritt button.demo-erledigt { background: rgba(111,184,232,.75); }
.demo-fortschritt button:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.demo-regie-titel { font-size: 1.12rem; margin: 0 0 .15rem; letter-spacing: -.01em; color: #fff; }
.demo-regie-satz { margin: 0; font-size: .9rem; line-height: 1.45; color: rgba(255,255,255,.82); max-width: 88ch; }
.demo-regie-knoepfe { display: flex; gap: .45rem; align-items: center; }
.demo-schalter, .demo-zurueck, .demo-weiter {
  font: inherit; border-radius: 999px; cursor: pointer; white-space: nowrap; min-height: 2.6rem;
}
.demo-schalter { background: transparent; color: rgba(255,255,255,.8); border: 1px solid rgba(255,255,255,.28); padding: .35rem .85rem; font-size: .84rem; }
.demo-schalter[aria-pressed="true"] { background: rgba(111,184,232,.18); color: #fff; border-color: #6FB8E8; }
.demo-zurueck { width: 2.6rem; background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.28); font-size: .8rem; }
.demo-zurueck:disabled { opacity: .35; cursor: default; }
.demo-weiter { background: #F2C27B; color: var(--petrol); border: 0; font-weight: 700; padding: .45rem 1.25rem; font-size: .98rem; box-shadow: 0 2px 10px rgba(242,194,123,.25); }
.demo-weiter:hover { background: #F6D29C; }
.demo-schalter:focus-visible, .demo-zurueck:focus-visible, .demo-weiter:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

.demo-seite .ec { height: calc(100dvh - 74px - var(--regie-h) - 2.2rem); min-height: 520px; margin-top: 1rem; }

/* ------------------------------------------------ Eingabe im Spiel */
#ec-text[readonly] { cursor: default; }
.demo-tippt #ec-text { background: #fff; outline: 2px solid var(--akzent); }
.ec-senden.demo-bereit { animation: demo-puls 1s ease infinite; }
.ec-aufnahme-stop { display: inline-block; }
@keyframes demo-puls { 50% { box-shadow: 0 0 0 7px rgba(12,119,189,.22); } }
.ec-anhang img { animation: demo-blitz .5s ease; }
@keyframes demo-blitz { 0% { filter: brightness(2.2); transform: scale(.85); } 100% { filter: none; transform: none; } }

/* Der vorbereitete Knopf leuchtet, der gedrückte rastet kurz ein */
.demo-ziel { box-shadow: 0 0 0 3px #F2C27B, 0 0 0 7px rgba(242,194,123,.35) !important; animation: demo-ziel 1.2s ease infinite; position: relative; z-index: 1; }
@keyframes demo-ziel { 50% { box-shadow: 0 0 0 3px #F2C27B, 0 0 0 11px rgba(242,194,123,.12) !important; } }
.demo-drueckt { transform: scale(.96); filter: brightness(.95); }

/* Neu oder geändert in der Erfassung */
.demo-neu { animation: demo-neu 2.6s ease; }
@keyframes demo-neu { 0%, 35% { background-color: #E5F5EE; box-shadow: 0 0 0 2px var(--glut); } 100% { box-shadow: 0 0 0 0 transparent; } }
.ec-chip.demo-neu { animation: demo-neu 2.6s ease; }
.ec-erfasst-knopf.demo-neu { animation: demo-puls 1s ease 3; }

/* ------------------------------------------------ Blick in den Agenten */
.demo-spur { margin-top: .4rem; max-width: 100%; }
.demo-spur > summary {
  list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: .4rem; font-size: .74rem; font-weight: 600;
  color: var(--akzent-tief); background: var(--akzent-hell); border: 1px solid #C9DFF0; border-radius: 999px; padding: .12rem .65rem;
}
.demo-spur > summary::-webkit-details-marker { display: none; }
.demo-spur > summary::after { content: "▾"; font-size: .7rem; }
.demo-spur[open] > summary::after { content: "▴"; }
.demo-spur-koerper {
  margin-top: .35rem; background: #0F2A3D; color: #DCE8F0; border-radius: 12px; padding: .7rem .85rem .75rem; font-size: .8rem; line-height: 1.45;
  box-shadow: var(--schatten-s);
}
.demo-spur-reihe { display: grid; grid-template-columns: 5.6rem minmax(0, 1fr); gap: .5rem; padding: .28rem 0; border-top: 1px solid rgba(255,255,255,.08); }
.demo-spur-reihe:first-child { border-top: 0; padding-top: 0; }
.demo-spur-was { color: #8FB3CC; font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; padding-top: .1rem; }
.demo-spur ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .3rem; }
.demo-spur code { font-family: var(--mono); font-size: .72rem; color: #9FD3F5; background: rgba(255,255,255,.06); border-radius: 4px; padding: 0 .3rem; }
.demo-spur-intent b { color: #fff; }
.demo-spur-angabe { color: #BFD2DF; }
.demo-spur-angabe i { font-style: normal; color: #F2C27B; }
.demo-spur-task { display: inline-block; margin: 0 .25rem .25rem 0; background: rgba(63,182,139,.16); color: #A8E6CC; border: 1px solid rgba(63,182,139,.35); border-radius: 999px; padding: 0 .5rem; font-size: .74rem; }
.demo-spur-ok { color: #A8E6CC; }
.demo-spur-fuss { color: #7F9CB0; font-size: .7rem; margin-top: .35rem; }
.ec-zeile-agent { max-width: 92% !important; }

/* ------------------------------------------------ Hinweis-Toast */
.demo-toast {
  position: fixed; left: 50%; bottom: 1.4rem; transform: translateX(-50%); z-index: 60; max-width: min(520px, 92vw);
  background: var(--navy); color: #fff; border-radius: 12px; padding: .65rem 1rem; font-size: .88rem; line-height: 1.4;
  box-shadow: 0 10px 30px rgba(11,35,52,.3);
}

/* ------------------------------------------------ Leiste auf der Angebotsseite */
.demo-angebotsleiste {
  background: var(--petrol); color: #fff; display: flex; align-items: center; gap: .9rem; flex-wrap: wrap;
  padding: .6rem max(3vw, calc((100vw - 1120px) / 2)); font-size: .9rem;
}
.demo-angebotsleiste a { color: #fff; text-decoration: none; border: 1px solid rgba(255,255,255,.3); border-radius: 999px; padding: .3rem .85rem; white-space: nowrap; }
.demo-angebotsleiste a:hover { background: rgba(255,255,255,.1); }
.demo-al-titel { flex: 1; min-width: 12rem; color: rgba(255,255,255,.85); }
.demo-al-titel b { color: #F2C27B; text-transform: uppercase; letter-spacing: .1em; font-size: .76rem; }
.demo-angebotsleiste .demo-al-pdf { background: #F2C27B; color: var(--petrol); border-color: #F2C27B; font-weight: 700; }

/* ------------------------------------------------ Start mit Ton */
.demo-hero-knoepfe { display: flex; flex-wrap: wrap; align-items: center; gap: .8rem 1.4rem; margin: 0 0 1.7rem; }
.demo-gross { font-size: 1.06rem; padding: .7rem 1.5rem; min-height: 3rem; }
.demo-dauer { font-weight: 500; opacity: .72; font-size: .88em; }
.demo-hero-link { color: #fff; opacity: .88; text-underline-offset: 3px; }
.demo-hero-link:hover { opacity: 1; }
.demo-fall-aktionen { display: flex; align-items: center; gap: .4rem .9rem; flex-wrap: wrap; }
.demo-fall-selbst { font-size: .88rem; color: var(--akzent-tief); text-underline-offset: 3px; }

/* ------------------------------------------------ Clara spricht */
.demo-tonmarke { display: inline-flex; align-items: center; gap: .35rem; color: #A8E6CC; font-weight: 600; }
.demo-tonmarke::after { content: ""; width: .45rem; height: .45rem; border-radius: 50%; background: rgba(168,230,204,.35); }
.demo-tonmarke.demo-spricht::after { background: var(--glut); animation: demo-spricht 1s ease infinite; }
@keyframes demo-spricht { 50% { transform: scale(1.6); opacity: .55; } }

/* ------------------------------------------------ Bühne: das fertige Angebot und die Schlusskarte */
.demo-buehne { width: min(1180px, 94vw); margin: 1rem auto 1.4rem; }
.demo-angebot { display: flex; flex-direction: column; gap: .6rem; }
.demo-angebot iframe {
  width: 100%; height: calc(100dvh - 74px - var(--regie-h) - 6.4rem); min-height: 420px; border: 0; display: block;
  background: #fff; border-radius: var(--radius); box-shadow: var(--schatten);
}
.demo-angebot-knoepfe { display: flex; gap: .5rem; justify-content: flex-end; flex-wrap: wrap; }
.demo-ende-innen { padding: 1.4rem 0 1rem; }
.demo-ende .demo-braue { color: var(--akzent-tief); }
.demo-ende h2 { font-size: clamp(1.6rem, 3.2vw, 2.3rem); margin: 0 0 1.2rem; }
.demo-ende-raster { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.1rem; }
.demo-ende-karte {
  background: #fff; border-radius: var(--radius); box-shadow: var(--schatten); border-top: 3px solid var(--warn);
  padding: 1.15rem 1.25rem 1.3rem; display: flex; flex-direction: column; align-items: flex-start; gap: .55rem;
}
.demo-ende-karte b { font-size: 1.12rem; }
.demo-ende-karte p { margin: 0 0 .3rem; color: var(--grau); font-size: .93rem; line-height: 1.45; }
.demo-ende-karte .knopf { margin-top: auto; }
.demo-ende-teilen { align-items: center; text-align: center; }
.demo-ende-teilen .knopf { margin-top: 0; }
.demo-ende-teilen img { width: 150px; height: 150px; border-radius: 8px; border: 1px solid var(--grau-hell); }
.demo-ende-adresse { font-family: var(--mono); font-size: .84rem; color: var(--akzent-tief); word-break: break-all; }
.demo-ende-klein { font-size: .88rem; color: var(--akzent-tief); text-underline-offset: 3px; }

/* Die Angebotsseite im Rahmen: ohne eigene Leiste, der Teil, von dem Clara spricht, leuchtet */
.demo-eingebettet .demo-angebotsleiste { display: none; }
.demo-eingebettet .demo-anker { box-shadow: 0 0 0 3px #F2C27B, 0 0 0 8px rgba(242,194,123,.25); border-radius: 10px; scroll-margin-top: 14px; transition: box-shadow .4s ease; }

/* ------------------------------------------------ Handy */
@media (max-width: 1000px) {
  .demo-regeln, .demo-bed-raster { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .demo-ende-raster { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 899px) {
  .demo-seite.demo-spielt .kopf { display: none; }
  .demo-seite:not(.demo-spielt) .kopf { display: block; }
  /* Raster statt absoluter Knöpfe: Meta und Knöpfe teilen sich die erste Zeile, nichts überlappt */
  .demo-regie-innen { width: 100%; grid-template-columns: minmax(0, 1fr) auto; gap: 0 .5rem; padding: .5rem .8rem .55rem;
    grid-template-areas: "meta knoepfe" "fort fort" "titel titel" "satz satz"; }
  .demo-regie-text { display: contents; }
  .demo-regie-meta { grid-area: meta; overflow: hidden; }
  .demo-fortschritt { grid-area: fort; }
  .demo-regie-titel { grid-area: titel; }
  .demo-regie-satz { grid-area: satz; }
  .demo-fortschritt { margin: .3rem 0 .3rem; max-width: none; }
  .demo-regie-titel { font-size: .98rem; }
  .demo-regie-satz { font-size: .8rem; line-height: 1.38; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
  .demo-regie-satz.demo-offen { -webkit-line-clamp: unset; }
  .demo-regie-knoepfe { grid-area: knoepfe; gap: .35rem; }
  .demo-regie-meta { min-height: 2.3rem; white-space: nowrap; }
  .demo-nur-gross { display: none; }
  .demo-nur-klein { display: inline; }
  .demo-schalter span { display: none; }
  .demo-schalter, .demo-zurueck { min-height: 2.3rem; width: 2.3rem; padding: 0; text-align: center; }
  .demo-weiter { min-height: 2.3rem; padding: .3rem .9rem; font-size: .9rem; }
  .demo-seite .ec { height: auto; min-height: 0; margin: 0; }
  .demo-seite .ec-chat { height: calc(100dvh - var(--regie-h)); }
  .demo-spur-reihe { grid-template-columns: minmax(0, 1fr); gap: .1rem; }
  .demo-hero h1 { font-size: 2rem; }
  .demo-regeln, .demo-bed-raster { grid-template-columns: minmax(0, 1fr); }
  .demo-faelle { grid-template-columns: minmax(0, 1fr); }
  .demo-al-titel { order: -1; flex-basis: 100%; }
  .demo-angebotsleiste { gap: .5rem; padding: .5rem .8rem; }
  .demo-angebotsleiste a { font-size: .85rem; padding: .28rem .75rem; }
  .demo-kopfmarke { display: flex; gap: .4rem; align-items: baseline; }
  .demo-kopfmarke b { display: inline !important; }
  .demo-buehne { width: 100%; margin: 0; padding: .6rem .6rem 1rem; }
  .demo-angebot { gap: .45rem; }
  .demo-angebot iframe { height: calc(100dvh - var(--regie-h) - 5.3rem); min-height: 340px; border-radius: 12px; }
  .demo-angebot-knoepfe { justify-content: stretch; }
  /* .knopf ist inline-flex: text-align greift nicht, die Mitte macht justify-content (offen seit 09.10.) */
  .demo-angebot-knoepfe .knopf { flex: 1; justify-content: center; text-align: center; padding: .55rem .6rem; font-size: .9rem; white-space: nowrap; }
  .demo-ende-innen { padding: .8rem .2rem .4rem; }
  .demo-ende-raster { grid-template-columns: minmax(0, 1fr); gap: .8rem; }
  .demo-ende-teilen img { width: 132px; height: 132px; }
  .demo-hero-knoepfe { gap: .7rem; }
  .demo-gross { width: 100%; justify-content: center; }
}
@media (max-width: 380px) {
  .demo-weiter { padding: .3rem .7rem; }
  .demo-regie-heim { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .demo-ziel, .ec-senden.demo-bereit, .demo-neu, .ec-anhang img, .demo-tonmarke.demo-spricht::after { animation: none; }
}
