:root {
  --bg: #0b1a1e;
  --bg2: #10262b;
  --panel: #14323a;
  --panel2: #1a3f48;
  --line: #2b5a64;
  --text: #e3eef0;
  --muted: #9dbac0;
  --orange: #ff8a2a;
  --orange-dim: #b35d16;
  --ok: #4fd18b;
  --bad: #ff5d5d;
  --mono: Consolas, "Cascadia Mono", "Courier New", monospace;
  --sans: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --r: 10px;
  --L1: #7a8fa6; --L2: #4aa3df; --L3: #4fd18b; --L4: #e2c043; --L5: #c58af0; --L6: #f07fb0; --L7: #ff8a2a;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: radial-gradient(ellipse at top, #12303a 0%, var(--bg) 60%) fixed, var(--bg);
  color: var(--text);
  font: 16px/1.55 var(--sans);
}
button { font: inherit; }
a { color: var(--orange); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.15rem; color: var(--orange); }
p { margin: 0 0 .8em; }
code, .mono { font-family: var(--mono); }
code { background: #0a1c20; padding: 1px 5px; border-radius: 4px; color: #ffd0a6; }
.hl { color: var(--orange); font-weight: 600; }
.muted { color: var(--muted); }
.small { font-size: .88rem; }
.hidden { display: none !important; }

/* ---------- Topbar ---------- */
#topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 8px 16px; background: rgba(8, 20, 23, .94); border-bottom: 1px solid var(--line);
  backdrop-filter: blur(4px);
}
#topbar .logo { font-weight: 800; letter-spacing: .06em; color: var(--orange); white-space: nowrap; }
#topbar .logo span { color: var(--text); font-weight: 400; }
#topbar .duo { color: var(--muted); font-size: .92rem; }
#topbar .spacer { flex: 1; }
.rangbox { display: flex; align-items: center; gap: 10px; }
.rang { font-weight: 700; }
.pts { font-family: var(--mono); color: var(--orange); }
.rangbar { width: 110px; height: 6px; background: #0a1c20; border-radius: 3px; overflow: hidden; }
.rangbar i { display: block; height: 100%; background: var(--orange); }
.tb-btn { background: transparent; border: 1px solid var(--line); color: var(--text); border-radius: 8px; padding: 5px 10px; cursor: pointer; font-size: .9rem; }
.tb-btn:hover { border-color: var(--orange); }
.savestate { font-size: .8rem; color: var(--muted); }
.savestate.warn { color: var(--orange); }

/* ---------- Layout ---------- */
#app { max-width: 1100px; margin: 0 auto; padding: 18px 16px 80px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 20px 22px; margin-bottom: 16px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  background: var(--orange); color: #1b0d00; border: 0; border-radius: 8px; padding: 10px 18px; font-weight: 700;
}
.btn:hover { filter: brightness(1.1); }
.btn:disabled { opacity: .45; cursor: default; filter: none; }
.btn.sec { background: transparent; color: var(--text); border: 1px solid var(--line); font-weight: 500; }
.btn.sec:hover { border-color: var(--orange); }
.btnrow { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; align-items: center; }
input[type=text], input[type=password] {
  background: #0a1c20; color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 9px 12px; font: inherit; width: 100%;
}
input:focus { outline: 2px solid var(--orange); outline-offset: 1px; }
label { display: block; margin: 10px 0 4px; color: var(--muted); font-size: .92rem; }

/* ---------- Start ---------- */
.hero { position: relative; border-radius: var(--r); overflow: hidden; border: 1px solid var(--line); margin-bottom: 16px; }
.hero img { display: block; width: 100%; max-height: 380px; object-fit: cover; }
.hero .over { position: absolute; left: 0; right: 0; bottom: 0; padding: 22px; background: linear-gradient(transparent, rgba(5, 14, 16, .95)); }
.hero h1 { font-size: 2.2rem; margin: 0; }
.hero h1 b { color: var(--orange); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 760px) { .grid2 { grid-template-columns: 1fr; } }

