/* Die Werkzeugkiste – Folien im Design der EWCC-Vorlage (2026_PPT_EWCC.pptx)
   Rot #F52D28, Beige #F8F3EF, Avenir Next (auf dem Mac vorhanden, läuft offline).
   Keine externen Schriften, keine CDNs. */

:root {
  --rot: #F52D28;
  --rot-dunkel: #C9201C;
  --rot-hell: #FDE4E3;
  --beige: #F8F3EF;
  --ink: #1D1D1B;
  --muted: #6B6B68;
  --line: #E2DCD6;
  --card: #FFFFFF;
  --gelaende: #E6DED7;   /* Boden zwischen den Räumen */
  --wand: #CFC4BA;       /* Wände der Räume */

  /* Namen, die Live- und Druckteil weiter benutzen */
  --paper: var(--beige);
  --primary: var(--rot);
  --primary-soft: var(--beige);
  --accent: var(--rot);
  --accent-soft: var(--rot-hell);
  --warn: var(--rot-dunkel);
  --warn-soft: var(--rot-hell);
  --ok: #2F6B3A;
  --ok-soft: #E3EFE4;

  --font: "Avenir Next", "Avenir", "Helvetica Neue", Arial, sans-serif;
  --mono: "SF Mono", ui-monospace, Menlo, monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: #111;
  color: var(--ink);
  font-family: var(--font);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Bühne ---------- */

/* ---------- Bühne und Welt (Gelände der Muster GmbH, 7200×4600) ---------- */

#stage { position: fixed; inset: 0; overflow: hidden; background: var(--gelaende); }

#world {
  position: absolute;
  left: 0;
  top: 0;
  width: 7200px;
  height: 4600px;
  transform-origin: 0 0;
  transition: transform 900ms cubic-bezier(.45, .05, .25, 1);
}
#world.fast { transition-duration: 550ms; }

#ground {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 1px 1px, rgba(29,29,27,.10) 1.5px, transparent 0) 0 0 / 60px 60px,
    var(--gelaende);
}

#route { position: absolute; inset: 0; pointer-events: none; overflow: visible; }

/* Titelband oben links im Gelände */
#banner {
  position: absolute;
  left: 200px;
  top: 110px;
  width: 4200px;
  height: 500px;
  display: flex;
  align-items: center;
  gap: 80px;
}
#banner .mark { width: 300px; height: auto; flex: none; }
#banner .b-ober {
  font-size: 46px;
  font-weight: 600;
  letter-spacing: 10px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 18px;
}
#banner h1 {
  font-size: 190px;
  line-height: 1;
  margin: 0;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -4px;
  color: var(--rot);
}
#banner p { font-size: 62px; margin: 28px 0 0; color: var(--ink); }

/* ---------- Räume (Stationen) ---------- */

.station {
  position: absolute;
  border: 10px solid var(--wand);
  background: var(--beige);
  cursor: zoom-in;
}
.station[data-plain] { border: 0; background: none; cursor: default; }

/* Türöffnung */
.station:not([data-plain])::after {
  content: "";
  position: absolute;
  width: 220px;
  height: 20px;
  background: var(--gelaende);
  left: calc(50% - 110px);
  bottom: -15px;
}

