/* Hülle (Phase 1d) — Gestaltung aus dem abgenommenen Entwurf
   planning/entwuerfe/huelle-1d.html. Ruhig, hell, gedecktes Petrol als Akzent;
   das Gespräch später dunkel wie ein Videocall. */

:root {
  --bg: #f6f5f2; --flaeche: #ffffff; --text: #1f2328; --leise: #5c6370;
  --linie: #e2e0da; --akzent: #2f5d62; --akzent-hell: #e4eeee;
  --gut: #2e7d4f; --gut-hell: #e3f1e8; --mittel: #a86b00; --mittel-hell: #fbf0dc;
  --rot: #c0392b; --rot-hell: #fdeaea;
  --radius: 10px;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text);
       font: 16px/1.55 system-ui, -apple-system, "Segoe UI", sans-serif; }
h1, h2, h3 { line-height: 1.25; }
button { font: inherit; cursor: pointer; }
[hidden] { display: none !important; }
.leise { color: var(--leise); }
.klein { font-size: .85rem; }

.ansicht { display: none; }
.ansicht.aktiv { display: block; }
.seite { max-width: 820px; margin: 0 auto; padding: 1.5rem 16px 4rem; }
.kopf { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 1.2rem; }
.kopf.rechts { justify-content: flex-end; }
/* Sprachwahl (2026-10-16): Deutsch ist aktiv, Englisch folgt — der Link
   erklärt das in einem kurzen Hinweis. */
.sprache { display: flex; gap: .35rem; align-items: baseline; font-size: .9rem; }
.sprache-wahl { border: 0; background: none; padding: 0; font: inherit; color: var(--akzent);
                text-decoration: underline; cursor: pointer; }
.sprache-wahl[aria-current="true"] { font-weight: 700; text-decoration: none; cursor: default; }
.karte { background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius);
         padding: 1.1rem 1.25rem; margin-bottom: 1rem; }
.karte h2 { font-size: 1.05rem; margin: 0 0 .6rem; }
.schritt { display: inline-block; font-size: .75rem; font-weight: 600; color: var(--akzent);
           background: var(--akzent-hell); border-radius: 99px; padding: .05rem .55rem; margin-right: .4rem; }
