/* ==========================================================================
   Erste-Hilfe-Simulator – Stylesheet
   ========================================================================== */

:root {
  --bg: #f3f6f4;
  --surface: #ffffff;
  --surface-2: #eef2f0;
  --surface-3: #e3e9e6;
  --text: #16201b;
  --text-2: #3b4842;
  --muted: #5d6b64;
  --border: #dbe3df;
  --border-strong: #c3cec8;

  --brand: #0a7a4a;
  --brand-strong: #075c38;
  --brand-soft: #e2f3ea;
  --on-brand: #ffffff;

  --danger: #c4321f;
  --danger-soft: #fbe9e5;
  --warn: #9a5800;
  --warn-soft: #fdf0d9;
  --ok: #0a7a4a;
  --ok-soft: #e2f3ea;
  --info: #1f5fbf;
  --info-soft: #e6eefb;
  --neutral-soft: #eceff0;

  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(16, 28, 22, .05), 0 6px 20px rgba(16, 28, 22, .06);
  --shadow-lg: 0 10px 40px rgba(10, 20, 15, .18);
  --focus: 0 0 0 3px rgba(10, 122, 74, .35);

  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e1411;
    --surface: #161e1a;
    --surface-2: #1c2622;
    --surface-3: #24302b;
    --text: #e6eee9;
    --text-2: #c3d0c9;
    --muted: #93a39b;
    --border: #2a3631;
    --border-strong: #3a4842;
    --brand: #34b27b;
    --brand-strong: #5fcb98;
    --brand-soft: #16332a;
    --on-brand: #06140d;
    --danger: #ff7a62;
    --danger-soft: #3b1a14;
    --warn: #f2b04f;
    --warn-soft: #3a2a12;
    --ok: #34b27b;
    --ok-soft: #16332a;
    --info: #78aaff;
    --info-soft: #172842;
    --neutral-soft: #222b28;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 20px rgba(0, 0, 0, .25);
    --focus: 0 0 0 3px rgba(52, 178, 123, .45);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #0a0d0c;
  --surface: #131917;
  --surface-2: #1a221f;
  --surface-3: #24302b;
  --text: #e6eee9;
  --text-2: #c3d0c9;
  --muted: #93a39b;
  --border: #25302b;
  --border-strong: #3a4842;
  --brand: #34b27b;
  --brand-strong: #5fcb98;
  --brand-soft: #16332a;
  --on-brand: #06140d;
  --danger: #ff7a62;
  --danger-soft: #3b1a14;
  --warn: #f2b04f;
  --warn-soft: #3a2a12;
  --ok: #34b27b;
  --ok-soft: #16332a;
  --info: #78aaff;
  --info-soft: #172842;
  --neutral-soft: #222b28;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 20px rgba(0, 0, 0, .25);
  --focus: 0 0 0 3px rgba(52, 178, 123, .45);
  color-scheme: dark;
}

/* ---------- Basis ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 .8em; }
a { color: var(--brand); }
img, svg { max-width: 100%; }
button { font: inherit; color: inherit; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--brand); color: var(--on-brand); padding: 8px 12px; border-radius: 8px; z-index: 100; }
.skip-link:focus { left: 8px; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.hidden { display: none !important; }

.container { width: 100%; max-width: 1220px; margin: 0 auto; padding: 0 16px; }
main.container { padding-top: 24px; padding-bottom: 48px; min-height: 70vh; outline: none; }

.icon { width: 1.15em; height: 1.15em; flex: none; vertical-align: -0.2em; }

/* ---------- Kopfzeile ---------- */
.topbar {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--border);
}
.topbar-inner { display: flex; align-items: center; gap: 16px; min-height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); font-weight: 600; white-space: nowrap; }
.brand-mark { width: 32px; height: 32px; flex: none; }
.brand-text b { color: var(--brand); font-weight: 700; }
.topbar-tools { display: flex; gap: 4px; margin-left: auto; }
.icon-btn {
  width: 38px; height: 38px; display: inline-grid; place-items: center;
  border-radius: 10px; border: 1px solid transparent; background: transparent; cursor: pointer; color: var(--text-2);
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }


/* ---------- Fußzeile ---------- */
.footer { border-top: 1px solid var(--border); background: var(--surface); color: var(--muted); font-size: .88rem; }
.footer-inner { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; justify-content: space-between; padding: 20px 16px; }
.footer p { margin: 0; max-width: 760px; }
.footer .link-btn { background: none; border: none; color: var(--muted); text-decoration: underline; cursor: pointer; padding: 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px; border-radius: 10px; border: 1px solid transparent;
  background: var(--brand); color: var(--on-brand); font-weight: 600; font-size: .96rem;
  text-decoration: none; cursor: pointer; transition: background .15s, transform .05s, border-color .15s;
  white-space: nowrap;
}
.btn:hover { background: var(--brand-strong); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--border-strong); }
.btn-secondary:hover { background: var(--surface-2); }
.btn-ghost { background: transparent; color: var(--text-2); border-color: transparent; padding: 8px 12px; }
.btn-ghost:hover { background: var(--surface-2); color: var(--text); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: color-mix(in srgb, var(--danger) 85%, #000); }
.btn-lg { padding: 13px 22px; font-size: 1.02rem; border-radius: 12px; }
.btn-sm { padding: 6px 12px; font-size: .88rem; border-radius: 8px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; }

/* ---------- Karten & Tags ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.card + .card { margin-top: 16px; }
.card-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.card-title h2, .card-title h3 { margin: 0; }
.tag {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px;
  background: var(--brand-soft); color: var(--brand-strong); font-size: .78rem; font-weight: 600; letter-spacing: .01em;
}
.tag.neutral { background: var(--neutral-soft); color: var(--text-2); }
.tag.danger { background: var(--danger-soft); color: var(--danger); }
.tag.info { background: var(--info-soft); color: var(--info); }
.tag.warn { background: var(--warn-soft); color: var(--warn); }
.level { display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; color: var(--muted); }
.level-dots { display: inline-flex; gap: 3px; }
.level-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--border-strong); }
.level-dots i.on { background: var(--brand); }
.stars { display: inline-flex; gap: 2px; vertical-align: middle; }
.star { width: 18px; height: 18px; fill: var(--border-strong); }
.star.on { fill: #e9a400; }
.stars.lg .star { width: 34px; height: 34px; }

.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 24px; margin-bottom: 20px; }
.page-head p { margin: 0; color: var(--muted); max-width: 680px; }
.page-head h1 { margin-bottom: 6px; }
.back-link { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); text-decoration: none; font-size: .92rem; margin-bottom: 10px; }
.back-link:hover { color: var(--text); }

.section-title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 8px 0 14px; }
.section-title h2 { margin: 0; }

.notice {
  display: flex; gap: 12px; align-items: flex-start; margin-top: 32px; padding: 16px 18px;
  border-radius: var(--radius); background: var(--danger-soft); color: var(--text); border: 1px solid color-mix(in srgb, var(--danger) 25%, transparent);
}
.notice .icon { color: var(--danger); width: 22px; height: 22px; margin-top: 2px; }
.notice p { margin: 0; }
.badge-112 { display: inline-block; background: var(--danger); color: #fff; font-weight: 800; padding: 0 8px; border-radius: 6px; letter-spacing: .02em; }

/* ---------- Szenario-Liste ---------- */
.sc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.sc-card[hidden] { display: none; }
.s3d-filter { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }
.s3d-filter button { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--text-2); font: inherit; font-size: .92rem; cursor: pointer; transition: background .15s, border-color .15s, color .15s; }
.s3d-filter button:hover { border-color: var(--border-strong); color: var(--text); }
.s3d-filter button:focus-visible { outline: none; box-shadow: var(--focus); }
.s3d-filter button .n { font-size: .78rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.s3d-filter button.on { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.s3d-filter button.on .n { color: var(--on-brand); opacity: .8; }
.sc-card { position: relative; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: border-color .15s, box-shadow .15s; }
.sc-card:hover { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand), var(--shadow); }
/* Die ganze Karte ist anklickbar (Start-Knopf deckt sie unsichtbar ab) */
.sc-card .sc-foot .btn::after { content: ""; position: absolute; inset: 0; }
.sc-card .sc-foot .btn:active { transform: none; }
.sc-thumb { aspect-ratio: 480 / 220; overflow: hidden; background: var(--surface-2); border-bottom: 1px solid var(--border); }
.sc-thumb svg { display: block; width: 100%; height: 100%; }
.sc-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.sc-body h3 { margin: 0; font-size: 1.08rem; }
.sc-body p { margin: 0; color: var(--muted); font-size: .93rem; flex: 1; }
.sc-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.sc-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 6px; }
.sc-best { font-size: .82rem; color: var(--muted); display: flex; align-items: center; gap: 6px; }

/* ---------- Szenario-Ablauf ---------- */
.run-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.run-title { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.run-title h1 { font-size: clamp(1.3rem, 2.6vw, 1.7rem); margin: 0; }
.run-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.clock {
  display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-variant-numeric: tabular-nums;
  background: var(--surface); border: 1px solid var(--border); padding: 6px 12px; border-radius: 999px; font-size: .95rem; font-weight: 600;
}
.clock.live { border-color: var(--danger); color: var(--danger); }
.clock.live::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--danger); animation: blink 1s infinite; }
@keyframes blink { 50% { opacity: .2; } }

.run-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 16px; align-items: start; }
@media (max-width: 960px) { .run-grid { grid-template-columns: 1fr; } }
.run-grid .card + .card { margin-top: 16px; }

.scene-card { padding: 0; overflow: hidden; }
.scene-wrap { background: var(--surface-2); }
.scene-wrap svg { display: block; width: 100%; height: auto; }
.scene-caption { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 16px; font-size: .88rem; color: var(--muted); border-top: 1px solid var(--border); flex-wrap: wrap; }
.scene-caption b { color: var(--text); font-weight: 600; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .scene-svg { filter: brightness(.9) saturate(.95); } }
:root[data-theme="dark"] .scene-svg { filter: brightness(.9) saturate(.95); }

.status-card { padding: 16px; }
.vitals { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.chip {
  display: inline-flex; align-items: baseline; gap: 6px; padding: 6px 10px; border-radius: 10px;
  background: var(--neutral-soft); font-size: .86rem; border: 1px solid transparent;
}
.chip .k { color: var(--muted); font-weight: 500; }
.chip .v { font-weight: 650; color: var(--text); }
.chip.ok { background: var(--ok-soft); }
.chip.ok .v { color: var(--ok); }
.chip.warn { background: var(--warn-soft); }
.chip.warn .v { color: var(--warn); }
.chip.bad { background: var(--danger-soft); }
.chip.bad .v { color: var(--danger); }
.chip.changed { animation: chipflash .9s ease-out; }
@keyframes chipflash { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--brand) 55%, transparent); } 100% { box-shadow: 0 0 0 10px transparent; } }