/* ---------- Übersicht / Akten ---------- */
.akten { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.akte { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; cursor: pointer; position: relative; }
.akte:hover { border-color: var(--orange); }
.akte .nr { font-family: var(--mono); color: var(--orange); font-size: .85rem; }
.akte h3 { color: var(--text); margin: 4px 0 6px; }
.akte .prog { height: 5px; background: #0a1c20; border-radius: 3px; overflow: hidden; margin-top: 10px; }
.akte .prog i { display: block; height: 100%; background: var(--ok); }
.akte.locked { cursor: default; opacity: .6; }
.akte.locked:hover { border-color: var(--line); }
.stempel { position: absolute; top: 12px; right: -6px; transform: rotate(8deg); border: 2px solid var(--orange); color: var(--orange); font-weight: 800; font-size: .72rem; padding: 2px 8px; letter-spacing: .08em; background: var(--bg2); }
.stempel.ok { border-color: var(--ok); color: var(--ok); }

.stepnav { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 14px; }
.stepnav button { width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line); background: var(--bg2); color: var(--muted); cursor: pointer; font-size: .8rem; }
.stepnav button.done { background: #173d2c; border-color: var(--ok); color: var(--ok); }
.stepnav button.cur { border-color: var(--orange); color: var(--orange); box-shadow: 0 0 0 2px rgba(255, 138, 42, .3); }
.stepnav button:disabled { opacity: .35; cursor: default; }
.crumb { color: var(--muted); font-size: .9rem; margin-bottom: 6px; }
.crumb a { cursor: pointer; }

/* ---------- Story ---------- */
.scene-img { width: 100%; border-radius: var(--r); border: 1px solid var(--line); display: block; margin-bottom: 14px; max-height: 420px; object-fit: cover; }
.dialog { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 12px; animation: fadein .35s ease; }
.dialog .portrait { width: 86px; height: 86px; border-radius: 50%; object-fit: cover; object-position: top; border: 2px solid var(--line); flex: none; background: var(--bg2); }
.dialog .portrait.sys { display: grid; place-items: center; font-size: 2rem; }
.dialog .bubble { background: var(--panel2); border: 1px solid var(--line); border-radius: 4px 14px 14px 14px; padding: 12px 16px; flex: 1; }
.dialog .who { font-weight: 700; color: var(--orange); font-size: .9rem; margin-bottom: 2px; }
.dialog.kalle .who { color: #7fd6e8; }
.dialog.system .bubble { border-style: dashed; font-family: var(--mono); font-size: .93rem; }
@keyframes fadein { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------- Lesson ---------- */
.lesson h2 { color: var(--text); }
.lesson .tag { display: inline-block; font-family: var(--mono); font-size: .8rem; color: var(--orange); border: 1px solid var(--orange-dim); border-radius: 4px; padding: 0 6px; margin-bottom: 8px; }
.lesson ul { margin: 0 0 .8em; padding-left: 1.2em; }
.lesson li { margin-bottom: .25em; }
.merk { border-left: 4px solid var(--orange); background: #0f2a30; padding: 10px 14px; border-radius: 0 8px 8px 0; margin: 12px 0; }
.merk b:first-child { color: var(--orange); }
.profi { border: 1px dashed #7fd6e8; background: #0d2429; padding: 10px 14px; border-radius: 8px; margin: 12px 0; font-size: .93rem; color: #cfe3e6; }
.profi > b:first-child { color: #7fd6e8; }
.kallebox { display: flex; gap: 12px; align-items: flex-start; background: #0f2a30; border: 1px dashed var(--line); border-radius: 10px; padding: 10px 14px; margin: 12px 0; }
.kallebox img { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; object-position: top; flex: none; }
.figure { margin: 12px 0; text-align: center; }
.figure svg { max-width: 100%; height: auto; }
table.t { border-collapse: collapse; width: 100%; margin: 10px 0; font-size: .95rem; }
table.t th, table.t td { border: 1px solid var(--line); padding: 6px 10px; text-align: left; vertical-align: top; }
table.t th { background: var(--panel2); color: var(--muted); font-weight: 600; }
.lchip { display: inline-block; min-width: 34px; text-align: center; font-family: var(--mono); font-weight: 700; border-radius: 5px; padding: 0 6px; color: #081418; }
.egg { cursor: pointer; color: var(--orange-dim); font-weight: 700; user-select: none; }
.egg:hover { color: var(--orange); }

/* ---------- Aufgaben allgemein ---------- */
.task-head { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.task-count { font-family: var(--mono); color: var(--muted); font-size: .88rem; }
.frage { font-size: 1.1rem; font-weight: 600; margin: 8px 0 12px; }
.opts { display: grid; gap: 8px; }
.opt { text-align: left; background: var(--bg2); border: 1px solid var(--line); color: var(--text); border-radius: 8px; padding: 10px 14px; cursor: pointer; }
.opt:hover:not(:disabled) { border-color: var(--orange); }
.opt.sel { border-color: var(--orange); background: #2a2014; }
.opt.right { border-color: var(--ok); background: #173d2c; }
.opt.wrong { border-color: var(--bad); background: #3d1717; }
.opt:disabled { cursor: default; }
.feedback { margin-top: 12px; padding: 10px 14px; border-radius: 8px; animation: fadein .25s ease; }
.feedback.ok { background: #143626; border: 1px solid var(--ok); }
.feedback.bad { background: #361616; border: 1px solid var(--bad); }
.feedback .pt { font-family: var(--mono); color: var(--orange); font-weight: 700; }
.hints { margin-top: 12px; }
.hint { display: flex; gap: 10px; align-items: flex-start; background: #0f2a30; border: 1px dashed #7fd6e8; border-radius: 8px; padding: 8px 12px; margin-top: 8px; animation: fadein .25s ease; }
.hint img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; object-position: top; }
.hintbtn { background: transparent; border: 1px dashed #7fd6e8; color: #7fd6e8; border-radius: 8px; padding: 6px 12px; cursor: pointer; font-size: .9rem; }
.hintbtn:disabled { opacity: .4; cursor: default; }
.shake { animation: shake .35s; }
@keyframes shake { 0%, 100% { transform: none; } 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }

/* ---------- Sortierer ---------- */
.pool { display: flex; flex-wrap: wrap; gap: 8px; min-height: 48px; padding: 10px; border: 1px dashed var(--line); border-radius: 10px; margin-bottom: 12px; }
.chip { background: var(--panel2); border: 1px solid var(--line); border-radius: 18px; padding: 6px 14px; cursor: grab; user-select: none; }
.chip:hover { border-color: var(--orange); }
.chip.sel { border-color: var(--orange); background: #3a2410; box-shadow: 0 0 0 2px rgba(255, 138, 42, .35); }
.chip.placed { cursor: default; background: #173d2c; border-color: var(--ok); font-size: .9rem; padding: 3px 10px; }
.bins { display: grid; gap: 8px; }
.bins.cols { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.bin { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; background: var(--bg2); cursor: pointer; min-height: 48px; }
.bin.cols-bin { flex-direction: column; min-height: 140px; }
.bin:hover, .bin.over { border-color: var(--orange); }
.bin .blabel { flex: none; font-weight: 700; min-width: 150px; }
.bin .blabel small { display: block; color: var(--muted); font-weight: 400; font-size: .78rem; }
.bin .bitems { display: flex; flex-wrap: wrap; gap: 6px; }
.sorthelp { color: var(--muted); font-size: .9rem; margin-bottom: 8px; }

/* ---------- Kapselung ---------- */
.kapsel-stage { display: flex; flex-direction: column; align-items: center; gap: 12px; margin: 14px 0; }
.frame-vis { display: flex; align-items: stretch; font-family: var(--mono); font-size: .88rem; min-height: 52px; flex-wrap: nowrap; max-width: 100%; overflow-x: auto; }
.frame-vis > div { padding: 12px 10px; border: 2px solid #081418; display: flex; align-items: center; white-space: nowrap; color: #081418; font-weight: 700; animation: fadein .3s ease; }
.frame-vis .daten { background: #e3eef0; }
.frame-vis .l4 { background: var(--L4); }
.frame-vis .l3 { background: var(--L3); }
.frame-vis .l2 { background: var(--L2); }
.frame-vis .fcs { background: var(--L2); }
.bits { font-family: var(--mono); color: var(--L1); word-break: break-all; font-size: .8rem; max-width: 700px; text-align: center; }
.kapsel-opts { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }

/* ---------- Paket-Röntgen ---------- */
.ws { background: #0d1417; border: 1px solid #33464c; border-radius: 8px; font-family: var(--mono); font-size: .88rem; overflow: hidden; margin: 10px 0; }
.ws .ws-bar { background: #1f2d31; padding: 4px 10px; color: #9fb4b9; font-size: .8rem; display: flex; gap: 14px; }
.ws .ws-list { border-bottom: 1px solid #33464c; }
.ws .ws-row { display: grid; grid-template-columns: 50px 80px 150px 150px 70px 1fr; gap: 8px; padding: 2px 10px; white-space: nowrap; overflow: hidden; }
.ws .ws-row.head { color: #9fb4b9; background: #182226; }
.ws .ws-row.sel { background: #2f5d80; color: #fff; }
.ws .ws-row.clickable { cursor: pointer; }
.ws .ws-row.clickable:hover { background: #1c3a4a; }
.ws .ws-tree { padding: 6px 0; }
.ws .ws-node > .ws-lbl { padding: 1px 10px; cursor: pointer; display: flex; gap: 8px; align-items: center; }
.ws .ws-node > .ws-lbl:hover { background: #1c2a2e; }
.ws .ws-node > .ws-lbl .tri { width: 12px; color: #9fb4b9; }
.ws .ws-node > .ws-lbl .lay { font-size: .72rem; padding: 0 5px; border-radius: 3px; color: #081418; font-weight: 700; }
.ws .ws-kids { padding-left: 34px; color: #b9cdd1; }
.ws .ws-kids div { padding: 0 10px; }
.ws .hl-field { color: var(--orange); }

/* ---------- Switch / Beweise ---------- */
.switch-wrap { overflow-x: auto; }
.port { cursor: pointer; }
.port:hover rect.body { stroke: var(--orange); stroke-width: 2.5; }
.port.sel rect.body { stroke: var(--orange); stroke-width: 3; }
.evidence { background: #f2e9d8; color: #231a0e; border-radius: 6px; padding: 14px 16px; font-family: var(--mono); font-size: .88rem; box-shadow: 0 6px 20px rgba(0, 0, 0, .4); transform: rotate(-.4deg); margin: 12px 0; overflow-x: auto; }
.evidence h4 { margin: 0 0 8px; font-family: var(--sans); letter-spacing: .05em; text-transform: uppercase; font-size: .85rem; color: #6b4a1a; }
.evidence table { border-collapse: collapse; width: 100%; }
.evidence td, .evidence th { border-bottom: 1px solid #cdbf9f; padding: 3px 8px; text-align: left; white-space: nowrap; }
.evidence th { color: #6b4a1a; }

/* ---------- Verdächtigen-Board ---------- */
.board { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; margin: 12px 0; }
.suspect { background: #e9dfca; color: #231a0e; border-radius: 4px; padding: 8px 8px 12px; box-shadow: 0 6px 18px rgba(0, 0, 0, .45); position: relative; transform: rotate(-1deg); }
.suspect:nth-child(even) { transform: rotate(1.2deg); }
.suspect img { width: 100%; aspect-ratio: 4/5; object-fit: cover; object-position: top; display: block; border: 1px solid #b9a984; filter: saturate(.9); }
.suspect h4 { margin: 8px 0 2px; font-size: 1rem; }
.suspect .role { font-size: .82rem; color: #5a4a2e; margin-bottom: 4px; }
.suspect .notes { font-size: .8rem; color: #3a2e1a; }
.suspect .pin { position: absolute; top: -7px; left: 50%; width: 14px; height: 14px; border-radius: 50%; background: #d23; box-shadow: 0 2px 3px rgba(0, 0, 0, .5); transform: translateX(-50%); }
.suspect .status { position: absolute; top: 34%; left: 6%; right: 6%; text-align: center; font-weight: 900; letter-spacing: .1em; font-size: 1.05rem; padding: 4px; border: 3px solid; transform: rotate(-14deg); background: rgba(233, 223, 202, .82); }
.suspect .status.entlastet { color: #1d7a45; border-color: #1d7a45; }
.suspect .status.verdaechtig { color: #c0391b; border-color: #c0391b; }
.suspect .status.frei { color: #1d7a45; border-color: #1d7a45; }
.suspect .status.ueberfuehrt { color: #fff; border-color: #8f1d0b; background: rgba(192, 57, 27, .9); }

/* ---------- Abschluss / Toast / Modal ---------- */
.summary { text-align: center; }
.summary .big { font-size: 2.6rem; font-weight: 800; color: var(--orange); font-family: var(--mono); }
.badges { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin: 10px 0; }
.badge { background: var(--bg2); border: 1px solid var(--orange-dim); border-radius: 10px; padding: 8px 12px; min-width: 150px; text-align: center; }
.badge .ic { font-size: 1.6rem; }
.badge.off { opacity: .35; border-color: var(--line); filter: grayscale(1); }
.badge .bn { font-weight: 700; font-size: .9rem; }
.badge .bd { font-size: .78rem; color: var(--muted); }
#toasts { position: fixed; right: 16px; bottom: 16px; z-index: 50; display: flex; flex-direction: column; gap: 8px; align-items: flex-end; }
.toast { background: var(--panel2); border: 1px solid var(--orange); border-radius: 10px; padding: 10px 16px; box-shadow: 0 6px 20px rgba(0, 0, 0, .5); animation: fadein .3s ease; max-width: 340px; }
.toast b { color: var(--orange); }
#modal { position: fixed; inset: 0; z-index: 40; background: rgba(0, 0, 0, .65); display: flex; align-items: center; justify-content: center; padding: 16px; }
#modal .box { position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 20px 22px; max-width: 640px; width: 100%; max-height: 90vh; overflow: auto; }
.sealed { border: 2px dashed var(--orange-dim); background: repeating-linear-gradient(-45deg, #13292e, #13292e 12px, #162f35 12px, #162f35 24px); }
.warnbar { background: #3a2410; border: 1px solid var(--orange); border-radius: 8px; padding: 8px 12px; margin-bottom: 12px; font-size: .92rem; }

/* ---------- Challenge ---------- */
.ch-top { display: flex; justify-content: space-between; align-items: center; font-family: var(--mono); font-size: 1.1rem; margin-bottom: 10px; }
.ch-item { font-size: 1.5rem; font-weight: 700; text-align: center; padding: 24px; background: var(--bg2); border-radius: 10px; margin-bottom: 12px; }
.ch-btns { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.ch-btns button { padding: 14px 0; border-radius: 8px; border: 0; font-weight: 800; font-family: var(--mono); cursor: pointer; color: #081418; font-size: 1.05rem; }
.timebar { height: 8px; background: #0a1c20; border-radius: 4px; overflow: hidden; margin-bottom: 12px; }
.timebar i { display: block; height: 100%; background: var(--orange); transition: width .2s linear; }

/* ---------- Triage ---------- */
.triage-btns { display: flex; gap: 6px; flex-wrap: wrap; }
.triage-btns button { min-width: 56px; padding: 10px 12px; border-radius: 8px; border: 2px solid transparent; font-weight: 800; font-family: var(--mono); cursor: pointer; color: #081418; }
.triage-btns button:hover:not(:disabled) { border-color: #fff; }
.triage-btns button:disabled { opacity: .35; cursor: default; }
.ticket { background: var(--bg2); border-left: 4px solid var(--orange); border-radius: 0 8px 8px 0; padding: 12px 16px; margin: 10px 0 14px; }
.ticket .tno { font-family: var(--mono); color: var(--muted); font-size: .82rem; }

.toc-e { border: 1px solid var(--line); border-radius: 10px; margin: 8px 0; background: var(--bg2); }
.toc-e > summary { cursor: pointer; padding: 10px 14px; font-weight: 700; }
.toc-e > summary:hover { color: var(--orange); }
div.toc-e.toc-off { padding: 10px 14px; opacity: .55; font-weight: 700; }
.toc-list { list-style: none; margin: 0; padding: 0 8px 8px; }
.toc-step { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; background: transparent; border: 0; border-radius: 6px; color: var(--text); padding: 6px 8px; cursor: pointer; }
.toc-step:hover:not(:disabled) { background: var(--panel2); }
.toc-step.cur { background: #2a2014; outline: 1px solid var(--orange); }
.toc-step:disabled { opacity: .45; cursor: default; }
.toc-nr { width: 22px; text-align: right; font-family: var(--mono); color: var(--muted); font-size: .85rem; }
.toc-ic { width: 22px; text-align: center; }
.toc-t { flex: 1; }
.toc-ok { color: var(--ok); font-weight: 700; }
.uebbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: var(--bg2); border: 1px solid var(--line); border-radius: 10px; padding: 8px 14px; margin-bottom: 12px; color: var(--muted); font-size: .92rem; }
.uebbar .btn { padding: 6px 14px; }
.uebbar.on { border: 2px dashed #7fd6e8; color: var(--text); background: #0f2a30; }
.modal-x { position: absolute; top: 8px; right: 10px; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); background: var(--bg2); color: var(--text); font-size: 1.3rem; line-height: 1; cursor: pointer; }
.modal-x:hover { border-color: var(--orange); color: var(--orange); }
.rang { white-space: nowrap; }
/* ---------- Wireshark live (Filter, Liste, Status) ---------- */
.ws-live .ws-row { grid-template-columns: 40px 70px 170px 170px 58px 52px 1fr; }
.ws-scroll { max-height: 300px; overflow: auto; }
.ws-live .ws-row span { overflow: hidden; text-overflow: ellipsis; }
.ws-filter { display: flex; gap: 6px; align-items: center; padding: 6px 10px; background: #172226; border-bottom: 1px solid #33464c; }
.ws-filter input { flex: 1; font-family: var(--mono); font-size: .9rem; padding: 5px 8px; background: #0a1215; color: var(--text); border: 2px solid #33464c; border-radius: 5px; }
.ws-filter.ok input { border-color: #2f9e5c; background: #0f2a1b; }
.ws-filter.bad input { border-color: #c94444; background: #2e1111; }
.ws-filter button { background: #22363c; color: var(--text); border: 1px solid #3d565d; border-radius: 5px; padding: 4px 10px; cursor: pointer; font-family: var(--sans); font-size: .85rem; }
.ws-filter button:hover { border-color: var(--orange); }
.ws-status { font-size: .78rem; color: #9fb4b9; background: #182226; padding: 3px 10px; border-bottom: 1px solid #33464c; }
.ws-row.p-arp { background: #26261a; }
.ws-row.p-dhcp { background: #1a2433; }
.ws-row.p-dns { background: #16282c; }
.ws-row.p-icmp { background: #251c2e; }
.ws-live .ws-row.sel { background: #2f5d80; color: #fff; }
.ws-live .ws-row.head { position: sticky; top: 0; z-index: 1; }
@media (max-width: 760px) { .ws-live .ws-list .ws-row { min-width: 880px; } .ws-filter > .small { display: none; } .ws-filter input { min-width: 0; } }

/* ---------- Terminal ---------- */
.term { background: #0c0c0c; border: 1px solid #3a3a3a; border-radius: 8px; overflow: hidden; margin: 10px 0; font-family: var(--mono); font-size: .88rem; }
.term-bar { display: flex; align-items: center; gap: 8px; background: #1f1f1f; color: #cfcfcf; padding: 4px 10px; font-family: var(--sans); font-size: .82rem; }
.term-spick { background: transparent; color: #7fd6e8; border: 1px dashed #7fd6e8; border-radius: 6px; padding: 2px 10px; cursor: pointer; font-size: .82rem; }
.term-spickbox { background: #141e21; border-bottom: 1px solid #333; padding: 8px 12px; font-family: var(--sans); font-size: .88rem; }
.term-spickbox table { border-collapse: collapse; }
.term-spickbox td { padding: 2px 10px 2px 0; vertical-align: top; }
.term-vorlage { cursor: pointer; }
.term-vorlage:hover { outline: 1px solid var(--orange); }
.term-body { max-height: 360px; min-height: 180px; overflow: auto; padding: 8px 12px; color: #cccccc; cursor: text; }
.term-out div { white-space: pre-wrap; word-break: break-word; }
.term-out .out:not(:empty) { margin-bottom: 1.1em; }
.term-in { display: flex; margin: 0; color: #cccccc; font-size: inherit; cursor: text; }
.term-prompt { white-space: pre; }
.term-in input { flex: 1; background: transparent; border: 0; color: #fff; font: inherit; padding: 0 0 0 2px; outline: none; min-width: 60px; }
.term-in input:focus { outline: none; }
.term.matrix .term-body, .term.matrix .term-in, .term.matrix .term-in input { color: #3cff5a; }

/* ---------- Eingabe-Aufgaben ---------- */
.eingabe-row { display: flex; gap: 8px; align-items: center; }
.eingabe-row input { font-family: var(--mono); max-width: 420px; }
.eingabe-row input.right { border-color: var(--ok); background: #173d2c; }
@media print { #topbar, #toasts { display: none; } }

/* Finale: Beweiskarten und Anklageschrift */
.opts.karten { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.opts.karten .opt { display: flex; flex-direction: column; gap: 6px; background: #e9dfca; color: #231a0e; border: 2px solid #cdbf9f; box-shadow: 0 3px 10px rgba(0, 0, 0, .35); font-weight: 600; min-height: 76px; }
.opts.karten .opt:hover:not(:disabled) { border-color: var(--orange); transform: translateY(-2px); }
.opts.karten .opt img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 3px; }
.opts.karten .opt small { font-weight: 400; font-size: .78rem; color: #6b4a1a; }
.opts.karten .opt.belegt { opacity: .45; }
.opts.karten .opt.wrong { background: #e4c4b8; border-color: var(--bad); opacity: .6; }
.opts.karten .opt.right { background: #cfe5d3; border-color: var(--ok); }
.anklageschrift { background: #f2e9d8; color: #231a0e; border-radius: 6px; padding: 14px 18px; box-shadow: 0 6px 20px rgba(0, 0, 0, .4); margin: 12px 0; }
.anklageschrift h4 { margin: 0 0 4px; font-size: 1rem; letter-spacing: .12em; color: #6b4a1a; text-transform: uppercase; }
.anklageschrift .az { font-family: var(--mono); font-size: .8rem; color: #6b4a1a; margin-bottom: 10px; }
.anklageschrift .feld { display: grid; grid-template-columns: 150px 1fr; gap: 10px; padding: 6px 0; border-top: 1px solid #cdbf9f; align-items: center; }
.anklageschrift .feld b { color: #6b4a1a; font-size: .85rem; text-transform: uppercase; letter-spacing: .05em; }
.anklageschrift .leer { color: #a8987a; font-style: italic; }
@media (max-width: 560px) { .anklageschrift .feld { grid-template-columns: 1fr; gap: 2px; } }
.akten-gesperrt { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin: 12px 0; }
.akten-gesperrt > div { border: 2px dashed var(--orange-dim); background: repeating-linear-gradient(-45deg, #13292e, #13292e 12px, #162f35 12px, #162f35 24px); border-radius: 8px; padding: 12px 14px; }
.akten-gesperrt h4 { margin: 0 0 6px; color: var(--orange); }
.akten-gesperrt .gs { font-family: var(--mono); font-size: .75rem; color: var(--orange); letter-spacing: .1em; margin-top: 8px; }

/* Abschlussverhör */
.verhoer-liste { display: grid; gap: 10px; margin: 14px 0; }
.verhoer-person { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; background: var(--bg2); border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px; }
.verhoer-person b { font-family: var(--mono); font-size: 1.2rem; min-width: 70px; }
.verhoer-person .muted { flex: 1; }
.verhoer-person .toc-ok { font-size: 1.3rem; }

/* Abschluss: Urkunde und Konfetti */
.urkunde { position: relative; background: #f2e9d8; color: #231a0e; border: 3px double #6b4a1a; border-radius: 6px; padding: 28px 24px 22px; margin: 18px auto; max-width: 680px; text-align: center; box-shadow: 0 8px 26px rgba(0, 0, 0, .45); }
.urkunde .uk-kopf { font-family: var(--mono); font-size: .78rem; letter-spacing: .14em; color: #6b4a1a; }
.urkunde .uk-titel { font-size: 2rem; font-weight: 900; letter-spacing: .06em; margin: 6px 0 10px; color: #8f3d0b; }
.urkunde .uk-name { font-size: 2.2rem; font-weight: 900; color: #231a0e; }
.urkunde .uk-kuerzel { font-family: var(--mono); color: #6b4a1a; margin-bottom: 8px; }
.urkunde .uk-werte { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; margin: 16px 0; }
.urkunde .uk-werte div { border-top: 1px solid #cdbf9f; padding-top: 6px; }
.urkunde .uk-werte b { display: block; font-size: 1.15rem; }
.urkunde .uk-werte span { font-size: .78rem; color: #6b4a1a; }
.urkunde .uk-fuss { display: flex; justify-content: space-between; gap: 12px; margin-top: 14px; font-size: .9rem; color: #6b4a1a; }
.urkunde .uk-gez { font-style: italic; }
.urkunde .uk-siegel { position: absolute; right: 18px; top: 18px; width: 62px; height: 62px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #ff9c45, #b35d16); color: #fff3e0; font-weight: 900; display: flex; align-items: center; justify-content: center; transform: rotate(-12deg); box-shadow: 0 3px 8px rgba(0, 0, 0, .35); }
@media (max-width: 560px) { .urkunde .uk-siegel { width: 46px; height: 46px; font-size: .8rem; } .urkunde .uk-titel { font-size: 1.5rem; } .urkunde .uk-name { font-size: 1.6rem; } }
.konfetti { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 999; }
.konfetti i { position: absolute; top: -12px; width: 9px; height: 14px; border-radius: 2px; animation-name: konfetti-fall; animation-timing-function: linear; animation-fill-mode: forwards; }
@keyframes konfetti-fall { to { top: 105%; transform: translateX(40px) rotate(720deg); } }
.druckblatt { display: none; }
@page urkunde { size: A4 portrait; margin: 0; }
@media print {
  body.druck-urkunde > *:not(.druckblatt) { display: none !important; }
  body.druck-urkunde { background: #fff !important; margin: 0; padding: 0; }
  .druckblatt { display: block; page: urkunde; box-sizing: border-box; width: 210mm; height: 296mm; padding: 12mm; background: #fff; color: #231a0e; overflow: hidden; font-family: var(--sans); -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .db-rahmen { box-sizing: border-box; height: 100%; border: 4px double #6b4a1a; padding: 14mm 14mm 12mm; display: flex; flex-direction: column; align-items: center; justify-content: space-between; text-align: center; }
  .db-kopf { font-family: var(--mono); font-size: 9.5pt; letter-spacing: .18em; color: #6b4a1a; }
  .db-titel { font-size: 34pt; font-weight: 900; letter-spacing: .05em; color: #8f3d0b; }
  .db-linie { width: 60%; border-top: 2px solid #b35d16; }
  .db-klein { font-size: 13pt; color: #4a3a22; }
  .db-name { font-size: 38pt; font-weight: 900; }
  .db-kuerzel { font-family: var(--mono); font-size: 14pt; color: #6b4a1a; }
  .db-text { font-size: 13pt; line-height: 1.55; margin: 0; }
  .db-rang { font-size: 22pt; font-weight: 800; color: #8f3d0b; }
  .db-werte { display: flex; gap: 16mm; }
  .db-werte b { display: block; font-size: 18pt; }
  .db-werte span { font-size: 9.5pt; color: #6b4a1a; }
  .db-abz { display: flex; flex-wrap: wrap; justify-content: center; gap: 2mm 6mm; font-size: 10pt; color: #4a3a22; max-width: 160mm; }
  .db-fuss { width: 100%; display: flex; justify-content: space-between; align-items: flex-end; }
  .db-fuss > div:not(.db-siegel) { width: 55mm; }
  .db-fuss span { font-size: 9pt; color: #6b4a1a; }
  .db-unterschrift { border-bottom: 1px solid #231a0e; font-size: 14pt; padding-bottom: 1mm; margin-bottom: 1mm; }
  .db-siegel { width: 26mm; height: 26mm; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #ff9c45, #b35d16); color: #fff3e0; font-weight: 900; font-size: 16pt; display: flex; align-items: center; justify-content: center; transform: rotate(-12deg); }
}

.feedback.neutral { border-color: #7fd6e8; background: #10303a; }
