/* UTGARD · Helm-HUD
   Bühne 1920 × 1080, wird per JavaScript auf das Fenster skaliert (wie ein Spiel). */

:root {
  --phosphor: #ffb13b;
  --phosphor-hell: #ffd28a;
  --glimmer: #c99446;
  --glimmer-dunkel: #a3732a;
  --linie: rgba(255, 177, 59, 0.42);
  --tief: #070807;
  --text: #efe6d6;
  --alarm: #ff4a3d;
  --ok: #8fcb5a;
  --mono: "IBM Plex Mono", "Cascadia Mono", Consolas, monospace;
  --sans: "IBM Plex Sans", "Segoe UI", sans-serif;
}

html, body {
  margin: 0;
  height: 100%;
  background: #000;
  overflow: hidden;
  cursor: default;
}

#stage {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 1920px;
  height: 1080px;
  transform-origin: 0 0;
  overflow: hidden;
  background: #000;
  color: var(--text);
  font-family: var(--sans);
  opacity: 0;
  transition: opacity 0.8s ease;
}
#stage.bereit { opacity: 1; }

/* Szenenbild ------------------------------------------------------------- */
.bild img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1.4s ease;
  animation: atmen 14s ease-in-out infinite alternate;
}
.bild img.sichtbar { opacity: 1; }
@keyframes atmen {
  from { transform: scale(1.02) translate(0, 0); }
  to { transform: scale(1.045) translate(-6px, 4px); }
}
.abdunkeln {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 75% 70% at 50% 48%, rgba(0, 0, 0, 0) 55%, rgba(0, 0, 0, 0.82) 100%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0) 46%, rgba(0, 0, 0, 0) 68%, rgba(0, 0, 0, 0.55) 100%);
}
.visierglanz {
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, rgba(255, 255, 255, 0) 30%, rgba(255, 255, 255, 0.045) 38%, rgba(255, 255, 255, 0) 46%);
  pointer-events: none;
}