.meter-label { display: flex; justify-content: space-between; font-size: .86rem; color: var(--muted); margin-bottom: 6px; }
.meter-label b { color: var(--text); font-variant-numeric: tabular-nums; }
.meter-bar { height: 10px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.meter-fill { height: 100%; border-radius: 999px; background: var(--ok); transition: width .5s ease, background .3s; }
.meter-fill.warn { background: #d98a00; }
.meter-fill.bad { background: var(--danger); }

.feedback-card { padding: 0; overflow: hidden; }
.feedback-empty { padding: 18px; color: var(--muted); font-size: .94rem; }
.fb-entry { padding: 14px 18px; border-left: 4px solid var(--border-strong); }
.fb-entry + .fb-entry { border-top: 1px solid var(--border); }
.fb-head { display: flex; align-items: center; gap: 8px; font-weight: 650; margin-bottom: 4px; }
.fb-head .verdict { margin-left: auto; font-size: .76rem; font-weight: 650; padding: 2px 8px; border-radius: 999px; background: var(--neutral-soft); color: var(--text-2); white-space: nowrap; }
.fb-result { margin: 0; color: var(--text); }
.fb-why { margin: 8px 0 0; font-size: .92rem; color: var(--text-2); display: flex; gap: 8px; }
.fb-why .icon { color: var(--brand); margin-top: 2px; }
.fb-entry.ok { border-left-color: var(--ok); }
.fb-entry.ok .verdict { background: var(--ok-soft); color: var(--ok); }
.fb-entry.early { border-left-color: #d98a00; }
.fb-entry.early .verdict { background: var(--warn-soft); color: var(--warn); }
.fb-entry.harmful { border-left-color: var(--danger); background: color-mix(in srgb, var(--danger-soft) 55%, transparent); }
.fb-entry.harmful .verdict { background: var(--danger-soft); color: var(--danger); }
.fb-entry.harmful .fb-why .icon { color: var(--danger); }
.fb-entry.useless .verdict, .fb-entry.repeat .verdict { background: var(--neutral-soft); }
.fb-entry.blocked { border-left-color: var(--info); }
.fb-entry.blocked .verdict { background: var(--info-soft); color: var(--info); }
.fb-entry.event { border-left-color: var(--info); background: color-mix(in srgb, var(--info-soft) 60%, transparent); }
.fb-entry.event .verdict { background: var(--info-soft); color: var(--info); }
.fb-entry.info { border-left-color: var(--brand); }
.fb-entry.neutral { border-left-color: var(--border-strong); }

.toolbox-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.toolbox-head h2 { margin: 0; }
.hint-box { background: var(--warn-soft); border-radius: var(--radius-sm); padding: 12px 14px; margin-bottom: 14px; font-size: .93rem; display: flex; gap: 10px; align-items: flex-start; }
.hint-box .icon { color: var(--warn); margin-top: 2px; }
.hint-box p { margin: 0 0 6px; }
.hint-box .link-btn { background: none; border: none; padding: 0; color: var(--warn); font-weight: 600; text-decoration: underline; cursor: pointer; font-size: .9rem; }
.tb-group + .tb-group { margin-top: 14px; }
.tb-label { font-size: .74rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; margin-bottom: 8px; }
.tb-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.act {
  position: relative; text-align: left; padding: 9px 13px; border-radius: 10px; cursor: pointer;
  background: var(--surface); border: 1px solid var(--border-strong); font-size: .92rem; line-height: 1.3; font-weight: 500;
  transition: border-color .12s, background .12s, transform .05s;
}
.act:hover { border-color: var(--brand); background: var(--brand-soft); }
.act:active { transform: translateY(1px); }
.act[disabled] { opacity: .5; cursor: not-allowed; }
.act.done { background: var(--ok-soft); border-color: transparent; color: var(--text-2); padding-left: 30px; }
.act.done::before { content: ""; position: absolute; left: 11px; top: 50%; width: 11px; height: 6px; border-left: 2px solid var(--ok); border-bottom: 2px solid var(--ok); transform: translateY(-70%) rotate(-45deg); }
.act.highlight { border-color: var(--warn); box-shadow: 0 0 0 3px color-mix(in srgb, var(--warn) 35%, transparent); animation: pulse-hl 1.2s ease-in-out 3; }
@keyframes pulse-hl { 50% { box-shadow: 0 0 0 7px color-mix(in srgb, var(--warn) 10%, transparent); } }

.log { list-style: none; margin: 0; padding: 0; max-height: 360px; overflow-y: auto; }
.log li { display: grid; grid-template-columns: 52px 22px 1fr; gap: 8px; padding: 9px 0; border-top: 1px solid var(--border); font-size: .9rem; align-items: start; }
.log li:first-child { border-top: none; }
.log .t { font-family: var(--mono); color: var(--muted); font-size: .8rem; padding-top: 2px; }
.log .vi { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: var(--neutral-soft); color: var(--muted); }
.log .vi .icon { width: 13px; height: 13px; }
.log .vi.ok { background: var(--ok-soft); color: var(--ok); }
.log .vi.early { background: var(--warn-soft); color: var(--warn); }
.log .vi.harmful { background: var(--danger-soft); color: var(--danger); }
.log .vi.blocked, .log .vi.event { background: var(--info-soft); color: var(--info); }
.log .vi.info { background: var(--brand-soft); color: var(--brand); }
.log .lbl { font-weight: 600; }
.log .res { color: var(--muted); display: block; font-size: .86rem; margin-top: 2px; }
.log-empty { color: var(--muted); font-size: .92rem; margin: 0; }

/* ---------- Debriefing ---------- */
.debrief-hero { text-align: center; padding: clamp(20px, 4vw, 36px); }
.debrief-hero .result-icon { width: 60px; height: 60px; margin: 0 auto 10px; display: grid; place-items: center; border-radius: 50%; background: var(--ok-soft); color: var(--ok); }
.debrief-hero .result-icon .icon { width: 30px; height: 30px; }
.debrief-hero.fail .result-icon { background: var(--danger-soft); color: var(--danger); }
.debrief-hero.abort .result-icon { background: var(--warn-soft); color: var(--warn); }
.debrief-hero h2 { font-size: clamp(1.3rem, 3vw, 1.7rem); }
.debrief-hero > p { max-width: 640px; margin: 0 auto 14px; color: var(--text-2); }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 20px auto; max-width: 680px; }
.kpis div { background: var(--surface-2); border-radius: var(--radius-sm); padding: 12px 8px; }
.kpis b { display: block; font-size: 1.35rem; font-variant-numeric: tabular-nums; }
.kpis span { font-size: .8rem; color: var(--muted); }
@media (max-width: 560px) { .kpis { grid-template-columns: repeat(2, 1fr); } }
.debrief-hero .btn-row { justify-content: center; }
.debrief-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 16px; }
.debrief-grid .card + .card { margin-top: 0; }
@media (max-width: 860px) { .debrief-grid { grid-template-columns: 1fr; } }
.issue-list, .point-list { list-style: none; margin: 0; padding: 0; }
.issue-list li { display: grid; grid-template-columns: 24px 1fr; gap: 10px; padding: 10px 0; border-top: 1px solid var(--border); }
.issue-list li:first-child { border-top: none; padding-top: 0; }
.issue-list .ii { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; }
.issue-list .ii .icon { width: 14px; height: 14px; }
.issue-list .ii.missed { background: var(--warn-soft); color: var(--warn); }
.issue-list .ii.harmful { background: var(--danger-soft); color: var(--danger); }
.issue-list .ii.early { background: var(--warn-soft); color: var(--warn); }
.issue-list .ii.useless { background: var(--neutral-soft); color: var(--muted); }
.issue-list b { display: block; }
.issue-list span { color: var(--text-2); font-size: .92rem; }
.point-list li { position: relative; padding: 8px 0 8px 30px; border-top: 1px solid var(--border); }
.point-list li:first-child { border-top: none; padding-top: 0; }
.point-list li:first-child::before { top: 0; }
.point-list li::before {
  content: ""; position: absolute; left: 0; top: 8px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--brand-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230a7a4a' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 12px no-repeat;
}
.all-good { color: var(--ok); font-weight: 600; margin: 0; }

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: grid; grid-template-columns: 56px 22px 1fr; gap: 10px; padding: 12px 0; border-top: 1px solid var(--border); }
.timeline li:first-child { border-top: none; }
.timeline .t { font-family: var(--mono); font-size: .82rem; color: var(--muted); padding-top: 2px; }
.timeline .why { font-size: .9rem; color: var(--text-2); margin-top: 4px; }
.timeline .res { font-size: .9rem; color: var(--muted); margin-top: 2px; }

/* ---------- Modal ---------- */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 80; background: rgba(8, 16, 12, .55);
  display: grid; place-items: center; padding: 16px; overflow-y: auto; animation: fadein .15s ease-out;
}
@keyframes fadein { from { opacity: 0; } }
.modal {
  width: 100%; max-width: 620px; background: var(--surface); border-radius: 18px; box-shadow: var(--shadow-lg);
  border: 1px solid var(--border); overflow: hidden; animation: popin .18s ease-out; margin: auto;
}
.modal.wide { max-width: 860px; }
@keyframes popin { from { transform: translateY(10px) scale(.98); opacity: 0; } }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.modal-head h2 { margin: 0; font-size: 1.15rem; }
.modal-body { padding: 20px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 20px; border-top: 1px solid var(--border); background: var(--surface-2); flex-wrap: wrap; }

