:root {
  --bg: #0f1a1f; --panel: #16242b; --panel2: #1d2f37; --line: #2b424c; --txt: #e8f1f3; --mut: #9ab0b8;
  --acc: #2bb3a3; --acc2: #1f8a8a; --red: #e5484d; --amber: #f5a524; --green: #3ecf8e; --blue: #4aa3ff;
  --r: 10px; --top: 34px; --side: 232px;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Inter, Arial, sans-serif;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--txt); overflow: hidden; overscroll-behavior: none; }
body { touch-action: manipulation; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
button { font: inherit; color: inherit; }
.hidden { display: none !important; }
.screen { position: fixed; inset: 0; padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); }

/* ---------- Hochformat-Hinweis ---------- */
#rotate { position: fixed; inset: 0; z-index: 999; background: var(--bg); display: none; align-items: center; justify-content: center; flex-direction: column; gap: 18px; text-align: center; padding: 30px; }
#rotate .phone { width: 60px; height: 100px; border: 4px solid var(--acc); border-radius: 12px; animation: rot 2.2s ease-in-out infinite; }
@keyframes rot { 0%, 30% { transform: rotate(0) } 60%, 100% { transform: rotate(-90deg) } }
@media (orientation: portrait) and (max-width: 900px) and (pointer: coarse) { #rotate { display: flex; } }

/* ---------- Start / Formulare ---------- */
.center { display: flex; align-items: center; justify-content: center; height: 100%; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 18px 22px; box-shadow: 0 20px 60px rgba(0,0,0,.35); }
.start { display: grid; grid-template-columns: 1.1fr 1fr; gap: 18px; width: min(860px, 96vw); align-items: stretch; }
.hero { position: relative; border-radius: 16px; overflow: hidden; min-height: 260px; background: #0b1418; }
.hero svg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero .t { position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 16px; background: linear-gradient(transparent, rgba(5,12,15,.92)); }
.hero h1 { margin: 0; font-size: clamp(18px, 3.2vw, 28px); letter-spacing: .2px; }
.hero p { margin: 4px 0 0; color: var(--mut); font-size: 13px; }
label.f { display: block; font-size: 12px; color: var(--mut); margin: 10px 0 4px; }
input.f { width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: #0d171b; color: var(--txt); font-size: 16px; user-select: text; -webkit-user-select: text; }
input.f:focus { outline: 2px solid var(--acc); border-color: transparent; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 16px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel2); cursor: pointer; font-weight: 600; font-size: 14px; min-height: 40px; }
.btn.primary { background: linear-gradient(180deg, #33c2b1, #1f8a8a); border-color: #2bb3a3; color: #fff; }
.btn.danger { background: linear-gradient(180deg, #f0585d, #c0353a); border-color: #e5484d; color: #fff; }
.btn.ghost { background: transparent; }
.btn:active { transform: translateY(1px); filter: brightness(.95); }
.btn[disabled] { opacity: .45; pointer-events: none; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.mut { color: var(--mut); font-size: 13px; }
.small { font-size: 12px; }
.err { color: #ff8b8f; font-size: 13px; min-height: 18px; margin-top: 6px; }

/* ---------- Spiel-Layout ---------- */
#game { display: grid; grid-template-columns: 1fr var(--side); grid-template-rows: var(--top) 1fr; }
#topbar { grid-column: 1 / 3; display: flex; align-items: center; gap: 10px; padding: 0 10px; background: #0b1519; border-bottom: 1px solid var(--line); font-size: 13px; min-width: 0; }
#topbar .title { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 1; }
#topbar .pill { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 99px; background: var(--panel2); border: 1px solid var(--line); font-variant-numeric: tabular-nums; font-weight: 700; white-space: nowrap; }
#topbar .pill.time { color: #ffd479; }
#topbar .pill.score { color: #7ef0c4; }
#topbar .ibtn { width: 30px; height: 26px; border-radius: 8px; background: var(--panel2); border: 1px solid var(--line); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; font-size: 14px; }
#stageWrap { position: relative; background: #070d10; overflow: hidden; display: flex; align-items: center; justify-content: center; }
#stage { position: relative; aspect-ratio: 16 / 9; width: 100%; max-height: 100%; max-width: calc((100dvh - var(--top)) * 16 / 9); }
#stage > svg.scene { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
#stage .photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
#hot { position: absolute; inset: 0; }
.hs { position: absolute; transform: translate(-50%, -50%); border-radius: 50%; border: 2px dashed rgba(255,255,255,.0); cursor: pointer; }
.hs::after { content: ''; position: absolute; left: 50%; top: 50%; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; background: rgba(43,179,163,.85); box-shadow: 0 0 0 4px rgba(43,179,163,.25); animation: hsp 2s ease-in-out infinite; }
.hs.quiet::after { animation: none; opacity: .55; }
.hs .lbl { position: absolute; left: 50%; top: calc(50% + 12px); transform: translateX(-50%); white-space: nowrap; font-size: 10.5px; font-weight: 700; padding: 1px 6px; border-radius: 6px; background: rgba(8,16,20,.72); color: #dff; pointer-events: none; }
@keyframes hsp { 0%, 100% { box-shadow: 0 0 0 3px rgba(43,179,163,.25) } 50% { box-shadow: 0 0 0 9px rgba(43,179,163,.0) } }
.hs.show-labels .lbl { display: block; }

/* Kontextmenü am Hotspot */
.ctx { position: absolute; z-index: 30; min-width: 170px; max-width: 240px; background: rgba(14,26,31,.97); border: 1px solid var(--line); border-radius: 12px; padding: 6px; box-shadow: 0 14px 40px rgba(0,0,0,.45); }
.ctx h4 { margin: 2px 6px 6px; font-size: 12px; color: var(--mut); font-weight: 700; text-transform: uppercase; letter-spacing: .5px; }
.ctx button { display: flex; width: 100%; text-align: left; align-items: center; gap: 8px; padding: 8px 9px; border-radius: 8px; border: 0; background: transparent; cursor: pointer; font-size: 13.5px; }
.ctx button:active, .ctx button:hover { background: var(--panel2); }
.ctx button .ic { width: 20px; text-align: center; }
.ctx button[disabled] { opacity: .45; }

/* Sprechblasen */
.bubble { position: absolute; z-index: 20; max-width: 42%; background: #fff; color: #18242a; padding: 6px 10px; border-radius: 12px; font-size: 12.5px; line-height: 1.25; box-shadow: 0 6px 18px rgba(0,0,0,.3); transform: translate(-50%, -100%); pointer-events: none; animation: pop .18s ease-out; }
.bubble::after { content: ''; position: absolute; left: 50%; bottom: -7px; margin-left: -7px; border: 7px solid transparent; border-bottom: 0; border-top-color: #fff; }
.bubble .who { font-weight: 800; font-size: 10.5px; color: #1f8a8a; display: block; }
.bubble.npc .who { color: #b4590a; }
@keyframes pop { from { transform: translate(-50%, -90%) scale(.9); opacity: 0 } }

/* Toasts */
#toasts { position: absolute; top: 6px; left: 50%; transform: translateX(-50%); z-index: 40; display: flex; flex-direction: column; gap: 4px; align-items: center; pointer-events: none; width: 90%; }
.toast { padding: 5px 12px; border-radius: 99px; font-size: 12.5px; font-weight: 700; background: rgba(10,22,27,.92); border: 1px solid var(--line); animation: pop .2s; max-width: 100%; text-align: center; }
.toast.good { border-color: #2bb37c; color: #9ff3cc; }
.toast.bad { border-color: #e5484d; color: #ffb4b6; }
.toast.info { color: #cfe6ff; }

/* Vitalmonitor */
#monitor { position: absolute; left: 1.2%; top: 2%; z-index: 15; width: 27%; min-width: 150px; background: #050a0c; border: 2px solid #2a3a40; border-radius: 10px; padding: 5px 7px; font-variant-numeric: tabular-nums; box-shadow: 0 8px 24px rgba(0,0,0,.45); pointer-events: none; }
#monitor .r { display: flex; justify-content: space-between; align-items: baseline; gap: 6px; }
#monitor .k { font-size: 9.5px; font-weight: 800; letter-spacing: .5px; }
#monitor .v { font-size: 18px; font-weight: 800; line-height: 1.05; }
#monitor .hr { color: #3df58a; } #monitor .sp { color: #4cd3ff; } #monitor .bp { color: #ff6f91; } #monitor .bz { color: #ffd166; }
#monitor canvas { width: 100%; height: 24px; display: block; }
#monitor .dim { opacity: .35; }

/* Status (beschäftigt) */
#busy { position: absolute; left: 50%; bottom: 8px; transform: translateX(-50%); z-index: 25; background: rgba(9,18,22,.92); border: 1px solid var(--line); border-radius: 99px; padding: 5px 14px 5px 8px; font-size: 12.5px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
#busy .ring { width: 18px; height: 18px; border-radius: 50%; border: 3px solid #2b424c; border-top-color: var(--acc); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg) } }
#teamstrip { position: absolute; right: 6px; bottom: 6px; z-index: 14; display: flex; flex-direction: column; gap: 3px; align-items: flex-end; pointer-events: none; }
#teamstrip .t { font-size: 11px; background: rgba(9,18,22,.86); border: 1px solid var(--line); border-radius: 8px; padding: 2px 8px; }

/* Seitenleiste */
#side { background: var(--panel); border-left: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
#tabs { display: grid; grid-template-columns: repeat(5, 1fr); border-bottom: 1px solid var(--line); }
#tabs button { border: 0; background: transparent; padding: 5px 0 4px; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 1px; font-size: 9.5px; color: var(--mut); position: relative; }
#tabs button .i { font-size: 16px; line-height: 1.1; }
#tabs button.on { color: #fff; background: var(--panel2); box-shadow: inset 0 -3px 0 var(--acc); }
#tabs button .dot { position: absolute; top: 3px; right: 8px; width: 7px; height: 7px; border-radius: 50%; background: var(--amber); }
#list { flex: 1; overflow-y: auto; padding: 6px; display: flex; flex-direction: column; gap: 5px; -webkit-overflow-scrolling: touch; }
#list .sec { font-size: 10px; text-transform: uppercase; letter-spacing: .6px; color: var(--mut); margin: 4px 2px 0; font-weight: 800; }
.act { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; padding: 7px 8px; border-radius: 9px; border: 1px solid var(--line); background: var(--panel2); cursor: pointer; font-size: 12.5px; line-height: 1.2; min-height: 36px; }
.act .ic { width: 22px; flex: none; text-align: center; font-size: 15px; }
.act .sub { display: block; font-size: 10.5px; color: var(--mut); font-weight: 400; }
.act.done { border-color: #23614e; background: #14302a; }
.act.warn { border-color: #6b4a14; }
.act.hot { border-color: var(--acc); box-shadow: 0 0 0 1px var(--acc) inset; }
.act[disabled] { opacity: .45; pointer-events: none; }
.act:active { filter: brightness(1.2); }
.find { font-size: 12px; padding: 5px 7px; border-radius: 8px; background: #0f1d22; border: 1px solid var(--line); line-height: 1.25; }
.find .tm { color: var(--mut); font-size: 10px; margin-right: 4px; font-variant-numeric: tabular-nums; }
.find.crit { border-color: #7a2b2e; } .find.warn { border-color: #6b4a14; } .find.ok { border-color: #23614e; }

/* Dialoge */
#sheet { position: absolute; inset: 0; z-index: 60; background: rgba(4,9,11,.62); display: flex; align-items: center; justify-content: center; padding: 8px; }
.dlg { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; width: min(720px, 100%); max-height: 100%; display: flex; flex-direction: column; box-shadow: 0 30px 80px rgba(0,0,0,.5); animation: pop .15s; }
.dlg.wide { width: min(1000px, 100%); }
.dlg header { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-bottom: 1px solid var(--line); }
.dlg header h3 { margin: 0; font-size: 15px; flex: 1; }
.dlg header .x { width: 32px; height: 30px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel2); cursor: pointer; }
.dlg .body { padding: 10px 12px; overflow-y: auto; }
.dlg .body p { margin: 0 0 8px; font-size: 13.5px; line-height: 1.35; }
.dlg footer { padding: 8px 12px; border-top: 1px solid var(--line); display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.opts { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 6px; }
.opt { padding: 9px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel2); cursor: pointer; text-align: left; font-size: 13px; line-height: 1.25; }
.opt.sel { border-color: var(--acc); background: #133a37; }
.opt .sub { display: block; color: var(--mut); font-size: 11px; margin-top: 2px; }
.opt.right { border-color: #2bb37c; background: #123528; }
.opt.wrong { border-color: #e5484d; background: #3a1618; }
.grid-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 6px; }
.item { padding: 7px; border-radius: 10px; border: 1px solid var(--line); background: #f4f7f8; color: #1a262c; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 3px; text-align: center; font-size: 11.5px; font-weight: 600; min-height: 76px; justify-content: center; }
.item .ico { font-size: 22px; line-height: 1; }
.item small { font-weight: 400; color: #51616a; font-size: 10px; }
.item.used { outline: 2px solid #2bb37c; }
.closeup { width: 100%; max-width: calc(46vh * 800 / 460); margin: 0 auto; aspect-ratio: 800 / 460; border-radius: 10px; overflow: hidden; background: #000; }
.closeup svg, .closeup img { width: 100%; height: 100%; display: block; object-fit: cover; }
.callbox { display: grid; grid-template-columns: 1fr 1.4fr; gap: 10px; }
.phone-ui { background: #0b1418; border: 1px solid var(--line); border-radius: 14px; padding: 10px; text-align: center; }
.phone-ui .num { font-size: 26px; font-weight: 800; letter-spacing: 3px; min-height: 34px; }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 6px; }
.keypad button { height: 34px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel2); font-size: 16px; font-weight: 700; cursor: pointer; }
.chat { display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.chat .m { padding: 6px 9px; border-radius: 10px; max-width: 92%; }
.chat .m.l { background: #24363e; align-self: flex-start; }
.chat .m.me { background: #134a43; align-self: flex-end; }

/* Karte */
.map svg { width: 100%; height: auto; display: block; border-radius: 10px; }
.map .room { cursor: pointer; }
.map .room:hover rect { filter: brightness(.97); }

/* Ergebnis / Debrief */
#debrief .wrap, #final .wrap, #lobby .wrap { width: min(980px, 96vw); max-height: 96dvh; display: flex; flex-direction: column; }
.dbgrid { display: grid; grid-template-columns: 220px 1fr; gap: 14px; min-height: 0; flex: 1; }
.scorebig { font-size: 44px; font-weight: 900; color: #7ef0c4; line-height: 1; }
.check { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.check li { display: grid; grid-template-columns: 22px 1fr auto; gap: 6px; font-size: 12.5px; padding: 5px 7px; border-radius: 8px; background: #0f1d22; border: 1px solid var(--line); align-items: start; }
.check li .p { font-weight: 800; font-variant-numeric: tabular-nums; }
.check li.ok .p { color: #7ef0c4; } .check li.no .p { color: var(--mut); } .check li.pen .p { color: #ff8b8f; }
.check li .why { display: block; color: var(--mut); font-size: 11px; margin-top: 1px; }
.learn { background: #10262a; border: 1px solid #23515a; border-radius: 10px; padding: 8px 10px; font-size: 12.5px; line-height: 1.35; }
.learn ul { margin: 4px 0 0; padding-left: 18px; }
.scroll { overflow-y: auto; min-height: 0; }
table.board { width: 100%; border-collapse: collapse; font-size: 13px; }
table.board th, table.board td { padding: 6px 8px; border-bottom: 1px solid var(--line); text-align: left; font-variant-numeric: tabular-nums; }
table.board tr.me td { background: #133a37; }
table.board td.num, table.board th.num { text-align: right; }
.cpr-metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.metric { background: #0f1d22; border: 1px solid var(--line); border-radius: 10px; padding: 6px 8px; }
.metric b { display: block; font-size: 18px; }
.metric span { font-size: 11px; color: var(--mut); }

/* kleine Displays */
@media (max-height: 380px) {
  :root { --top: 30px; --side: 210px; }
  .act { min-height: 32px; padding: 5px 7px; font-size: 12px; }
  #tabs button { font-size: 9px; }
  .dlg .body { padding: 8px 10px; }
  .start { gap: 10px; }
  .card { padding: 12px 14px; }
  .hero { min-height: 200px; }
  .scorebig { font-size: 34px; }
}
@media (max-width: 700px) and (orientation: landscape) { :root { --side: 196px; } }
/* Bildebenen */
#stage .layers { position: absolute; inset: 0; overflow: hidden; background: #0b1215; }
#stage .layers img, #stage .layers video { position: absolute; object-fit: fill; display: block; transition: opacity .9s ease; pointer-events: none; user-select: none; -webkit-user-drag: none; }
.hs { border: 2px solid rgba(255,255,255,0); }
/* ---------- Reanimation ---------- */
.cpr { position: absolute; inset: 0; z-index: 12; overflow: hidden; background: #000; touch-action: none; }
.cpr .cprimg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .08s ease-out, opacity 1.2s; transform-origin: 50% 55%; pointer-events: none; }
.cpr.push .cprimg { animation: push .28s ease-out; }
@keyframes push { 0% { transform: scale(1) } 25% { transform: scale(.985) translateY(.4%) } 100% { transform: scale(1) } }
.cpr.rise .cprimg { transform: scale(1.012) translateY(-.4%); transition: transform 1s ease-out; }
.cpr .tapzone { position: absolute; left: 22%; right: 22%; top: 18%; bottom: 0; z-index: 2; }
.cpr .sternum { position: absolute; width: 9%; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%; border: 2px dashed rgba(255,255,255,.35); z-index: 3; pointer-events: none; }
.cpr .sternum.miss { border-color: rgba(229,72,77,.8); }
.cpr .hands { position: absolute; transform: translate(-50%, -50%); font-size: 34px; z-index: 4; pointer-events: none; filter: drop-shadow(0 2px 4px rgba(0,0,0,.5)); }
.cpr.push .hands { animation: hp .25s ease-out; }
@keyframes hp { 30% { transform: translate(-50%, -42%) scale(.92) } }
.cpr .cprfb { position: absolute; left: 50%; top: 6px; transform: translateX(-50%); z-index: 8; display: flex; flex-direction: column; gap: 4px; align-items: center; pointer-events: none; }
.cpr .chip { padding: 5px 12px; border-radius: 99px; font-size: 13px; font-weight: 800; background: rgba(8,16,20,.88); border: 1px solid var(--line); animation: pop .2s; white-space: nowrap; }
.cpr .chip.good { border-color: #2bb37c; color: #9ff3cc; } .cpr .chip.bad { border-color: #e5484d; color: #ffb4b6; } .cpr .chip.warn { border-color: #f5a524; color: #ffd38a; }
.cpr .bvm { position: absolute; left: 1.5%; top: 14%; width: 17%; aspect-ratio: .8; z-index: 6; border-radius: 18px; border: 2px solid #3a6f7a; background: rgba(10,26,31,.85); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; cursor: pointer; touch-action: none; }
.cpr .bvm .bag { width: 58%; aspect-ratio: .7; border-radius: 45% 45% 40% 40%; background: radial-gradient(circle at 35% 30%, #ffd9a8, #f08a24 60%, #b85a10); box-shadow: inset 0 -6px 10px rgba(0,0,0,.25); transition: transform .9s; }
.cpr .bvm.on .bag { transform: scale(.72, .6); transition: transform .9s ease-out; }
.cpr .bvm b { font-size: 13px; } .cpr .bvm small { font-size: 10px; color: var(--mut); text-align: center; line-height: 1.1; padding: 0 4px; }
.cpr .bvm.dis { opacity: .4; }
.cpr .airway { position: absolute; left: 1.5%; top: 4%; z-index: 6; font-size: 11px; min-height: 28px; padding: 4px 8px; }
.cpr .airway.done { border-color: #2bb37c; color: #9ff3cc; }
.cpr .aed { position: absolute; right: 1.5%; top: 4%; width: 22%; z-index: 7; background: #0f6e36; border: 3px solid #0a4f26; border-radius: 16px; padding: 6px; color: #fff; display: flex; flex-direction: column; gap: 6px; box-shadow: 0 10px 24px rgba(0,0,0,.4); }
.cpr .aedhead { font-weight: 900; font-size: 12px; letter-spacing: .5px; }
.cpr .aedscr { background: #0b1418; border-radius: 8px; padding: 6px; font-size: 11.5px; min-height: 44px; line-height: 1.25; color: #d7ffe6; }
.cpr .aedbtn { border-radius: 10px; border: 0; padding: 8px; font-weight: 900; cursor: pointer; font-size: 13px; }
.cpr .aedbtn.on { background: #e8f5ec; color: #0a4f26; }
.cpr .aedbtn.clear { background: #ffe9a8; color: #5a3d00; }
.cpr .aedbtn.shock { background: #ff7a00; color: #fff; animation: blink .7s infinite; font-size: 16px; }
@keyframes blink { 50% { filter: brightness(1.35); box-shadow: 0 0 18px #ff9a3c } }
.cpr .pads { display: flex; gap: 8px; justify-content: center; }
.cpr .pad, .cpr .padon { width: 46px; height: 58px; border-radius: 10px; background: #f4f6f7; border: 2px solid #c9d2d6; color: #333; display: flex; align-items: center; justify-content: center; font-size: 22px; cursor: grab; touch-action: none; }
.cpr .pad.ghost { position: absolute; transform: translate(-50%, -50%); z-index: 20; pointer-events: none; opacity: .9; }
.cpr .padon { position: absolute; transform: translate(-50%, -50%); width: 6.5%; height: auto; aspect-ratio: .78; z-index: 5; pointer-events: none; background: #eef1f3 linear-gradient(#eef1f3, #cfd8dc); border-color: #9aa5ab; }
.cpr.shockfx::after { content: ''; position: absolute; inset: 0; background: rgba(255,255,255,.75); z-index: 30; animation: fl .4s forwards; pointer-events: none; }
@keyframes fl { to { opacity: 0 } }
#stage .layers { z-index: 0; }
#hot { z-index: 6; }
.bubble.below { transform: translate(-50%, 14px); }
.bubble.below::after { bottom: auto; top: -7px; border-top: 0; border-bottom: 7px solid #fff; border-top-color: transparent; }
/* Druckstelle statt Emoji-Hand */
.cpr .hands { width: 7%; aspect-ratio: 1; border-radius: 50%; border: 3px solid rgba(255,255,255,.85); background: radial-gradient(circle, rgba(255,255,255,.35), rgba(255,255,255,0) 70%); font-size: 0; }
.cpr.push .hands { animation: hp2 .3s ease-out; }
@keyframes hp2 { 0% { transform: translate(-50%, -50%) scale(.7); opacity: 1 } 100% { transform: translate(-50%, -50%) scale(1.25); opacity: .55 } }
/* Leuchtpunkte als Ring, damit Gesichter sichtbar bleiben */
.hs::after { width: 18px; height: 18px; margin: -9px 0 0 -9px; background: rgba(43,179,163,.18); border: 2px solid rgba(120,240,220,.95); box-shadow: 0 0 0 3px rgba(43,179,163,.25), 0 0 8px rgba(0,0,0,.5); }
.hs.quiet::after { opacity: .7; }

/* Fotoversion: seitliche Sprechblasen */
.bubble.side { transform: translate(-100%, -50%); max-width: 36%; margin-left: -6px; }
.bubble.side::after { left: auto; right: -7px; top: 50%; bottom: auto; margin: -7px 0 0 0; border: 7px solid transparent; border-right: 0; border-left-color: #fff; }
.bubble.side.r { transform: translate(0, -50%); margin-left: 6px; }
.bubble.side.r::after { right: auto; left: -7px; border: 7px solid transparent; border-left: 0; border-right-color: #fff; }

/* Reanimation – Fotoversion: Bildvarianten, Beutel im Bild, Aktionsknöpfe, pulsierende Ringe */
.cpr.photo .cprimg > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: fill; transition: opacity .45s ease; pointer-events: none; }
.cpr.photo .cprimg > img.ov { inset: auto; transition: opacity 1.2s ease; }
.cpr .cacts { position: absolute; left: 1.5%; top: 13%; z-index: 7; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; max-width: 26%; }
.cpr .cacts .cact { position: static; font-size: 11.5px; min-height: 30px; padding: 5px 9px; text-align: left; background: rgba(10,26,31,.88); }
.cpr .cacts .cact:disabled { opacity: .55; }
.cpr.photo .aed { left: 1.5%; right: auto; top: 34%; width: 24%; }
/* Rückmeldungen unten (über der Hose) statt oben – oben erscheinen die Spiel-Meldungen */
.cpr.photo .cprfb { top: auto; bottom: 3%; flex-direction: column-reverse; max-width: 56%; }
.cpr.photo .chip { white-space: normal; text-align: center; }
.cpr .baghit { position: absolute; z-index: 6; border-radius: 50%; cursor: pointer; touch-action: none; }
.cpr .baghit .squeeze { position: absolute; inset: 8%; border-radius: 50%; border: 3px solid rgba(255,255,255,0); transition: transform .9s ease-out, border-color .2s; pointer-events: none; }
.cpr .baghit.on .squeeze { transform: scale(.62); border-color: rgba(255,255,255,.85); background: rgba(255,255,255,.12); }
.cpr .rings { position: absolute; left: 50%; top: 50%; width: 100%; height: 100%; transform: translate(-50%, -50%); pointer-events: none; display: none; }
.cpr .sternum .rings { width: 170%; height: 170%; }
.cpr .rings::before, .cpr .rings::after { content: ''; position: absolute; inset: 0; border-radius: 50%; border: 2.5px solid rgba(120,230,210,.95); box-shadow: 0 0 8px rgba(120,230,210,.6); animation: ringpulse 1.8s ease-out infinite; }
.cpr .rings::after { animation-delay: .9s; }
/* bewusst langsam (≈ 33/min), damit der Puls keinen Kompressionsrhythmus vorgibt */
@keyframes ringpulse { 0% { transform: scale(.45); opacity: .95 } 100% { transform: scale(1.25); opacity: 0 } }
@media (hover: hover) {
  .cpr .baghit:hover .rings { display: block; }
  .cpr .baghit.on .rings { display: none; }
  .cpr .tapzone:hover ~ .sternum .rings { display: block; }
  .cpr.comping .sternum .rings { display: none !important; }
}
@media (hover: none) {
  .cpr.nobreath .baghit .rings { display: block; }
  .cpr.nocomp .sternum .rings { display: block; }
}

/* Zähler Kompressionen : Beatmungen (oben rechts) */
.cpr .cnt { position: absolute; right: 1.5%; top: 4%; z-index: 7; background: rgba(8,16,20,.84); border: 1px solid var(--line); border-radius: 12px; padding: 4px 12px 5px; text-align: center; pointer-events: none; box-shadow: 0 6px 16px rgba(0,0,0,.3); }
.cpr:not(.photo) .cnt { top: auto; bottom: 4%; }
.cpr .cntn { display: flex; align-items: baseline; justify-content: center; gap: 5px; font-size: 26px; font-weight: 900; line-height: 1.05; font-variant-numeric: tabular-nums; color: #f2f6f7; }
.cpr .cntn b { min-width: 1.15em; display: inline-block; }
.cpr .cntn .cc { text-align: right; } .cpr .cntn .cb { text-align: left; }
.cpr .cntn span { color: var(--mut); font-size: 22px; }
.cpr .cntn b.good { color: #6ff0b8; } .cpr .cntn b.warn { color: #ffb347; }
.cpr .cntn b.bump { animation: cbump .22s ease-out; }
@keyframes cbump { 40% { transform: scale(1.22); } }
.cpr .cntl { display: flex; justify-content: space-between; gap: 10px; font-size: 9px; letter-spacing: .4px; text-transform: uppercase; color: var(--mut); }
/* AED-Elektroden */
.cpr .pads { gap: 10px; }
.cpr .padslot { display: flex; flex-direction: column; align-items: center; gap: 3px; }
.cpr .padslot small { font-size: 9.5px; color: #cfeedd; white-space: nowrap; }
.cpr .pad { width: 50px; height: 65px; background: none; border: 0; border-radius: 0; padding: 0; filter: drop-shadow(0 3px 4px rgba(0,0,0,.35)); transition: transform .15s; }
.cpr .pad:hover { transform: translateY(-2px) rotate(-3deg); }
.cpr .pad.lifted { opacity: .25; }
.cpr .pad svg, .cpr .padon svg { width: 100%; height: 100%; display: block; }
.cpr .pad.ghost { width: 58px; height: 75px; transform: translate(-50%, -50%) rotate(-6deg) scale(1.05); opacity: 1; filter: drop-shadow(0 10px 12px rgba(0,0,0,.45)); }
.cpr .padon { width: 6.2%; height: auto; aspect-ratio: 80 / 104; background: none; border: 0; border-radius: 0; transform: translate(-50%, -50%) rotate(var(--rot, 0deg)); filter: drop-shadow(0 1.5px 2px rgba(0,0,0,.35)); animation: padstick .35s ease-out; }
@keyframes padstick { 0% { transform: translate(-50%, -50%) rotate(var(--rot, 0deg)) scale(1.18); filter: drop-shadow(0 10px 10px rgba(0,0,0,.4)); } 100% { transform: translate(-50%, -50%) rotate(var(--rot, 0deg)) scale(1); } }

/* Schnellaktionen am linken Bildrand */
.fly { --fw: min(40%, 290px); position: absolute; inset: 0; z-index: 22; pointer-events: none; }
.fly .flypanel, .fly .flytab { pointer-events: auto; }
.fly .flypanel { position: absolute; left: 0; top: 0; bottom: 0; width: var(--fw); transform: translateX(-104%); transition: transform .24s ease; background: rgba(9,19,23,.96); border-right: 1px solid var(--line); box-shadow: 12px 0 30px rgba(0,0,0,.45); padding: 8px 8px 10px; overflow-y: auto; display: flex; flex-direction: column; gap: 5px; }
.fly.open .flypanel { transform: none; }
.fly .flypanel .act { width: 100%; }
.fly .flytab { position: absolute; left: 0; top: 50%; transform: translateY(-50%); width: 28px; padding: 10px 0; border-radius: 0 12px 12px 0; border: 1px solid var(--line); border-left: 0; background: rgba(10,26,31,.9); color: #e9f3f5; display: flex; flex-direction: column; align-items: center; gap: 6px; cursor: pointer; box-shadow: 4px 6px 16px rgba(0,0,0,.35); transition: left .24s ease; }
.fly .flytab .i { font-size: 14px; line-height: 1; }
.fly .flytab .l { writing-mode: vertical-rl; transform: rotate(180deg); font-size: 11px; font-weight: 800; letter-spacing: .6px; }
.fly.open .flytab { left: var(--fw); }
.fly.open .flytab .i::after { content: ''; }
/* Platz für die Lasche in der Reanimationsansicht */
.cpr .cacts, .cpr.photo .aed { left: 36px; }

/* Pausenmenü */
.menuov { position: fixed; inset: 0; z-index: 300; background: rgba(4,10,12,.6); display: flex; align-items: center; justify-content: center; padding: 12px; }
.dlg.menu { width: min(420px, 100%); }
.dlg.menu .body { display: flex; flex-direction: column; gap: 8px; padding: 12px; }
.dlg.menu .body .btn { width: 100%; justify-content: center; }
.dlg.menu .body p { margin: 2px 0 0; }
#topbar .ibtn.menu { font-size: 18px; font-weight: 900; }
