/* Sky Team — „Cockpit in der Dämmerung“: Graphit und Nachtblau, Instrumente in
   Bernstein, der Himmel draußen kalt. Bewusst einthemig. */

:root {
  --nacht: #0b1220;
  --nacht-2: #060a13;
  --panel: #141d2c;
  --panel-2: #1b2637;
  --naht: #29364a;
  --nebel: #9bacc4;
  --nebel-dim: #64758c;

  --weiss: #e9eff7;
  --tinte: #0b1220;

  --bernstein: #f0a92b;
  --bernstein-dim: #8a6416;
  --himmel: #6fbcff;
  --gut: #5ec98a;
  --schlecht: #e2664f;

  --font-ui: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-num: ui-monospace, SFMono-Regular, 'SF Mono', 'Roboto Mono', Menlo, Consolas, monospace;

  --r-sm: 9px;
  --r-md: 13px;
  --r-lg: 20px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; overscroll-behavior: none; }

body {
  background: var(--nacht);
  background-image:
    radial-gradient(130% 48% at 50% 0%, #1c2c45 0%, rgba(28, 44, 69, 0) 68%),
    linear-gradient(180deg, var(--nacht) 0%, var(--nacht-2) 100%);
  background-attachment: fixed;
  color: var(--nebel);
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  user-select: none; -webkit-user-select: none;
}

button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; touch-action: manipulation; }
:focus-visible { outline: 2px solid var(--bernstein); outline-offset: 3px; }

/* ---------- Gerüst ---------- */

/* Kopf und Fuß stehen fest, nur die Mitte scrollt — darum die feste Höhe
   plus min-height:0, sonst wächst das Flex-Kind über den Bildschirm hinaus. */
#app { height: 100dvh; display: flex; flex-direction: column; }
.screen { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.scroll { flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.wrap { width: 100%; max-width: 520px; margin-inline: auto; padding: 24px 18px calc(24px + var(--safe-b)); }

.kopf {
  display: flex; align-items: center; gap: 12px;
  padding: calc(var(--safe-t) + 10px) 16px 10px;
  border-bottom: 1px solid var(--naht);
  background: rgba(6, 10, 19, 0.7);
}
.kopf .titel { flex: 1; min-width: 0; }
.kopf .ober {
  font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--nebel-dim); font-weight: 700;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.kopf h1 {
  margin: 0; font-size: 17px; font-weight: 650; color: var(--weiss);
  letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.werkzeuge { display: flex; align-items: center; gap: 8px; }
.hoehe { text-align: right; line-height: 1.1; }
.hoehe b { font-family: var(--font-num); font-size: 17px; color: var(--bernstein); font-weight: 700; }
.hoehe small { display: block; font-size: 9px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--nebel-dim); }
.werkzeug {
  width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
  background: var(--panel); border: 1px solid var(--naht); color: var(--nebel); font-size: 14px;
}

/* ---------- Knöpfe ---------- */

.btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: 15px 16px; border-radius: var(--r-md);
  font-weight: 650; font-size: 15.5px; letter-spacing: -0.01em;
  transition: transform 0.1s ease, filter 0.15s ease;
}
.btn:active { transform: scale(0.985); }
.btn:disabled { opacity: 0.35; transform: none; box-shadow: none; }
.btn--bernstein { background: var(--bernstein); color: #2a1c00; box-shadow: 0 8px 24px rgba(240, 169, 43, 0.16); }
.btn--geist { background: var(--panel); color: var(--weiss); border: 1px solid var(--naht); }
.btn--leise { background: none; color: var(--nebel-dim); font-weight: 500; font-size: 15px; padding: 12px; }
.btn--warn { background: var(--panel); color: #f2a294; border: 1px solid #4c2c27; }
.btn--klein { width: auto; padding: 7px 14px; font-size: 14px; border-radius: 9px; background: var(--panel-2); border: 1px solid var(--naht); color: var(--weiss); }
.knopfsaeule { display: flex; flex-direction: column; gap: 10px; margin-top: 20px; }

/* ---------- Startbildschirm ---------- */

.start { text-align: center; }
.marke { padding: 6px 0 4px; }
.horizont {
  height: 54px; border-radius: 999px 999px 0 0;
  background: linear-gradient(180deg, #24405f 0%, #101a2a 100%);
  border: 1px solid var(--naht); border-bottom: 0;
  display: grid; place-items: center; margin-bottom: 14px;
  overflow: hidden; position: relative;
}
.horizont::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--bernstein), transparent);
}
.flieger { font-size: 26px; color: var(--bernstein); transform: rotate(-14deg); }
.wortmarke {
  font-size: clamp(34px, 11vw, 50px); font-weight: 800; margin: 0;
  letter-spacing: 0.2em; text-indent: 0.2em; color: var(--weiss); line-height: 1;
}
.unterzeile { margin: 12px 0 4px; font-size: 13.5px; color: var(--nebel-dim); text-wrap: balance; }

.feldreihe { display: flex; align-items: center; gap: 9px; margin-bottom: 9px; }
.feld {
  flex: 1; min-width: 0; background: var(--panel); border: 1px solid var(--naht);
  border-radius: var(--r-md); padding: 13px 14px; color: var(--weiss); font-size: 16px;
  user-select: text; -webkit-user-select: text;
}
.rollenschild {
  flex: none; font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase;
  font-weight: 700; color: var(--bernstein); background: rgba(240, 169, 43, 0.1);
  border: 1px solid var(--bernstein-dim); border-radius: 999px; padding: 6px 10px;
}
.feldlabel {
  font-size: 10.5px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--nebel-dim); font-weight: 700; text-align: left; margin: 20px 0 8px;
}