.intro-scene { border-radius: 12px; overflow: hidden; border: 1px solid var(--border); margin-bottom: 16px; }
.intro-scene svg { display: block; width: 100%; height: auto; }
.intro-text { font-size: 1.02rem; color: var(--text); }
.mode-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
@media (max-width: 520px) { .mode-pick { grid-template-columns: 1fr; } }
.mode-opt { position: relative; display: block; cursor: pointer; }
.mode-opt input { position: absolute; opacity: 0; pointer-events: none; }
.mode-opt .box { display: block; height: 100%; border: 2px solid var(--border); border-radius: 12px; padding: 12px 14px; transition: border-color .12s, background .12s; }
.mode-opt .box b { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.mode-opt .box span { font-size: .86rem; color: var(--muted); display: block; }
.mode-opt input:checked + .box { border-color: var(--brand); background: var(--brand-soft); }
.mode-opt input:focus-visible + .box { box-shadow: var(--focus); }

/* ---------- HLW-Trainer ---------- */
.cpr-layout { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); gap: 16px; align-items: start; }
@media (max-width: 960px) { .cpr-layout { grid-template-columns: 1fr; } }
.cpr { display: flex; flex-direction: column; gap: 16px; }
.cpr-stage { display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: 18px; align-items: center; }
@media (max-width: 640px) { .cpr-stage { grid-template-columns: 1fr; } }
.cpr-target {
  position: relative; width: 100%; max-width: 360px; aspect-ratio: 1; justify-self: center;
  border-radius: 50%; border: none; background: radial-gradient(circle at 50% 45%, var(--surface-2), var(--surface-3));
  cursor: pointer; display: grid; place-items: center; touch-action: manipulation; user-select: none; -webkit-user-select: none;
  box-shadow: inset 0 0 0 1px var(--border), var(--shadow);
}
.cpr-target svg { width: 82%; height: 82%; transition: transform .07s ease-out; pointer-events: none; }
.cpr-target.down svg { transform: scale(.94) translateY(3%); }
.cpr-target .pulse-ring { position: absolute; inset: 0; border-radius: 50%; border: 3px solid var(--brand); opacity: 0; pointer-events: none; }
.cpr-target.metro .pulse-ring { animation: metro var(--beat, .545s) infinite ease-out; }
@keyframes metro { 0% { transform: scale(.92); opacity: .55; } 80%, 100% { transform: scale(1.04); opacity: 0; } }
.cpr-target:focus-visible { box-shadow: var(--focus), inset 0 0 0 1px var(--border); }
.cpr-side { display: flex; flex-direction: column; gap: 12px; }
.cpr-rate { text-align: center; }
.cpr-rate .v { font-size: 3.2rem; font-weight: 750; line-height: 1; font-variant-numeric: tabular-nums; letter-spacing: -.03em; }
.cpr-rate .u { color: var(--muted); font-size: .9rem; }
.gauge { position: relative; height: 16px; border-radius: 999px; background: var(--surface-3); }
.gauge .zone { position: absolute; top: 0; bottom: 0; background: color-mix(in srgb, var(--ok) 35%, transparent); border-left: 2px solid var(--ok); border-right: 2px solid var(--ok); }
.gauge .needle { position: absolute; top: -5px; width: 4px; height: 26px; border-radius: 2px; background: var(--text); transform: translateX(-2px); transition: left .15s ease-out; }
.gauge-scale { display: flex; justify-content: space-between; font-size: .72rem; color: var(--muted); margin-top: 4px; font-variant-numeric: tabular-nums; }
.cpr-msg { text-align: center; font-weight: 650; padding: 8px 10px; border-radius: 10px; background: var(--neutral-soft); min-height: 2.6em; display: grid; place-items: center; }
.cpr-msg.ok { background: var(--ok-soft); color: var(--ok); }
.cpr-msg.warn { background: var(--warn-soft); color: var(--warn); }
.cpr-counters { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.cpr-counters div { background: var(--surface-2); border-radius: 10px; padding: 8px 10px; text-align: center; }
.cpr-counters b { display: block; font-size: 1.25rem; font-variant-numeric: tabular-nums; }
.cpr-counters span { font-size: .76rem; color: var(--muted); }
.breath-panel { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; justify-content: center; padding: 14px; border-radius: 12px; background: var(--info-soft); text-align: center; }
.breath-panel b { color: var(--info); }
.lungs { display: inline-flex; gap: 6px; }
.lungs i { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--info); }
.lungs i.on { background: var(--info); }
.lungs i.fill { animation: lungfill 1s ease-out forwards; }
@keyframes lungfill { from { background: transparent; } to { background: var(--info); } }
.kbd { display: inline-block; font-family: var(--mono); font-size: .78rem; padding: 1px 6px; border-radius: 5px; border: 1px solid var(--border-strong); border-bottom-width: 2px; background: var(--surface); color: var(--text-2); }
.cpr-setup { display: grid; gap: 14px; }
.seg { display: inline-flex; background: var(--surface-2); border-radius: 10px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg button { border: none; background: transparent; padding: 7px 12px; border-radius: 8px; cursor: pointer; font-size: .9rem; color: var(--text-2); font-weight: 500; }
.seg button.on { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(0, 0, 0, .1); font-weight: 650; }
.field-label { font-size: .8rem; font-weight: 650; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 6px; display: block; }
.facts { list-style: none; margin: 0; padding: 0; }
.facts li { display: flex; gap: 10px; padding: 9px 0; border-top: 1px solid var(--border); font-size: .93rem; }
.facts li:first-child { border-top: none; padding-top: 0; }
.facts b { min-width: 110px; color: var(--text); }
.facts span { color: var(--text-2); }
.result-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 14px 0; }
.result-grid div { background: var(--surface-2); border-radius: 10px; padding: 10px; }
.result-grid b { display: block; font-size: 1.3rem; font-variant-numeric: tabular-nums; }
.result-grid span { font-size: .78rem; color: var(--muted); }
@media (max-width: 560px) { .result-grid { grid-template-columns: repeat(2, 1fr); } }