.room-label {
  position: absolute;
  left: 60px;
  top: 50px;
  right: 60px;
  height: 120px;
  display: flex;
  align-items: center;
  gap: 36px;
}
.room-label .num {
  width: 120px;
  height: 120px;
  background: var(--rot);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 70px;
  font-weight: 800;
  flex: none;
}
.room-label .name {
  font-size: 72px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -1px;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.room-label .plan { margin-left: auto; font-size: 48px; font-weight: 600; color: var(--muted); flex: none; }

/* ---------- Folie (Grundform: weiße Inhaltsfolie wie EWCC-Folie 5/6) ---------- */

.frame {
  position: absolute;
  left: 0;
  top: 0;
  width: 1600px;
  height: 900px;
  background: #fff;
  padding: 92px 120px 64px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform-origin: 0 0;
  box-shadow: 0 2px 0 rgba(0,0,0,.04), 0 18px 40px rgba(29,29,27,.14);
  cursor: pointer;
}
.frame.active { cursor: default; }

.frame > .logo {
  position: absolute;
  top: 26px;
  right: 34px;
  width: 92px;
  height: auto;
}

.frame .kicker {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 14px;
}

.frame h2 {
  font-size: 54px;
  line-height: 1.05;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -1px;
  color: var(--rot);
  margin: 0 220px 40px 0;
}

.frame p, .frame li { font-size: 34px; line-height: 1.4; }
.frame p { margin: 0 0 22px; }
.frame ul, .frame ol { margin: 0; padding-left: 1.1em; }
.frame li { margin: 0 0 12px; }
.frame li::marker { color: var(--rot); }
.frame .muted { color: var(--muted); }
.frame em { font-style: italic; }

.frame .legal {
  margin-top: auto;
  padding-top: 18px;
  font-size: 21px;
  color: var(--muted);
}

aside.notes { display: none; }

/* ---------- Titelfolie (EWCC-Folie 1) ---------- */

.frame.titel {
  background: url(ewcc/foto1.jpg) center / cover;
  padding: 0;
  align-items: center;
  justify-content: center;
}
.t-box {
  width: 1000px;
  background: var(--rot);
  color: #fff;
  padding: 44px 70px 50px;
  text-align: center;
}
.t-ober { font-size: 22px; letter-spacing: 4px; text-transform: uppercase; margin-bottom: 30px; }
.t-inner { background: #fff; padding: 46px 40px 40px; }
.t-inner h1 {
  margin: 0 0 16px;
  font-size: 76px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -1.5px;
  color: var(--rot);
  line-height: 1;
}
.t-inner p { margin: 0; color: var(--ink); font-size: 32px; }
.t-unter { margin-top: 30px; font-size: 28px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; }

/* ---------- Inhaltsverzeichnis (EWCC-Folie 2) ---------- */

.frame.agenda {
  background: url(ewcc/foto3.jpg) right center / cover;
  padding: 50px 0 50px 0;
}
.a-panel {
  width: 980px;
  height: 100%;
  background: var(--beige);
  padding: 70px 80px;
}
.a-panel h2 { margin-right: 0; font-size: 64px; }
.a-panel ol { padding-left: 1.4em; }
.a-panel li { font-size: 40px; font-weight: 700; color: var(--rot); margin-bottom: 18px; }
.a-panel li::marker { font-weight: 800; }
.a-fall { margin-top: 40px !important; font-size: 28px !important; color: var(--muted); }

/* ---------- Kapitelfolie (EWCC-Folie 3) ---------- */

.frame.kapitel {
  background: var(--foto) center / cover;
  padding: 0;
  align-items: center;
  justify-content: center;
}
.k-box {
  width: 900px;
  background: var(--rot);
  color: #fff;
  text-align: center;
  padding: 50px 60px 56px;
}
.k-ober { font-size: 20px; letter-spacing: 4px; text-transform: uppercase; margin-bottom: 34px; }
.frame.kapitel h2 {
  color: #fff;
  margin: 0 0 30px;
  font-size: 76px;
  letter-spacing: -1.5px;
}
.k-unter { font-size: 28px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; }

/* ---------- Paragrafenfolie (EWCC-Folie 5: großes Anführungszeichen) ---------- */

.frame.paragraf::after {
  content: "";
  position: absolute;
  right: 110px;
  bottom: 70px;
  width: 150px;
  height: 116px;
  background: url(ewcc/zitat.svg) center / contain no-repeat;
  opacity: .9;
}
.frame.paragraf .legal { padding-right: 260px; }

/* ---------- Übungsfall (EWCC-Folie 6: beiges Feld) ---------- */

.frame.uebungsfall .kicker { color: var(--rot); font-weight: 800; letter-spacing: 2px; }
.frame.uebungsfall .facts,
.frame.uebungsfall .ue-feld {
  background: var(--beige);
  padding: 40px 48px;
}

/* ---------- Kernaussage (EWCC-Folie 8: rot mit weißem Rahmen) ---------- */

.frame.statement {
  background: var(--rot);
  color: #fff;
  justify-content: center;
  padding: 90px 160px;
}
.frame.statement h2 {
  color: #fff;
  font-size: 80px;
  margin: 0 0 36px;
  letter-spacing: -2px;
}
.frame.statement p { color: #fff; font-size: 38px; }
.frame.statement .kicker { color: rgba(255,255,255,.85); }
.frame.statement .muted { color: rgba(255,255,255,.85); }
.frame.statement > .logo { background: #fff; padding: 6px; }

/* ---------- Pause ---------- */

.frame.pause { background: var(--beige); }

/* ---------- Kontakt (EWCC-Folie 7) ---------- */

.frame.kontakt { padding: 0; display: block; }
.c-head {
  position: absolute;
  left: 0;
  top: 150px;
  width: 940px;
  background: var(--beige);
  padding: 44px 60px 44px 120px;
}
.frame.kontakt h2 { margin: 0 0 8px; font-size: 70px; }
.c-sub { font-size: 32px; font-weight: 800; text-transform: uppercase; color: var(--rot); }
.c-daten {
  position: absolute;
  left: 120px;
  top: 480px;
  width: 820px;
  font-size: 30px;
  line-height: 1.5;
  color: var(--rot);
}
.c-daten b { display: block; font-size: 32px; }
.c-daten .offen { color: var(--muted); }
.c-bild {
  position: absolute;
  right: 180px;
  top: 60px;
  width: 400px;
  height: 780px;
  border-top: 24px solid var(--rot);
  overflow: hidden;
}
.c-bild img { width: 100%; height: 100%; object-fit: cover; display: block; }

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

.cols {
  display: grid;
  grid-template-columns: repeat(var(--n, 3), 1fr);
  gap: 32px;
  flex: 1;
  min-height: 0;
}
.col { padding: 34px 34px 26px; background: var(--beige); }
.col h3 { font-size: 36px; margin: 0 0 16px; font-weight: 800; }
.col p, .col li { font-size: 29px; }
.col.bad  { background: var(--rot-hell); }
.col.mid  { background: var(--beige); }
.col.good { background: var(--ok-soft); }
.col .tag {
  display: inline-block;
  font-size: 21px;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 12px;
  color: var(--rot);
}
.col.good .tag { color: var(--ok); }

.flow { display: flex; align-items: stretch; margin: 6px 0 36px; }
.flow .step {
  flex: 1;
  min-width: 0;
  background: var(--beige);
  padding: 26px 18px;
  font-size: 26px;
  line-height: 1.3;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.flow .step b { display: block; font-size: 30px; font-weight: 800; color: var(--rot); margin-bottom: 6px; }
.flow .step.human { background: var(--rot); color: #fff; }
.flow .step.human b { color: #fff; }
.flow .arrow { width: 52px; flex: none; display: grid; place-items: center; color: var(--rot); font-size: 44px; font-weight: 800; }

.callout { background: var(--beige); padding: 24px 34px; font-size: 31px; line-height: 1.4; font-weight: 600; }
.callout.warn { background: var(--rot); color: #fff; }
.callout.ok { background: var(--beige); }

.facts { display: grid; grid-template-columns: 280px 1fr; gap: 16px 36px; font-size: 34px; line-height: 1.3; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; font-weight: 700; }

.checklist { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 40px; }
.checklist div { display: flex; gap: 22px; font-size: 29px; line-height: 1.3; align-items: baseline; }
.checklist b {
  flex: none; width: 88px; height: 54px; background: var(--rot); color: #fff;
  display: grid; place-items: center; font-size: 26px; font-weight: 800;
}

.vote { display: grid; grid-template-columns: 330px 1fr; gap: 64px; align-items: center; flex: 1; }
.qr {
  width: 330px; height: 330px; border: 5px dashed var(--line);
  display: grid; place-items: center; text-align: center; font-size: 24px; color: var(--muted); padding: 24px;
}
.bars { display: grid; gap: 26px; }
.bar { display: grid; grid-template-columns: 330px 1fr 120px; align-items: center; gap: 24px; font-size: 34px; font-weight: 600; }
.bar .track { height: 60px; background: var(--beige); overflow: hidden; }
.bar .fill { height: 100%; width: 0; background: var(--rot); transition: width 600ms ease; }
.bar .val { text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); }
.vote-hint { font-size: 24px; color: var(--muted); margin-top: 18px; }

.countdown {
  font-size: 250px; font-weight: 800; letter-spacing: -6px; font-variant-numeric: tabular-nums;
  line-height: 1; color: var(--rot); cursor: pointer; user-select: none;
}
.countdown.paused { opacity: .45; }
.countdown.done { color: var(--ink); }

.paras { display: grid; gap: 22px; padding-right: 220px; }
.paras div { display: grid; grid-template-columns: 280px 1fr; gap: 32px; font-size: 32px; line-height: 1.3; align-items: baseline; }
.paras b { color: var(--rot); font-size: 32px; font-weight: 800; }

.steps { counter-reset: s; display: grid; gap: 22px; }
.steps > div {
  counter-increment: s; position: relative; padding-left: 96px; min-height: 62px;
  font-size: 33px; line-height: 1.32; padding-top: 6px;
}
.steps.compact { gap: 14px; }
.steps.compact > div { font-size: 30px; padding-top: 10px; }
.steps > div::before {
  content: counter(s); position: absolute; left: 0; top: 0; width: 62px; height: 62px;
  background: var(--rot); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 30px;
}

.offline {
  display: inline-flex; align-items: center; gap: 16px; background: var(--ink); color: #fff;
  padding: 12px 28px; font-size: 26px; font-weight: 700; align-self: flex-start; text-transform: uppercase; letter-spacing: 1px;
}

/* ---------- Bedienelemente ---------- */

#hud {
  position: fixed; right: 22px; bottom: 16px; font-size: 14px; color: #999;
  opacity: 0; transition: opacity .3s; font-variant-numeric: tabular-nums; pointer-events: none;
}
body:hover #hud { opacity: .7; }
#blackout { position: fixed; inset: 0; background: #000; display: none; z-index: 10; }
body.black #blackout { display: block; }
#help {
  position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); background: #fff;
  box-shadow: 0 20px 60px rgba(0,0,0,.35); padding: 28px 36px; font-size: 16px; line-height: 1.8; display: none; z-index: 11;
}
body.help #help { display: block; }
#help kbd { font-family: var(--mono); background: var(--beige); border: 1px solid var(--line); padding: 1px 8px; }

/* ---------- Referentenansicht ---------- */

body.presenter { overflow: auto; background: var(--beige); }
body.presenter #stage, body.presenter #hud { display: none; }
#presenter { display: none; }
body.presenter #presenter { display: grid; grid-template-columns: 1fr 360px; gap: 24px; padding: 28px; }
#presenter .now-label, #presenter .next-label {
  font-size: 13px; letter-spacing: 2px; text-transform: uppercase; color: var(--muted); margin-bottom: 6px;
}
#presenter .now-title { font-size: 34px; font-weight: 800; margin-bottom: 20px; color: var(--rot); }
#presenter .notes-box { background: #fff; padding: 22px 26px; font-size: 22px; line-height: 1.5; }
#presenter .notes-box p { margin: 0 0 12px; }
#presenter .notes-box li { margin-bottom: 6px; }
#presenter .side { display: grid; gap: 18px; align-content: start; }
#presenter .panel { background: #fff; padding: 18px 20px; }
#presenter .clock, #presenter .elapsed { font-size: 44px; font-weight: 800; font-variant-numeric: tabular-nums; }
#presenter .delta { font-size: 18px; margin-top: 4px; }
#presenter .delta.late { color: var(--rot); }
#presenter .delta.early { color: var(--ok); }
#presenter button {
  font: inherit; font-size: 16px; border: 1px solid var(--line); background: var(--beige); padding: 8px 14px; cursor: pointer;
}
#presenter .next-title { font-size: 20px; font-weight: 700; }
#presenter .navrow { display: flex; gap: 10px; }

/* ---------- Live-Server ---------- */

.qr.ready {
  border: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.qr img { width: 100%; height: auto; display: block; image-rendering: pixelated; }
.qr .url { font-size: 24px; font-weight: 700; color: var(--ink); word-break: break-all; }

.tile p {
  font-size: 22px;
  line-height: 1.35;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  white-space: pre-line;
}
.tile.filled { background: var(--ok-soft); cursor: zoom-in; }

#reader {
  position: fixed;
  inset: 0;
  background: rgba(28, 34, 48, .55);
  display: none;
  place-items: center;
  z-index: 9;
}
#reader.open { display: grid; }
#reader .reader-box {
  background: var(--card);
  border-radius: 18px;
  width: min(1100px, 92vw);
  max-height: 86vh;
  overflow: auto;
  padding: 36px 48px;
}
#reader h3 { margin: 0 0 16px; font-size: 28px; color: var(--primary); }
#reader .reader-text { font-size: 22px; line-height: 1.5; white-space: pre-wrap; }

#livedot {
  position: fixed;
  left: 14px;
  bottom: 14px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  z-index: 8;
  opacity: 0;
}
#livedot.on { background: var(--ok); opacity: .35; }
#livedot.off { background: var(--warn); opacity: 1; }
#livedot.nokey { background: var(--accent); opacity: 1; }
body.presenter #livedot { left: auto; right: 14px; }