.zielliste { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.ziel {
  display: flex; flex-direction: column; align-items: flex-start; gap: 1px;
  background: var(--panel); border: 1px solid var(--naht); border-radius: var(--r-md);
  padding: 10px 12px; text-align: left;
}
.ziel--an { border-color: var(--bernstein); background: var(--panel-2); box-shadow: 0 0 0 1px var(--bernstein-dim) inset; }
.ziel .kuerzel { font-family: var(--font-num); font-size: 15px; font-weight: 700; color: var(--weiss); letter-spacing: 0.06em; }
.ziel .ort { font-size: 12.5px; color: var(--nebel-dim); }
.ziel .schwer { font-size: 8px; letter-spacing: 0.24em; color: var(--bernstein); margin-top: 3px; }
.ziel .schwer .aus { color: var(--naht); }

.schalter {
  display: flex; align-items: center; gap: 11px; text-align: left;
  margin-top: 18px; font-size: 13.5px; color: var(--nebel-dim);
  background: var(--panel); border: 1px solid var(--naht); border-radius: var(--r-md); padding: 12px 14px;
}
.schalter input { width: 20px; height: 20px; flex: none; accent-color: var(--bernstein); }

/* ---------- Instrumente ---------- */

.cockpit .scroll { padding: 12px 14px 0; }
.instrumente { display: flex; flex-direction: column; gap: 9px; }
.instrumentpaar { display: grid; grid-template-columns: minmax(0, 0.68fr) minmax(0, 1.5fr); gap: 9px; }

.instrument, .anflug {
  background: var(--panel); border: 1px solid var(--naht); border-radius: var(--r-md); padding: 9px 11px;
}
.instrument { display: flex; flex-direction: column; justify-content: space-between; }
.instrumentkopf, .anflugkopf {
  display: flex; justify-content: space-between; gap: 8px;
  font-size: 9.5px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--nebel-dim); font-weight: 700; margin-bottom: 7px;
}
.instrumentwert { font-size: 10.5px; color: var(--nebel-dim); margin-top: 6px; font-family: var(--font-num); }
.windzeichen { color: var(--himmel); }