.chart { position: relative; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart .grid-line { stroke: var(--border); stroke-width: 1; }
.chart .axis-text { fill: var(--muted); font-size: 11px; font-family: var(--font); }
.chart .band { fill: var(--surface-3); }
.chart .band-label { fill: var(--text-2); font-size: 11px; font-weight: 600; paint-order: stroke; stroke: var(--surface-3); stroke-width: 4px; stroke-linejoin: round; }
.chart .line { fill: none; stroke: var(--brand); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .cross { stroke: var(--text-2); stroke-width: 1; stroke-dasharray: 3 3; }
.chart .dot { fill: var(--brand); stroke: var(--surface); stroke-width: 2; }
.chart .tip {
  position: absolute; pointer-events: none; background: var(--text); color: var(--surface); font-size: .8rem;
  padding: 5px 8px; border-radius: 6px; white-space: nowrap; transform: translate(-50%, -120%); font-variant-numeric: tabular-nums;
}

/* ---------- AED ---------- */
.aed-voice {
  display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 12px;
  background: #13202a; color: #d9f2ff; font-family: var(--mono); font-size: .95rem; margin-bottom: 14px; min-height: 52px;
}
.aed-voice .icon { color: #6fd0ff; }
.aed-grid { display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 16px; align-items: center; }
@media (max-width: 600px) { .aed-grid { grid-template-columns: 1fr; } }
.aed-torso { width: 100%; max-width: 300px; justify-self: center; display: block; cursor: pointer; }
.aed-zone { fill: rgba(31, 95, 191, .08); stroke: #1f5fbf; stroke-width: 2; stroke-dasharray: 5 4; cursor: pointer; transition: fill .12s; }
.aed-zone:hover { fill: rgba(31, 95, 191, .22); }
.aed-device { background: #1e9c57; border-radius: 18px; padding: 14px; display: flex; flex-direction: column; gap: 10px; box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .15); }
.aed-screen { background: #0e1a14; color: #8ff0b9; font-family: var(--mono); font-size: .8rem; border-radius: 8px; padding: 10px; min-height: 56px; }
.aed-btn { border: none; border-radius: 12px; padding: 10px; font-weight: 700; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; }
.aed-btn[disabled] { opacity: .45; cursor: not-allowed; }
.aed-power { background: #f4f7f5; color: #0e5a33; }
.aed-warn { background: #ffe9a8; color: #5e4300; }
.aed-shock { background: #ff8a1f; color: #2a1200; font-size: 1.05rem; }
.aed-shock.armed { animation: shockpulse .8s infinite; }
@keyframes shockpulse { 50% { box-shadow: 0 0 0 8px rgba(255, 138, 31, .35); } }
.aed-msg { min-height: 1.5em; margin-top: 12px; font-size: .92rem; }
.aed-msg.bad { color: var(--danger); font-weight: 600; }
.aed-msg.ok { color: var(--ok); font-weight: 600; }

/* ---------- Notruf ---------- */
.call-layout { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 16px; align-items: start; }
@media (max-width: 900px) { .call-layout { grid-template-columns: 1fr; } }
.situation h3 { display: flex; align-items: center; gap: 8px; }
.situation ul { margin: 0; padding-left: 18px; }
.situation li { margin: 4px 0; color: var(--text-2); }
.w-list { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 6px; }
.w-list li { display: flex; align-items: center; gap: 10px; font-size: .92rem; color: var(--text-2); }
.w-list .w { width: 26px; height: 26px; border-radius: 8px; background: var(--surface-2); display: grid; place-items: center; font-weight: 800; font-size: .8rem; color: var(--muted); flex: none; }
.w-list li.hit .w { background: var(--ok-soft); color: var(--ok); }
.w-list li.part .w { background: var(--warn-soft); color: var(--warn); }
.w-list li.miss .w { background: var(--danger-soft); color: var(--danger); }
.phone { background: #111a16; border-radius: 26px; padding: 12px; box-shadow: var(--shadow-lg); color: #e8f1ec; }
.phone-head { display: flex; align-items: center; gap: 12px; padding: 8px 10px 12px; border-bottom: 1px solid #24312b; }
.phone-avatar { width: 40px; height: 40px; border-radius: 50%; background: #c4321f; display: grid; place-items: center; font-weight: 800; font-size: .85rem; color: #fff; }
.phone-head b { display: block; }
.phone-head span { font-size: .8rem; color: #9fb3a9; font-family: var(--mono); }
.phone-head .live-dot { margin-left: auto; width: 10px; height: 10px; border-radius: 50%; background: #39d07f; animation: blink 1.2s infinite; }
.chat { padding: 14px 6px; display: flex; flex-direction: column; gap: 10px; min-height: 280px; max-height: 460px; overflow-y: auto; }
.bubble { max-width: 86%; padding: 10px 13px; border-radius: 16px; font-size: .94rem; line-height: 1.4; }
.bubble.them { background: #233029; align-self: flex-start; border-bottom-left-radius: 5px; }
.bubble.me { background: #1d6b45; align-self: flex-end; border-bottom-right-radius: 5px; }
.bubble .who { display: block; font-size: .72rem; color: #9fb3a9; margin-bottom: 2px; font-weight: 600; }
.bubble.me .who { color: #bfe8d2; }
.call-fb { align-self: flex-end; max-width: 86%; font-size: .84rem; padding: 7px 11px; border-radius: 10px; display: flex; gap: 6px; }
.call-fb .icon { flex: none; margin-top: 1px; }
.call-fb.ok { background: rgba(57, 208, 127, .14); color: #8be6b4; }
.call-fb.part { background: rgba(242, 176, 79, .16); color: #f6c77f; }
.call-fb.bad { background: rgba(255, 122, 98, .16); color: #ffab9b; }
.typing { align-self: flex-start; display: inline-flex; gap: 4px; padding: 12px 14px; background: #233029; border-radius: 16px; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: #9fb3a9; animation: typing 1s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; }
.typing i:nth-child(3) { animation-delay: .3s; }
@keyframes typing { 50% { opacity: .3; transform: translateY(-2px); } }
.call-options { display: grid; gap: 8px; padding: 10px 4px 4px; border-top: 1px solid #24312b; }
.call-opt { text-align: left; background: #1a2621; border: 1px solid #2c3d35; color: #e8f1ec; border-radius: 12px; padding: 11px 14px; cursor: pointer; font-size: .93rem; }
.call-opt:hover { border-color: #39d07f; background: #1f2f28; }
.call-end { padding: 14px 6px 6px; border-top: 1px solid #24312b; }

/* ---------- Abläufe ---------- */
.seq-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
@media (max-width: 860px) { .seq-layout { grid-template-columns: 1fr; } }
.seq-pool, .seq-list { display: grid; gap: 8px; }
.seq-item {
  display: flex; align-items: flex-start; gap: 10px; text-align: left; padding: 11px 14px; border-radius: 12px;
  border: 1px solid var(--border-strong); background: var(--surface); cursor: pointer; font-size: .94rem; line-height: 1.35; width: 100%;
}
.seq-item:hover { border-color: var(--brand); background: var(--brand-soft); }
.seq-item .n { flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-3); font-size: .8rem; font-weight: 700; color: var(--text-2); }
.seq-list .seq-item .n { background: var(--brand); color: var(--on-brand); }
.seq-slot { border: 2px dashed var(--border); border-radius: 12px; padding: 11px 14px; color: var(--muted); font-size: .9rem; }
.seq-item.correct { border-color: var(--ok); background: var(--ok-soft); cursor: default; }
.seq-item.correct .n { background: var(--ok); }
.seq-item.wrong { border-color: var(--danger); background: var(--danger-soft); cursor: default; }
.seq-item.wrong .n { background: var(--danger); color: #fff; }
.seq-item .should { display: block; font-size: .8rem; color: var(--danger); margin-top: 2px; font-weight: 600; }
.seq-solution { counter-reset: s; list-style: none; padding: 0; margin: 0; }
.seq-solution li { counter-increment: s; position: relative; padding: 10px 0 10px 38px; border-top: 1px solid var(--border); }
.seq-solution li:first-child { border-top: none; }
.seq-solution li::before { content: counter(s); position: absolute; left: 0; top: 10px; width: 26px; height: 26px; border-radius: 50%; background: var(--brand-soft); color: var(--brand-strong); display: grid; place-items: center; font-weight: 700; font-size: .85rem; }
.seq-solution b { display: block; }
.seq-solution span { font-size: .9rem; color: var(--text-2); }

/* ---------- Quiz ---------- */
.quiz-wrap { max-width: 760px; margin: 0 auto; }
.progress { height: 8px; border-radius: 999px; background: var(--surface-3); overflow: hidden; margin-bottom: 18px; }
.progress > div { height: 100%; background: var(--brand); border-radius: 999px; transition: width .3s; }
.q-meta { display: flex; justify-content: space-between; color: var(--muted); font-size: .88rem; margin-bottom: 8px; }
.q-text { font-size: clamp(1.15rem, 2.4vw, 1.4rem); font-weight: 650; margin-bottom: 18px; line-height: 1.35; }
.q-options { display: grid; gap: 10px; }
.q-opt {
  display: flex; align-items: center; gap: 12px; text-align: left; padding: 13px 16px; border-radius: 12px; cursor: pointer;
  background: var(--surface); border: 1.5px solid var(--border-strong); font-size: 1rem; line-height: 1.35; width: 100%;
}
.q-opt:hover:not([disabled]) { border-color: var(--brand); background: var(--brand-soft); }
.q-opt .letter { flex: none; width: 28px; height: 28px; border-radius: 8px; background: var(--surface-2); display: grid; place-items: center; font-weight: 700; font-size: .85rem; color: var(--text-2); }
.q-opt[disabled] { cursor: default; }
.q-opt.correct { border-color: var(--ok); background: var(--ok-soft); }
.q-opt.correct .letter { background: var(--ok); color: var(--on-brand); }
.q-opt.wrong { border-color: var(--danger); background: var(--danger-soft); }
.q-opt.wrong .letter { background: var(--danger); color: #fff; }
.q-expl { margin-top: 16px; padding: 14px 16px; border-radius: 12px; background: var(--surface-2); display: flex; gap: 10px; }
.q-expl .icon { color: var(--brand); margin-top: 3px; }
.q-expl.bad .icon { color: var(--danger); }
.q-expl p { margin: 0; }
.q-foot { display: flex; justify-content: flex-end; margin-top: 16px; }
.review-list { list-style: none; padding: 0; margin: 0; }
.review-list li { padding: 12px 0; border-top: 1px solid var(--border); }
.review-list li:first-child { border-top: none; }
.review-list b { display: block; margin-bottom: 4px; }
.review-list .ans { font-size: .9rem; color: var(--ok); font-weight: 600; }
.review-list .ex { font-size: .9rem; color: var(--text-2); }

/* ---------- Wissen ---------- */
.kn-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.kn-card h3 { display: flex; align-items: center; gap: 8px; }
.kn-card ul { margin: 0 0 12px; padding-left: 18px; }
.kn-card li { margin: 6px 0; color: var(--text-2); font-size: .94rem; }
.kn-card .btn { margin-top: 4px; }

.list-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.list-card { display: flex; flex-direction: column; gap: 8px; }
.list-card p { color: var(--muted); font-size: .93rem; margin: 0; flex: 1; }
.list-card .row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; }

/* ---------- Szenen-Animationen ---------- */
.scene-svg .breathe { animation: breathe 4.2s ease-in-out infinite; }
.scene-svg .agonal { animation: agonal 7s ease-in-out infinite; }
@keyframes breathe { 0%, 100% { transform: scaleY(1); } 45% { transform: scaleY(1.07); } }
@keyframes agonal { 0%, 82%, 100% { transform: scaleY(1); } 88% { transform: scaleY(1.09); } }
.scene-svg .cpr-hands { animation: compress .545s ease-in-out infinite; }
@keyframes compress { 0%, 100% { transform: translateY(0); } 45% { transform: translateY(6px); } }
.scene-svg .seize { animation: seize .16s linear infinite; }
@keyframes seize { 0% { transform: translate(0, 0); } 25% { transform: translate(1.5px, -1px); } 50% { transform: translate(-1px, 1px); } 75% { transform: translate(1px, 1.5px); } 100% { transform: translate(0, 0); } }
.scene-svg .drip { animation: drip 1.1s ease-in infinite; }
.scene-svg .drip.d2 { animation-delay: .55s; }
@keyframes drip { 0% { transform: translateY(0); opacity: 1; } 100% { transform: translateY(46px); opacity: 0; } }
.scene-svg .water { stroke-dasharray: 6 6; animation: water .5s linear infinite; }
@keyframes water { to { stroke-dashoffset: -12; } }
.scene-svg .hazard { animation: blink 1s steps(1) infinite; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

/* Vorschaubilder ohne Animation */
.sc-thumb .scene-svg *, .hero-art .scene-svg .seize { animation: none !important; }

/* ==========================================================================
   3D-Einsatz
   ========================================================================== */
.s3d-thumb { position: relative; }
.s3d-badge { position: absolute; top: 10px; right: 10px; background: #ffd23f; color: #1a1a14; font-weight: 800; font-size: .78rem; padding: 3px 8px; border-radius: 6px; }
.s3d-howto { margin-top: 20px; }
.s3d-howto summary { display: flex; align-items: center; gap: 8px; font-weight: 600; cursor: pointer; list-style: none; }
.s3d-howto summary::-webkit-details-marker { display: none; }
.s3d-howto summary::after { content: "+"; margin-left: auto; color: var(--muted); font-size: 1.2rem; line-height: 1; }
.s3d-howto[open] summary::after { content: "−"; }
.s3d-howto[open] summary { margin-bottom: 12px; }
.s3d-head { margin-bottom: 14px; }
.s3d-head h1 { margin: 0; font-size: clamp(1.3rem, 2.6vw, 1.8rem); }
.s3d-note { margin: 10px 0 0; }

.s3d-stage {
  --acc: #ffd23f;
  position: relative; width: 100%; height: min(calc(100vh - 190px), 780px); min-height: 460px;
  border-radius: var(--radius); overflow: hidden; background: #0b0e10; box-shadow: var(--shadow-lg);
  color: #f1f4f0; font-size: 14px; line-height: 1.35;
  user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
}
.s3d-stage:fullscreen { height: 100vh; border-radius: 0; }
/* Ersatz-Vollbild ohne Vollbild-Schnittstelle (z. B. iPhone): Szene füllt das Fenster, Seite scrollt nicht */
.s3d-stage.pseudo-fs { position: fixed; inset: 0; z-index: 1000; width: 100vw; height: 100vh; height: 100dvh; min-height: 0; border-radius: 0; }
html.pseudo-fs-on, html.pseudo-fs-on body { overflow: hidden; }
.s3d-stage:-webkit-full-screen { width: 100%; height: 100%; border-radius: 0; }
.s3d-loading { position: absolute; inset: 0; display: grid; place-items: center; padding: 24px; text-align: center; color: #c3d0c9; }
.s3d-gl { position: absolute; inset: 0; }
.s3d-gl canvas { display: block; width: 100%; height: 100%; touch-action: none; }
.s3d-hud { position: absolute; inset: 0; pointer-events: none; z-index: 2; }
.s3d-hud button { pointer-events: auto; font: inherit; }
.s3d-hud .icon { width: 1.05em; height: 1.05em; }
.s3d-box { background: rgba(9, 12, 14, .74); border: 1px solid rgba(255, 255, 255, .08); border-radius: 10px; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }

/* Aufgaben (oben links) */
.s3d-tl { position: absolute; left: 14px; top: 14px; width: min(300px, 46%); }
/* Ziel-Tracker: Abschnitt, nächste Aufgaben, Fortschritt; Tab klappt die ganze Liste auf */
.s3d-obj, .s3d-cpr { padding: 10px 12px; }
.s3d-ohead { display: flex; justify-content: space-between; font-size: .66rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #9aa69f; margin-bottom: 2px; }
.s3d-og { font-weight: 800; color: var(--acc); font-size: .95rem; margin: 0 0 6px; }
.s3d-next, .s3d-ofull ul { list-style: none; margin: 0; padding: 0; }
.s3d-next li, .s3d-ofull li { display: grid; grid-template-columns: 16px 1fr; gap: 8px; align-items: start; padding: 2px 0; font-size: .86rem; }
.s3d-next li i, .s3d-ofull li i { width: 9px; height: 9px; margin: 5px 0 0 3px; border: 2px solid var(--acc); border-radius: 2px; transform: rotate(45deg); }
.s3d-next li.opt i, .s3d-ofull li.opt i { border-color: #9aa69f; }
.s3d-next small { color: #9aa69f; font-weight: 700; }
.s3d-oprog { height: 4px; border-radius: 2px; background: rgba(255, 255, 255, .12); margin-top: 8px; overflow: hidden; }
.s3d-oprog i { display: block; height: 100%; background: linear-gradient(90deg, #4cc38a, var(--acc)); transition: width .6s cubic-bezier(.2, .8, .2, 1); }
.s3d-obonus { margin-top: 6px; font-size: .7rem; color: #9aa69f; }
.s3d-ofull { display: none; margin-top: 10px; border-top: 1px solid rgba(255, 255, 255, .1); padding-top: 6px; max-height: 52vh; overflow: auto; }
.s3d-tab .s3d-ofull { display: block; }
.s3d-og2 { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: #c3d0c9; margin: 6px 0 2px; }
.s3d-ofull li.done { color: #8b978f; }
.s3d-ofull li.done span { text-decoration: line-through; text-decoration-color: rgba(255, 255, 255, .25); }
.s3d-ofull li.done .icon { color: #4cc38a; }
.s3d-ofull li em { font-style: normal; font-size: .66rem; font-weight: 700; color: #1a1a14; background: #9aa69f; border-radius: 4px; padding: 0 4px; margin-left: 2px; }
.s3d-otab { margin-top: 6px; font-size: .68rem; color: #8b978f; }
.s3d-tab .s3d-otab { display: none; }
.s3d-tr { position: absolute; right: 14px; top: 14px; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; width: min(300px, 46%); }
.s3d-meta { display: flex; gap: 14px; padding: 8px 12px; }
.s3d-meta div { display: flex; flex-direction: column; align-items: flex-end; }
.s3d-meta span { font-size: .64rem; letter-spacing: .12em; text-transform: uppercase; color: #9aa69f; }
.s3d-meta b { font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.s3d-meta [data-eta] { color: #ff8c7a; }
.s3d-meta .bump { animation: s3dbump .45s ease-out; }
@keyframes s3dbump { 0% { transform: scale(1.35); color: var(--acc); } 100% { transform: scale(1); } }
.s3d-tools { display: flex; gap: 6px; }
.s3d-tbtn { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 9px; border: 1px solid rgba(255, 255, 255, .12); background: rgba(9, 12, 14, .7); color: #fff; cursor: pointer; }
.s3d-tbtn:hover { border-color: var(--acc); color: var(--acc); }

/* Hinweise */
.s3d-toasts { display: flex; flex-direction: column; width: 100%; margin-top: 8px; }
.s3d-toast { background: rgba(9, 12, 14, .84); border-left: 4px solid var(--acc); border-radius: 8px; padding: 9px 12px; font-size: .84rem; animation: s3din .3s ease-out; transition: opacity .4s, transform .4s; }
.s3d-toast b { display: block; font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; color: var(--acc); margin-bottom: 2px; }
.s3d-toast.bad { border-left-color: #ff6b57; }
.s3d-toast.bad b { color: #ff8c7a; }
.s3d-toast.info { border-left-color: #78aaff; }
.s3d-toast.info b { color: #9fc2ff; }
.s3d-toast.out { opacity: 0; transform: translateX(-20px); }
@keyframes s3din { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

.s3d-banner { position: absolute; left: 50%; top: 11%; transform: translateX(-50%); text-align: center; opacity: 0; white-space: nowrap; }
.s3d-banner span { display: block; font-size: .78rem; letter-spacing: .3em; text-transform: uppercase; color: var(--acc); }
.s3d-banner b { display: block; font-size: clamp(1.2rem, 3vw, 1.9rem); text-transform: uppercase; letter-spacing: .05em; text-shadow: 0 2px 14px rgba(0, 0, 0, .7); border-top: 2px solid var(--acc); margin-top: 6px; padding-top: 6px; }
.s3d-banner.on { animation: s3dbanner 3.2s ease-out forwards; }
@keyframes s3dbanner { 0% { opacity: 0; transform: translate(-50%, 10px); } 12%, 75% { opacity: 1; transform: translate(-50%, 0); } 100% { opacity: 0; } }

/* Betroffene (unten links) */
.s3d-victims { position: absolute; left: 14px; bottom: 14px; display: flex; flex-direction: column; gap: 6px; width: min(240px, 40%); }
.s3d-vic { background: rgba(9, 12, 14, .74); border-radius: 8px; padding: 6px 9px 8px; border: 1px solid rgba(255, 255, 255, .08); }
.s3d-vic-top { display: flex; justify-content: space-between; gap: 8px; font-size: .78rem; margin-bottom: 4px; }
.s3d-vic .nm { font-weight: 700; }
.s3d-vic .st { color: #b9c2bd; text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.s3d-vic .bar { height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .12); overflow: hidden; }
.s3d-vic .bar i { display: block; height: 100%; border-radius: 3px; transition: width .25s linear; }
.s3d-vic.crit { border-color: rgba(255, 107, 87, .6); animation: s3dcrit 1s ease-in-out infinite; }
@keyframes s3dcrit { 50% { border-color: rgba(255, 107, 87, .1); } }

/* Inventar (unten Mitte) */
.s3d-inv { position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); text-align: center; }
.s3d-inv-h { font-size: .64rem; letter-spacing: .2em; text-transform: uppercase; color: var(--acc); margin-bottom: 4px; text-shadow: 0 1px 4px rgba(0, 0, 0, .8); }
.s3d-slots { display: flex; gap: 6px; }
.s3d-slot { position: relative; width: 62px; height: 58px; border-radius: 9px; border: 1px solid rgba(255, 210, 63, .35); background: rgba(9, 12, 14, .74); color: #fff; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 4px 2px; }
.s3d-slot[disabled] { cursor: default; border-color: rgba(255, 255, 255, .1); }
.s3d-slot .icon { width: 22px; height: 22px; }
.s3d-slot .k { position: absolute; left: 5px; top: 2px; font-size: .62rem; color: #9aa69f; }
.s3d-slot .nm { font-size: .6rem; color: #c3d0c9; max-width: 58px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.s3d-slot:not([disabled]):hover { border-color: var(--acc); }
.s3d-slot.sel { background: var(--acc); color: #1a1a14; border-color: var(--acc); box-shadow: 0 0 16px rgba(255, 210, 63, .5); }
.s3d-slot.sel .nm, .s3d-slot.sel .k { color: #1a1a14; }
.s3d-slot.worn { border-color: #b5e61d; }

/* Untertitel */
.s3d-sub { position: absolute; left: 50%; bottom: 96px; transform: translateX(-50%); max-width: min(720px, 80%); text-align: center; background: rgba(0, 0, 0, .62); padding: 8px 14px; border-radius: 8px; font-size: .95rem; opacity: 0; transition: opacity .3s; }
.s3d-sub.on { opacity: 1; }
@media (min-width: 701px) { .s3d-hud:has(> .s3d-actions:not(.hidden)) .s3d-sub { left: calc((100% - 530px) / 2); max-width: min(560px, calc(100% - 580px)); } }
.s3d-sub b { color: var(--acc); }

/* Maßnahmen-Menü (rechts) */
/* Aktionsrad: höchstens 4 Felder um einen Ring, Tasten 1–4 bzw. Pfeiltasten */
.s3d-actions { position: absolute; right: max(14px, 3%); top: 50%; transform: translateY(-50%); width: 500px; height: 380px; pointer-events: none; animation: s3dwheel .22s cubic-bezier(.2, .9, .3, 1.2); }
@keyframes s3dwheel { from { opacity: 0; transform: translateY(-50%) scale(.86); } to { opacity: 1; transform: translateY(-50%) scale(1); } }
.s3d-wheel { position: absolute; inset: 0; }
.s3d-wring { position: absolute; left: 50%; top: 50%; width: 200px; height: 200px; transform: translate(-50%, -50%); overflow: visible; }
.s3d-wring circle { fill: rgba(9, 12, 14, .55); stroke: rgba(255, 255, 255, .1); stroke-width: 1; }
.s3d-wring path { fill: rgba(255, 255, 255, .07); stroke: rgba(0, 0, 0, .35); stroke-width: 2; transition: fill .15s; }
.s3d-wring path.off { fill: rgba(255, 255, 255, .02); }
.s3d-wring path.on { fill: rgba(255, 210, 63, .55); }
.s3d-wring path.hit { fill: var(--acc); }
.s3d-whub { position: absolute; left: 50%; top: 50%; width: 112px; transform: translate(-50%, -50%); text-align: center; display: flex; flex-direction: column; gap: 3px; align-items: center; }
.s3d-whub b { font-size: .8rem; line-height: 1.15; max-height: 2.4em; overflow: hidden; }
.s3d-whub span { font-size: .66rem; color: #9aa69f; display: inline-flex; align-items: center; gap: 3px; }
.s3d-whub .icon { width: .9em; height: .9em; color: #4cc38a; }
.s3d-wback { pointer-events: auto; margin-top: 4px; white-space: nowrap; font-size: .72rem; color: #c3d0c9; background: rgba(9, 12, 14, .85); border: 1px solid rgba(255, 255, 255, .14); border-radius: 999px; padding: 3px 10px 3px 4px; cursor: pointer; }
.s3d-wback:hover { border-color: #ff8c7a; color: #fff; }
.s3d-wslot { pointer-events: auto; position: absolute; width: 150px; min-height: 52px; display: flex; align-items: center; gap: 8px; text-align: left; padding: 8px 10px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, .14); background: rgba(9, 12, 14, .86); color: #fff; cursor: pointer; font-size: .82rem; line-height: 1.22; box-shadow: 0 6px 18px rgba(0, 0, 0, .35); transition: transform .12s, border-color .12s, background .12s; }
.s3d-wslot.empty { pointer-events: none; background: transparent; border: 1px dashed rgba(255, 255, 255, .08); box-shadow: none; }
.s3d-wslot:hover:not([disabled]) { border-color: var(--acc); background: rgba(40, 46, 30, .95); transform: scale(1.04); }
.s3d-wslot.primary { font-weight: 700; }
.s3d-wslot.more { color: #c3d0c9; font-style: italic; }
.s3d-wslot.more small { font-style: normal; color: #8b978f; margin-left: 4px; }
.s3d-wslot[disabled] { opacity: .5; cursor: progress; }
.s3d-wslot .n { flex: none; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--acc); color: #1a1a14; font-size: .74rem; font-weight: 800; font-family: var(--mono); }
.s3d-wslot.top { left: 50%; top: 0; width: 230px; translate: -50% 0; }
.s3d-wslot.bottom { left: 50%; bottom: 0; width: 230px; translate: -50% 0; }
.s3d-wslot.left { left: 0; top: 50%; translate: 0 -50%; }
.s3d-wslot.right { right: 0; top: 50%; translate: 0 -50%; }
.s3d-ph-opts .n { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 5px; background: rgba(255, 210, 63, .16); color: var(--acc); font-size: .74rem; font-weight: 800; font-family: var(--mono); margin-right: 8px; vertical-align: 1px; }
@media (max-width: 700px) {
  .s3d-actions { right: 50%; top: auto; bottom: 8px; transform: translateX(50%) scale(.82); transform-origin: 50% 100%; animation: none; }
}
/* Punkte-Einblendungen, Serie, Treffer-Impuls */
.s3d-pops { position: absolute; left: 50%; top: 35%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 4px; }
.s3d-pop { display: flex; align-items: baseline; gap: 8px; padding: 4px 12px; border-radius: 999px; background: rgba(9, 12, 14, .72); animation: s3dpop 2.2s ease-out forwards; white-space: nowrap; }
.s3d-pop b { font-size: 1.15rem; font-weight: 900; color: #4cc38a; text-shadow: 0 2px 8px rgba(0, 0, 0, .6); }
.s3d-pop span { font-size: .8rem; color: #e6ece8; }
.s3d-pop em { font-style: normal; font-size: .72rem; font-weight: 800; color: #1a1a14; background: var(--acc); border-radius: 999px; padding: 1px 7px; }
.s3d-pop.bonus b { color: var(--acc); }
.s3d-pop.step b { color: #9fc2ff; }
.s3d-pop.bad b { color: #ff6b57; }
@keyframes s3dpop { 0% { opacity: 0; transform: translateY(14px) scale(.8); } 12% { opacity: 1; transform: translateY(0) scale(1.06); } 22% { transform: scale(1); } 80% { opacity: 1; } 100% { opacity: 0; transform: translateY(-26px); } }
.s3d-combo b { color: var(--acc); }
.s3d-combo.bump b { animation: s3dbump .45s ease-out; }
.s3d-stage.s3d-hit::after { content: ''; position: absolute; inset: 0; pointer-events: none; box-shadow: inset 0 0 120px rgba(255, 60, 40, .55); animation: s3dhit .6s ease-out forwards; }
@keyframes s3dhit { from { opacity: 1; } to { opacity: 0; } }
.s3d-tooltip { position: absolute; max-width: 240px; background: rgba(9, 12, 14, .9); border: 1px solid var(--acc); color: #fff; padding: 5px 9px; border-radius: 6px; font-size: .82rem; white-space: nowrap; }
.s3d-help { position: absolute; right: 14px; bottom: 14px; font-size: .74rem; color: rgba(255, 255, 255, .7); text-shadow: 0 1px 4px rgba(0, 0, 0, .9); max-width: 260px; text-align: right; transition: opacity .6s; }
.s3d-help.auto-off { opacity: 0; }
.s3d-help.show { opacity: 1; }

/* Ring (Atemkontrolle) und Beatmungs-Ring */
.s3d-center { position: absolute; left: 50%; top: 46%; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; gap: 10px; }
.s3d-ring { position: relative; width: 110px; height: 110px; }
.s3d-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.s3d-ring circle { fill: none; stroke-width: 7; }
.s3d-ring .bg { stroke: rgba(255, 255, 255, .18); }
.s3d-ring .fg { stroke: var(--acc); stroke-dasharray: 100; stroke-dashoffset: 100; stroke-linecap: round; }
.s3d-ring b { position: absolute; inset: 0; display: grid; place-items: center; font-size: 1.4rem; text-shadow: 0 1px 6px rgba(0, 0, 0, .8); }
.s3d-ring-l { background: rgba(0, 0, 0, .62); padding: 6px 12px; border-radius: 8px; font-size: .9rem; text-align: center; }
.s3d-vent { position: relative; width: 120px; height: 120px; }
.s3d-vent i { position: absolute; left: 50%; top: 50%; width: 120px; height: 120px; border-radius: 50%; transform: translate(-50%, -50%); }
.s3d-vent .tgt { border: 4px solid var(--acc); box-shadow: 0 0 0 9px rgba(255, 210, 63, .18), inset 0 0 0 9px rgba(255, 210, 63, .18); }
.s3d-vent .mov { border: 3px solid #fff; }

/* HLW-Anzeige */
.s3d-crow { display: flex; justify-content: space-between; gap: 10px; padding: 3px 0; font-size: .86rem; }
.s3d-crow span { color: #9aa69f; }
.s3d-crow b { font-variant-numeric: tabular-nums; }
.s3d-rate { position: relative; height: 8px; margin: 4px 0 8px; border-radius: 4px; background: linear-gradient(90deg, #ff6b57 0%, #f2b04f 30%, #4cc38a 40%, #4cc38a 60%, #f2b04f 70%, #ff6b57 100%); }
.s3d-rate i { position: absolute; top: -4px; width: 4px; height: 16px; margin-left: -2px; background: #fff; border-radius: 2px; box-shadow: 0 0 6px rgba(0, 0, 0, .8); transition: left .15s; }
.s3d-fb { margin: 8px 0; padding: 6px 8px; border-radius: 6px; background: rgba(255, 255, 255, .06); font-size: .84rem; }
.s3d-fb.ok { color: #4cc38a; }
.s3d-fb.warn { color: #f2b04f; }
.s3d-fb.bad { color: #ff8c7a; }
.s3d-stop { width: 100%; padding: 6px 10px; border-radius: 7px; border: 1px solid rgba(255, 255, 255, .18); background: transparent; color: #c3d0c9; cursor: pointer; font-size: .8rem; }
.s3d-stop:hover { border-color: #ff8c7a; color: #ff8c7a; }
.s3d-count { position: absolute; transform: translate(-50%, -50%); font-size: 3rem; font-weight: 800; font-style: italic; color: var(--acc); text-shadow: 0 2px 10px rgba(0, 0, 0, .7); }
.s3d-count.bump { animation: s3dcount .25s ease-out; }
@keyframes s3dcount { from { transform: translate(-50%, -50%) scale(1.35); } to { transform: translate(-50%, -50%) scale(1); } }
.s3d-press { position: absolute; right: 22px; bottom: 70px; width: 112px; height: 112px; border-radius: 50%; border: 4px solid var(--acc); background: rgba(255, 210, 63, .2); color: #fff; font-weight: 800; font-size: 1rem; letter-spacing: .06em; text-transform: uppercase; cursor: pointer; touch-action: manipulation; }
/* HLW in der Ich-Perspektive: Taktleiste (unten) und Drucktiefe (rechts) */
.s3d-cprui { position: absolute; inset: 0; pointer-events: none; }
.s3d-cprui .s3d-beat { position: absolute; left: 50%; top: 14px; transform: translateX(-50%); width: 440px; max-width: calc(100% - 32px); height: auto; }
.s3d-cprui .s3d-depth { position: absolute; right: 150px; bottom: 40px; width: 74px; height: 230px; }
.s3d-press:active { background: rgba(255, 210, 63, .5); transform: scale(.95); }
.s3d-phone:not(.hidden) ~ .s3d-help, .s3d-press:not(.hidden) ~ .s3d-help, .s3d-actions:not(.hidden) ~ .s3d-help { display: none; }

/* Handy / Notruf */
.s3d-phone { position: absolute; right: 14px; bottom: 14px; top: 64px; width: min(320px, 92%); display: flex; flex-direction: column; background: #0d1114; border: 2px solid #2b3236; border-radius: 26px; overflow: hidden; pointer-events: auto; box-shadow: 0 20px 60px rgba(0, 0, 0, .6); }
.s3d-ph-top { display: flex; align-items: center; gap: 10px; padding: 14px 16px; background: #182025; }
.s3d-ph-top .icon { width: 22px; height: 22px; color: #4cc38a; }
.s3d-ph-top div { flex: 1; display: flex; flex-direction: column; }
.s3d-ph-top b { font-size: 1.1rem; }
.s3d-ph-top span { font-size: .78rem; color: #9aa69f; }
.s3d-ph-top em { font-style: normal; font-variant-numeric: tabular-nums; color: #9aa69f; font-size: .85rem; }
.s3d-ph-msgs { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.s3d-ph-msgs .msg { max-width: 88%; padding: 8px 11px; border-radius: 14px; font-size: .86rem; animation: s3din .25s ease-out; }
.s3d-ph-msgs .msg b { display: block; font-size: .7rem; color: #9aa69f; margin-bottom: 2px; }
.s3d-ph-msgs .them { background: #232c31; align-self: flex-start; border-bottom-left-radius: 4px; }
.s3d-ph-msgs .me { background: #1d5d43; align-self: flex-end; border-bottom-right-radius: 4px; }
.s3d-ph-msgs .me b { color: #a7d9c1; }
.s3d-ph-msgs .fb { align-self: stretch; max-width: none; background: rgba(255, 140, 122, .12); border: 1px solid rgba(255, 140, 122, .4); color: #ffc2b8; }
.s3d-ph-opts { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px 14px; border-top: 1px solid #222a2e; }
.s3d-ph-opts:empty { display: none; }
.s3d-ph-opts button { text-align: left; padding: 9px 11px; border-radius: 10px; border: 1px solid #2f383d; background: #182025; color: #fff; cursor: pointer; font-size: .85rem; }
.s3d-ph-opts button:hover { border-color: var(--acc); }
.s3d-ph-opts button.primary { background: #1d5d43; border-color: #2c8a63; text-align: center; font-weight: 700; }

/* Start/Pause */
.s3d-overlay { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(5, 8, 10, .55); pointer-events: auto; padding: 16px; overflow-y: auto; }
.s3d-card { width: min(560px, 100%); background: rgba(13, 17, 20, .94); border: 1px solid rgba(255, 210, 63, .3); border-radius: 16px; padding: 22px 24px; box-shadow: 0 30px 80px rgba(0, 0, 0, .55); }
.s3d-card h2 { color: #fff; font-size: 1.4rem; margin: 4px 0 8px; }
.s3d-card p { color: #c3d0c9; font-size: .95rem; }
.s3d-kicker { font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: var(--acc); font-weight: 700; }
.s3d-keys { list-style: none; margin: 12px 0 18px; padding: 0; display: grid; gap: 6px; }
.s3d-keys li { display: grid; grid-template-columns: 130px 1fr; gap: 10px; font-size: .86rem; color: #c3d0c9; }
.s3d-keys b { color: #fff; }
.s3d-card .btn-secondary { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .25); }
.s3d-card .btn-ghost { color: #c3d0c9; }

@media (max-width: 700px) {
  .s3d-stage { height: calc(100svh - 150px); min-height: 480px; font-size: 13px; border-radius: 10px; }
  .s3d-tl { left: 8px; top: 8px; width: 56%; }
  .s3d-tr { right: 8px; top: 8px; width: 42%; }
  .s3d-obj li { font-size: .78rem; }
  .s3d-meta { gap: 10px; padding: 6px 8px; }
  .s3d-meta b { font-size: .98rem; }
  .s3d-victims { left: 8px; bottom: 84px; width: 46%; }
  .s3d-inv { bottom: 8px; }
  .s3d-inv-h, .s3d-help { display: none; }
  .s3d-slot { width: 52px; height: 52px; }
  .s3d-sub { bottom: auto; top: 40%; max-width: 90%; }
  .s3d-actions { top: auto; bottom: 74px; right: 8px; transform: none; width: 52%; max-height: 52%; }
  .s3d-press { right: 10px; bottom: 76px; width: 96px; height: 96px; }
  .s3d-cprui .s3d-depth { right: 116px; bottom: 60px; width: 56px; height: 174px; }
  .s3d-cprui .s3d-beat { top: 64px; }
  .s3d-phone { top: 8px; right: 8px; bottom: 8px; left: 8px; width: auto; }
  .s3d-keys li { grid-template-columns: 1fr; gap: 0; }
  .s3d-toast { font-size: .76rem; }
  .s3d-hud:has(> .s3d-actions:not(.hidden)) .s3d-victims { display: none; }
}

/* Ego-Steuerung: Fadenkreuz, Interaktions-Prompt, Maus-Lock-Hinweis, Touch */
.s3d-key { display: inline-grid; place-items: center; min-width: 24px; height: 24px; padding: 0 7px; margin-right: 8px; border-radius: 6px; border: 1px solid rgba(255, 255, 255, .5); border-bottom-width: 3px; background: rgba(255, 255, 255, .12); color: #fff; font-weight: 800; font-size: .78rem; font-family: var(--mono); }
.s3d-help .s3d-key { min-width: 0; height: 18px; padding: 0 5px; margin: 0 4px 0 8px; font-size: .66rem; border-bottom-width: 2px; }
.s3d-cross { position: absolute; left: 50%; top: 50%; width: 6px; height: 6px; margin: -3px 0 0 -3px; border-radius: 50%; background: rgba(255, 255, 255, .85); box-shadow: 0 0 0 1.5px rgba(0, 0, 0, .45); transition: transform .12s, background .12s; }
.s3d-cross.on { transform: scale(1.8); background: var(--acc); }
.s3d-prompt { position: absolute; left: 50%; top: calc(50% + 26px); transform: translateX(-50%); background: rgba(9, 12, 14, .78); border: 1px solid rgba(255, 210, 63, .45); border-radius: 9px; padding: 7px 12px; font-size: .92rem; font-weight: 600; white-space: nowrap; display: flex; align-items: center; }
.s3d-prompt .far { color: #b9c2bd; font-weight: 500; }
.s3d-lockhint { position: absolute; left: 50%; top: 66%; transform: translateX(-50%); pointer-events: auto; cursor: pointer; background: rgba(9, 12, 14, .82); border: 1px solid var(--acc); color: #fff; border-radius: 10px; padding: 9px 16px; font-weight: 700; animation: s3dpulse 1.6s ease-in-out infinite; }
@keyframes s3dpulse { 50% { box-shadow: 0 0 0 6px rgba(255, 210, 63, .18); } }
.s3d-joy { position: absolute; left: 22px; bottom: 96px; width: 120px; height: 120px; border-radius: 50%; background: rgba(9, 12, 14, .38); border: 2px solid rgba(255, 255, 255, .35); pointer-events: auto; touch-action: none; }
.s3d-joy i { position: absolute; left: 50%; top: 50%; width: 52px; height: 52px; margin: -26px 0 0 -26px; border-radius: 50%; background: rgba(255, 255, 255, .55); }
.s3d-usebtn { position: absolute; right: 22px; bottom: 110px; width: 74px; height: 74px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, .4); background: rgba(9, 12, 14, .5); color: #fff; font-size: 1.4rem; font-weight: 800; opacity: .55; touch-action: manipulation; }
.s3d-usebtn.on { opacity: 1; border-color: var(--acc); background: rgba(255, 210, 63, .3); }
@media (max-width: 700px) {
  .s3d-joy { left: 12px; bottom: 74px; width: 104px; height: 104px; }
  .s3d-usebtn { right: 12px; bottom: 86px; }
  .s3d-prompt { font-size: .8rem; max-width: 92%; white-space: normal; }
  .s3d-hud:has(> .s3d-joy:not(.hidden)) .s3d-victims { display: none; }
}

/* Zwischensequenzen: Kinobalken, HUD ausgeblendet */
.s3d-skip { display: none; position: absolute; right: 18px; bottom: 9%; z-index: 3; align-items: center; gap: 2px; pointer-events: auto; background: rgba(0, 0, 0, .55); color: #fff; border: 1px solid rgba(255, 255, 255, .25); border-radius: 8px; padding: 7px 12px; cursor: pointer; font-weight: 600; }
.s3d-skip .s3d-key { margin: 0 0 0 8px; }
.s3d-cine .s3d-skip { display: flex; }
.s3d-cine .s3d-hud::before, .s3d-cine .s3d-hud::after { content: ""; position: absolute; left: 0; right: 0; height: 8%; background: #000; z-index: 2; animation: s3dbars .6s ease-out; }
.s3d-cine .s3d-hud::before { top: 0; }
.s3d-cine .s3d-hud::after { bottom: 0; }
@keyframes s3dbars { from { height: 0; } }
.s3d-cine .s3d-tl, .s3d-cine .s3d-tr, .s3d-cine .s3d-victims, .s3d-cine .s3d-inv, .s3d-cine .s3d-help, .s3d-cine .s3d-cross, .s3d-cine .s3d-prompt, .s3d-cine .s3d-lockhint, .s3d-cine .s3d-joy, .s3d-cine .s3d-usebtn { display: none !important; }
.s3d-cine .s3d-sub { bottom: 12%; z-index: 3; }

/* ---------- 3D-Einsatz: Spielerstufe, Rang, Medaillen, Erfolge ---------- */
.s3d-level { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; padding: 14px 18px; }
.s3d-lv-badge { flex: none; width: 64px; height: 64px; border-radius: 16px; display: flex; flex-direction: column; align-items: center; justify-content: center; background: linear-gradient(145deg, var(--brand), #13a067); color: #fff; box-shadow: 0 6px 18px rgba(10, 122, 74, .35); }
.s3d-lv-badge span { font-size: .62rem; letter-spacing: .12em; text-transform: uppercase; opacity: .85; }
.s3d-lv-badge b { font-size: 1.7rem; line-height: 1; }
.s3d-lv-main { flex: 1; min-width: 0; }
.s3d-lv-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; align-items: baseline; }
.s3d-lv-top b { font-size: 1.1rem; }
.s3d-lv-top span { font-size: .85rem; color: var(--muted); }
.s3d-lv-bar { height: 8px; border-radius: 4px; background: var(--surface-3); overflow: hidden; margin: 8px 0; }
.s3d-lv-bar i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--brand), #ffd23f); transition: width 1.2s cubic-bezier(.2, .8, .2, 1); }
.s3d-lv-stats { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; font-size: .82rem; color: var(--muted); }
.s3d-lv-stats .m::before { content: ''; display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-right: 5px; vertical-align: -1px; }
.m.gold::before, .s3d-medal.gold { background: linear-gradient(145deg, #ffe27a, #d9a400); }
.m.silver::before, .s3d-medal.silver { background: linear-gradient(145deg, #f1f3f5, #a7afb7); }
.m.bronze::before, .s3d-medal.bronze { background: linear-gradient(145deg, #f0b98a, #a86232); }
.s3d-rankb { position: absolute; left: 10px; top: 10px; width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; font-weight: 900; color: #1a1a14; background: #ffd23f; box-shadow: 0 2px 8px rgba(0, 0, 0, .3); }
.s3d-result { display: flex; gap: 20px; align-items: center; margin-top: 16px; }
.s3d-rank { flex: none; width: 96px; height: 96px; border-radius: 22px; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #1a1a14; background: #ffd23f; box-shadow: 0 8px 24px rgba(0, 0, 0, .18); animation: s3drank .7s cubic-bezier(.2, .9, .3, 1.4); }
.s3d-rank b { font-size: 3rem; line-height: 1; font-weight: 900; }
.s3d-rank span { font-size: .72rem; font-weight: 700; }
.s3d-rank.r-S, .s3d-rankb.r-S { background: linear-gradient(145deg, #ffe27a, #ff9d00); }
.s3d-rank.r-A, .s3d-rankb.r-A { background: #8fe0a8; }
.s3d-rank.r-B, .s3d-rankb.r-B { background: #9fc2ff; }
.s3d-rank.r-C, .s3d-rankb.r-C { background: #e3d3a8; }
.s3d-rank.r-D, .s3d-rankb.r-D { background: #e9b3a8; }
@keyframes s3drank { from { transform: scale(.3) rotate(-12deg); opacity: 0; } to { transform: none; opacity: 1; } }
.s3d-res-main { flex: 1; min-width: 0; }
.s3d-medal { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px; color: #1a1a14; font-weight: 800; font-size: .85rem; }
.s3d-xp { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; margin-top: 8px; }
.s3d-xp span { font-size: 1.4rem; font-weight: 900; color: var(--brand); }
.s3d-xp em { font-style: normal; font-size: .82rem; color: var(--muted); }
.s3d-lv-line { font-size: .88rem; color: var(--muted); }
.s3d-lv-line .up { color: var(--brand); }
.s3d-ach { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px; margin-top: 12px; }
.s3d-ach .a { padding: 8px 10px; border-radius: 10px; background: var(--brand-soft); }
.s3d-ach .a b { display: flex; align-items: center; gap: 6px; font-size: .88rem; color: var(--brand-strong); }
.s3d-ach .a span { font-size: .78rem; color: var(--text-2); }
@media (max-width: 600px) { .s3d-result { flex-direction: column; align-items: flex-start; } }
.s3d-stage.s3d-critical::before { content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 1; box-shadow: inset 0 0 140px rgba(200, 20, 20, .45); animation: s3dcritpulse .85s ease-in-out infinite; }
@keyframes s3dcritpulse { 0%, 100% { opacity: .35; } 20% { opacity: 1; } }

/* ---------- Feedback-Schleife (js/sim3d/feedback.js): Entscheidungen, Checkpoints, Baum-Auswertung ---------- */
.s3d-fb { position: absolute; inset: 0; display: grid; place-items: center; padding: 16px; background: rgba(4, 7, 9, .42); pointer-events: auto; z-index: 6; animation: s3din .25s ease-out; }
.s3d-fb.hidden { display: none; }
.s3d-hud.s3d-fb-on .s3d-actions, .s3d-hud.s3d-fb-on .s3d-cross, .s3d-hud.s3d-fb-on .s3d-prompt { visibility: hidden; }
.s3d-fb-card { width: min(560px, 100%); max-height: calc(100% - 8px); overflow-y: auto; background: rgba(12, 16, 19, .94); border: 1px solid rgba(255, 255, 255, .1); border-radius: 16px; padding: 18px 20px 20px; color: #fff; box-shadow: 0 24px 70px rgba(0, 0, 0, .55); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.s3d-fb-card.decide { border-top: 4px solid #f0a23a; }
.s3d-fb-kick { display: flex; align-items: center; gap: 7px; font-size: .7rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: #f0a23a; }
.s3d-fb-kick span { margin-left: auto; color: #8b979e; font-weight: 600; letter-spacing: .04em; text-transform: none; }
.s3d-fb-card h3 { margin: 8px 0 6px; font-size: 1.22rem; line-height: 1.3; }
.s3d-fb-card .ctx { margin: 0 0 12px; color: #c4ccd1; font-size: .9rem; line-height: 1.45; }
.s3d-fb-opts { display: flex; flex-direction: column; gap: 7px; }
.s3d-fb-opts button { text-align: left; padding: 10px 12px; border-radius: 10px; border: 1px solid #33404a; background: #172026; color: #fff; cursor: pointer; font-size: .92rem; line-height: 1.35; transition: border-color .15s, background .15s; }
.s3d-fb-opts button:hover:not(:disabled) { border-color: var(--acc); background: #1c2830; }
.s3d-fb-opts button:disabled { cursor: default; }
.s3d-fb-opts button.no { opacity: .5; text-decoration: line-through; border-color: rgba(255, 107, 87, .5); }
.s3d-fb-opts button.yes { border-color: #4cc38a; background: rgba(76, 195, 138, .14); }
.s3d-fb-card .n { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 4px; border-radius: 5px; background: rgba(255, 210, 63, .16); color: var(--acc); font-size: .72rem; font-weight: 800; font-family: var(--mono); margin-right: 9px; vertical-align: 1px; }
.s3d-fb-res { display: flex; gap: 10px; margin-top: 12px; padding: 10px 12px; border-radius: 10px; font-size: .88rem; line-height: 1.45; animation: s3din .25s ease-out; }
.s3d-fb-res .icon { flex: none; width: 20px; height: 20px; margin-top: 1px; }
.s3d-fb-res b { display: block; }
.s3d-fb-res span { display: block; color: #d7dde0; }
.s3d-fb-res em { display: block; margin-top: 4px; font-style: normal; font-weight: 700; color: #ffc2b8; }
.s3d-fb-res.bad { background: rgba(255, 107, 87, .12); border: 1px solid rgba(255, 107, 87, .4); }
.s3d-fb-res.bad .icon { color: #ff8c7a; }
.s3d-fb-res.ok { background: rgba(76, 195, 138, .12); border: 1px solid rgba(76, 195, 138, .45); }
.s3d-fb-res.ok .icon { color: #4cc38a; }
.s3d-fb-go { display: block; margin: 14px 0 0 auto; padding: 9px 16px; border-radius: 10px; border: 0; background: var(--acc); color: #111; font-weight: 800; cursor: pointer; }
.s3d-fb-go .n { background: rgba(0, 0, 0, .12); color: #111; margin: 0 0 0 8px; }
.s3d-fb-card.cp { border-top: 4px solid #4cc38a; }
.s3d-fb-card.cp.part { border-top-color: #f0a23a; }
.s3d-fb-cphead { display: flex; align-items: baseline; gap: 10px; }
.s3d-fb-cphead b { font-size: .74rem; letter-spacing: .14em; text-transform: uppercase; color: #4cc38a; }
.s3d-fb-card.cp.part .s3d-fb-cphead b { color: #f0a23a; }
.s3d-fb-cphead span { margin-left: auto; color: #aab4ba; font-size: .85rem; }
.s3d-fb-cpl { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.s3d-fb-cpl li { display: flex; gap: 10px; align-items: flex-start; }
.s3d-fb-cpl li .icon { flex: none; width: 20px; height: 20px; margin-top: 1px; }
.s3d-fb-cpl li.ok .icon { color: #4cc38a; }
.s3d-fb-cpl li.no .icon { color: #ff8c7a; }
.s3d-fb-cpl b { display: block; font-size: .98rem; }
.s3d-fb-cpl span { display: block; color: #c4ccd1; font-size: .85rem; line-height: 1.4; }
.s3d-fb-sum { margin: 12px 0 0; color: #aab4ba; font-size: .85rem; }

.fb-tree { margin-top: 16px; }
.fb-tree-head { display: flex; gap: 20px; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; }
.fb-tree-head h3 { margin: 0 0 4px; }
.fb-tree-head p { margin: 0; max-width: 60ch; }
.fb-kpis { display: flex; gap: 10px; }
.fb-kpis div { display: flex; flex-direction: column; align-items: center; padding: 8px 12px; border-radius: 10px; background: var(--surface-2, rgba(127, 127, 127, .08)); min-width: 92px; }
.fb-kpis b { font-size: 1.25rem; }
.fb-kpis span { font-size: .72rem; color: var(--muted); text-align: center; }
.fb-phases { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; margin-top: 16px; }
.fb-phase { border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.fb-phase h4 { display: flex; align-items: center; gap: 10px; margin: 0; padding: 8px 12px; background: var(--ph); color: #fff; font-size: .92rem; }
.fb-phase h4 span { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: #fff; color: var(--ph); font-size: .78rem; }
.fb-phase ol { list-style: none; margin: 0; padding: 6px 8px; display: flex; flex-direction: column; gap: 2px; }
.fb-node { display: grid; grid-template-columns: 26px 1fr auto; gap: 8px; align-items: start; padding: 6px 4px; border-radius: 8px; }
.fb-node .no { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: #2f6fb3; color: #fff; font-size: .75rem; font-weight: 800; }
.fb-node.decision .no { background: none; position: relative; z-index: 0; }
.fb-node.decision .no::before { content: ""; position: absolute; inset: 3px; z-index: -1; background: #e48a1c; border-radius: 4px; transform: rotate(45deg); }
.fb-node.danger .no { background: #c4321f; }
.fb-node.branch { opacity: .55; }
.fb-node.branch .no { background: #8a949a; }
.fb-node .tx b { display: block; font-size: .9rem; }
.fb-node .tx span { display: block; font-size: .78rem; color: var(--muted); line-height: 1.35; }
.fb-node .tx em { display: block; font-style: normal; font-size: .76rem; color: var(--muted); }
.fb-node .tx .wrong { color: var(--danger); }
.fb-node .st { display: inline-flex; align-items: center; gap: 4px; font-size: .74rem; font-weight: 700; white-space: nowrap; padding: 2px 7px; border-radius: 99px; }
.fb-node .st .icon { width: 13px; height: 13px; }
.fb-node.ok .st { background: var(--ok-soft); color: var(--ok); }
.fb-node.late .st { background: var(--warn-soft); color: var(--warn); }
.fb-node.bad .st, .fb-node.miss .st { background: var(--danger-soft); color: var(--danger); }
.fb-node.branch .st { background: transparent; color: var(--muted); }
.fb-cp { list-style: none; margin: 4px 2px 6px; padding: 8px 10px; border: 2px solid var(--ok); border-radius: 10px; background: var(--ok-soft); font-size: .82rem; }
.fb-cp.part { border-color: var(--warn); background: var(--warn-soft); }
.fb-cp.none { border-color: var(--border); background: transparent; color: var(--muted); }
.fb-cp b { display: block; letter-spacing: .08em; text-transform: uppercase; font-size: .72rem; }
.fb-cp ul { list-style: none; margin: 4px 0 0; padding: 0; }
.fb-cp li { display: flex; padding: 0; gap: 6px; align-items: center; }
.fb-cp li .icon { width: 14px; height: 14px; flex: none; }
.fb-cp li.ok .icon { color: var(--ok); }
.fb-cp li.no .icon { color: var(--danger); }
.fb-loop { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 16px; }
.fb-loop h4 { display: flex; gap: 8px; align-items: center; margin: 0 0 10px; }
.fb-bars { display: flex; align-items: flex-end; gap: 8px; height: 120px; padding: 0 2px; border-bottom: 1px solid var(--border); }
.fb-bar { flex: 1; max-width: 46px; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; position: relative; }
.fb-bar i { display: block; width: 100%; border-radius: 6px 6px 0 0; background: color-mix(in srgb, var(--ok) 45%, transparent); }
.fb-bar.cur i { background: var(--ok); }
.fb-bar span { position: absolute; top: -2px; font-size: .72rem; font-weight: 700; }
.fb-bar em { position: absolute; bottom: -18px; font-style: normal; font-size: .68rem; color: var(--muted); }
.fb-curve p { margin: 26px 0 0; }
.fb-curve .up { color: var(--ok); }
.fb-curve .down { color: var(--danger); }
.fb-next ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.fb-next li b { display: block; font-size: .9rem; }
.fb-next li span { display: block; font-size: .8rem; color: var(--muted); }
@media (max-width: 720px) { .fb-loop { grid-template-columns: 1fr; } .fb-kpis { width: 100%; } .fb-kpis div { flex: 1; min-width: 0; } }
/* Zeitlupe beim Heranfahren (Autobahn) */
.s3d-slowmo { position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .6s; box-shadow: inset 0 0 160px 40px rgba(10, 20, 40, .55); }
.s3d-slowmo.on { opacity: 1; }
.s3d-slowmo span { position: absolute; left: 50%; top: 64px; transform: translateX(-50%); padding: 4px 12px; border-radius: 99px; background: rgba(9, 12, 14, .7); color: #9fd2ff; font-size: .74rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