#livepanel { display: none; }
body.presenter #livepanel {
  display: grid;
  gap: 16px;
  padding: 0 28px 28px;
}
.lp-stats { display: flex; gap: 28px; font-size: 18px; color: var(--muted); }
.lp-stats b { color: var(--ink); font-size: 24px; }
.lp-q { background: var(--card); border-radius: 14px; padding: 18px 20px; }
.lp-list { display: grid; gap: 8px; max-height: 40vh; overflow: auto; }
.lp-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  justify-content: space-between;
  font-size: 19px;
  line-height: 1.4;
  border-bottom: 1px solid var(--paper);
  padding-bottom: 8px;
}
.lp-item.done { color: var(--muted); text-decoration: line-through; }
.lp-item button, .lp-admin button, .lp-admin a {
  font: inherit;
  font-size: 15px;
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: 10px;
  padding: 6px 12px;
  cursor: pointer;
  color: var(--ink);
  text-decoration: none;
  flex: none;
}

/* ---------- Druckfassung (?druck) ---------- */

#druck { display: none; }
html:has(body.druck) { height: auto; overflow: visible; background: #fff; }
body.druck {
  overflow: visible;
  height: auto;
  background: #fff;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}
body.druck #stage, body.druck #hud, body.druck #livedot, body.druck #reader { display: none !important; }
body.druck #druck { display: block; width: 180mm; margin: 0 auto; }

@page { size: A4 portrait; margin: 14mm 15mm; }

.d-page { break-after: page; font-size: 10.5pt; line-height: 1.45; }
.d-page:last-child { break-after: auto; }
.d-head {
  display: flex;
  justify-content: space-between;
  font-size: 9pt;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  padding-bottom: 2mm;
  margin-bottom: 4mm;
}
.d-card {
  width: 180mm;
  aspect-ratio: 16 / 9;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 3mm;
}
.d-card .frame {
  position: absolute;
  left: 0;
  top: 0;
  transform: scale(var(--s, .425));
  transform-origin: 0 0;
  box-shadow: none;
  border-radius: 0;
}
.d-label {
  font-size: 8.5pt;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--primary);
  margin: 5mm 0 1.5mm;
}
.d-notes p, .d-notes ul { margin: 0 0 1.5mm; }
.d-notes ul { padding-left: 5mm; }
.d-space {
  border: 1px solid var(--line);
  border-radius: 2mm;
  min-height: 55mm;
  margin-top: 5mm;
  padding: 0 3mm;
}
.d-space .d-label { margin-top: 2mm; color: var(--muted); }

.d-cover h1 { font-size: 22pt; margin: 0 0 2mm; letter-spacing: -.3px; }
.d-cover .d-sub { color: var(--muted); margin: 0 0 6mm; }
.d-cover h2 { font-size: 12.5pt; margin: 6mm 0 2mm; }
.d-cover ol { padding-left: 6mm; margin: 0; }
.d-cover li { margin-bottom: 2.2mm; }
.d-cover .d-box {
  background: var(--paper);
  border-radius: 2mm;
  padding: 3mm 4mm;
  margin: 3mm 0;
}
.d-cover blockquote {
  margin: 2mm 0 4mm;
  padding: 2mm 4mm;
  border-left: 3px solid var(--primary);
  background: var(--paper);
}

body.ohne-notizen .d-mit-notizen { display: none; }
body.ohne-notizen .d-space { min-height: 120mm; }
body.ohne-fragen .d-fragen { display: none; }

/* ?druck=folien: eine Folie pro Seite, 16:9 */
@page folie { size: 297mm 167.0625mm; margin: 0; }
body.folien .d-page { height: 167mm; overflow: hidden; }
body.folien #druck { width: 297mm; }
body.folien .d-page { page: folie; }
body.folien .d-card { width: 297mm; height: 167mm; aspect-ratio: auto; border: 0; border-radius: 0; }
/* Im Druck zerteilt Chrome sonst den unskalierten 900px-Rahmen über die Seitengrenze:
   zoom statt transform, damit auch das Layout klein wird */
body.folien .d-card .frame { transform: none; zoom: var(--s); break-inside: avoid; }