.bahn { display: flex; gap: 3px; }
.zelle {
  flex: 1; aspect-ratio: 1; min-width: 0; border-radius: 6px;
  background: var(--panel-2); border: 1px solid var(--naht);
  display: grid; place-items: center;
}
.zelle .zeichen { font-size: 13px; line-height: 1; color: var(--nebel-dim); }
.zelle--bahn { background: repeating-linear-gradient(90deg, #223047 0 4px, #1b2637 4px 8px); border-color: var(--nebel-dim); }
.zelle--fremd { border-color: var(--schlecht); }
.zelle--fremd .zeichen { color: var(--schlecht); }
.zelle--hier { background: rgba(240, 169, 43, 0.16); border-color: var(--bernstein); }
.zelle--hier .zeichen { color: var(--bernstein); font-size: 15px; }

.lageskala { display: flex; gap: 4px; align-items: center; justify-content: space-between; }
.lagepunkt {
  flex: 1; height: 9px; border-radius: 3px;
  background: var(--panel-2); border: 1px solid var(--naht);
}
.lagepunkt.mitte { border-color: var(--nebel-dim); }
.lagepunkt.an { background: var(--bernstein); border-color: var(--bernstein); box-shadow: 0 0 10px rgba(240, 169, 43, 0.5); }
.lagepunkt.an.mitte { background: var(--gut); border-color: var(--gut); box-shadow: 0 0 10px rgba(94, 201, 138, 0.5); }

.tempoleiste { display: flex; gap: 2px; }
.tempofeld {
  flex: 1; text-align: center; font-family: var(--font-num); font-size: 9.5px; font-weight: 700;
  border-radius: 4px; padding: 4px 0; border: 1px solid var(--naht);
}
.tempofeld.t0 { background: var(--panel-2); color: var(--nebel-dim); }
.tempofeld.t1 { background: rgba(111, 188, 255, 0.14); color: var(--himmel); border-color: rgba(111, 188, 255, 0.35); }
.tempofeld.t2 { background: rgba(240, 169, 43, 0.18); color: var(--bernstein); border-color: var(--bernstein-dim); }

/* ---------- Cockpit-Felder ---------- */

.panel { margin-top: 12px; display: flex; flex-direction: column; gap: 10px; }
.bereichskopf {
  font-size: 9.5px; letter-spacing: 0.18em; text-transform: uppercase; font-weight: 700;
  color: var(--bernstein); margin: 6px 0 2px;
}
.bereichskopf--fremd { color: var(--nebel-dim); }
.fremds { opacity: 0.62; }

.gruppe { margin-bottom: 2px; }
.gruppentitel {
  display: flex; justify-content: space-between; gap: 8px; margin: 0 0 5px;
  font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--nebel-dim); font-weight: 700;
}
.gruppenwert { color: var(--nebel); font-family: var(--font-num); letter-spacing: 0; }
.slots { display: grid; grid-template-columns: repeat(auto-fit, minmax(78px, 1fr)); gap: 6px; }

.feld-slot {
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  background: var(--panel); border: 1px solid var(--naht); border-radius: var(--r-sm);
  padding: 8px 4px 9px; min-height: 62px; justify-content: center;
}
.feld-slot .slotname {
  font-size: 9px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--nebel-dim); font-weight: 700; text-align: center; line-height: 1.2;
}
.feld-slot .anforderung { font-family: var(--font-num); font-size: 13px; color: var(--nebel-dim); }
.feld-slot.belegt { background: var(--panel-2); border-color: var(--nebel-dim); }
.feld-slot.zu { opacity: 0.35; }
.feld-slot.offen {
  border-color: var(--bernstein); background: rgba(240, 169, 43, 0.1);
  animation: pochen 1.6s ease-in-out infinite;
}
.feld-slot.offen .anforderung { color: var(--bernstein); }
@keyframes pochen {
  50% { box-shadow: 0 0 0 3px rgba(240, 169, 43, 0.22); }
}

.platzhalter { height: 14px; }

/* ---------- Würfel ---------- */

.wuerfel {
  --b: 46px;
  width: var(--b); height: var(--b); flex: none; padding: 4px;
  display: grid; grid-template: repeat(3, 1fr) / repeat(3, 1fr); gap: 1px;
  background: linear-gradient(155deg, #f4f7fb 0%, #ccd6e4 100%);
  border-radius: 10px; box-shadow: 0 4px 10px rgba(0, 0, 0, 0.45);
  position: relative;
}
.wuerfel i { display: block; border-radius: 50%; }
.wuerfel i.an { background: var(--tinte); box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.25); }
.wuerfel--klein { --b: 30px; padding: 3px; border-radius: 7px; }
.wuerfel--mini { --b: 22px; padding: 2px; border-radius: 6px; }
.wuerfel--zu {
  background: repeating-linear-gradient(45deg, #223047 0 4px, #1b2637 4px 8px);
  border: 1px solid var(--naht); display: grid; place-items: center; box-shadow: none;
}
.wuerfel--zu .fragezeichen { color: var(--nebel-dim); font-weight: 700; font-size: calc(var(--b) * 0.4); }
.wuerfel--an { box-shadow: 0 0 0 3px var(--bernstein), 0 6px 14px rgba(0, 0, 0, 0.5); transform: translateY(-4px); }
.wuerfel--tot { opacity: 0.4; }

/* ---------- Fuß: eigene Würfel, Kaffee, Ansage ---------- */

.fuss {
  padding: 9px 14px calc(11px + var(--safe-b));
  border-top: 1px solid var(--naht);
  background: rgba(6, 10, 19, 0.9); backdrop-filter: blur(8px);
  display: flex; flex-direction: column; gap: 8px; align-items: center;
}
.fremdreihe { display: flex; align-items: center; gap: 6px; }
.fremdlabel {
  font-size: 9.5px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--nebel-dim); font-weight: 700;
}
.wuerfelreihe { display: flex; gap: 10px; justify-content: center; }
.kaffeeleiste { display: flex; align-items: center; gap: 9px; }
.tassen { display: flex; gap: 3px; }
.tasse { font-size: 15px; filter: grayscale(1); opacity: 0.3; }
.tasse.voll { filter: none; opacity: 1; }
.kaffeetext { font-size: 11.5px; color: var(--nebel-dim); }
.ansage { text-align: center; font-size: 13.5px; color: var(--nebel); min-height: 20px; margin: 0; text-wrap: balance; }
.ansage b { color: var(--weiss); font-weight: 650; }

