/* Gegenanflug – Gerätestatus (pi-geraet.js, dunkles Instrumenten-Design wie pi-radio.css) sowie Menü „Display & Strom“,
   Bestätigungsdialog und schwarze Fläche bei „Display aus“ (pi-strom.js). 800 × 480, Touch: Ziele ≥ 44 px. */
.pi-gs { --gs-grund: #070b18; --gs-feld: #0f1630; --gs-linie: #22305a; --gs-akzent: #93a8ec; --gs-text: #e6ebff; --gs-leise: #8d97b8;
  --gs-ok: #4ade80; --gs-warn: #fbbf24; --gs-fehler: #f87171;
  position: fixed; inset: 52px 0 0 0; z-index: 900; padding: 8px; display: grid; grid-template-rows: 1fr 52px; gap: 6px;
  background: var(--gs-grund); color: var(--gs-text); font: 14px/1.25 var(--f-body, "Inter", sans-serif); }
.pi-gs__inhalt { display: grid; grid-template-rows: 30px 1fr; gap: 6px; min-height: 0; }
.pi-gs__laden { color: var(--gs-leise); margin: 12px; }
.pi-gs__kopf { display: flex; align-items: center; gap: 10px; padding: 0 4px; white-space: nowrap; }
.pi-gs__kopf b { font: 700 21px/1 var(--f-display, "Barlow Condensed", sans-serif); letter-spacing: .03em; }
.pi-gs__summe { font-weight: 600; }
.pi-gs__zeit { margin-left: auto; color: var(--gs-leise); font-size: 13px; }
.pi-gs__liste { overflow-y: auto; overflow-x: hidden; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; align-items: start; min-height: 0; }
.pi-gs__spalte { display: grid; gap: 8px; min-width: 0; }
.pi-gs__gruppe { margin: 0; padding: 6px 10px 4px; border-radius: 12px;
  background: linear-gradient(180deg, #16234d, #0f1630 50%); border: 1px solid var(--gs-linie); }
.pi-gs__gruppe h2 { margin: 0 0 4px; font: 700 15px/1.2 var(--f-display, "Barlow Condensed", sans-serif); letter-spacing: .08em;
  text-transform: uppercase; color: var(--gs-akzent); }
.pi-gs__gruppe ul { list-style: none; margin: 0; padding: 0; }
.pi-gs__punkt { display: grid; grid-template-columns: 12px auto 1fr; column-gap: 8px; align-items: baseline; padding: 4px 0;
  border-top: 1px solid var(--gs-linie); }
.pi-gs__punkt:first-child { border-top: 0; }
.pi-gs__titel { color: var(--gs-leise); white-space: nowrap; }
.pi-gs__wert { font-weight: 600; text-align: right; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.pi-gs__erkl { grid-column: 2 / -1; color: var(--gs-leise); font-size: 12px; line-height: 1.3; }
.pi-gs__punkt--warn .pi-gs__erkl { color: #f5d78a; } .pi-gs__punkt--fehler .pi-gs__erkl { color: #fca5a5; }
.pi-gs__fehler { grid-column: 1 / -1; margin: 0; padding: 6px 10px; border-radius: 8px; background: rgba(248, 113, 113, .12); color: #fca5a5; }
.pi-gs__lampe { width: 10px; height: 10px; border-radius: 50%; background: var(--gs-ok); align-self: center; }
.pi-gs__lampe--gross { width: 14px; height: 14px; }
.pi-gs__punkt--ok > .pi-gs__lampe, .pi-gs__lampe.pi-gs__punkt--ok { background: var(--gs-ok); box-shadow: 0 0 6px var(--gs-ok); }
.pi-gs__punkt--warn > .pi-gs__lampe, .pi-gs__lampe.pi-gs__punkt--warn { background: var(--gs-warn); box-shadow: 0 0 6px var(--gs-warn); }
.pi-gs__punkt--fehler > .pi-gs__lampe, .pi-gs__lampe.pi-gs__punkt--fehler { background: var(--gs-fehler); box-shadow: 0 0 6px var(--gs-fehler); }
/* neutral (grau): so gewollt, z. B. kein Schreibschutz auf einem Testgerät */
.pi-gs__punkt--info > .pi-gs__lampe { background: var(--gs-leise); box-shadow: none; }
.pi-gs__fuss { display: flex; align-items: center; gap: 8px; padding: 0 2px; }
.pi-gs__meldung { flex: 1; color: var(--gs-leise); font-size: 13px; line-height: 1.25; overflow: hidden; max-height: 48px; }
.pi-gs__knopf { min-height: 46px; padding: 0 14px; border-radius: 23px; border: 1px solid var(--gs-akzent); background: transparent;
  color: var(--gs-akzent); font: 600 15px/1 var(--f-body, "Inter", sans-serif); white-space: nowrap; }
.pi-gs__knopf--haupt { background: var(--gs-akzent); color: #0b1330; }
.pi-gs--neustart .pi-gs__knopf { opacity: .4; pointer-events: none; }
/* Kopf-Knopf ⏻ */
.pi-strom-knopf { min-width: 44px; padding: 0; font-size: 22px; line-height: 1; }
/* Menü „Display & Strom“: Kasten oben rechts unter dem Kopf */
.pi-menue { position: fixed; inset: 0; z-index: 2500; background: rgba(7, 11, 24, .35); }
.pi-menue__kasten { position: absolute; top: 56px; right: 8px; width: 560px; padding: 14px 18px; border-radius: 16px;
  background: var(--surface, #fff); color: var(--ink, #10172a); box-shadow: 0 12px 40px rgba(7, 11, 24, .35); }
.pi-menue__titel { margin: 0 0 6px; font: 600 24px/1.2 var(--f-display, "Barlow Condensed", sans-serif); }
.pi-menue__zeile { display: grid; grid-template-columns: 150px 1fr auto; align-items: center; gap: 12px; min-height: 52px; }
.pi-menue__zeile small { grid-column: 2 / -1; margin-top: -10px; color: var(--text-leise, #4a5470); font-size: 13px; }
.pi-menue__zeile input[type=range] { width: 100%; height: 44px; accent-color: var(--brand, #27479f); }
.pi-menue__zeile b { min-width: 52px; text-align: right; font-variant-numeric: tabular-nums; }
.pi-menue__hinweis { color: var(--text-leise, #4a5470); margin: 6px 0; }
.pi-menue__fuss { margin: 10px 0 0; color: var(--text-leise, #4a5470); font-size: 13px; }
.pi-menue .pi-leiste { margin-top: 8px; }
.pi-menue .pi-knopf { min-height: 56px; padding: 0 18px; font-size: 18px; }
/* Schalter als Tippziel ≥ 44 px (Touch) */
.pi-schalter { justify-self: start; width: 76px; height: 44px; border-radius: 22px; border: 2px solid var(--brand, #27479f); background: var(--rule, #cfd5e3);
  position: relative; padding: 0; }
.pi-schalter::after { content: ""; position: absolute; top: 3px; left: 3px; width: 34px; height: 34px; border-radius: 50%; background: #fff; transition: left .15s; }
.pi-schalter[aria-checked=true] { background: var(--brand, #27479f); }
.pi-schalter[aria-checked=true]::after { left: 35px; }
.pi-wahl { grid-column: 2 / -1; display: flex; gap: 6px; }
.pi-wahl button { min-height: 44px; min-width: 64px; padding: 0 10px; border-radius: 10px; border: 2px solid var(--rule, #cfd5e3); background: var(--surface, #fff);
  color: var(--ink, #10172a); font: 600 16px/1 var(--f-body, "Inter", sans-serif); }
.pi-wahl button[aria-pressed=true] { border-color: var(--brand, #27479f); background: var(--brand, #27479f); color: #fff; }
.pi-knopf--gefahr { border-color: #8a4b00; color: #8a4b00; }
.pi-dialog .pi-knopf--gefahr { background: #8a4b00; color: #fff; }
/* Bestätigung */
.pi-dialog { position: fixed; inset: 0; z-index: 4000; display: grid; place-items: center; background: rgba(7, 11, 24, .55); }
.pi-dialog__kasten { width: 620px; padding: 20px 24px; border-radius: 18px; background: var(--surface, #fff); color: var(--ink, #10172a); }
/* Display aus: schwarz, fängt den Tipp ab (über allem) */
.pi-dunkel { position: fixed; inset: 0; z-index: 9000; background: #000; touch-action: none; }
.pi-gs__liste::-webkit-scrollbar { width: 8px; } .pi-gs__liste::-webkit-scrollbar-track { background: transparent; }
.pi-gs__liste::-webkit-scrollbar-thumb { background: var(--gs-linie); border-radius: 4px; }