.knopf { border: 0; border-radius: 8px; padding: .65rem 1.3rem; background: var(--akzent); color: #fff; font-weight: 600; }
.knopf:disabled { opacity: .4; cursor: not-allowed; }
.knopf.zweit { background: transparent; color: var(--akzent); border: 1px solid var(--akzent); }
.fehler { color: var(--rot); background: var(--rot-hell); border-radius: 8px; padding: .5rem .8rem; }

/* ── Start ───────────────────────────────────── */
.auswahl { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.auswahl label { font-size: .85rem; color: var(--leise); display: block; margin-bottom: .2rem; }
.anrede { margin-top: 1.6rem; }
.anrede label { font-size: .85rem; color: var(--leise); display: block; margin-bottom: .2rem; }
.anrede input { width: 100%; max-width: 320px; font: inherit; padding: .5rem; border: 1px solid var(--linie); border-radius: 8px; }
.anrede p { margin: .3rem 0 0; }
.anrede p.fehler { color: var(--rot); }
select { width: 100%; font: inherit; padding: .5rem; border: 1px solid var(--linie); border-radius: 8px; background: #fff; }
details { border-top: 1px solid var(--linie); padding: .55rem 0; }
details:first-of-type { border-top: 0; }
summary { cursor: pointer; font-weight: 600; }
details > div { padding-top: .4rem; }
details table { border-collapse: collapse; font-size: .92rem; }
details td, details th { border-bottom: 1px solid var(--linie); padding: .3rem .5rem; text-align: left; }
/* ── Briefing ────────────────────────────────── */
.briefing table { border-collapse: collapse; font-size: .92rem; }
.briefing td, .briefing th { border-bottom: 1px solid var(--linie); padding: .3rem .5rem; text-align: left; }
.los { margin-top: 1.6rem; text-align: right; }
.los-satz { font-size: 1.1rem; font-weight: 600; margin: 0 0 .7rem; }
.los .aktionen { justify-content: flex-end; }
.geraete { display: grid; grid-template-columns: 1fr 200px; gap: 1rem; align-items: start; }
.pegel { height: 8px; background: var(--linie); border-radius: 99px; overflow: hidden; margin: .3rem 0 .6rem; }
.pegel span { display: block; height: 100%; width: 0; background: var(--gut); transition: width .08s linear; }
.okliste { list-style: none; padding: 0; margin: 0; font-size: .92rem; }
.okliste li.ok::before { content: "✓ "; color: var(--gut); font-weight: 700; }
.okliste li.nein::before { content: "! "; color: var(--rot); font-weight: 700; }
.vorschau { width: 100%; aspect-ratio: 4/3; border-radius: 8px; background: linear-gradient(160deg, #3a4450, #20262d);
            object-fit: cover; display: block; }
.einwilligung { display: flex; gap: .6rem; align-items: flex-start; margin-top: .6rem; }
.einwilligung input { margin-top: .3rem; transform: scale(1.2); }
.entwurfshinweis { font-size: .78rem; color: var(--mittel); background: var(--mittel-hell); border-radius: 6px;
                   padding: .15rem .5rem; display: inline-block; margin-bottom: .5rem; }
.aktionen { display: flex; gap: .7rem; justify-content: flex-end; margin-top: .8rem; }

/* ── Gespräch (Videocall) ────────────────────── */
#gespraech { background: #15181c; color: #eee; }
.call { position: relative; height: 100dvh; min-height: 420px; display: flex; flex-direction: column; }
.buehne { position: relative; flex: 1; margin: 12px 12px 0; border-radius: 14px; overflow: hidden; background: #22272e; }
/* Grüner Rahmen, wenn das Gegenüber spricht — als eigene Ebene über dem
   Video: Als Schatten der Bühne verdeckte ihn das Bild oben und unten
   (2026-10-16). */
.buehne::after { content: ""; position: absolute; inset: 0; border-radius: inherit;
                 pointer-events: none; z-index: 2; }
.buehne.spricht::after { box-shadow: inset 0 0 0 3px #5fbf8f; }
/* contain statt cover (2026-10-11): Auf breiten Bildschirmen schnitt cover
   den Kopf oben ab. Jetzt ist immer das ganze Avatarbild zu sehen, notfalls
   mit dunklen Rändern wie in einem Videocall. */
.alex-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; display: none; }
.buehne.mit-bild .alex-video { display: block; }
.alex-ohne-bild { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center;
                  justify-content: center; gap: .6rem; background: #2a3038; }
.buehne.mit-bild .alex-ohne-bild { display: none; }
.initialen { width: 120px; height: 120px; border-radius: 50%; background: #4a6b6f; display: flex; align-items: center;
             justify-content: center; font-size: 2.6rem; font-weight: 600; color: #fff; overflow: hidden; }
/* Profilbild der gewählten Persona wie in Teams; fehlt es, steht dort die Initiale. */
.initialen img { width: 100%; height: 100%; object-fit: cover; }
/* „Kamera aus“ erst nach dem Avatar-Zeitfenster (1d.3b). Das schlechte Netz
   erwähnt das Gegenüber selbst — ein Hinweis im Bild war doppelt (2026-10-01). */
.kamera-aus-text { display: none; }
.buehne.kamera-aus .kamera-aus-text { display: block; }
.namensschild { position: absolute; left: 14px; bottom: 14px; background: #000000a0; padding: .2rem .6rem;
                border-radius: 6px; font-size: .85rem; }
.ich { position: absolute; top: 14px; right: 14px; width: 190px; aspect-ratio: 4/3; border-radius: 10px; overflow: hidden;
       background: #2a3038; border: 2px solid #ffffff30; }
.ich.spricht { border-color: #5fbf8f; }
.ich video { width: 100%; height: 100%; object-fit: cover; display: block; }
.ich.aus video { visibility: hidden; }
.ich .namensschild { left: 8px; bottom: 8px; font-size: .75rem; }
.ich .nur-du { position: absolute; top: 6px; right: 8px; font-size: .68rem; color: #ffffffb0; }
.transkript { position: absolute; top: 0; right: 0; bottom: 0; width: 320px; background: #1c2026f0; padding: 1rem;
              overflow: auto; font-size: .88rem; display: none; border-left: 1px solid #ffffff15; }
.transkript.offen { display: block; }
.transkript p { margin: 0 0 .6rem; }
.transkript .wer { font-weight: 600; color: #9fd3c7; }
.verbindung { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center;
              justify-content: center; background: #15181ce0; text-align: center; padding: 1rem; }
.leiste { display: flex; justify-content: center; align-items: center; gap: .7rem; padding: 14px; position: relative; }
.rund { width: 48px; height: 48px; border-radius: 50%; border: 0; background: #343a42; color: #fff; font-size: 1.15rem; }
.rund[aria-pressed="true"] { background: #5a2d2d; }
#mitschrift[aria-pressed="true"] { background: #2f5d62; }
.beenden { border: 0; border-radius: 24px; padding: 0 1.3rem; height: 48px; background: var(--rot); color: #fff; font-weight: 600; }
.beenden:disabled { opacity: .5; cursor: not-allowed; }
.dauer { position: absolute; left: 18px; font-variant-numeric: tabular-nums; color: #aab; font-size: .9rem; }

/* ── Nachbereitung ───────────────────────────── */
.fortschritt { list-style: none; padding: 0; margin: .2rem 0 0; }
.fortschritt li { padding: .25rem 0; }
.fortschritt .fertig::before { content: "✓  "; color: var(--gut); font-weight: 700; }
.fortschritt .laeuft::before { content: "◌  "; color: var(--akzent); display: inline-block; animation: dreh 1.2s linear infinite; }
.fortschritt .offen { color: var(--leise); }
.fortschritt .offen::before { content: "·  "; }
@keyframes dreh { to { transform: rotate(360deg); } }
textarea { width: 100%; font: inherit; min-height: 70px; padding: .5rem; border: 1px solid var(--linie); border-radius: 8px; resize: vertical; }
.frage { margin-bottom: .8rem; }
.frage label { font-weight: 600; display: block; margin-bottom: .25rem; }
.zielwahl { border-top: 1px solid var(--linie); padding: .6rem 0; }
.zielwahl p { margin: 0 0 .35rem; }
.segment { display: inline-flex; border: 1px solid var(--linie); border-radius: 8px; overflow: hidden; }
.segment label { padding: .3rem .8rem; font-size: .88rem; cursor: pointer; border-left: 1px solid var(--linie); }
.segment label:first-child { border-left: 0; }
.segment input { position: absolute; opacity: 0; pointer-events: none; }
.segment input:checked + span { font-weight: 700; color: var(--akzent); }
.segment input:focus-visible + span { outline: 2px solid var(--akzent); outline-offset: 2px; }
.fertig-banner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; background: var(--gut-hell);
                 border: 1px solid #b8dcc6; border-radius: var(--radius); padding: .8rem 1.1rem; margin-bottom: 1rem; }

/* ── Debrief ─────────────────────────────────── */
.werkzeuge { display: flex; gap: .6rem; justify-content: flex-end; margin-bottom: .8rem; }
.doc { background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius); padding: 1.6rem 2rem; }
.doc h1 { font-size: 1.3rem; margin: 1.6rem 0 .2rem; }
.doc h1:first-child { font-size: 1.45rem; margin-top: 0; }
.doc h2 { font-size: 1.12rem; margin: 1.8rem 0 .6rem; padding-top: .8rem; border-top: 1px solid var(--linie); }
.doc blockquote { margin: .6rem 0; padding: .5rem 1rem; border-left: 3px solid var(--akzent); background: #fafaf8; }
.doc table { border-collapse: collapse; width: 100%; font-size: .92rem; margin: .5rem 0; }
.doc td, .doc th { text-align: left; padding: .35rem .5rem; border-bottom: 1px solid var(--linie); vertical-align: top; }
.doc figure.verlauf { margin: .8rem 0; }
.doc figure.verlauf svg { max-width: 100%; height: auto; }
.selbst { float: right; width: 260px; margin: 0 0 1rem 1.2rem; background: var(--akzent-hell); border-radius: 8px;
          padding: .8rem 1rem; font-size: .9rem; }
.selbst h3 { font-size: .85rem; margin: 0 0 .4rem; color: var(--akzent); }
.selbst p { margin: 0 0 .4rem; }
.vergleich { clear: both; }
.chip { display: inline-block; border-radius: 99px; padding: .05rem .6rem; font-size: .82rem; white-space: nowrap; }
.chip.erreicht { background: var(--gut-hell); color: var(--gut); }
.chip.teilweise { background: var(--mittel-hell); color: var(--mittel); }
.chip.nicht { background: var(--rot-hell); color: var(--rot); }
.chip.kein_anlass { background: var(--bg); color: var(--leise); }

@media (max-width: 720px) {
  .auswahl, .geraete { grid-template-columns: 1fr; }
  .ich { width: 110px; }
  .transkript { width: 100%; }
  .doc { padding: 1.1rem; }
  .selbst { float: none; width: auto; margin: 0 0 1rem; }
}

/* Drucken: nur der Debrief, Teil 2 auf neuer Seite (E4). */
@media print {
  #start, #gespraech, #nachbereitung, .werkzeuge, #debrief-fehler { display: none !important; }
  body { background: #fff; }
  .seite { padding: 0; max-width: none; }
  .doc { border: 0; padding: 0; }
  .seitenumbruch { break-before: page; }
  .selbst, blockquote, figure.verlauf, tr { break-inside: avoid; }
}