/* ---------- Blätter, Overlays ---------- */

.overlay {
  position: fixed; inset: 0; z-index: 50;
  background: var(--nacht-2);
  display: flex; flex-direction: column; min-height: 0;
  animation: aufblenden 0.18s ease-out;
}
@keyframes aufblenden { from { opacity: 0; } }

.blatt { padding: calc(var(--safe-t) + 18px) 18px calc(20px + var(--safe-b)); width: 100%; max-width: 520px; margin-inline: auto; }
.blatt h2 { font-size: 23px; color: var(--weiss); margin: 0 0 8px; font-weight: 700; letter-spacing: -0.01em; }
.blatt h3 {
  font-size: 10.5px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--bernstein-dim); font-weight: 700; margin: 22px 0 8px;
}
.blatt p, .blatt li { font-size: 15px; line-height: 1.6; color: var(--nebel); }
.blatt p { margin: 0 0 10px; }
.blatt ul, .blatt ol { margin: 0 0 10px; padding-left: 20px; }
.blatt li { margin-bottom: 6px; }
.blatt strong { color: var(--weiss); font-weight: 650; }
.blatt em { color: var(--bernstein); font-style: normal; }
.lesbar { user-select: text; -webkit-user-select: text; }
.lbl { font-size: 10.5px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--nebel-dim); font-weight: 700; }
.hinweiszeile { font-size: 12.5px; color: var(--nebel-dim); margin: 14px 0 0; text-wrap: balance; }
.hinweis {
  font-size: 13px; color: var(--nebel); background: var(--panel);
  border: 1px solid var(--naht); border-radius: var(--r-md); padding: 11px 13px; margin-top: 14px;
}
.hinweis--warn { border-color: #4c2c27; color: #f2a294; }

.rueckblick { display: flex; flex-direction: column; gap: 6px; margin: 12px 0 4px; }
.rzeile {
  display: flex; justify-content: space-between; gap: 12px;
  background: var(--panel); border: 1px solid var(--naht); border-radius: var(--r-sm);
  padding: 9px 12px; font-size: 13.5px;
}
.rzeile span:first-child { color: var(--nebel-dim); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; font-size: 10px; align-self: center; }
.rzeile span:last-child { color: var(--weiss); font-family: var(--font-num); font-size: 13px; text-align: right; }

.briefingzahlen {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 16px 0 4px;
}
.briefingzahlen div {
  background: var(--panel); border: 1px solid var(--naht); border-radius: var(--r-sm);
  padding: 10px 6px; text-align: center;
}
.briefingzahlen b { display: block; font-family: var(--font-num); font-size: 20px; color: var(--weiss); font-weight: 700; line-height: 1.2; }
.briefingzahlen small { font-size: 9.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--nebel-dim); }

.regeltabelle { display: grid; grid-template-columns: 1fr; gap: 0; margin: 10px 0; }
.regeltabelle > div { font-size: 14px; line-height: 1.55; }
.regeltabelle > div:nth-child(odd) {
  margin-top: 10px; color: var(--weiss);
}
.regeltabelle > div:nth-child(odd) small { color: var(--nebel-dim); font-size: 12px; margin-left: 6px; }
.regeltabelle > div:nth-child(even) { color: var(--nebel); padding-left: 2px; }

.endkopf { text-align: center; padding: 10px 0 4px; }
.endzeichen { font-size: 42px; line-height: 1; }
.endkopf.gut .endzeichen { color: var(--gut); }
.endkopf.schlecht .endzeichen { color: var(--schlecht); }
.endkopf h2 { margin: 6px 0 8px; }
.endgrund { color: var(--nebel); max-width: 34ch; margin-inline: auto; }

/* ---------- Übergabe ---------- */

