:root {
  --bg: #07090d;
  --panel: rgba(16, 20, 28, 0.88);
  --panel-solid: #11161f;
  --line: rgba(255, 255, 255, 0.08);
  --text: #e6ebf2;
  --muted: #8b96a8;
  --accent: #4cc9f0;
  --accent2: #ffd166;
  --danger: #ff6b6b;
  --radius: 10px;
  --left-w: 344px;
  --right-w: 364px;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); overflow: hidden; }
body { font-size: 15px; -webkit-font-smoothing: antialiased; }
button { font: inherit; color: inherit; }
#app { position: fixed; inset: 0; }
#viewport { position: absolute; inset: 0; }
#viewport canvas { display: block; width: 100%; height: 100%; touch-action: none; cursor: grab; }
#viewport canvas.dragging { cursor: grabbing; }

/* Kopfzeile */
#topbar {
  position: absolute; left: 0; right: 0; top: 0; height: 48px; display: flex; align-items: center; gap: 12px;
  padding: 0 12px; background: linear-gradient(180deg, rgba(7,9,13,.95), rgba(7,9,13,.6)); border-bottom: 1px solid var(--line); z-index: 20;
}
.brand { font-weight: 600; letter-spacing: .3px; font-size: 17px; white-space: nowrap; }
.brand b { color: var(--accent); }
.logo { color: var(--accent); }
.proj { margin-left: auto; font-variant-numeric: tabular-nums; color: var(--accent2); font-weight: 600; white-space: nowrap; }
.seg { display: inline-flex; background: rgba(255,255,255,.05); border: 1px solid var(--line); border-radius: 8px; padding: 2px; }
.seg button { white-space: nowrap; border: 0; background: transparent; padding: 6px 12px; border-radius: 6px; cursor: pointer; color: var(--muted); font-weight: 600; }
.seg button.active { background: var(--accent); color: #031018; }
.seg.small button { padding: 3px 10px; font-size: 14px; }
.icon-btn { border: 1px solid var(--line); background: rgba(255,255,255,.05); width: 32px; height: 32px; border-radius: 8px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; flex: none; }
.icon-btn:hover { background: rgba(255,255,255,.12); }

/* Seitenleisten */
.panel-col { position: absolute; top: 56px; bottom: 74px; overflow-y: auto; z-index: 15; padding: 0 8px; scrollbar-width: thin; scrollbar-color: #2a3240 transparent; }
#left { left: 0; width: var(--left-w); }
#right { right: 0; width: var(--right-w); }
#right.hidden, #ctRight.hidden, #symRight.hidden { display: none; }
#symRight { right: 0; width: 380px; }
#ctRight { right: 0; width: var(--right-w); }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; margin-bottom: 8px; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.card h3 { margin: 0 0 8px; font-size: 14px; text-transform: uppercase; letter-spacing: .8px; color: var(--muted); }
.row { display: flex; align-items: center; }
.row.gap { gap: 6px; margin: 6px 0; }
.row.wrap { flex-wrap: wrap; }
.btn { border: 1px solid var(--line); background: rgba(255,255,255,.06); padding: 6px 10px; border-radius: 7px; cursor: pointer; font-size: 14px; white-space: nowrap; }
.btn:hover { background: rgba(255,255,255,.13); }
.btn.primary { background: var(--accent); color: #031018; border-color: transparent; font-weight: 700; }
.btn.primary:hover { filter: brightness(1.1); }
.btn.big { width: 100%; padding: 10px; font-size: 16px; margin-top: 6px; }
.btn:disabled { opacity: .4; cursor: default; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.hint { font-size: 13px; color: var(--muted); margin-top: 6px; }
.chips { display: flex; flex-wrap: wrap; gap: 4px; margin: 4px 0 6px; }
.chip { border: 1px solid var(--line); background: rgba(255,255,255,.05); padding: 3px 8px; border-radius: 999px; cursor: pointer; font-size: 13.5px; }
.chip:hover { border-color: var(--accent); }
.chip.active { background: rgba(76,201,240,.2); border-color: var(--accent); color: #bdefff; }
.cath-pos { font-size: 16px; margin-bottom: 4px; }
.cath-pos b { color: var(--accent2); }
.cath-path { font-size: 13px; color: var(--muted); margin-bottom: 6px; line-height: 1.5; }
.cath-path span { white-space: nowrap; }
.cath-next { display: flex; flex-wrap: wrap; gap: 4px; margin: 4px 0 2px; }
.cath-next .chip { font-size: 14px; padding: 4px 9px; border-color: rgba(76,201,240,.4); }
.cath-next-title { font-size: 13px; margin-top: 4px; }

.tgl { display: flex; align-items: center; gap: 8px; padding: 3px 0; cursor: pointer; user-select: none; }
.tgl input { appearance: none; width: 30px; height: 17px; border-radius: 10px; background: #2a3240; position: relative; cursor: pointer; flex: none; margin: 0; transition: background .15s; }
.tgl input::after { content: ""; position: absolute; left: 2px; top: 2px; width: 13px; height: 13px; border-radius: 50%; background: #c9d1dc; transition: left .15s; }
.tgl input:checked { background: var(--accent); }
.tgl input:checked::after { left: 15px; background: #fff; }
.slider { display: grid; grid-template-columns: 96px 1fr 76px; align-items: center; gap: 6px; margin: 5px 0; font-size: 14px; }
.slider output { text-align: right; font-variant-numeric: tabular-nums; color: var(--accent2); }
input[type=range] { width: 100%; accent-color: var(--accent); }
input[type=search] { width: 100%; padding: 7px 9px; border-radius: 7px; border: 1px solid var(--line); background: rgba(0,0,0,.35); color: var(--text); outline: none; }
input[type=search]:focus { border-color: var(--accent); }
#tree { margin-top: 6px; max-height: 340px; overflow-y: auto; font-size: 14px; }
.tree-group { margin: 6px 0 2px; font-weight: 700; font-size: 13px; display: flex; align-items: center; gap: 6px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); }
.tree-group i { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.tree-item { padding: 3px 6px; border-radius: 5px; cursor: pointer; display: flex; justify-content: space-between; gap: 6px; }
.tree-item:hover { background: rgba(255,255,255,.07); }
.tree-item.sel { background: rgba(255,209,102,.18); color: var(--accent2); }
.tree-item .side { color: var(--muted); font-size: 12.5px; }
.credits { padding: 6px 4px 14px; }

/* Info-Karte */
.info-head { display: flex; justify-content: space-between; gap: 8px; }
.info-head h2 { margin: 2px 0 2px; font-size: 18px; }
.info-group { font-size: 13px; text-transform: uppercase; letter-spacing: .7px; font-weight: 700; }
#infoBody { margin: 10px 0 0; }
#infoBody dt { font-size: 13px; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); margin-top: 9px; font-weight: 700; }
#infoBody dd { margin: 2px 0 0; line-height: 1.45; }
#infoBody dd.supply { color: #ffe39a; }
#infoBranches { margin-top: 10px; }
#infoBranches .chip { font-size: 13px; }

/* Zeitleiste */
#timeline {
  position: absolute; left: calc(var(--left-w) + 16px); right: 16px; bottom: 12px; height: 54px; display: flex; align-items: center; gap: 10px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 6px 10px; z-index: 16; backdrop-filter: blur(8px);
}
body.right-open #timeline { right: calc(var(--right-w) + 16px); }
.tl-main { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tl-phases { display: flex; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .6px; }
.tl-phases span { border-top: 2px solid #2a3240; padding-top: 2px; margin-right: 3px; }
.tl-phases span:nth-child(1) { border-color: #ff6b6b; }
.tl-phases span:nth-child(2) { border-color: #ffd166; }
.tl-phases span:nth-child(3) { border-color: #5c7cfa; }
.tl-info { display: flex; flex-direction: column; align-items: flex-end; min-width: 92px; font-variant-numeric: tabular-nums; }
.badge { font-size: 12.5px; padding: 1px 7px; border-radius: 999px; background: #2a3240; margin-top: 2px; }
.badge.art { background: #6b2430; color: #ffd0d0; }
.badge.cap { background: #5e4c1a; color: #ffe9b0; }
.badge.ven { background: #26336b; color: #d0dbff; }
#btnLoop.on, #btnAutoRot.on { background: rgba(76,201,240,.25); border-color: var(--accent); }

/* Beschriftungen */
#labels { position: absolute; inset: 0; pointer-events: none; z-index: 10; overflow: hidden; }
.lbl {
  position: absolute; left: 0; top: 0; transform-origin: 0 0; white-space: nowrap; font-size: 13px; font-weight: 600; padding: 1px 5px 1px 4px;
  border-radius: 4px; pointer-events: auto; cursor: pointer; display: flex; align-items: center; gap: 4px; will-change: transform;
}
.lbl i { width: 6px; height: 6px; border-radius: 50%; flex: none; box-shadow: 0 0 0 1.5px rgba(0,0,0,.5); }
.lbl.dark { background: rgba(10, 14, 20, .74); color: #f2f5fa; }
.lbl.light { background: rgba(255, 255, 255, .82); color: #10141a; }
.lbl.big { font-size: 14.5px; }
.lbl.sel { outline: 2px solid var(--accent2); }
.lbl:hover { z-index: 5; filter: brightness(1.2); }
.lbl-line { position: absolute; height: 1px; transform-origin: 0 50%; pointer-events: none; }

#tooltip { position: absolute; z-index: 30; pointer-events: none; background: rgba(10,14,20,.92); border: 1px solid var(--line); padding: 5px 8px; border-radius: 6px; font-size: 14px; display: none; max-width: 280px; }
#tooltip b { color: var(--accent2); }

#carmLabel { position: absolute; right: 16px; bottom: 76px; z-index: 12; font-size: 13px; color: var(--muted); background: rgba(10,14,20,.7); padding: 2px 8px; border-radius: 6px; pointer-events: none; }
#carmLabel b { color: var(--accent2); }
body.right-open #carmLabel { right: calc(var(--right-w) + 16px); }
#phaseOverlay { position: absolute; top: 60px; left: 50%; transform: translateX(-50%); z-index: 11; font-size: 14px; letter-spacing: 1px; text-transform: uppercase; color: rgba(255,255,255,.8); text-shadow: 0 1px 3px #000; pointer-events: none; font-variant-numeric: tabular-nums; }

#loading { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; background: var(--bg); z-index: 100; gap: 14px; transition: opacity .4s; }
#loading.done { opacity: 0; pointer-events: none; }
.spinner { width: 42px; height: 42px; border-radius: 50%; border: 3px solid #1e2633; border-top-color: var(--accent); animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.modal { position: absolute; inset: 0; background: rgba(0,0,0,.6); z-index: 90; display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal.hidden { display: none; }
.modal-box { background: var(--panel-solid); border: 1px solid var(--line); border-radius: 12px; padding: 18px 22px; max-width: 620px; position: relative; max-height: 90vh; overflow: auto; line-height: 1.5; }
.modal-box h2 { margin-top: 0; }
.modal-box .close { position: absolute; right: 12px; top: 12px; }
.modal-box li { margin: 5px 0; }

.only-mobile { display: none; }

@media (max-width: 900px) {
  :root { --left-w: 320px; --right-w: 340px; }
  .only-mobile { display: inline-flex; }
  #left { transform: translateX(-105%); transition: transform .2s; background: rgba(7,9,13,.92); padding-top: 4px; }
  #left.open { transform: none; }
  #right { left: 0; right: 0; width: auto; top: auto; bottom: 74px; max-height: 52vh; background: transparent; }
  #timeline { left: 8px; right: 8px; }
  body.right-open #timeline { right: 8px; }
  body.right-open #carmLabel { right: 16px; }
  .brand { display: none; }
  .seg button { padding: 6px 8px; }
  .proj { font-size: 14px; }
}
@media (max-width: 480px) {
  .tl-info { min-width: 70px; }
  .tl-phases { display: none; }
  #topbar { gap: 6px; padding: 0 8px; }
  .seg button { padding: 5px 6px; font-size: 14px; }
}

.ori { position: absolute; z-index: 11; font-weight: 800; font-size: 18px; color: rgba(255,255,255,.85); text-shadow: 0 1px 4px #000; pointer-events: none; transform: translate(-50%, -50%); }

/* CT-Modus */
body:not(.ct-mode) .card-ct { display: none; }
body.ct-mode .card-3d, body.ct-mode #timeline, body.ct-mode #carmLabel, body.ct-mode #labels, body.ct-mode .ori,
body.ct-mode #phaseOverlay, body.ct-mode #right, body.ct-mode #tooltip { display: none !important; }
body:not(.ct-mode) #ctRight, body:not(.ct-mode) #ctOverlay, body:not(.ct-mode) #ctInfo { display: none !important; }
body.ct-mode .panel-col { bottom: 12px; }
body.ct-mode #viewport canvas { cursor: crosshair; }
#ctOverlay { position: absolute; left: 0; top: 0; pointer-events: none; z-index: 9; }
#ctInfo { position: absolute; inset: 48px 0 0 0; pointer-events: none; z-index: 9; font: 500 11.5px/1.45 ui-monospace, "SF Mono", Menlo, Consolas, monospace; color: rgba(255,255,255,.82); text-shadow: 0 1px 2px #000; }
#ctInfo .tl { position: absolute; left: calc(var(--left-w) + 22px); top: 10px; }
#ctInfo .tr { position: absolute; right: 22px; top: 10px; text-align: right; }
body.right-open #ctInfo .tr { right: calc(var(--right-w) + 22px); }
#ctInfo .bl { position: absolute; left: calc(var(--left-w) + 22px); bottom: 14px; }
#ctInfo .br { position: absolute; right: 260px; bottom: 14px; text-align: right; }
#ctInfo [class^=ori-] { position: absolute; transform: translate(-50%, -50%); font: 700 15px system-ui, sans-serif; color: rgba(255,255,255,.75); margin-top: -48px; }
#ctInfo .scout-lbl { position: absolute; font: 500 10.5px system-ui, sans-serif; color: rgba(255,255,255,.6); }
#ctResult dt { font-size: 13px; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); margin-top: 10px; font-weight: 700; }
#ctResult dd { margin: 3px 0 0; line-height: 1.45; }
#ctResult dd.verdict { color: #fff; background: rgba(255,211,77,.1); border-left: 3px solid #ffd34d; padding: 6px 8px; border-radius: 4px; }
#ctResult dd.venous { background: rgba(92,124,250,.12); border-left: 3px solid #5c7cfa; padding: 6px 8px; border-radius: 4px; }
#ctResult .chain { font-size: 13.5px; color: var(--muted); margin-top: 4px; }
#ctResult .syn { font-size: 14px; margin-top: 4px; color: #ffe39a; }
.bars { display: flex; flex-direction: column; gap: 4px; margin-top: 2px; }
.bar { position: relative; display: flex; align-items: center; gap: 6px; padding: 3px 6px; border-radius: 5px; background: rgba(255,255,255,.04); cursor: pointer; overflow: hidden; font-size: 14px; }
.bar:hover { background: rgba(255,255,255,.09); }
.bar i { position: absolute; left: 0; bottom: 0; height: 2px; opacity: .9; }
.bar .sw { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.bar .bl { flex: 1; }
.bar .bv { font-variant-numeric: tabular-nums; color: var(--accent2); }
@media (max-width: 900px) {
  #ctRight { left: 0; right: 0; width: auto; top: auto; bottom: 12px; max-height: 50vh; background: transparent; }
  #ctInfo .tl, #ctInfo .bl { left: 12px; }
  #ctInfo .br { display: none; }
}

details.variants { margin-top: 12px; border: 1px solid var(--line); border-radius: 8px; background: rgba(255,255,255,.03); }
details.variants summary { cursor: pointer; padding: 8px 10px; font-size: 14px; font-weight: 700; list-style: none; display: flex; align-items: center; gap: 8px; }
details.variants summary::-webkit-details-marker { display: none; }
details.variants summary::before { content: none; }
details.variants[open] summary::before { transform: rotate(90deg); }
.vcount { margin-left: auto; background: rgba(76,201,240,.18); color: #bdefff; border-radius: 999px; padding: 0 7px; font-size: 13px; }
.variant { padding: 8px 10px; border-top: 1px solid var(--line); font-size: 14px; line-height: 1.45; }
.variant .vh { display: flex; flex-direction: column; gap: 1px; margin-bottom: 3px; }
.variant .vf { color: var(--accent2); font-size: 13px; }
.variant .vt { color: #d4dae3; }
.variant .vchain { display: block; margin: 4px 0; color: var(--muted); font-size: 13.5px; }
.variant .vsim { margin-top: 6px; }

/* Symptom-Modus */
body:not(.sym-mode) .card-sym, body:not(.sym-mode) #symRight { display: none !important; }
body.sym-mode .card-3d, body.sym-mode #timeline, body.sym-mode #right, body.sym-mode #carmLabel { display: none !important; }
body.sym-mode .panel-col { bottom: 12px; }
.sym-search { position: relative; }
#symInput { font-size: 16px; padding: 10px 11px; }
.sym-suggest { position: absolute; left: 0; right: 0; top: calc(100% + 4px); background: #161c27; border: 1px solid rgba(76,201,240,.35); border-radius: 9px; z-index: 40; overflow: hidden; box-shadow: 0 12px 30px rgba(0,0,0,.5); }
.sym-suggest.hidden { display: none; }
.sug { padding: 8px 10px; cursor: pointer; display: flex; justify-content: space-between; gap: 8px; font-size: 15px; }
.sug .c { color: var(--muted); font-size: 13px; white-space: nowrap; }
.sug.act, .sug:hover { background: rgba(76,201,240,.16); }
.sug b { color: var(--accent); font-weight: 700; }
.sym-selected { display: flex; flex-direction: column; gap: 5px; margin: 8px 0 2px; }
.symchip { display: flex; align-items: center; gap: 6px; background: rgba(255,209,102,.1); border: 1px solid rgba(255,209,102,.35); border-radius: 8px; padding: 5px 6px 5px 9px; font-size: 14.5px; }
.symchip .t { flex: 1; }
.symchip .sd { border: 1px solid rgba(255,255,255,.2); background: rgba(0,0,0,.3); border-radius: 6px; padding: 1px 7px; font-size: 13.5px; cursor: pointer; font-weight: 700; color: var(--accent2); min-width: 34px; }
.symchip .x { border: 0; background: transparent; cursor: pointer; color: var(--muted); font-size: 16px; padding: 0 4px; }
.symchip .x:hover { color: #fff; }
#symResult .empty { padding: 16px; color: var(--muted); line-height: 1.5; }
.top-hit { background: linear-gradient(160deg, rgba(255,209,102,.16), rgba(16,20,28,.92) 55%); border: 1px solid rgba(255,209,102,.55); border-radius: 12px; padding: 12px 14px; margin-bottom: 8px; box-shadow: 0 0 0 1px rgba(255,209,102,.15), 0 10px 30px rgba(0,0,0,.35); backdrop-filter: blur(8px); }
.top-hit.ven { background: linear-gradient(160deg, rgba(92,124,250,.22), rgba(16,20,28,.92) 55%); border-color: rgba(120,150,255,.7); }
.top-hit .lbl-top { font-size: 13px; letter-spacing: .8px; text-transform: uppercase; color: var(--accent2); font-weight: 800; }
.top-hit.ven .lbl-top { color: #a9b9ff; }
.top-hit h2 { margin: 3px 0 2px; font-size: 19px; line-height: 1.25; }
.top-hit .pct { font-size: 34px; font-weight: 800; color: #fff; line-height: 1; font-variant-numeric: tabular-nums; }
.top-hit .pbar { height: 7px; border-radius: 4px; background: rgba(255,255,255,.1); overflow: hidden; margin: 8px 0 4px; }
.top-hit .pbar i { display: block; height: 100%; background: linear-gradient(90deg, #ffd166, #ff8a5b); }
.top-hit.ven .pbar i { background: linear-gradient(90deg, #8aa2ff, #5c7cfa); }
.top-hit .head { display: flex; justify-content: space-between; align-items: flex-end; gap: 10px; }
.sec { margin-top: 10px; }
.sec-t { font-size: 13px; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); font-weight: 700; margin-bottom: 4px; }
.regions { display: flex; flex-wrap: wrap; gap: 4px; }
.region { background: rgba(255,209,102,.18); color: #ffe7a8; border-radius: 6px; padding: 3px 8px; font-size: 14px; font-weight: 600; }
.top-hit.ven .region { background: rgba(92,124,250,.22); color: #d5ddff; }
.steps { margin: 0; padding-left: 0; list-style: none; counter-reset: st; }
.steps li { position: relative; padding: 5px 0 5px 28px; font-size: 14.5px; line-height: 1.45; border-top: 1px solid rgba(255,255,255,.06); }
.steps li:first-child { border-top: 0; }
.steps li::before { counter-increment: st; content: counter(st); position: absolute; left: 0; top: 5px; width: 19px; height: 19px; border-radius: 50%; background: #ffd166; color: #231a00; font-weight: 800; font-size: 13px; display: flex; align-items: center; justify-content: center; }
.top-hit.ven .steps li::before { background: #8aa2ff; color: #0b1033; }
.match { display: flex; flex-wrap: wrap; gap: 4px; }
.match span { font-size: 13.5px; padding: 2px 7px; border-radius: 5px; }
.match .ok { background: rgba(80,200,120,.16); color: #b6f0c8; }
.match .no { background: rgba(255,107,107,.14); color: #ffc0c0; }
.act-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.alt-card { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin-bottom: 8px; backdrop-filter: blur(8px); }
.alt { position: relative; display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 6px; cursor: pointer; font-size: 14.5px; overflow: hidden; }
.alt:hover, .alt.on { background: rgba(255,255,255,.08); }
.alt .n { flex: 1; }
.alt .v { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--accent2); }
.alt.venous .v { color: #a9b9ff; }
.alt i { position: absolute; left: 0; bottom: 0; height: 2px; }
.alt .tag { font-size: 12px; padding: 0 5px; border-radius: 4px; background: rgba(255,255,255,.1); color: var(--muted); }
.alt.venous .tag { background: rgba(92,124,250,.25); color: #c9d3ff; }
.ven-dd { border-color: rgba(120,150,255,.45); background: linear-gradient(160deg, rgba(92,124,250,.12), rgba(16,20,28,.9) 60%); }
.disclaim { font-size: 13px; color: var(--muted); padding: 2px 4px 14px; }
@media (max-width: 900px) {
  #symRight { left: 0; right: 0; width: auto; top: auto; bottom: 12px; max-height: 55vh; background: transparent; }
}

.card:has(.sym-search) { position: relative; z-index: 6; }

/* CT-Befund */
.sel { width: 100%; padding: 8px 9px; border-radius: 7px; border: 1px solid var(--line); background: rgba(0,0,0,.35); color: var(--text); font: inherit; margin-bottom: 6px; }
.sel option { background: #11161f; }
.ct-find { margin-top: 8px; }
.find-head { background: linear-gradient(160deg, rgba(255,77,77,.22), rgba(16,20,28,.6)); border: 1px solid rgba(255,90,90,.55); border-radius: 9px; padding: 8px 10px; }
.fh-l { font-size: 12.5px; letter-spacing: .8px; text-transform: uppercase; color: #ff9a8a; font-weight: 800; }
.fh-t { font-size: 17px; font-weight: 700; margin-top: 2px; }
.fh-s { font-size: 13.5px; color: var(--muted); }
.find-sec { margin-top: 8px; }
.fs-t { font-size: 13px; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); font-weight: 700; margin-bottom: 3px; }
.find-sec ul { margin: 0; padding-left: 16px; font-size: 14.5px; line-height: 1.45; }
.find-sec ul b { color: #ffb4a8; }
.asp { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.asp-n { font-size: 26px; font-weight: 800; color: #ffd166; min-width: 30px; }
.asp b { background: rgba(255,90,90,.25); color: #ffd0c8; padding: 1px 5px; border-radius: 4px; }
.ct-find .steps li::before { background: #ff8a7a; color: #2a0500; }

/* Fall-Tabs */
.case-tabs { display: flex; flex-wrap: wrap; gap: 4px; padding-bottom: 6px; margin-bottom: 6px; border-bottom: 1px solid var(--line); scrollbar-width: thin; }
.ctab { flex: none; display: flex; align-items: center; gap: 6px; padding: 5px 8px 5px 10px; border-radius: 8px 8px 4px 4px; background: rgba(255,255,255,.05); border: 1px solid var(--line); cursor: pointer; font-size: 14px; max-width: 170px; }
.ctab .n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.ctab .e { color: var(--muted); font-size: 12.5px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ctab .x { border: 0; background: transparent; color: var(--muted); cursor: pointer; padding: 0 2px; font-size: 14px; }
.ctab .x:hover { color: #fff; }
.ctab.on { background: rgba(76,201,240,.18); border-color: var(--accent); }
.ctab-add { flex: none; width: 30px; border-radius: 8px; border: 1px dashed rgba(76,201,240,.6); background: transparent; color: var(--accent); font-size: 18px; cursor: pointer; }
.ctab-add:hover { background: rgba(76,201,240,.12); }
.case-fields input[type=text], .case-fields input[type=datetime-local] { width: 100%; padding: 7px 9px; border-radius: 7px; border: 1px solid var(--line); background: rgba(0,0,0,.35); color: var(--text); font: inherit; color-scheme: dark; }
.case-onset { flex-wrap: wrap; }
.case-onset label { width: 100%; }
.case-onset input { flex: 1; min-width: 0; }
.case-elapsed { margin-top: 6px; display: flex; flex-wrap: wrap; gap: 4px; font-size: 14px; }
.case-elapsed .big { width: 100%; font-size: 18px; font-weight: 800; font-variant-numeric: tabular-nums; }
.tw { padding: 2px 7px; border-radius: 5px; font-size: 13px; font-weight: 600; }
.tw.ok { background: rgba(80,200,120,.18); color: #b6f0c8; }
.tw.warn { background: rgba(255,209,102,.16); color: #ffe39a; }
.tw.no { background: rgba(255,107,107,.15); color: #ffc0c0; }

.ct-case { background: rgba(255,255,255,.04); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; font-size: 14.5px; line-height: 1.45; margin-bottom: 6px; }
.ct-case .cc-l { font-size: 12.5px; text-transform: uppercase; letter-spacing: .7px; color: var(--muted); font-weight: 700; }
.ct-case .cc-o { font-size: 16px; font-weight: 700; color: #ffb4a8; }
.ct-case .btn { margin-top: 6px; }
.occ-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 4px; }
.occ-row select { flex: 1; min-width: 170px; margin: 0; }
.alt .occ-tag { max-width: 92px; overflow: hidden; text-overflow: ellipsis; font-size: 12px; padding: 1px 6px; border-radius: 4px; background: rgba(255,90,90,.18); color: #ffc4b8; white-space: nowrap; }
.alt.cur { outline: 1px solid rgba(255,209,102,.6); }

.report-box { width: min(760px, 100%); max-width: 760px; }
.rep-opts { margin: 8px 0; flex-wrap: wrap; }
#reportText { width: 100%; min-height: 380px; resize: vertical; box-sizing: border-box; background: #0b0f14; color: #e8edf3; border: 1px solid var(--line); border-radius: 8px; padding: 12px; font: 13.5px/1.55 ui-monospace, Menlo, Consolas, monospace; white-space: pre-wrap; margin-bottom: 10px; }
.asp-grid { display: grid; gap: 2px; margin-top: 6px; font-size: 13.5px; }
.asp-h { color: var(--muted, #8a97a8); font-size: 12.5px; text-transform: uppercase; letter-spacing: .04em; margin-top: 4px; }
.asp-r { display: grid; grid-template-columns: 30px 1fr; align-items: center; gap: 6px; padding: 2px 4px; border-radius: 4px; color: #b8c3d0; }
.asp-r b { text-align: center; background: rgba(255,255,255,.08); border-radius: 3px; padding: 0 3px; font-weight: 700; }
.asp-r.hit { background: rgba(255,90,90,.16); color: #ffd0c8; }
.asp-r.hit b { background: rgba(255,90,90,.45); color: #fff; }
.match .via { font-style: normal; opacity: .7; font-size: 13px; }

/* ============================================================================================
   UI 2026-10-26: Modusleiste, einklappbare Karten, Ergebnis-Register, Bottom-Sheets
   ============================================================================================ */
svg[viewBox="0 0 24 24"] { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
#topbar { height: 56px; gap: 14px; }
.panel-col { top: 64px; }
#phaseOverlay { top: 68px; }
#btnPanel svg { width: 17px; height: 17px; }
.modes { display: flex; align-items: flex-end; gap: 6px; margin-left: 4px; }
.mgroup { display: flex; flex-direction: column; gap: 1px; }
.mg-l { font-size: 10.5px; letter-spacing: .6px; text-transform: uppercase; color: #5d6878; padding-left: 6px; line-height: 1; }
.mg-b { display: flex; justify-content: center; background: rgba(255,255,255,.045); border: 1px solid var(--line); border-radius: 9px; padding: 2px; }
.modes button { display: flex; align-items: center; gap: 6px; border: 0; background: transparent; color: var(--muted); padding: 6px 11px; border-radius: 7px; cursor: pointer; font-weight: 600; white-space: nowrap; transition: background .15s, color .15s; }
.modes button:hover { color: var(--text); background: rgba(255,255,255,.06); }
.modes button.active { background: var(--accent); color: #031018; box-shadow: 0 2px 10px rgba(76,201,240,.35); }
.modes button svg { width: 16px; height: 16px; }

/* einklappbare Karten */
.card.collapsible > h3 { cursor: pointer; display: flex; align-items: center; justify-content: space-between; margin: -2px 0 0; padding: 2px 0; user-select: none; }
.card.collapsible > h3:hover { color: var(--text); }
.card.collapsible:not(.collapsed) > h3 { margin-bottom: 8px; }
.card .chev { width: 15px; height: 15px; transition: transform .18s; opacity: .7; }
.card.collapsed .chev { transform: rotate(-90deg); }
.card.collapsed .card-body { display: none; }
.card.collapsed { padding-top: 8px; padding-bottom: 8px; }

/* Seitenleiste einklappen (Desktop) */
body.left-collapsed { --left-w: 0px; }
body.left-collapsed #left { display: none; }
#btnPanel { color: var(--muted); }
body:not(.left-collapsed) #btnPanel { color: var(--accent); border-color: rgba(76,201,240,.4); }

/* Ergebnis: Kopf, Register, Aktionsleiste */
.top-hit .pct small { font-size: 18px; font-weight: 700; margin-left: 1px; opacity: .8; }
.top-hit .side-t { color: var(--accent2); }
.top-hit > .match { margin-top: 8px; }
.rtabs { display: flex; gap: 2px; margin: 12px 0 0; border-bottom: 1px solid rgba(255,255,255,.1); }
.rtabs button { flex: 1; border: 0; background: transparent; color: var(--muted); padding: 7px 4px 8px; font-size: 14px; font-weight: 700; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; display: inline-flex; align-items: center; justify-content: center; gap: 5px; }
.rtabs button:hover { color: var(--text); }
.rtabs button.on { color: var(--accent2); border-bottom-color: var(--accent2); }
.top-hit.ven .rtabs button.on { color: #a9b9ff; border-bottom-color: #a9b9ff; }
.rtabs .dot { width: 6px; height: 6px; border-radius: 50%; background: #ff6b6b; display: inline-block; }
.rpane { padding-top: 8px; min-height: 90px; }
.rpane .sec:first-child { margin-top: 0; }
.sec-v { font-size: 14.5px; line-height: 1.45; }
.act-bar { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 12px; padding-top: 10px; border-top: 1px solid rgba(255,255,255,.08); }
.act-bar .btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 10px; font-size: 14.5px; min-width: 0; }
.act-bar .btn span { overflow: hidden; text-overflow: ellipsis; }
.act-bar .btn svg { width: 16px; height: 16px; }
.act-bar .btn.alt2 { background: #ffd166; color: #231a00; }
.alt-card .alt.more { display: none; }
.alt-card.all .alt.more { display: flex; }
.linkbtn { border: 0; background: transparent; color: var(--accent); cursor: pointer; font-size: 14px; padding: 6px 8px 2px; }
.linkbtn:hover { text-decoration: underline; }
.top-hit.intro h2 { font-size: 20px; }
.onb { list-style: none; counter-reset: ob; margin: 10px 0 4px; padding: 0; }
.onb li { position: relative; padding: 7px 0 7px 36px; border-top: 1px solid rgba(255,255,255,.06); display: flex; flex-direction: column; gap: 2px; }
.onb li:first-child { border-top: 0; }
.onb li::before { counter-increment: ob; content: counter(ob); position: absolute; left: 0; top: 8px; width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid var(--accent2); color: var(--accent2); font-weight: 800; display: flex; align-items: center; justify-content: center; font-size: 14px; }
.onb b { font-size: 15.5px; }
.onb span { font-size: 14px; color: var(--muted); line-height: 1.4; }
.sheet-handle, .left-head { display: none; }
#symGo[hidden] { display: none; }

/* sanftere Übergänge */
.card, .top-hit, .alt-card { transition: border-color .2s; }
.btn, .chip { transition: background .15s, border-color .15s; }
.btn:focus-visible, .chip:focus-visible, .modes button:focus-visible, .rtabs button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

/* ---------------- Handy / Tablet ---------------- */
@media (max-width: 900px) {
  :root { --tabbar: calc(60px + env(safe-area-inset-bottom)); }
  #topbar { height: 52px; }
  .brand { display: block; font-size: 16px; }
  .panel-col { top: 58px; }
  .modes { position: fixed; left: 0; right: 0; bottom: 0; height: var(--tabbar); margin: 0; z-index: 60; background: rgba(9,12,18,.96); border-top: 1px solid var(--line); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); padding: 4px 4px env(safe-area-inset-bottom); gap: 0; align-items: stretch; }
  .mgroup, .mg-b { display: contents; }
  .mg-l { display: none; }
  .modes button { flex: 1; flex-direction: column; gap: 3px; padding: 6px 0 4px; font-size: 12.5px; border-radius: 10px; min-width: 0; }
  .modes button svg { width: 21px; height: 21px; }
  .modes button.active { background: transparent; color: var(--accent); box-shadow: none; }
  .modes button.active svg { filter: drop-shadow(0 0 6px rgba(76,201,240,.6)); }
  #timeline { bottom: calc(var(--tabbar) + 8px); }
  #carmLabel { bottom: calc(var(--tabbar) + 72px); }
  body.ct-mode .panel-col, body.sym-mode .panel-col, .panel-col { bottom: calc(var(--tabbar) + 8px); }
  #left { top: 0; bottom: var(--tabbar); width: min(92vw, 360px); z-index: 50; padding: 0 10px 10px; box-shadow: 10px 0 30px rgba(0,0,0,.5); }
  .left-head { display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 3; padding: 12px 2px 10px; background: rgba(7,9,13,.96); }
  .left-head b { font-size: 17px; }
  /* Bottom-Sheets */
  .sheet { left: 0 !important; right: 0 !important; width: auto !important; top: auto !important; bottom: calc(var(--tabbar)) !important; max-height: 62vh; padding: 0 8px 8px; background: rgba(9,12,18,.97) !important; border-top: 1px solid var(--line); border-radius: 16px 16px 0 0; box-shadow: 0 -10px 30px rgba(0,0,0,.5); transition: max-height .25s ease; }
  .sheet.min { max-height: 128px; overflow: hidden; }
  .sheet-handle { display: flex; justify-content: center; position: sticky; top: 0; z-index: 3; padding: 8px 0 8px; background: inherit; cursor: pointer; }
  .sheet-handle i { width: 42px; height: 5px; border-radius: 3px; background: #3a4456; }
  .sheet .card, .sheet .top-hit, .sheet .alt-card { backdrop-filter: none; -webkit-backdrop-filter: none; }
  .act-bar { grid-template-columns: 1fr 1fr; }
  .act-bar .btn { padding: 10px; font-size: 15px; }
  .btn, .chip { min-height: 32px; }
  .chip { padding: 5px 10px; font-size: 14.5px; }
  #symGo { margin-top: 8px; }
  #symGo b { color: #031018; }
  .proj { font-size: 13.5px; }
  #ctInfo .bl { bottom: calc(var(--tabbar) + 14px); }
}
@media (max-width: 480px) {
  .brand { display: none; }
}

#terrLegend { display: none; position: absolute; left: calc(var(--left-w) + 24px); right: 404px; bottom: 16px; z-index: 12; flex-wrap: wrap; justify-content: center; gap: 4px 12px; font-size: 13.5px; color: #cdd5df; pointer-events: none; }
body.sym-overview #terrLegend { display: flex; }
#terrLegend span { display: inline-flex; align-items: center; gap: 5px; background: rgba(10,14,20,.72); padding: 3px 8px; border-radius: 999px; }
#terrLegend i { width: 9px; height: 9px; border-radius: 50%; }
#terrLegend .tl-t { background: transparent; color: var(--muted); text-transform: uppercase; letter-spacing: .7px; font-size: 12px; }
@media (max-width: 900px) { #terrLegend { left: 8px; right: 8px; bottom: auto; top: 60px; font-size: 12.5px; } #terrLegend .tl-t { display: none; } }

#ctRoiCard.hidden { display: none; }
#ctFindCard .ct-find { margin-top: 0; }
body.ct-mode .proj, body.sym-mode .proj { visibility: hidden; }
body.sym-mode #phaseOverlay { display: none; }
body.right-open #ctInfo .br { right: calc(var(--right-w) + 266px); }
@media (max-width: 900px) { .sheet { max-height: 54vh; } }
@media (max-width: 900px) {
  .sheet.min { max-height: 132px !important; overflow: hidden; }
  body.right-open #ctInfo .tr { right: 12px; }
  #ctInfo .tr { right: 12px; }
}
@media (max-width: 900px) { #ctInfo .bl { bottom: calc(var(--tabbar) + 142px); } }
@media (max-width: 900px) { #ctInfo .scout-lbl { display: none; } }
#symGo { display: flex; align-items: center; justify-content: center; gap: 8px; white-space: normal; }
#symGo[hidden] { display: none; }

/* Ursachen & Literatur */
.bars.causes .bar { align-items: flex-start; padding: 5px 6px 6px; }
.bars.causes .bl { display: flex; flex-direction: column; gap: 1px; }
.bars.causes .bl small { color: #ffd9a0; font-size: 12.5px; line-height: 1.3; }
.bars.causes .bar.var .sw { box-shadow: 0 0 0 2px rgba(255,209,102,.5); }
.refs { display: flex; flex-direction: column; gap: 3px; margin-top: 6px; }
.ref { display: block; font-size: 13.5px; line-height: 1.35; color: #9fd8ff; text-decoration: none; padding: 3px 6px 3px 22px; border-radius: 5px; background: rgba(255,255,255,.04); position: relative; }
.ref:hover { background: rgba(76,201,240,.14); color: #d6f2ff; }
.ref::before { position: absolute; left: 6px; top: 3px; font-size: 12px; font-weight: 800; }
.ref.rp::before { content: 'R'; color: #7dd3a8; }
.ref.pm::before { content: 'V'; color: #ffd166; }
.ref-leg { font-size: 12px; color: var(--muted); padding: 0 2px 2px; }
.ref-leg .lr { color: #7dd3a8; font-weight: 800; }
.ref-leg .lv { color: #ffd166; font-weight: 800; }
.ref.pq::before { content: 'S'; color: #9fb3c8; }
.ref.pq { color: #b9c6d4; }

/* Symptombeginn: Schnelleingabe */
.onset-row { margin-top: 8px; }
.onset-row > label { display: block; margin-bottom: 3px; }
.onset-in { position: relative; display: flex; gap: 6px; }
.onset-in input[type=text] { flex: 1; min-width: 0; padding: 8px 10px; border-radius: 7px; border: 1px solid var(--line); background: rgba(0,0,0,.35); color: var(--text); font: inherit; font-size: 16px; outline: none; }
.onset-in input[type=text]:focus { border-color: var(--accent); }
.onset-in input.bad { border-color: #ff6b6b; }
.onset-in .icon-btn { width: 38px; height: auto; }
#caseOnset { position: absolute; right: 0; top: 0; width: 38px; height: 100%; opacity: 0; pointer-events: none; color-scheme: dark; }
.onset-hint { min-height: 16px; font-size: 13.5px; margin-top: 3px; color: var(--muted); }
.onset-hint b { color: var(--accent2); }
.onset-hint.bad { color: #ff9a8a; }
.onset-quick { margin-top: 6px; }
.onset-quick .chip { font-variant-numeric: tabular-nums; }
.small-tgl { font-size: 14px; margin-top: 4px; }
@media (min-width: 901px) { #symGo { display: none !important; } }

/* Belege an Prozentangaben */
.evs { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 3px; }
.ev { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; line-height: 1; color: #8fd0ff; text-decoration: none; padding: 3px 6px; border-radius: 99px; background: rgba(76,201,240,.1); border: 1px solid rgba(76,201,240,.22); white-space: nowrap; font-style: normal; }
.ev:hover { background: rgba(76,201,240,.22); color: #e3f6ff; }
.ev::before { content: none; }
.ev.model { color: #9aa6b4; background: rgba(255,255,255,.04); border-color: rgba(255,255,255,.1); }
.ev.model::before { content: none; }
.bars.causes .bar { cursor: default; }
.bars.causes .bar[data-id] { cursor: pointer; }

details.calc { margin: 2px 0 8px; font-size: 14px; }
details.calc summary { cursor: pointer; color: var(--accent); font-weight: 600; list-style: none; }
details.calc summary::-webkit-details-marker { display: none; }
details.calc summary::before { content: none; }

.calc-b { margin-top: 6px; padding: 8px 10px; border-radius: 7px; background: rgba(255,255,255,.04); line-height: 1.45; }
.calc-b b { display: block; margin-top: 6px; }
.calc-b b:first-child { margin-top: 0; }

.spine-link { display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border-radius: 9px; border: 1px solid var(--line); color: var(--muted); text-decoration: none; font-weight: 600; white-space: nowrap; }
.spine-link:hover { color: var(--text); border-color: rgba(76,201,240,.5); }
@media (max-width: 900px) { .spine-link span { font-size: 14px; } .spine-link { padding: 6px 9px; margin-left: auto; } }

#occOverlay { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 9; opacity: 0; transition: opacity .4s; }
#occOverlay.on { opacity: 1; }
body.sym-overview #terrLegend { display: none; }

/* Quellen hinter kleinem Knopf */
.srcs { display: inline-block; margin-top: 6px; max-width: 100%; }
.srcs > summary { list-style: none; display: inline-flex; align-items: center; gap: 5px; cursor: pointer; font-size: 13px; font-weight: 700; color: #9fb3c8; padding: 4px 9px; border-radius: 99px; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.12); user-select: none; }
.srcs > summary::-webkit-details-marker { display: none; }
.srcs > summary svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; }
.srcs > summary b { font-size: 12px; background: rgba(76,201,240,.2); color: #bfeaff; border-radius: 99px; padding: 1px 5px; }
.srcs > summary:hover, .srcs[open] > summary { color: #e3f6ff; border-color: rgba(76,201,240,.45); background: rgba(76,201,240,.12); }
.srcs[open] { display: block; }
.src-row { margin-top: 8px; }

/* Verschluss-Auswahl als Chips */
.occ-pick { margin-top: 12px; padding: 10px 10px 8px; border-radius: 10px; background: rgba(255,80,80,.06); border: 1px solid rgba(255,107,107,.18); }
.top-hit.ven .occ-pick { background: rgba(92,124,250,.07); border-color: rgba(92,124,250,.25); }
.op-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 7px; }
.op-h .sec-t { margin: 0; }
.ochips { display: flex; flex-wrap: wrap; gap: 5px; }
.ochips.all { margin-top: 6px; padding-top: 6px; border-top: 1px dashed rgba(255,255,255,.12); }
.ochip { display: inline-flex; align-items: center; gap: 5px; border: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.05); color: var(--text); border-radius: 99px; padding: 5px 10px; font-size: 14px; font-weight: 600; cursor: pointer; transition: background .15s, border-color .15s, transform .1s; }
.ochip:hover { border-color: rgba(255,107,107,.6); background: rgba(255,107,107,.12); }
.ochip:active { transform: scale(.97); }
.ochip b { font-size: 12.5px; color: #ffb4a6; font-weight: 800; }
.ochip .s { font-size: 12.5px; color: var(--muted); font-weight: 700; }
.ochip.on { background: #e5484d; border-color: #ff6b6b; color: #fff; box-shadow: 0 0 0 3px rgba(229,72,77,.25); }
.ochip.on b, .ochip.on .s { color: #ffe3de; }
.ochip.ven:hover { border-color: rgba(92,124,250,.7); background: rgba(92,124,250,.14); }
.ochip.ven.on { background: #4c6ef5; border-color: #748ffc; box-shadow: 0 0 0 3px rgba(76,110,245,.25); }
.ochip.none, .ochip.more { color: var(--muted); font-weight: 600; }
.ochip.none.on { background: rgba(255,255,255,.18); border-color: rgba(255,255,255,.4); color: #fff; box-shadow: none; }
.ochip.more { border-style: dashed; }
.bar.cause.pick { cursor: pointer; border-radius: 6px; transition: background .15s; }
.bar.cause.pick:hover { background: rgba(255,107,107,.1); }
.bar.cause.on { background: rgba(229,72,77,.16); box-shadow: inset 3px 0 0 #e5484d; }
.hint-pick { margin-top: 4px; font-size: 12.5px; }
.rtabs .srcs { margin: 0 0 0 auto; align-self: center; flex: none; }
.rtabs .srcs[open] { position: relative; }
.rtabs .srcs[open] > .refs { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; width: min(320px, 80vw); max-height: 260px; overflow: auto; background: #151b26; border: 1px solid rgba(255,255,255,.14); border-radius: 10px; padding: 8px; box-shadow: 0 12px 30px rgba(0,0,0,.5); margin: 0; }
body.sym-mode #labels { display: none !important; }

/* =====================================================================================
   Stroke-Cockpit: ruhige, dreispaltige Arbeitsfläche ohne Vollbild-Hintergrund
   ===================================================================================== */
.l-short { display: none; }
.cockpit { display: none; }
body.sym-mode .cockpit { display: flex; flex-direction: column; position: fixed; left: 0; right: 0; top: 56px; bottom: 0; z-index: 30; background: #0b0e13; overflow: hidden; }
body.sym-mode #left, body.sym-mode #right, body.sym-mode #timeline, body.sym-mode #carmLabel, body.sym-mode #btnPanel, body.sym-mode #projReadout, body.sym-mode #tooltip, body.sym-mode .ori { display: none !important; }
body.sym-mode #app > #viewport { visibility: hidden; }
.ck-head { display: flex; align-items: center; gap: 22px; padding: 14px 24px; border-bottom: 1px solid var(--line); background: #0d1117; }
.ck-title { margin: 0; font-size: 19px; font-weight: 700; letter-spacing: .2px; white-space: nowrap; }
.cockpit .case-tabs { flex: 1; display: flex; gap: 6px; flex-wrap: wrap; margin: 0; padding: 0; border: 0; }
.cockpit .ctab { max-width: none; border-radius: 8px; font-size: 15px; }
.cockpit .ctab-add { width: auto; font-size: 15px; color: var(--muted); border-color: #2c3647; white-space: nowrap; }
.cockpit .ctab { display: flex; align-items: center; gap: 8px; padding: 7px 12px; border-radius: 8px; background: transparent; border: 1px solid var(--line); cursor: pointer; color: var(--muted); font-weight: 600; }
.cockpit .ctab.on { background: #171d27; color: var(--text); border-color: #2c3647; }
.cockpit .ctab .e { font-weight: 500; color: var(--muted); font-size: 14px; }
.cockpit .ctab .x { border: 0; background: none; color: var(--muted); font-size: 13.5px; padding: 0 0 0 6px; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.cockpit .ctab-add { border: 1px dashed #2c3647; background: none; color: var(--muted); padding: 7px 12px; border-radius: 8px; cursor: pointer; font-weight: 600; }
.cockpit .ctab-add:hover { color: var(--text); border-color: #45526a; }
.ck-clock { text-align: right; min-width: 260px; }
.ck-reset { flex: none; border: 1px solid #3a2a30; background: transparent; color: #f2a7ad; font: inherit; font-size: 15px; font-weight: 600; padding: 8px 14px; border-radius: 8px; cursor: pointer; white-space: nowrap; }
.ck-reset:hover { background: rgba(255,107,107,.1); border-color: #6b3a42; }
.ck-reset.arm { background: var(--danger); border-color: var(--danger); color: #1a0508; }
.ck-cl-t { font-size: 13px; text-transform: uppercase; letter-spacing: .8px; color: var(--muted); }
.ck-cl-v { font-size: 24px; font-weight: 700; line-height: 1.15; }
.ck-cl-v.muted { font-size: 17px; color: var(--muted); font-weight: 500; }
.ck-cl-s { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; margin-top: 4px; }
.ck-cl-s .tw { font-size: 13.5px; padding: 2px 8px; border-radius: 6px; margin: 0; }
.ck-grid { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(300px, 360px) minmax(0, 1fr) minmax(320px, 420px); gap: 20px; padding: 20px 24px; overflow: hidden; }
.ck-col { min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; padding-right: 2px; display: flex; flex-direction: column; gap: 14px; }
.ck-card { background: #11161f; border: 1px solid #1d2532; border-radius: 12px; padding: 16px; }
.ck-h { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; font-size: 14px; text-transform: uppercase; letter-spacing: .9px; color: var(--muted); font-weight: 700; margin-bottom: 12px; }
.ck-h2 { font-size: 14px; text-transform: uppercase; letter-spacing: .9px; color: var(--muted); font-weight: 700; margin: 18px 0 8px; }
.ck-sub { text-transform: none; letter-spacing: 0; font-weight: 600; color: var(--text); font-size: 15px; text-align: right; }
.ck-count { color: var(--accent); font-size: 15px; letter-spacing: 0; }
.ck-input { width: 100%; background: #0b0f15; border: 1px solid #263042; color: var(--text); border-radius: 8px; padding: 10px 12px; font-size: 16px; outline: none; }
.ck-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(76,201,240,.15); }
.ck-input.big { font-size: 17px; padding: 13px 14px; }
.ck-lab { display: block; font-size: 13.5px; color: var(--muted); margin: 12px 0 5px; }
.cockpit .onset-in { display: flex; gap: 8px; align-items: stretch; position: relative; }
.cockpit .onset-in .ck-input { flex: 1; }
.cockpit #caseOnset { position: absolute; right: 0; bottom: 0; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.cockpit .onset-hint { font-size: 14px; color: var(--muted); margin-top: 6px; min-height: 16px; }
.ck-btn { border: 1px solid #2a3446; background: #161c27; color: var(--text); border-radius: 8px; padding: 10px 14px; font-weight: 600; font-size: 15.5px; cursor: pointer; transition: background .15s, border-color .15s; }
.ck-btn:hover { background: #1c2431; border-color: #3a4760; }
.ck-btn.small { padding: 6px 10px; font-size: 14.5px; }
.ck-btn.primary { background: var(--accent); border-color: var(--accent); color: #041219; }
.ck-btn.primary:hover { filter: brightness(1.06); }
.ck-btn.ghost { background: transparent; color: var(--text); border-color: #3a4760; }
.ck-link { border: 0; background: none; color: var(--muted); font-size: 14.5px; padding: 8px 0 0; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; text-align: left; }
.ck-link:hover { color: var(--text); }
.ck-link[hidden] { display: none; }
.ck-row { display: flex; gap: 8px; margin-top: 10px; }
.ck-row .ck-btn { flex: 1; }
/* Symptomliste */
.ck-symlist { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; }
.ck-symlist .symchip { display: flex; align-items: center; gap: 8px; padding: 9px 10px 9px 12px; border-radius: 8px; background: #161c27; border: 1px solid #222b3a; font-size: 16px; }
.ck-symlist .symchip .t { flex: 1; line-height: 1.3; }
.ck-symlist .symchip .sd { border: 1px solid #344158; background: #0f141c; color: var(--accent2); border-radius: 6px; padding: 3px 8px; font-size: 14px; font-weight: 700; cursor: pointer; }
.ck-symlist .symchip .x { border: 0; background: none; color: var(--muted); font-size: 14px; cursor: pointer; padding: 3px 2px; }
.ck-symlist .symchip .x:hover { color: var(--danger); }
.cockpit .sym-search { position: relative; }
.cockpit .sym-suggest { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 20; }
/* Aufklappbare Abschnitte */
.ck-acc { border-top: 1px solid #1d2532; }
.ck-card .ck-acc { margin-top: 12px; }
.ck-acc > summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 2px; font-weight: 600; font-size: 16px; color: var(--text); user-select: none; }
.ck-acc > summary::-webkit-details-marker { display: none; }
.ck-acc > summary::after { content: 'öffnen'; font-size: 13.5px; font-weight: 500; color: var(--muted); }
.ck-acc[open] > summary::after { content: 'schließen'; }
.ck-acc > summary .ck-sum { margin-left: auto; font-size: 14px; color: var(--muted); font-weight: 600; }
.ck-acc > summary:hover { color: var(--accent); }
.ck-acc.flat > summary { font-size: 14.5px; color: var(--muted); padding: 10px 0 6px; }
.ck-accb { padding: 2px 2px 14px; font-size: 15.5px; line-height: 1.5; color: #c9d2de; }
.ck-accs { background: #11161f; border: 1px solid #1d2532; border-radius: 12px; padding: 0 16px; }
.ck-accs > .ck-acc:first-child { border-top: 0; }
.ck-note { font-size: 14.5px; color: var(--muted); margin-top: 8px; line-height: 1.45; }
.ck-accb p { margin: 0 0 10px; }
.ck-accb .steps { margin: 0; padding-left: 20px; }
.ck-accb .steps li { margin-bottom: 6px; }
/* Ergebnis */
.ck-empty { padding: 34px 30px; background: #11161f; border: 1px solid #1d2532; border-radius: 12px; }
.ck-empty h2 { margin: 6px 0 10px; font-size: 26px; }
.ck-empty p { margin: 0; color: #b5c0cf; font-size: 17px; line-height: 1.55; max-width: 560px; }
.ck-kicker { font-size: 14px; text-transform: uppercase; letter-spacing: 1px; color: var(--accent2); font-weight: 700; }
.ck-hero { background: #11161f; border: 1px solid #1d2532; border-left: 4px solid var(--accent2); border-radius: 12px; padding: 20px 22px; }
.ck-hero.ven { border-left-color: #748ffc; }
.ck-hero.ven .ck-kicker { color: #a9b9ff; }
.ck-hero-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-top: 6px; }
.ck-hero h2 { margin: 0; font-size: 28px; line-height: 1.2; font-weight: 700; }
.ck-side-t { font-size: 18px; color: var(--accent2); font-weight: 600; margin-top: 4px; }
.ck-hero.ven .ck-side-t { color: #a9b9ff; }
.ck-pct { font-size: 52px; font-weight: 800; line-height: 1; letter-spacing: -1px; font-variant-numeric: tabular-nums; }
.ck-pct span { font-size: 22px; font-weight: 600; margin-left: 2px; color: var(--muted); }
.ck-bar { height: 6px; border-radius: 3px; background: #1f2735; margin: 16px 0 14px; overflow: hidden; }
.ck-bar i { display: block; height: 100%; background: var(--accent2); border-radius: 3px; }
.ck-hero.ven .ck-bar i { background: #748ffc; }
.ck-fit { display: flex; flex-direction: column; gap: 6px; font-size: 16px; color: #d3dbe6; line-height: 1.45; }
.ck-fit .ck-lab, .ck-alts .ck-lab { display: inline-block; margin: 0 10px 0 0; min-width: 92px; font-size: 13.5px; text-transform: uppercase; letter-spacing: .7px; }
.ck-fit .no { color: #f0a8a8; }
.ck-alts { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: 12px; padding-top: 12px; border-top: 1px solid #1d2532; }
.ck-alt { border: 1px solid #2a3446; background: transparent; color: var(--text); border-radius: 8px; padding: 6px 10px; font-size: 15px; cursor: pointer; }
.ck-alt b { color: var(--muted); font-weight: 600; margin-left: 4px; }
.ck-alt:hover { border-color: var(--accent2); }
.ck-actions { display: flex; gap: 10px; }
.ck-actions .ck-btn { flex: 1; padding: 13px 16px; font-size: 16.5px; }
.cockpit .occ-pick { margin: 0; padding: 0; background: none; border: 0; }
.cockpit .occ-pick .sec-t { font-size: 14px; text-transform: uppercase; letter-spacing: .9px; color: var(--muted); font-weight: 700; }
.cockpit .ochip { font-size: 15.5px; padding: 8px 12px; border-radius: 8px; }
.cockpit .bars.causes .bar { padding: 8px 6px; }
.cockpit .alt { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: center; padding: 9px 6px; border-radius: 8px; cursor: pointer; position: relative; font-size: 15.5px; }
.cockpit .alt:hover { background: #161c27; }
.cockpit .alt i { position: absolute; left: 6px; bottom: 3px; height: 2px; background: var(--accent2); border-radius: 1px; opacity: .6; }
.cockpit .alt.venous i { background: #748ffc; }
.cockpit .alt .tag { font-size: 13px; color: var(--muted); }
.cockpit .alt .v { font-weight: 700; font-variant-numeric: tabular-nums; }
/* DSA-Kachel und Vergrößerung */
.ck-dsabox, .ck-bigbox { position: relative; overflow: hidden; border-radius: 10px; background: #000; }
.ck-dsabox { aspect-ratio: 1 / 1; width: 100%; }
.ck-dsabox #viewport, .ck-bigbox #viewport { position: absolute; inset: 0; }
.ck-dsabox #occOverlay, .ck-bigbox #occOverlay { position: absolute; inset: 0; }
.ck-big { position: fixed; inset: 0; z-index: 90; background: rgba(3,5,8,.78); display: flex; align-items: center; justify-content: center; padding: 3vh 3vw; }
.ck-big.hidden { display: none; }
.ck-bigframe { width: min(1100px, 94vw); height: min(86vh, 900px); display: flex; flex-direction: column; background: #0d1117; border: 1px solid #263042; border-radius: 14px; overflow: hidden; box-shadow: 0 30px 80px rgba(0,0,0,.6); }
.ck-bighead { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid #1d2532; font-weight: 600; }
.ck-bighead span { flex: 1; }
.ck-bigbox { flex: 1; border-radius: 0; }
@media (max-width: 1280px) {
  .ck-grid { grid-template-columns: minmax(280px, 330px) minmax(0, 1fr); grid-template-rows: auto auto; align-content: start; overflow-y: auto; }
  .ck-col { overflow: visible; min-height: auto; }
  .ck-in { grid-column: 1; grid-row: 1 / span 2; }
  .ck-main { grid-column: 2; grid-row: 1; }
  .ck-side { grid-column: 2; grid-row: 2; }
  .ck-dsabox { aspect-ratio: auto; height: min(52vh, 460px); }
}
@media (max-width: 900px) {
  .l-long { display: none; } .l-short { display: inline; }
  .modes button.active { box-shadow: inset 0 -2px 0 var(--accent); }
  body.sym-mode .cockpit { top: 52px; bottom: var(--tabbar); }
  .ck-head { flex-wrap: wrap; gap: 8px 12px; padding: 10px 14px; }
  .ck-title { font-size: 17.5px; }
  .ck-clock { min-width: 0; width: 100%; text-align: left; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; order: 5; }
  /* Handy: Titel steht schon in der Tab-Leiste – Fälle und Zurücksetzen in einer Zeile */
  .ck-title { display: none; }
  .cockpit .case-tabs { flex: 1 1 auto; min-width: 0; }
  .ck-reset { margin-left: auto; padding: 7px 11px; font-size: 14px; }
  .ck-cl-v { font-size: 20px; }
  .ck-cl-s { justify-content: flex-start; }
  .ck-grid { display: flex; flex-direction: column; overflow-y: auto; padding: 12px 12px 24px; gap: 12px; }
  .ck-col { overflow: visible; flex: none; min-height: auto; }
  .ck-main { order: 2; } .ck-side { order: 3; } .ck-in { order: 1; }
  .ck-hero h2 { font-size: 22px; } .ck-pct { font-size: 40px; }
  .ck-dsabox { aspect-ratio: 1 / 1; height: auto; }
  .ck-bigframe { width: 100vw; height: 100%; border-radius: 0; }
  .ck-big { padding: 0; }
}

/* Miniaturen CT und Atlas */
.ck-trow { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ck-thumb { position: relative; padding: 0; border: 1px solid #263042; border-radius: 10px; overflow: hidden; background: #000; cursor: pointer; aspect-ratio: 1 / 1; transition: border-color .15s, transform .15s; }
.ck-thumb:hover { border-color: var(--accent); transform: translateY(-1px); }
.ck-thumb canvas { display: block; width: 100%; height: 100%; opacity: 0; transition: opacity .3s; }
.ck-thumb.ready canvas { opacity: 1; }
.ck-thumb .ck-tl { position: absolute; left: 0; right: 0; bottom: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 1px; padding: 18px 10px 8px; background: linear-gradient(transparent, rgba(5,7,10,.92)); text-align: left; font-size: 13.5px; color: #c9d2de; }
.ck-thumb .ck-tl b { font-size: 15px; color: #fff; }
.ck-thumb:disabled { cursor: default; opacity: .55; }
.ck-thumb:disabled:hover { transform: none; border-color: #263042; }
@media (max-width: 1280px) and (min-width: 901px) { .ck-side { display: grid; grid-template-columns: 1.6fr 1fr; gap: 14px; } .ck-trow { grid-template-columns: 1fr; } .ck-thumb { aspect-ratio: 16 / 10; } }
.ck-col > * { flex: none; }

#btnPlay { width: auto; padding: 0 12px; font-size: 14.5px; font-weight: 600; }
.icon-btn#btnCloseInfo, .icon-btn.close, #btnLeftClose, #btnCtCloseRes { width: auto; padding: 0 10px; font-size: 14px; }
#btnPanel { width: auto; padding: 0 10px; font-size: 14.5px; font-weight: 600; }

/* CT-Ebenenwahl */
.ori-seg { display: flex; margin: 2px 0 10px; }
.ori-seg button { flex: 1; }
.ct-oribar { display: none; position: absolute; top: 64px; left: 50%; transform: translateX(-50%); z-index: 12; background: rgba(10,13,19,.88); border: 1px solid #263042; border-radius: 10px; padding: 3px; gap: 2px; }
body.ct-mode .ct-oribar { display: flex; }
.ct-oribar button { border: 0; background: transparent; color: var(--muted); font-weight: 600; font-size: 15px; padding: 7px 14px; border-radius: 7px; cursor: pointer; }
.ct-oribar button:hover { color: var(--text); }
.ct-oribar button.active { background: var(--accent); color: #041219; }
@media (min-width: 901px) { body.ct-mode .ct-oribar { left: calc(50% + (var(--left-w) - var(--right-w)) / 2); } }
@media (max-width: 900px) { .ct-oribar { top: 58px; } #ctInfo .tl, #ctInfo .tr { display: none; } }
/* Miniaturen ohne Ergebnis: flach und dezent statt großer schwarzer Kacheln */
.ck-thumb:disabled { aspect-ratio: 16 / 7; opacity: .5; cursor: default; transform: none; background: #0b0f15; }
.ck-thumb:disabled:hover { border-color: #263042; }

/* Läsion → Symptome (Atlas) */
.card-lesion { display: none; }
body.atlas-mode .card-lesion { display: block; }
#btnLesOn.active { background: var(--danger); border-color: var(--danger); color: #1a0508; }
.les-list { display: flex; flex-direction: column; gap: 4px; margin: 8px 0 4px; }
.les-item { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.les-dot { flex: none; width: 10px; height: 10px; border-radius: 50%; background: #ff3b4a; }
.les-t { flex: 1; min-width: 0; }
.les-x { border: 0; background: none; color: var(--muted); font: inherit; font-size: 13.5px; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.les-result dt, #ctResult dt { margin-top: 8px; }
.lesym { margin: 4px 0 6px; padding-left: 18px; }
.lesym li { margin: 3px 0; line-height: 1.4; }
.lesym b { font-weight: 600; }
.lesym .sd { color: var(--accent2); font-size: 13.5px; margin-left: 4px; }
/* Freie Symptomeingabe: Korrekturhinweis, Seite, Sammelübernahme */
.sug-hint { padding: 6px 12px; font-size: 13.5px; color: var(--muted); border-bottom: 1px solid var(--line); }
.sug .sd { margin-left: 8px; font-size: 13px; font-weight: 700; color: var(--accent2); }
.sug.multi { background: rgba(76,201,240,.08); }
.sug.multi b { font-weight: 600; }

/* Mehrere ROIs: Vergleichstabelle */
.roi-list:empty { display: none; }
.roi-list { margin: 6px 0 4px; }
.roi-tab { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
.roi-tab th { text-align: left; font-weight: 600; color: var(--muted); font-size: 11.5px; text-transform: uppercase; letter-spacing: .4px; padding: 2px 4px; border-bottom: 1px solid rgba(255,255,255,.12); }
.roi-tab td { padding: 4px; border-bottom: 1px solid rgba(255,255,255,.06); white-space: nowrap; }
.roi-tab td:nth-child(6) { white-space: normal; }
.roi-tab tr[data-n] { cursor: pointer; }
.roi-tab tr.sel td { background: rgba(255,255,255,.07); }
.roi-tab td i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 5px; vertical-align: 0; }
.roi-del { background: none; border: 0; color: var(--muted); font-size: 16px; line-height: 1; cursor: pointer; padding: 0 4px; }
.roi-del:hover { color: #fff; }
.roi-hint { font-size: 12.5px; color: var(--muted); line-height: 1.45; margin-top: 6px; }
.roi-hint b { color: #ffe39a; font-weight: 600; }

/* Einbettung im Workshop (?ws=1): nur Bild, Steuerung kommt aus der Workshop-Seite */
body.ws-embed #topbar, body.ws-embed #left, body.ws-embed #right, body.ws-embed #ctRight, body.ws-embed #cockpit, body.ws-embed #ckBig,
body.ws-embed #timeline, body.ws-embed #help, body.ws-embed #report, body.ws-embed #carmLabel, body.ws-embed #terrLegend, body.ws-embed #ctOriBar,
body.ws-embed #tooltip, body.ws-embed .mobile-modes { display: none !important; }
body.ws-embed #ctInfo .tr, body.ws-embed.right-open #ctInfo .tr { right: 12px; }
body.ws-embed #ctInfo .br, body.ws-embed.right-open #ctInfo .br { right: 266px; bottom: 60px; }
body.ws-embed #ctInfo .bl { left: 16px; bottom: 60px; }
/* Workshop-Link: auf dem Handy ausgeblendet (Workshop ist für Laptops gedacht) */
.ws-link { margin-left: 0; }
@media (max-width: 900px) { .ws-link { display: none; } }
@media (max-width: 700px) { body.ws-embed #ctInfo .scout-lbl, body.ws-embed #ctInfo .br { display: none; } body.ws-embed #ctInfo .bl { bottom: 52px; font-size: 10px; } body.ws-embed #ctInfo .tl { font-size: 10px; } }