/* Kopfzeile -------------------------------------------------------------- */
.kopf {
  position: absolute;
  left: 80px;
  right: 80px;
  top: 52px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  font-family: var(--mono);
  color: var(--phosphor);
  text-shadow: 0 0 6px rgba(255, 177, 59, 0.45);
}
.kopf-links { display: flex; flex-direction: column; gap: 6px; }
.h1 { font-size: 26px; font-weight: 600; letter-spacing: 0.08em; }
.h2 { font-size: 18px; letter-spacing: 0.08em; color: #e0a246; }
.h3 { font-size: 15px; letter-spacing: 0.08em; color: var(--glimmer); }
.kopf-rechts { display: flex; gap: 44px; align-items: center; }
.messwert { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.etikett { font-size: 14px; letter-spacing: 0.1em; color: var(--glimmer); font-family: var(--mono); }
.puls { display: flex; align-items: center; gap: 12px; }
.ekg { width: 120px; height: 34px; overflow: hidden; }
.ekg polyline { fill: none; stroke: var(--phosphor); stroke-width: 2; }
#ekg-zug { animation: ekg 2.4s linear infinite; }
@keyframes ekg { from { transform: translateX(0); } to { transform: translateX(-120px); } }
.zahl { font-size: 30px; font-weight: 600; min-width: 46px; text-align: right; }
.wert { font-size: 22px; font-weight: 500; }

/* Szene ------------------------------------------------------------------ */
.szene {
  position: absolute;
  left: 80px;
  top: 236px;
  width: 800px;
  max-height: 720px;
  box-sizing: border-box;
  padding: 34px 40px 36px;
  background: rgba(6, 7, 6, 0.8);
  border: 1px solid var(--linie);
  display: flex;
  flex-direction: column;
}
.ecke { position: absolute; width: 26px; height: 26px; pointer-events: none; }
.ecke-lo { left: -2px; top: -2px; border-left: 3px solid var(--phosphor); border-top: 3px solid var(--phosphor); }
.ecke-ru { right: -2px; bottom: -2px; border-right: 3px solid var(--phosphor); border-bottom: 3px solid var(--phosphor); }
#szene-inhalt {
  overflow-y: auto;
  padding-right: 10px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  scrollbar-width: thin;
  scrollbar-color: var(--glimmer-dunkel) transparent;
}
.szene-titel { font-family: var(--mono); font-size: 15px; letter-spacing: 0.12em; color: var(--glimmer); text-transform: uppercase; }
.szene-text p {
  margin: 0 0 16px;
  font-size: 23px;
  line-height: 1.55;
  font-weight: 300;
  white-space: pre-line;
  animation: auftauchen 0.7s ease both;
}
.szene-text p:last-child { margin-bottom: 0; }
@keyframes auftauchen { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.visiertext { font-family: var(--mono); color: var(--phosphor); font-size: 20px; }
.funkzeile { font-family: var(--mono); color: #f2d7a6; font-size: 20px; }
.funkzeile .wer { color: var(--phosphor); margin-right: 10px; }
.tippt { animation: blinken 1.2s steps(2) infinite; }

.wahl { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.wahl button, .knopf {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 58px;
  padding: 8px 20px;
  box-sizing: border-box;
  background: rgba(255, 177, 59, 0.08);
  border: 1px solid var(--glimmer-dunkel);
  color: #f4e6cc;
  font-family: var(--sans);
  font-size: 21px;
  text-align: left;
  cursor: pointer;
  animation: auftauchen 0.6s ease both;
}
.wahl button:hover:not(:disabled), .wahl button:focus-visible, .knopf:hover, .knopf:focus-visible {
  background: rgba(255, 177, 59, 0.2);
  border-color: var(--phosphor);
  outline: none;
}
.wahl button:disabled { opacity: 0.4; cursor: not-allowed; }
.taste {
  min-width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--phosphor);
  color: var(--phosphor);
  font-family: var(--mono);
  font-size: 17px;
}
.wahl-text { flex: 1; }
.kosten { font-family: var(--mono); font-size: 17px; color: #e0a246; white-space: nowrap; }

.probe { display: flex; flex-direction: column; gap: 14px; border: 1px solid var(--glimmer-dunkel); padding: 20px; background: rgba(255, 177, 59, 0.05); }
.probe-kopf { font-family: var(--mono); font-size: 19px; color: var(--phosphor); letter-spacing: 0.04em; }
.probe-zeile { display: flex; gap: 14px; align-items: center; }
.probe input {
  width: 110px;
  font-family: var(--mono);
  font-size: 34px;
  text-align: center;
  color: var(--phosphor-hell);
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid var(--phosphor);
  padding: 6px;
}
.probe .knopf { width: auto; }
.probe-kopf { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.marke { font-size: 14px; letter-spacing: 0.14em; color: var(--alarm); border: 1px solid var(--alarm); padding: 3px 9px; }
.probe-teile { font-family: var(--mono); font-size: 17px; color: #e9d9bd; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.probe-teile .ziel { color: var(--phosphor); }
.probe-bedarf { font-family: var(--mono); font-size: 16px; color: #b9a98e; }
.segment { display: flex; gap: 8px; }
.segment button {
  min-width: 62px;
  min-height: 46px;
  font-family: var(--mono);
  font-size: 20px;
  color: #f4e6cc;
  background: rgba(255, 177, 59, 0.06);
  border: 1px solid var(--glimmer-dunkel);
  cursor: pointer;
}
.segment button.an { background: rgba(255, 177, 59, 0.3); border-color: var(--phosphor); color: var(--phosphor-hell); }
.segment button:disabled { opacity: 0.35; cursor: not-allowed; }
.segment button:focus-visible { outline: 1px solid var(--phosphor); outline-offset: 2px; }
.schalter {
  display: flex; align-items: center; gap: 16px; min-height: 50px; padding: 6px 18px;
  background: transparent; border: 1px dashed var(--glimmer-dunkel); color: #d8c8ac;
  font-family: var(--sans); font-size: 19px; text-align: left; cursor: pointer;
}
.schalter.an { border-style: solid; border-color: var(--phosphor); background: rgba(255, 177, 59, 0.14); color: #f4e6cc; }
.warnung { font-family: var(--mono); font-size: 16px; color: var(--alarm); }
.probe input.wuerfel { width: 72px; }
.leise { background: none; border: none; color: #9b8f7c; font-family: var(--mono); font-size: 15px; text-decoration: underline; cursor: pointer; }
.ergebnis { font-family: var(--mono); font-size: 18px; padding: 12px 16px; border-left: 3px solid; display: flex; flex-direction: column; gap: 6px; }
.ergebnis .augen { color: var(--text); }
.ergebnis .stufe { font-size: 22px; letter-spacing: 0.1em; }
.ergebnis .hinweis { font-family: var(--sans); font-size: 18px; color: #d8c8ac; }
.ergebnis.volltreffer { color: var(--phosphor-hell); border-color: var(--phosphor-hell); }
.ergebnis.geschafft { color: var(--ok); border-color: var(--ok); }
.ergebnis.knapp { color: #e0a246; border-color: #e0a246; }
.ergebnis.daneben { color: var(--alarm); border-color: var(--alarm); }
/* Nach der Probe: wie es ausgeht, noch im Raum der Probe (Spieltest 28.11.) */
.szene-text.ausgang { margin-top: 4px; }
#nachspiel-weiter { align-self: flex-start; margin-top: 6px; }
.pasch { margin-top: 8px; border-top: 1px solid var(--linie); padding-top: 10px; }
.pasch p { margin: 0 0 6px; font-family: var(--sans); font-size: 19px; line-height: 1.5; color: var(--text); }
.pasch p.visiertext { font-family: var(--mono); color: var(--phosphor); }
.stoerung { color: var(--alarm) !important; animation: stoerflackern 0.14s steps(2) 10; }
@keyframes stoerflackern { 50% { opacity: 0.15; } }

.ende { display: flex; flex-direction: column; gap: 14px; }
.ende p { margin: 0; font-size: 21px; line-height: 1.5; font-weight: 300; }
.ende .nacht { color: var(--glimmer); font-size: 19px; }
.ende .haken { font-family: var(--mono); color: var(--phosphor); font-size: 19px; border-top: 1px solid var(--linie); padding-top: 14px; }
.dim { color: #9b8f7c; }

/* HEIMDALL-Kanal --------------------------------------------------------- */
.kanal {
  position: absolute;
  right: 80px;
  top: 200px;
  width: 560px;
  height: 720px;
  background: rgba(6, 7, 6, 0.78);
  border: 1px solid rgba(255, 177, 59, 0.34);
  display: flex;
  flex-direction: column;
  font-family: var(--mono);
}
.kanal-kopf {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 22px;
  border-bottom: 1px solid rgba(255, 177, 59, 0.3);
  color: var(--phosphor);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.1em;
}
.signal { display: flex; gap: 4px; align-items: center; height: 20px; }
.signal i { display: block; width: 4px; background: var(--phosphor); animation: pegel 1.6s ease-in-out infinite; }
.signal i:nth-child(odd) { animation-delay: -0.4s; }
.signal i:nth-child(3n) { animation-delay: -0.9s; }
@keyframes pegel { 0%, 100% { height: 4px; } 50% { height: 18px; } }
.kanal.aus .signal i { animation: none; height: 3px; background: var(--glimmer-dunkel); }
.kanal.aus .kanal-kopf { color: var(--glimmer-dunkel); }
.kanal-log {
  flex: 1;
  overflow-y: auto;
  padding: 18px 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  font-size: 17px;
  line-height: 1.55;
  color: #f2d7a6;
  scrollbar-width: thin;
  scrollbar-color: var(--glimmer-dunkel) transparent;
}
.msg { margin: 0; white-space: pre-wrap; }
.msg .wer { color: var(--phosphor); margin-right: 8px; }
.msg.player, .msg.player .wer { color: var(--text); }
.msg.system { color: var(--glimmer-dunkel); }
.msg.system .wer { color: var(--glimmer-dunkel); }
.kein-signal { color: var(--glimmer-dunkel); font-size: 16px; line-height: 1.6; }
.kanal-form { padding: 14px 22px 20px; border-top: 1px solid rgba(255, 177, 59, 0.3); display: flex; flex-direction: column; gap: 8px; }
.kanal-form label { font-size: 14px; letter-spacing: 0.08em; color: var(--glimmer); }
.kanal-form input {
  font-family: var(--mono);
  font-size: 17px;
  color: var(--phosphor-hell);
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid var(--glimmer-dunkel);
  padding: 12px 14px;
  outline: none;
}
.kanal-form input:focus { border-color: var(--phosphor); }

/* Anzugenergie ----------------------------------------------------------- */
.energie {
  position: absolute;
  left: 80px;
  bottom: 52px;
  display: flex;
  align-items: center;
  gap: 22px;
  font-family: var(--mono);
  color: var(--phosphor);
}
.energie svg { width: 132px; height: 78px; overflow: visible; }
.energie .bahn { fill: none; stroke: #4a3517; stroke-width: 9; }
.energie .stand { fill: none; stroke: var(--phosphor); stroke-width: 9; transition: stroke-dashoffset 0.8s ease; }
.energie text { font-family: var(--mono); font-size: 23px; font-weight: 600; fill: var(--phosphor); }
.energie-text { display: flex; flex-direction: column; gap: 2px; }
#energie-hinweis { font-size: 18px; letter-spacing: 0.04em; }
.energie.knapp .stand { stroke: var(--alarm); animation: blinken 1.2s steps(2) infinite; }
.energie.knapp text, .energie.knapp #energie-hinweis { fill: var(--alarm); color: var(--alarm); }
@keyframes blinken { 50% { opacity: 0.45; } }

/* Zugänge ---------------------------------------------------------------- */
.zugang { position: absolute; right: 80px; bottom: 52px; display: flex; gap: 14px; }
.zugang button, .fenster button, .schliessen {
  min-height: 52px;
  padding: 0 22px;
  background: rgba(6, 7, 6, 0.72);
  border: 1px solid var(--glimmer-dunkel);
  color: var(--phosphor);
  font-family: var(--mono);
  font-size: 17px;
  letter-spacing: 0.08em;
  cursor: pointer;
}
.zugang button:hover, .zugang button:focus-visible, .fenster button:hover, .fenster button:focus-visible {
  border-color: var(--phosphor);
  background: rgba(255, 177, 59, 0.15);
  outline: none;
}
.zugang .neu { border-color: var(--phosphor); animation: rufen 2.4s ease-in-out infinite; }
/* Ton: leiser als die anderen Zugänge, stumm gedimmt */
.zugang #btn-ton { opacity: 0.7; }
.zugang #btn-ton.stumm { opacity: 0.45; text-decoration: line-through; }
@keyframes rufen { 50% { box-shadow: 0 0 18px rgba(255, 177, 59, 0.45); } }

/* Fenster: Terminal und Logbuch ------------------------------------------ */
.fenster {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.62);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
}
.fenster[hidden] { display: none; }
.fenster-rahmen {
  width: 1500px;
  height: 820px;
  box-sizing: border-box;
  background: rgba(7, 8, 7, 0.95);
  border: 1px solid var(--linie);
  padding: 26px 34px 30px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.fenster-kopf {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--mono);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--phosphor);
  border-bottom: 1px solid var(--linie);
  padding-bottom: 16px;
}
.doc-split { flex: 1; display: grid; grid-template-columns: 380px 1fr; gap: 30px; min-height: 0; }
.doclist { list-style: none; margin: 0; padding: 0; overflow-y: auto; font-family: var(--mono); }
.doclist .kat { color: var(--glimmer); font-size: 14px; letter-spacing: 0.12em; margin: 14px 0 6px; text-transform: uppercase; }
.doclist button {
  width: 100%;
  text-align: left;
  min-height: 44px;
  padding: 6px 12px;
  font-size: 17px;
  letter-spacing: 0.02em;
  display: flex;
  justify-content: space-between;
  gap: 10px;
}
.doclist button.aktiv { border-color: var(--phosphor); background: rgba(255, 177, 59, 0.15); }
.doclist .marke { color: var(--alarm); font-size: 13px; }
.docview {
  overflow-y: auto;
  font-family: var(--mono);
  font-size: 18px;
  line-height: 1.6;
  color: #f2d7a6;
  padding-right: 12px;
  scrollbar-width: thin;
  scrollbar-color: var(--glimmer-dunkel) transparent;
}
.docview h2 { margin: 0 0 18px; font-size: 24px; color: var(--phosphor); letter-spacing: 0.06em; }
.docview p { margin: 0 0 14px; white-space: pre-line; }
.docview table { border-collapse: collapse; margin: 0 0 16px; }
.docview th, .docview td { border: 1px solid rgba(255, 177, 59, 0.3); padding: 6px 12px; text-align: left; }
.docview th { color: var(--phosphor); }
/* Akte mit Lichtbild (z. B. Personalakte): leicht entsättigt und warm, damit es zum Visier passt */
.docview .akte { display: grid; grid-template-columns: 210px 1fr; gap: 28px; align-items: start; margin-bottom: 18px; }
.docview .akte table { margin: 0; }
.docview .lichtbild { margin: 0; }
.docview .lichtbild img { display: block; width: 210px; height: 280px; object-fit: cover; border: 1px solid rgba(255, 177, 59, 0.45);
  filter: grayscale(0.3) sepia(0.18) contrast(1.04) brightness(0.96); }
.docview .lichtbild figcaption { font-size: 13px; color: var(--glimmer); letter-spacing: 0.1em; margin-top: 6px; }

#logform { display: flex; flex-direction: column; gap: 12px; }
#loginput {
  font-family: var(--sans);
  font-size: 20px;
  line-height: 1.5;
  color: var(--text);
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid var(--glimmer-dunkel);
  padding: 14px;
  resize: none;
  outline: none;
}
#loginput:focus { border-color: var(--phosphor); }
#logform button { align-self: flex-start; }
#logentries { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; }
.logeintrag { border-left: 2px solid var(--glimmer-dunkel); padding: 4px 0 4px 16px; font-size: 19px; line-height: 1.5; white-space: pre-wrap; }
.logeintrag .wann { font-family: var(--mono); font-size: 14px; color: var(--glimmer); letter-spacing: 0.06em; margin-bottom: 4px; }

/* Meldungen -------------------------------------------------------------- */
.toast {
  position: absolute;
  left: 50%;
  bottom: 150px;
  transform: translateX(-50%);
  background: rgba(20, 6, 4, 0.92);
  border: 1px solid var(--alarm);
  color: #ffb4a8;
  font-family: var(--mono);
  font-size: 18px;
  padding: 14px 22px;
  z-index: 9;
}

/* Kamera: Korn, Zeilen, Visierrand (über allem, nicht klickbar) ----------- */
.korn {
  position: absolute;
  inset: -50%;
  pointer-events: none;
  opacity: 0.09;
  z-index: 20;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  animation: korn 0.6s steps(4) infinite;
}
@keyframes korn {
  0% { transform: translate(0, 0); }
  25% { transform: translate(-7%, 5%); }
  50% { transform: translate(4%, -8%); }
  75% { transform: translate(-3%, 9%); }
  100% { transform: translate(6%, -4%); }
}
.zeilen {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 21;
  background: repeating-linear-gradient(to bottom, rgba(0, 0, 0, 0) 0, rgba(0, 0, 0, 0) 3px, rgba(0, 0, 0, 0.13) 4px);
}
.visier {
  position: absolute;
  inset: 16px;
  pointer-events: none;
  z-index: 22;
  border-radius: 70px;
  box-shadow: 0 0 0 40px #000, inset 0 0 120px 40px rgba(0, 0, 0, 0.62);
  animation: flackern 7s infinite;
}
@keyframes flackern {
  0%, 93%, 100% { opacity: 1; }
  94% { opacity: 0.86; }
  95% { opacity: 1; }
  97% { opacity: 0.92; }
}

/* Aussetzer: Bild flackert, EKG wird zur Linie, dann Schwarz über allem (auch über dem Visierrand) */
#stage.aussetzer .bild { animation: aussetzer-flackern 0.9s steps(3) 1; }
#stage.aussetzer #ekg-zug { animation-play-state: paused; }
#stage.aussetzer .ekg polyline { transform: scaleY(0); transform-origin: 0 20px; transition: transform 0.5s ease-in; }
@keyframes aussetzer-flackern {
  0% { opacity: 1; }
  33% { opacity: 0.35; }
  66% { opacity: 0.8; }
  100% { opacity: 0.6; }
}
.schwarz {
  position: absolute;
  inset: 0;
  z-index: 30;
  background: #000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 1.4s ease-in;
}
.schwarz.an { opacity: 1; pointer-events: auto; cursor: none; }

@media (prefers-reduced-motion: reduce) {
  .bild img, .korn, .visier, #ekg-zug, .signal i, .zugang .neu, #stage.aussetzer .bild { animation: none; }
}

/* Gesprächsweiche im Funkkanal ------------------------------------------
   Eine Stimme: Die Sätze, die er sagen könnte, und die Zeile, in der er spricht, sind ein Block.
   Der Satz wandert per Klick in die Zeile; die Zeile sieht aus wie die nächste Zeile des Funkverkehrs. */
.kanal.weiche { border-color: rgba(255, 177, 59, 0.6); box-shadow: 0 0 0 1px rgba(255, 177, 59, 0.12), 0 0 28px rgba(255, 177, 59, 0.08); }
.kanal.weiche .kanal-form { background: rgba(255, 177, 59, 0.035); }
.sagen { display: flex; flex-direction: column; gap: 6px; }
.sagen[hidden] { display: none; }
.sagen-kopf { display: flex; justify-content: space-between; font-size: 14px; letter-spacing: 0.08em; color: var(--glimmer); }
.sagen-kopf span:last-child { letter-spacing: 0.02em; color: var(--glimmer-dunkel); }
.vorschlaege { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.vorschlaege button {
  width: 100%; display: flex; align-items: baseline; gap: 12px; text-align: left;
  background: transparent; border: 0; border-left: 2px solid transparent; color: #e9dcc3;
  font-family: var(--sans); font-size: 17px; line-height: 1.35; padding: 5px 10px 5px 8px; cursor: pointer;
}
.vorschlaege button:hover:not(:disabled), .vorschlaege button:focus-visible {
  background: rgba(255, 177, 59, 0.1); border-left-color: var(--glimmer-dunkel); color: #f8ecd6; outline: none;
}
.vorschlaege button.gewaehlt { background: rgba(255, 177, 59, 0.16); border-left-color: var(--phosphor); color: var(--phosphor-hell); }
.vorschlaege button:disabled { opacity: 0.4; cursor: not-allowed; }
.vorschlaege button.stumm .satz { font-style: italic; color: var(--glimmer); }
.vorschlaege .taste { min-width: 22px; height: 22px; font-size: 13px; align-self: center; flex: none; }
.vorschlaege .satz { flex: 1; min-width: 0; }
.zeile { display: flex; align-items: center; gap: 10px; border: 1px solid var(--glimmer-dunkel); background: rgba(0, 0, 0, 0.5); padding: 0 14px; }
.zeile:focus-within { border-color: var(--phosphor); }
.zeile .prompt { color: var(--text); font-size: 17px; }
.kanal-form .zeile input { flex: 1; min-width: 0; border: 0; background: transparent; padding: 12px 0; }
.zeile .senden { color: var(--phosphor); font-size: 18px; animation: blinken 1.2s steps(2) infinite; }
.zeile .senden[hidden] { display: none; }
.zeile-hinweis { min-height: 18px; font-size: 13px; letter-spacing: 0.02em; color: var(--glimmer-dunkel); }
.rede-hinweis { font-family: var(--mono); font-size: 16px; color: var(--phosphor); border-left: 3px solid var(--phosphor); padding: 8px 12px; display: flex; flex-direction: column; gap: 4px; }
.rede-hinweis .dim { color: var(--glimmer); font-size: 14px; }
#h-lage.knapp { color: #ff8a5c; }

/* Aufnahmen im Terminal (z. B. Perennis-Einweisung) ---------------------- */
.docview video.aufnahme { display: block; width: 100%; max-height: 520px; background: #000; border: 1px solid var(--glimmer-dunkel); margin: 6px 0 12px; }
.aufnahme-fehlt { font-family: var(--mono); color: var(--alarm); border: 1px solid rgba(255, 74, 61, 0.5); padding: 18px; margin: 6px 0 14px; line-height: 1.6; }
.transkript { margin-top: 10px; }
.transkript[hidden] { display: none; }
.transkript .etikett { font-family: var(--mono); font-size: 14px; letter-spacing: 0.08em; color: var(--glimmer); margin-bottom: 8px; }

/* Post: Reiter, Posteingang, Mail-Ansicht, Schreiben, Funkfenster -------- */
.fenster-kopf .reiter { display: flex; gap: 10px; margin-left: auto; margin-right: 24px; }
.fenster-kopf .reiter button { min-height: 40px; font-size: 15px; padding: 0 16px; opacity: 0.7; }
.fenster-kopf .reiter button.aktiv { opacity: 1; border-color: var(--phosphor); background: rgba(255, 177, 59, 0.15); }
.postspalte { display: flex; flex-direction: column; gap: 10px; min-height: 0; }
.postkopf { font-family: var(--mono); font-size: 14px; letter-spacing: 0.1em; color: var(--glimmer); line-height: 1.6; }
.post-neu { align-self: flex-start; min-height: 40px !important; font-size: 15px !important; }
.postlist { flex: 1; min-height: 0; }
.postlist .mailzeile { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.postlist .zeit { font-size: 13px; color: var(--glimmer); }
.postlist .absender { font-size: 13px; color: #b8a789; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.postlist .betreff { font-size: 16px; overflow: hidden; text-overflow: ellipsis; }
.postlist button { align-items: center; }
.postlist button.ungelesen .betreff { color: var(--phosphor-hell); font-weight: 600; }
.postlist li.sammel { display: flex; gap: 12px; padding: 6px 12px; font-size: 14px; color: #8a7f6d; font-family: var(--mono); }
.postlist .status { font-size: 12px; letter-spacing: 0.08em; padding: 2px 8px; border: 1px solid var(--glimmer-dunkel); color: var(--glimmer); white-space: nowrap; }
.postlist .status.unterwegs { color: var(--phosphor); border-color: var(--phosphor); }
.postlist .status.verloren { color: var(--alarm); border-color: var(--alarm); }
.mailkopf { display: grid; gap: 4px; margin: 0 0 18px; padding: 10px 14px; border: 1px solid rgba(255, 177, 59, 0.25); font-size: 16px; }
.mailkopf .etikett { display: inline-block; min-width: 110px; color: var(--glimmer); font-size: 13px; letter-spacing: 0.12em; }
.mailform { display: flex; flex-direction: column; gap: 12px; }
.mailform input, .mailform textarea, .mailform select {
  font-family: var(--mono); font-size: 17px; color: var(--text); background: rgba(0, 0, 0, 0.5);
  border: 1px solid var(--glimmer-dunkel); padding: 10px 12px; outline: none;
}
.mailform textarea { resize: none; line-height: 1.5; }
.mailform input:focus, .mailform textarea:focus, .mailform select:focus { border-color: var(--phosphor); }
.mailform .hinweis { font-size: 14px; }
.mailform .knoepfe { display: flex; gap: 18px; align-items: center; }
.knopf-klein { min-height: 44px !important; font-size: 15px !important; margin-top: 8px; }
.funkfenster {
  position: absolute; left: 50%; top: 150px; transform: translateX(-50%); z-index: 6;
  display: flex; flex-direction: column; align-items: center; gap: 6px; pointer-events: none;
  text-shadow: 0 0 12px rgba(255, 177, 59, 0.55);
}
.funkfenster[hidden] { display: none; }
.funkfenster.zeigt { animation: funkfenster 5s ease-out forwards; }
@keyframes funkfenster { 0% { opacity: 0; } 8% { opacity: 1; } 20% { opacity: 0.6; } 28% { opacity: 1; } 80% { opacity: 1; } 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .funkfenster.zeigt { animation: none; } }

/* ------------------------------------------------------------------------
   Nach dem ersten Test des Users (27.11.): Bild sichtbarer, Kanal kompakt solange tot,
   Reiter exklusiv, Schreibansicht, Neues fällt auf, Visierzeile am Schichtende, [B] Blick.
   ------------------------------------------------------------------------ */

/* Reiter: Das hidden-Attribut muss gegen display:grid gewinnen (sonst standen Dokumente und Post übereinander) */
.doc-split[hidden] { display: none; }

/* Szenenbild sichtbarer: schmalerer, durchsichtigerer Textkasten, Lesbarkeit über Textschatten */
.abdunkeln {
  background:
    radial-gradient(ellipse 75% 70% at 50% 48%, rgba(0, 0, 0, 0) 58%, rgba(0, 0, 0, 0.72) 100%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0) 38%, rgba(0, 0, 0, 0) 72%, rgba(0, 0, 0, 0.42) 100%);
}
.szene {
  width: 600px;
  padding: 28px 32px 30px;
  background: linear-gradient(180deg, rgba(6, 7, 6, 0.64), rgba(6, 7, 6, 0.52));
  border-color: rgba(255, 177, 59, 0.32);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.95), 0 0 14px rgba(0, 0, 0, 0.7);
}
.szene-text p { font-size: 20px; line-height: 1.55; margin-bottom: 14px; }
#szene-inhalt { gap: 14px; }
.wahl { gap: 8px; }
.wahl button, .knopf { background-color: rgba(6, 7, 6, 0.62); min-height: 48px; padding: 6px 16px; gap: 14px; font-size: 19px; }
.wahl .taste, .knopf .taste { min-width: 28px; height: 28px; font-size: 15px; }
.kosten { font-size: 15px; }
.ende p { font-size: 20px; }

/* HEIMDALL-Kanal online: etwas schmaler und durchsichtiger */
.kanal {
  width: 500px;
  height: 660px;
  background: linear-gradient(180deg, rgba(6, 7, 6, 0.66), rgba(6, 7, 6, 0.56));
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9);
}
.kanal-form input, .zeile { background: rgba(0, 0, 0, 0.55); }

/* Kanal tot (vor dem 4.12.): eine schmale Leiste. Gepufferte Zeilen klappen auf. */
.kanal.aus { width: 440px; height: auto; background: rgba(6, 7, 6, 0.5); border-color: rgba(163, 115, 42, 0.5); }
.kanal.aus .kanal-kopf { padding: 12px 18px; font-size: 15px; border-bottom-color: rgba(163, 115, 42, 0.35); }
.kanal.aus .kanal-log { display: none; }
.kanal.aus.offen .kanal-log { display: flex; max-height: 240px; padding: 12px 18px; font-size: 15px; }
.kanal.aus .kanal-form { padding: 10px 18px 14px; border-top: 0; gap: 4px; }
.kanal.aus .kanal-form label, .kanal.aus .zeile-hinweis { display: none; }
.kanal.aus .zeile { border-color: rgba(163, 115, 42, 0.55); }
.kanal.aus .kanal-form .zeile input { padding: 8px 0; font-size: 15px; color: var(--glimmer); }
.kanal.aus .zeile .prompt { font-size: 15px; color: var(--glimmer); }
.puffer-zeile {
  display: flex; justify-content: space-between; gap: 12px; text-align: left; cursor: pointer;
  margin: 0; padding: 8px 18px; background: transparent; border: 0; border-bottom: 1px solid rgba(163, 115, 42, 0.25);
  font-family: var(--mono); font-size: 13px; letter-spacing: 0.08em; color: var(--glimmer-dunkel);
}
.puffer-zeile[hidden] { display: none; }
.puffer-zeile:hover, .puffer-zeile:focus-visible { color: var(--glimmer); outline: none; }

/* Neues im Terminal oder in der Post: deutlich pulsieren, bis er hineinsieht */
.zugang .neu.ruft {
  border-color: var(--phosphor-hell);
  color: var(--phosphor-hell);
  animation: rufen-stark 1.1s ease-in-out infinite;
}
@keyframes rufen-stark {
  0%, 100% { box-shadow: 0 0 0 rgba(255, 177, 59, 0); background-color: rgba(6, 7, 6, 0.72); }
  50% { box-shadow: 0 0 26px rgba(255, 177, 59, 0.85), inset 0 0 12px rgba(255, 177, 59, 0.35); background-color: rgba(255, 177, 59, 0.22); }
}

/* Erster Blick: Wechselt das Szenenbild, steht es kurz allein, dann blenden die Felder ein */
.szene, .kanal, .energie { transition: opacity 0.9s ease, transform 0.9s ease; }
#stage.erster-blick .szene, #stage.erster-blick .kanal { opacity: 0; transform: translateY(10px); pointer-events: none; }

/* [B] Blick: nur Bild und Visierkopf */
.zugang { transition: opacity 0.5s ease; }
#stage.blick .szene, #stage.blick .kanal, #stage.blick .energie, #stage.blick .zugang { opacity: 0; pointer-events: none; }
#stage.blick .abdunkeln { opacity: 0.35; }
.abdunkeln { transition: opacity 0.6s ease; }
.blick-hinweis {
  position: absolute; left: 50%; bottom: 58px; transform: translateX(-50%);
  font-family: var(--mono); font-size: 16px; letter-spacing: 0.12em; color: var(--glimmer);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9); z-index: 4;
}
.blick-hinweis[hidden] { display: none; }

/* Schichtende: Visierzeile flackert auf, steht, dann wird es dunkel */
.visierzeile {
  position: absolute; left: 50%; top: 46%; transform: translate(-50%, -50%); z-index: 7;
  font-family: var(--mono); font-size: 46px; letter-spacing: 0.14em; color: var(--phosphor-hell);
  text-shadow: 0 0 14px rgba(255, 177, 59, 0.8), 0 0 40px rgba(255, 177, 59, 0.35);
  pointer-events: none; white-space: nowrap;
}
.visierzeile[hidden] { display: none; }
.visierzeile.zeigt { animation: visierzeile 5.2s ease-out forwards; }
@keyframes visierzeile {
  0% { opacity: 0; } 3% { opacity: 1; } 6% { opacity: 0.15; } 9% { opacity: 0.9; } 12% { opacity: 0.3; }
  16% { opacity: 1; } 85% { opacity: 1; } 100% { opacity: 0; }
}
/* Einschlafen: Alles außer der Visierzeile tritt zurück, damit sie allein im Dunkeln steht */
#stage .szene, #stage .kanal, #stage .zugang, #stage .energie { transition: opacity 1.4s ease; }
#stage.einschlafen .szene, #stage.einschlafen .kanal, #stage.einschlafen .zugang, #stage.einschlafen .energie { opacity: 0.06; }
.bild { transition: opacity 4s ease; }
#stage.schlaf .bild { opacity: 0.12; }
#stage.schlaf .abdunkeln { opacity: 1; }

/* Testmodus: „nächste Schicht“ ist kein Spielelement */
.knopf.testmodus { border-style: dashed; border-color: #6f8f9a; color: #a9c7d1; }
.knopf.testmodus .taste { border-color: #6f8f9a; color: #a9c7d1; }
.testmodus-hinweis { font-family: var(--mono); font-size: 13px; letter-spacing: 0.1em; color: #7fa3ae; }

/* Schreibansicht: ersetzt die rechte Seite ganz, kein Scrollen */
.docview.schreibt { overflow: hidden; display: flex; flex-direction: column; padding-right: 0; }
.schreibansicht { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 12px; }
.schreibansicht h2 { margin: 0 0 4px; }
.schreibansicht .feldzeile { display: grid; grid-template-columns: 110px 1fr; align-items: center; gap: 12px; }
.schreibansicht .feldzeile .etikett { color: var(--glimmer); font-size: 13px; letter-spacing: 0.12em; }
.schreibansicht .fest { font-family: var(--mono); font-size: 17px; color: var(--text); padding: 8px 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.schreibansicht input, .schreibansicht select, .schreibansicht textarea {
  font-family: var(--mono); font-size: 17px; color: var(--text); background: rgba(0, 0, 0, 0.5);
  border: 1px solid var(--glimmer-dunkel); padding: 10px 12px; outline: none; min-width: 0;
}
.schreibansicht input:focus, .schreibansicht select:focus, .schreibansicht textarea:focus { border-color: var(--phosphor); }
.schreibansicht textarea { flex: 1; min-height: 120px; resize: none; line-height: 1.5; }
.schreibansicht .fuss { display: flex; justify-content: space-between; align-items: center; gap: 18px; }
.schreibansicht .fuss .hinweis { font-size: 13px; color: var(--glimmer-dunkel); }
.schreibansicht .knoepfe { display: flex; gap: 14px; }
.schreibansicht .knoepfe button { min-height: 44px; font-size: 15px; white-space: nowrap; }
.schreibansicht .fuss .hinweis { flex: 1; }
.gesendet { font-family: var(--mono); color: var(--phosphor); font-size: 17px; letter-spacing: 0.06em; border: 1px solid var(--linie); padding: 14px 18px; margin: 0 0 16px; }

@media (prefers-reduced-motion: reduce) {
  .zugang .neu.ruft, .visierzeile.zeigt { animation: none; }
  .szene, .kanal, .energie, .bild { transition: none; }
}
.schreibansicht .verwerfen { opacity: 0.7; }
/* Anzugenergie: hidden muss gegen display:flex gewinnen (sonst stand „stabil“ noch nach dem Schichtende da) */
.energie[hidden] { display: none; }
/* Visierzeile mit leichtem Schatten dahinter, damit sie sich vom Bild abhebt */
.visierzeile { padding: 30px 80px; background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.75) 0%, rgba(0, 0, 0, 0) 75%); }

/* ------------------------------------------------------------------------
   Ermittlung: Gerätebildschirm im Visier-Stil. Groß, ohne Scrollen auf 1920 × 1080, der HEIMDALL-Kanal bleibt
   rechts sichtbar. Bernstein und Störbild statt Quiz-Grün und -Rot.
   ------------------------------------------------------------------------ */
#szene.geraet-modus {
  left: 80px; top: 196px; width: 1224px; height: 728px; max-height: none;
  padding: 22px 28px 24px;
  background: linear-gradient(180deg, rgba(6, 7, 6, 0.86), rgba(6, 7, 6, 0.8));
  border-color: rgba(255, 177, 59, 0.42);
}
#szene.geraet-modus #szene-inhalt { overflow: hidden; height: 100%; gap: 10px; padding-right: 0; }
.geraet { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 14px; position: relative; }
/* feine Zeilen wie auf einem Stationsmonitor */
.geraet::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0.35;
  background: repeating-linear-gradient(180deg, rgba(255, 177, 59, 0.035) 0 1px, transparent 1px 4px);
}
.geraet-kopf {
  display: flex; justify-content: space-between; align-items: center; gap: 20px;
  font-family: var(--mono); color: var(--phosphor); border-bottom: 1px solid var(--linie); padding-bottom: 10px;
  text-shadow: 0 0 8px rgba(255, 177, 59, 0.35);
}
.geraet-titel { font-size: 21px; font-weight: 600; letter-spacing: 0.1em; }
.geraet-versuche { display: flex; align-items: center; gap: 7px; opacity: 0.75; }
.geraet-versuche .etikett { font-size: 12px; margin-right: 4px; color: var(--glimmer-dunkel); }
.geraet-versuche i { width: 9px; height: 9px; border: 1px solid var(--glimmer-dunkel); transform: rotate(45deg); }
.geraet-versuche i.an { background: var(--glimmer); border-color: var(--glimmer); }

.geraet-koerper { flex: 1; min-height: 0; display: grid; grid-template-columns: 1fr; gap: 26px; }
.geraet-koerper.mit-material { grid-template-columns: 500px 1fr; }

/* Material: Reiter und Ansicht */
.geraet-material { min-height: 0; display: flex; flex-direction: column; border: 1px solid rgba(255, 177, 59, 0.25); background: rgba(0, 0, 0, 0.35); }
.geraet-reiter { display: flex; gap: 0; border-bottom: 1px solid rgba(255, 177, 59, 0.25); font-family: var(--mono); }
.geraet-reiter button {
  flex: 1 1 0; min-width: 0; min-height: 40px; padding: 0 12px; background: transparent; border: 0; border-right: 1px solid rgba(255, 177, 59, 0.18);
  color: var(--glimmer); font-family: var(--mono); font-size: 14px; letter-spacing: 0.06em; cursor: pointer;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-transform: uppercase;
}
.geraet-reiter button:last-child { border-right: 0; }
.geraet-reiter button.aktiv { color: var(--phosphor-hell); background: rgba(255, 177, 59, 0.14); box-shadow: inset 0 -2px 0 var(--phosphor); }
.geraet-reiter button:hover, .geraet-reiter button:focus-visible { color: var(--phosphor-hell); outline: none; }
.geraet-reiter.einzeln { padding: 10px 14px; font-size: 14px; letter-spacing: 0.1em; color: var(--glimmer); text-transform: uppercase; }
.geraet-material-ansicht {
  flex: 1; min-height: 0; overflow-y: auto; padding: 16px 18px; font-family: var(--mono); font-size: 16px; line-height: 1.55; color: #f2d7a6;
  scrollbar-width: thin; scrollbar-color: var(--glimmer-dunkel) transparent;
}
.geraet-material-ansicht h3 { margin: 0 0 12px; font-size: 18px; color: var(--phosphor); letter-spacing: 0.05em; }
.geraet-material-ansicht p { margin: 0 0 12px; white-space: pre-line; }
.geraet-material-ansicht table { border-collapse: collapse; margin: 0 0 12px; font-size: 15px; }
.geraet-material-ansicht th, .geraet-material-ansicht td { border: 1px solid rgba(255, 177, 59, 0.28); padding: 4px 9px; text-align: left; }
.geraet-material-ansicht th { color: var(--phosphor); }
.geraet-bild {
  display: block; width: 100%; height: 100%; object-fit: contain; cursor: zoom-in;
  filter: sepia(0.25) saturate(0.85) contrast(1.05);
}
.geraet-material-ansicht:has(.geraet-bild) { padding: 10px; overflow: hidden; }
.geraet-bild-fehlt { font-family: var(--mono); color: var(--glimmer-dunkel); letter-spacing: 0.12em; padding: 40px 0; text-align: center; }

/* Arbeitsbereich */
.geraet-arbeit { min-height: 0; display: flex; flex-direction: column; gap: 12px; }
.geraet-szenentext p { margin: 0 0 8px; font-size: 18px; line-height: 1.5; font-weight: 300; white-space: pre-line; animation: none; }
.geraet-szenentext p:last-child { margin-bottom: 0; }
.geraet-szenentext .visiertext, .geraet-szenentext .funkzeile { font-size: 17px; }
.geraet-anleitung { font-family: var(--mono); font-size: 15px; letter-spacing: 0.03em; color: var(--glimmer); white-space: pre-line; }
.geraet-eingabe { flex: 1; min-height: 0; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--glimmer-dunkel) transparent; }

/* auswahl */
.geraet-optionen { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.geraet-optionen button {
  width: 100%; display: flex; align-items: center; gap: 14px; min-height: 50px; padding: 6px 16px; box-sizing: border-box;
  background: rgba(6, 7, 6, 0.55); border: 1px solid var(--glimmer-dunkel); color: #f4e6cc; font-family: var(--sans); font-size: 19px;
  text-align: left; cursor: pointer;
}
.geraet-optionen .taste { min-width: 28px; height: 28px; font-size: 15px; }
.geraet-optionen button:hover, .geraet-optionen button:focus-visible { border-color: var(--phosphor); background: rgba(255, 177, 59, 0.12); outline: none; }
.geraet-optionen button.an { border-color: var(--phosphor); background: rgba(255, 177, 59, 0.22); color: #fff1d6; box-shadow: inset 4px 0 0 var(--phosphor); }

/* markieren: Protokollzeilen und Tabellen */
.geraet-protokoll, .geraet-tabelle { display: flex; flex-direction: column; gap: 2px; font-family: var(--mono); }
.geraet-zeile {
  display: grid; grid-template-columns: 2.2em 1fr; align-items: center; gap: 6px; width: 100%; box-sizing: border-box;
  min-height: 34px; padding: 3px 10px; background: transparent; border: 0; border-left: 3px solid transparent;
  color: #ecdcbf; font-family: var(--mono); font-size: 16px; text-align: left; cursor: pointer; flex: none;
}
.geraet-tabelle .geraet-zeile { grid-template-columns: var(--spalten); }
.geraet-zeile:nth-of-type(even):not(.kopf) { background: rgba(255, 177, 59, 0.035); }
.geraet-zeile:hover, .geraet-zeile:focus-visible { background: rgba(255, 177, 59, 0.1); outline: none; }
.geraet-zeile.an { background: rgba(255, 177, 59, 0.2); border-left-color: var(--phosphor); color: #fff1d6; }
.geraet-zeile.kopf { cursor: default; color: var(--glimmer); font-size: 13px; letter-spacing: 0.1em; text-transform: uppercase; border-bottom: 1px solid rgba(255, 177, 59, 0.25); }
.geraet-zeile .marke-feld { color: var(--glimmer-dunkel); }
.geraet-zeile.an .marke-feld { color: var(--phosphor); }
.geraet-zeile span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Protokollzeilen nie abschneiden (die entscheidende Spalte steht oft am Ende): umbrechen, Leerraum bleibt */
.geraet-protokoll .geraet-zeile span { white-space: pre-wrap; overflow: visible; }
.geraet-protokoll .geraet-zeile { font-size: 14.5px; align-items: start; }
.geraet-protokoll .geraet-zeile .marke-feld { padding-top: 1px; }

/* ordnen */
.geraet-reihe { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.geraet-teil {
  display: flex; align-items: center; gap: 12px; padding: 6px 10px; min-height: 50px; box-sizing: border-box;
  border: 1px solid rgba(255, 177, 59, 0.3); background: rgba(6, 7, 6, 0.55); cursor: grab;
}
.geraet-teil.gewaehlt { border-color: var(--phosphor); background: rgba(255, 177, 59, 0.16); box-shadow: inset 4px 0 0 var(--phosphor); }
.geraet-teil.zieht { opacity: 0.45; border-style: dashed; }
.geraet-teil .griff { color: var(--glimmer-dunkel); font-size: 18px; letter-spacing: -2px; }
.geraet-teil .pos { font-family: var(--mono); color: var(--phosphor); min-width: 22px; font-size: 16px; }
.geraet-teil .teil-bild { width: 96px; height: 60px; object-fit: cover; border: 1px solid rgba(255, 177, 59, 0.3); cursor: zoom-in; filter: sepia(0.25) saturate(0.85); }
.geraet-teil .teil-text {
  flex: 1; background: transparent; border: 0; color: #f4e6cc; font-family: var(--sans); font-size: 18px; text-align: left; cursor: pointer; padding: 4px 0;
}
.geraet-teil .teil-text:focus-visible { outline: 1px dotted var(--phosphor); }
.geraet-teil .teil-pfeile { display: flex; gap: 4px; }
.geraet-teil .teil-pfeile button {
  width: 34px; height: 30px; background: transparent; border: 1px solid var(--glimmer-dunkel); color: var(--glimmer); font-size: 12px; cursor: pointer;
}
.geraet-teil .teil-pfeile button:disabled { opacity: 0.25; cursor: default; }
.geraet-teil .teil-pfeile button:hover:not(:disabled) { border-color: var(--phosphor); color: var(--phosphor-hell); }
.geraet-bedienung { margin-top: 10px; font-family: var(--mono); font-size: 13px; letter-spacing: 0.06em; color: var(--glimmer-dunkel); }

/* einstellen */
.geraet-felder { display: flex; flex-direction: column; gap: 18px; padding-top: 6px; }
.geraet-feld { display: grid; grid-template-columns: 180px auto 1fr; align-items: center; gap: 18px; font-family: var(--mono); }
.geraet-feld label { color: var(--glimmer); font-size: 15px; letter-spacing: 0.1em; text-transform: uppercase; }
.geraet-stellrad { display: flex; align-items: center; gap: 6px; }
.geraet-stellrad button {
  width: 40px; height: 52px; background: rgba(6, 7, 6, 0.55); border: 1px solid var(--glimmer-dunkel); color: var(--glimmer); font-size: 14px; cursor: pointer;
}
.geraet-stellrad button:hover { border-color: var(--phosphor); color: var(--phosphor-hell); }
.geraet-stellrad input {
  width: 150px; height: 52px; box-sizing: border-box; text-align: center; font-family: var(--mono); font-size: 30px; color: var(--phosphor-hell);
  background: rgba(0, 0, 0, 0.6); border: 1px solid var(--phosphor); outline: none; -moz-appearance: textfield; appearance: textfield;
  text-shadow: 0 0 8px rgba(255, 177, 59, 0.45);
}
.geraet-stellrad input::-webkit-outer-spin-button, .geraet-stellrad input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.geraet-stellrad input:focus { box-shadow: 0 0 0 1px var(--phosphor), 0 0 16px rgba(255, 177, 59, 0.25); }
.geraet-stellrad .einheit { color: var(--phosphor); font-size: 20px; min-width: 2ch; }
.geraet-feld .spanne { color: var(--glimmer-dunkel); font-size: 13px; letter-spacing: 0.06em; }

/* verteilen */
.geraet-verteilen { display: flex; flex-direction: column; gap: 14px; font-family: var(--mono); }
.geraet-budget { display: flex; align-items: center; gap: 22px; font-size: 15px; letter-spacing: 0.08em; color: var(--glimmer); flex-wrap: wrap; }
.geraet-budget .frei { color: var(--phosphor-hell); }
.budget-balken { display: flex; gap: 3px; margin-left: auto; }
.budget-balken i { width: 14px; height: 16px; border: 1px solid var(--glimmer-dunkel); }
.budget-balken i.an { background: var(--phosphor); border-color: var(--phosphor); box-shadow: 0 0 6px rgba(255, 177, 59, 0.5); }
.geraet-bereich { display: grid; grid-template-columns: 190px 1fr 48px; align-items: center; gap: 4px 18px; padding: 8px 0; border-bottom: 1px solid rgba(255, 177, 59, 0.12); }
.geraet-bereich label { color: #ecdcbf; font-size: 16px; letter-spacing: 0.04em; }
.geraet-bereich .bereich-wert { font-size: 24px; color: var(--phosphor-hell); text-align: right; }
.geraet-bereich .bereich-hinweis { grid-column: 2 / 4; font-size: 13px; color: var(--glimmer-dunkel); letter-spacing: 0.04em; }
.geraet-bereich input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 28px; background: transparent; cursor: pointer; }
.geraet-bereich input[type="range"]::-webkit-slider-runnable-track { height: 6px; background: linear-gradient(90deg, rgba(255, 177, 59, 0.5), rgba(255, 177, 59, 0.15)); border: 1px solid var(--glimmer-dunkel); }
.geraet-bereich input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 26px; margin-top: -11px; background: var(--phosphor); border: 1px solid #000; box-shadow: 0 0 8px rgba(255, 177, 59, 0.6); }
.geraet-bereich input[type="range"]:focus { outline: none; }
.geraet-bereich input[type="range"]:focus-visible::-webkit-slider-thumb { background: var(--phosphor-hell); }

/* Fuß: Visierzeile, Knöpfe */
.geraet-fuss { display: flex; flex-direction: column; gap: 10px; border-top: 1px solid rgba(255, 177, 59, 0.22); padding-top: 12px; }
.geraet-meldung { min-height: 26px; display: flex; flex-direction: column; gap: 4px; font-family: var(--mono); }
.geraet-rueckmeldung { color: var(--phosphor); font-size: 18px; letter-spacing: 0.04em; text-shadow: 0 0 10px rgba(255, 177, 59, 0.55); }
.geraet-rueckmeldung::before { content: "▸ "; color: var(--glimmer); }
.geraet-rueckmeldung.zeigt { animation: geraet-stoerung 0.9s steps(1) 1; }
@keyframes geraet-stoerung {
  0% { opacity: 0; } 12% { opacity: 1; transform: translateX(2px); } 24% { opacity: 0.2; } 36% { opacity: 1; transform: none; }
  48% { opacity: 0.5; } 60%, 100% { opacity: 1; }
}
.geraet-hinweis { color: #b9a98e; font-size: 15px; }
.geraet-knoepfe { display: flex; gap: 14px; }
.geraet-knoepfe .knopf { width: auto; flex: 1 1 0; justify-content: flex-start; min-height: 52px; animation: none; }
.geraet-festhalten .wahl-text { font-family: var(--mono); letter-spacing: 0.12em; }
/* Der Ausweg: gleich groß, aber leiser */
.knopf.geraet-glueck { background-color: rgba(6, 7, 6, 0.4); border-style: dashed; border-color: rgba(163, 115, 42, 0.7); color: #cdbb9a; }
.knopf.geraet-glueck:hover:not(:disabled), .knopf.geraet-glueck:focus-visible { color: #f4e6cc; border-color: var(--glimmer); background-color: rgba(255, 177, 59, 0.1); }
.geraet-knoepfe .knopf:disabled { opacity: 0.4; cursor: not-allowed; }
.geraet-kosten { font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em; color: var(--glimmer-dunkel); }

/* Befund nach dem Festhalten (oben in der nächsten Szene) */
.geraet-befund { font-family: var(--mono); border-left: 3px solid var(--phosphor); padding: 8px 14px; display: flex; flex-direction: column; gap: 5px; background: rgba(255, 177, 59, 0.06); }
.geraet-befund .befund-kopf { font-size: 13px; letter-spacing: 0.12em; color: var(--glimmer); }
.geraet-befund .befund-text { font-size: 18px; color: var(--phosphor-hell); text-shadow: 0 0 8px rgba(255, 177, 59, 0.4); }
.geraet-befund .befund-notiz { font-size: 12px; letter-spacing: 0.12em; color: var(--glimmer-dunkel); }
.geraet-befund.fehlschlag { border-left-color: var(--glimmer-dunkel); background: transparent; }
.geraet-befund.fehlschlag .befund-text { color: #cdbb9a; text-shadow: none; }

/* Bild groß */
.geraet-zoom {
  position: absolute; inset: 0; z-index: 8; background: rgba(0, 0, 0, 0.88); display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 14px; cursor: zoom-out;
}
.geraet-zoom[hidden] { display: none; }
.geraet-zoom img { max-width: 1680px; max-height: 920px; object-fit: contain; border: 1px solid var(--linie); filter: sepia(0.2) saturate(0.9); }
.geraet-zoom .zoom-hinweis { font-family: var(--mono); font-size: 15px; letter-spacing: 0.12em; color: var(--glimmer); }

/* Logbuch: Notizen aus Ermittlungen, dezent abgesetzt */
.logeintrag.notiz { border-left-style: dashed; font-family: var(--mono); font-size: 16px; color: #d6c4a3; }
.logeintrag.notiz .wann { color: var(--glimmer-dunkel); }

/* Nachholen: Hinweis vor „Aufwachen“ */
.nachholen-hinweis { font-family: var(--mono); font-size: 15px; letter-spacing: 0.08em; color: var(--glimmer); }

@media (prefers-reduced-motion: reduce) { .geraet-rueckmeldung.zeigt { animation: none; } }

/* Schichtende (Spieltest 28.11.): Logbuch-Aufforderung, dann „Schicht beenden“ und schwarz */
.ende-logbuch { margin-top: 14px; display: flex; flex-direction: column; gap: 8px; }
#schicht-ende { margin-top: 14px; align-self: flex-start; }
.schwarzblende { position: fixed; inset: 0; background: #000; z-index: 10000; pointer-events: all;
  animation: schwarzblende 2.8s ease-in forwards; }
@keyframes schwarzblende { from { opacity: 0; } to { opacity: 1; } }

/* Post nur am Terminal (Spieltest 28.11.): außerhalb gedämpft */
#btn-post.gesperrt { opacity: 0.5; }