.uebergabe {
  justify-content: center; align-items: center; text-align: center;
  padding: 26px calc(24px + var(--safe-b));
  background-image: radial-gradient(90% 50% at 50% 40%, #1c2c45 0%, rgba(28, 44, 69, 0) 70%);
}
.uebergabe .pfeil { font-size: 38px; animation: schubs 1.5s ease-in-out infinite; }
@keyframes schubs { 50% { transform: translateX(10px); } }
.uebergabe .lbl { margin-top: 6px; }
.uebergabe .name { font-size: clamp(28px, 9vw, 40px); font-weight: 700; color: var(--weiss); line-height: 1.1; margin: 4px 0 6px; }
.uebergabe .auftrag { color: var(--nebel); margin: 0 0 26px; max-width: 30ch; }
.uebergabe .btn { max-width: 320px; }

/* ---------- Kopplung zweier Geräte ---------- */

.qrfeld {
  display: grid; place-items: center;
  background: var(--weiss); border-radius: var(--r-md);
  padding: 14px; margin: 16px 0;
}
.qrfeld canvas { width: 100%; max-width: 300px; height: auto; image-rendering: pixelated; display: block; }

.scanfenster {
  position: relative; overflow: hidden;
  border-radius: var(--r-md); background: #000;
  aspect-ratio: 1; margin: 16px 0;
  border: 1px solid var(--naht);
}
.scanfenster video { width: 100%; height: 100%; object-fit: cover; display: block; }
.scanfenster::after {
  content: ""; position: absolute; inset: 16%;
  border: 2px solid var(--bernstein); border-radius: 12px;
  box-shadow: 0 0 0 999px rgba(6, 10, 19, 0.45);
}

.codeklappe { margin-top: 6px; }
.codeklappe summary { font-size: 13px; color: var(--nebel-dim); cursor: pointer; padding: 8px 0; list-style: none; }
.codeklappe summary::before { content: "▸ "; }
.codeklappe[open] summary::before { content: "▾ "; }
.codefeld {
  width: 100%; min-height: 84px; resize: vertical; margin-top: 6px;
  background: var(--panel); border: 1px solid var(--naht); border-radius: 10px;
  padding: 10px; color: var(--nebel); font-family: var(--font-num); font-size: 11px;
  word-break: break-all; user-select: text; -webkit-user-select: text;
}
.codeklappe .btn { margin-top: 8px; }

/* ---------- Enger und breiter ---------- */

@media (max-height: 720px) {
  .wuerfel { --b: 40px; }
  .feld-slot { min-height: 56px; padding: 6px 4px 7px; }
  .zelle .zeichen { font-size: 11px; }
}

@media (min-width: 640px) {
  .cockpit .scroll { padding-inline: max(14px, calc((100% - 620px) / 2)); }
  .fuss { padding-inline: max(14px, calc((100% - 620px) / 2)); }
}

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

/* ===========================================================================
   Zweite Fassung: näher am echten Brett — blaue Pilotenseite, orange
   Kopilotenseite, Schalter mit Lämpchen, Zeigerinstrument, echte Würfelfarben.
   =========================================================================== */

:root {
  --blau: #4a9be8;
  --blau-tief: #1d4f80;
  --blau-hauch: rgba(74, 155, 232, 0.12);
  --orange: #f0a92b;
  --orange-tief: #8a6416;
  --orange-hauch: rgba(240, 169, 43, 0.12);
  --rot: #e2664f;
  --gruen: #5ec98a;
  --metall: #1a2434;
  --metall-hell: #22304a;
}

/* ---------- Startbildschirm: Cockpitfenster statt Balken ---------- */

.marke { padding: 4px 0 2px; }
.fenster {
  position: relative; height: 78px; margin-bottom: 14px; overflow: hidden;
  border: 2px solid var(--naht); border-bottom: 0;
  border-radius: 46px 46px 8px 8px;
  background: linear-gradient(180deg, #16304f 0%, #2a4a6d 45%, #101b2b 100%);
}
.himmel { position: absolute; inset: 0; }
.sonne {
  position: absolute; left: 50%; bottom: 6px; width: 46px; height: 46px;
  margin-left: -23px; border-radius: 50%;
  background: radial-gradient(circle, #ffd894 0%, #f0a92b 55%, rgba(240, 169, 43, 0) 72%);
}
.bahnlicht {
  position: absolute; left: 12%; right: 12%; bottom: 0; height: 3px;
  background: repeating-linear-gradient(90deg, var(--orange) 0 12px, transparent 12px 24px);
  opacity: 0.85;
}

.zielkopf { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; width: 100%; }
.ziel .schwer { font-size: 7.5px; letter-spacing: 0.14em; color: var(--orange); }
.ziel .zielzeile { font-size: 10.5px; color: var(--nebel-dim); margin-top: 3px; line-height: 1.3; }
.rollenschild--blau { color: var(--blau); background: var(--blau-hauch); border-color: var(--blau-tief); }
.rollenschild--orange { color: var(--orange); background: var(--orange-hauch); border-color: var(--orange-tief); }
.schalterzeile {
  display: flex; align-items: center; gap: 11px; text-align: left;
  margin-top: 18px; font-size: 13.5px; color: var(--nebel-dim);
  background: var(--panel); border: 1px solid var(--naht); border-radius: var(--r-md); padding: 12px 14px;
}
.schalterzeile input { width: 20px; height: 20px; flex: none; accent-color: var(--orange); }

.btn--lehre { margin-top: 18px; justify-content: flex-start; gap: 10px; font-size: 14.5px; }
.lehrezeichen {
  display: inline-grid; place-items: center; flex: none;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--orange); color: #2a1c00; font-weight: 800; font-size: 14px;
}

/* ---------- Einweisung ---------- */

.einweisung .blatt { display: flex; flex-direction: column; justify-content: center; min-height: 100%; }
.lehrbild {
  background: var(--panel); border: 1px solid var(--naht); border-radius: var(--r-lg);
  padding: 12px; margin: 10px 0 16px;
}
.lehrbild svg { width: 100%; height: auto; display: block; }
.lehrtext { font-size: 15.5px; line-height: 1.65; }
.punkte { display: flex; gap: 6px; justify-content: center; margin-top: 18px; }
.punkte .punkt { width: 7px; height: 7px; border-radius: 50%; background: var(--naht); }
.punkte .punkt.an { background: var(--orange); }

/* ---------- Anflugstreifen ---------- */

.bahn { display: flex; gap: 3px; align-items: stretch; }
.zelle {
  flex: 1; aspect-ratio: 1; min-width: 0; border-radius: 6px; position: relative;
  background: linear-gradient(180deg, var(--metall-hell) 0%, var(--metall) 100%);
  border: 1px solid var(--naht);
  display: grid; place-items: center; overflow: hidden;
}
.zelle--bahn {
  background: linear-gradient(180deg, #2c3c56 0%, #1a2536 100%);
  border-color: var(--nebel-dim);
}
.bahnstreifen {
  position: absolute; inset: auto 3px 4px 3px; height: 3px; border-radius: 2px;
  background: repeating-linear-gradient(90deg, var(--orange) 0 4px, transparent 4px 8px);
}
.verkehrszeichen { font-size: 8px; color: var(--nebel-dim); }
.zelle--fremd { border-color: var(--rot); background: rgba(226, 102, 79, 0.14); }
.zelle--neu { animation: aufblitzen 1.4s ease-out 2; }
@keyframes aufblitzen { 50% { box-shadow: 0 0 0 3px rgba(226, 102, 79, 0.45); } }
.zelle--hier { border-color: var(--orange); background: rgba(240, 169, 43, 0.16); }

.flieger { width: 66%; height: 66%; }
.flieger--eigen { fill: var(--orange); filter: drop-shadow(0 0 4px rgba(240, 169, 43, 0.5)); }
.flieger--fremd { fill: var(--rot); transform: scaleX(-1); opacity: 0.9; }

/* ---------- Fluglage als Zeigerinstrument ---------- */

.lagescheibe { width: 100%; height: auto; display: block; margin: 2px 0 4px; }
.lagescheibe .bogen { fill: none; stroke: var(--naht); stroke-width: 2; }
.lagescheibe .strich { stroke: var(--nebel-dim); stroke-width: 1.6; }
.lagescheibe .strich--mitte { stroke: var(--gruen); stroke-width: 2.4; }
.lagescheibe .strich--x { stroke: var(--rot); stroke-width: 2.4; }
.lagescheibe .zeiger { stroke: var(--weiss); stroke-width: 2.4; stroke-linecap: round; }
.lagescheibe .zeigerspitze { fill: var(--weiss); }
.lagescheibe .nabe { fill: var(--panel-2); stroke: var(--nebel-dim); stroke-width: 1.5; }
.instrumentwert.gut { color: var(--gruen); }
.instrumentwert.warn { color: var(--orange); }

/* ---------- Geschwindigkeitsskala ---------- */

.tempoleiste { position: relative; padding-top: 9px; }
.tempofelder { display: flex; gap: 2px; }
.tempofeld {
  /* flex-basis 0 plus min-width 0: alle elf Felder wirklich gleich breit,
     sonst stimmen die Positionen der Marken darüber nicht. */
  flex: 1 1 0; min-width: 0;
  text-align: center; font-family: var(--font-num); font-size: 9px; font-weight: 700;
  letter-spacing: -0.08em; border-radius: 4px; padding: 5px 0; border: 1px solid var(--naht);
}
.tempofeld.t0 { background: var(--metall); color: var(--nebel-dim); }
.tempofeld.t1 { background: rgba(74, 155, 232, 0.16); color: var(--blau); border-color: var(--blau-tief); }
.tempofeld.t2 { background: rgba(240, 169, 43, 0.18); color: var(--orange); border-color: var(--orange-tief); }
.skalenmarke {
  position: absolute; top: 0; width: 0; height: 0; margin-left: -5px;
  border-left: 5px solid transparent; border-right: 5px solid transparent;
  border-top: 7px solid currentColor;
}
.marke--blau { color: var(--blau); }
.marke--orange { color: var(--orange); }
.marke--rot { color: var(--rot); top: auto; bottom: -7px; border-top: 0; border-bottom: 7px solid currentColor; }
.tempolegende {
  display: flex; align-items: center; gap: 10px; margin-top: 9px;
  font-size: 9.5px; color: var(--nebel-dim); letter-spacing: 0.04em;
}
.tempolegende span { display: inline-flex; align-items: center; gap: 4px; }
.tempolegende .pkt { width: 8px; height: 8px; border-radius: 2px; display: inline-block; }
.tempolegende .p0 { background: var(--metall); border: 1px solid var(--naht); }
.tempolegende .p1 { background: rgba(74, 155, 232, 0.5); }
.tempolegende .p2 { background: rgba(240, 169, 43, 0.6); }
.tempolegende .bremsnote { margin-left: auto; color: var(--rot); white-space: nowrap; }
.tempolegende .legendetitel { letter-spacing: 0.1em; text-transform: uppercase; }

/* ---------- Cockpit-Panel ---------- */

.pflichtband {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent);
  border: 1px solid var(--naht); border-radius: var(--r-md);
  padding: 8px 9px 4px; margin-bottom: 10px;
}
.gruppentitel {
  display: flex; align-items: center; gap: 8px; width: 100%; margin: 0 0 5px; padding: 2px 0;
  font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--nebel-dim); font-weight: 700; text-align: left;
}
.gruppentitel > span:first-child { flex: 1; }
.gruppenwert { color: var(--nebel); font-family: var(--font-num); letter-spacing: 0; }
.lexzeichen {
  flex: none; width: 15px; height: 15px; border-radius: 50%;
  display: grid; place-items: center; font-size: 10px; font-weight: 800;
  background: var(--panel-2); color: var(--nebel-dim); border: 1px solid var(--naht);
}
.slots { display: grid; grid-template-columns: repeat(auto-fit, minmax(76px, 1fr)); gap: 6px; }

.slot {
  position: relative;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  background: linear-gradient(180deg, var(--metall-hell) 0%, var(--metall) 100%);
  border: 1px solid var(--naht); border-radius: var(--r-sm);
  padding: 9px 4px 9px; min-height: 64px; justify-content: center;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.slot--blau { border-bottom: 2px solid var(--blau-tief); }
.slot--orange { border-bottom: 2px solid var(--orange-tief); }
.slot .slotname {
  font-size: 8.5px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--nebel-dim); font-weight: 700; text-align: center; line-height: 1.2;
}
.slot .anforderung { font-family: var(--font-num); font-size: 13px; color: var(--nebel); }
.slot.belegt { background: var(--panel-2); }
.slot.zu { opacity: 0.32; }
.slot.gruen { border-bottom-color: var(--gruen); }
.slot.offen {
  border-color: var(--orange); background: rgba(240, 169, 43, 0.12);
  animation: pochen 1.6s ease-in-out infinite;
}
.slot.offen .anforderung { color: var(--orange); }
.slot--klein { min-height: 50px; padding: 6px 3px; gap: 3px; }
.slot--klein .slotname { font-size: 7.5px; }
.slot--klein .anforderung { font-size: 11px; }

.lampe {
  position: absolute; top: 5px; right: 5px; width: 7px; height: 7px; border-radius: 50%;
  background: var(--rot); box-shadow: 0 0 5px rgba(226, 102, 79, 0.6);
}
.lampe--gruen { background: var(--gruen); box-shadow: 0 0 6px rgba(94, 201, 138, 0.7); }

.bereichskopf--blau { color: var(--blau); }
.bereichskopf--orange { color: var(--orange); }
.meins {
  border: 1px solid var(--naht); border-radius: var(--r-md);
  padding: 8px 9px 6px; margin-bottom: 10px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.025), transparent);
}
.fremds { opacity: 0.6; }

/* ---------- Würfel in Spielfarben ---------- */

.wuerfel--blau { background: linear-gradient(155deg, #79bdf5 0%, #2f74b8 100%); }
.wuerfel--orange { background: linear-gradient(155deg, #ffcd6e 0%, #d1841a 100%); }
.wuerfel--blau i.an, .wuerfel--orange i.an { background: #0b1220; box-shadow: none; }
.wuerfel--an { box-shadow: 0 0 0 3px var(--weiss), 0 6px 14px rgba(0, 0, 0, 0.55); }

/* ---------- Fußleiste ---------- */

.werkzeugleiste {
  display: flex; align-items: center; gap: 8px; width: 100%;
  max-width: 420px; justify-content: center;
}
.werkzeugleiste .trenner { flex: 1; }
.werkzeugtext { font-size: 11px; color: var(--nebel-dim); }
.tasse { font-size: 14px; }

/* ---------- Hinweisband ---------- */

.lehrband {
  width: 100%; max-width: 460px; max-height: 34vh; overflow-y: auto;
  background: linear-gradient(180deg, rgba(240, 169, 43, 0.13), rgba(240, 169, 43, 0.05));
  border: 1px solid var(--orange-tief); border-radius: var(--r-md);
  padding: 10px 12px 11px; display: flex; flex-direction: column; gap: 7px;
  animation: hochschieben 0.25s ease-out;
}
@keyframes hochschieben { from { opacity: 0; transform: translateY(8px); } }
.lehrbandkopf {
  display: flex; align-items: center; gap: 8px;
  font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--orange); font-weight: 700;
}
.lehrband p { margin: 0; font-size: 13px; line-height: 1.5; color: var(--weiss); }
.lehrband b { color: var(--orange); }
.lehrband .btn { align-self: flex-start; }

/* ---------- Briefing, Lexikon, Ende ---------- */

.planzeile {
  background: var(--panel); border-left: 3px solid var(--orange);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  padding: 10px 12px; font-size: 14px; margin: 14px 0 0;
}
.hoehenfenster {
  text-align: right; line-height: 1.15;
  background: var(--metall); border: 1px solid var(--naht); border-radius: 8px;
  padding: 4px 8px;
}
.hoehenfenster b { font-family: var(--font-num); font-size: 16px; color: var(--orange); font-weight: 700; }
.hoehenfenster small { display: block; font-size: 8.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--nebel-dim); }
.hoehenfenster.letzte { border-color: var(--rot); }
.hoehenfenster.letzte b { color: var(--rot); }

.lexzeile { border-top: 1px solid var(--naht); padding: 12px 0 2px; }
.lexkopf { display: flex; align-items: baseline; gap: 8px; }
.lexkopf b { color: var(--weiss); font-size: 15px; }
.lexkopf small { color: var(--nebel-dim); font-size: 11.5px; }
.lexzeile p { margin: 5px 0 0; font-size: 14px; }
.lexzeile .leise { color: var(--nebel-dim); font-size: 13px; }
.werzeile { color: var(--orange); font-size: 12.5px; letter-spacing: 0.06em; text-transform: uppercase; font-weight: 700; }
.regelzeile { font-size: 14px; margin-bottom: 9px; line-height: 1.5; }
.regelzeile b { color: var(--weiss); }
.regelzeile small { color: var(--nebel-dim); }
.lexpop .blatt { display: flex; flex-direction: column; justify-content: center; min-height: 100%; }

.pruefzeile {
  display: flex; align-items: center; gap: 10px;
  background: var(--panel); border: 1px solid var(--naht); border-radius: var(--r-sm);
  padding: 9px 12px; margin-bottom: 6px; font-size: 14px;
}
.pruefzeile .haken { font-weight: 800; width: 18px; text-align: center; }
.pruefzeile.ja { border-left: 3px solid var(--gruen); }
.pruefzeile.ja .haken { color: var(--gruen); }
.pruefzeile.nein { border-left: 3px solid var(--rot); }
.pruefzeile.nein .haken { color: var(--rot); }
.endzeichen svg { width: 46px; height: 46px; }
.endkopf.gut .endzeichen svg { fill: var(--gruen); filter: none; }

@media (max-height: 720px) {
  .slot { min-height: 56px; padding: 6px 4px; }
  .lehrband p { font-size: 12.5px; }
}

/* ---------- Raumcode für zwei Handys über das Internet ---------- */

.raumcode {
  font-family: var(--font-num);
  font-size: clamp(38px, 13vw, 58px); font-weight: 800; letter-spacing: 0.14em;
  text-align: center; padding: 18px 10px; margin: 16px 0;
  border-radius: 14px; user-select: all; -webkit-user-select: all;
  background: var(--metall); color: var(--weiss); border: 2px solid var(--orange);
}
.feld--code {
  width: 100%; text-align: center; letter-spacing: 0.3em;
  font-family: var(--font-num); font-size: 28px; text-transform: uppercase;
  margin-top: 8px;
}
