/* E-Kit (Dominik, 04.12.2026) */
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; }
body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: #16202c; background: #f4f6f8;
  -webkit-tap-highlight-color: transparent;
}
body.ekit { display: flex; flex-direction: column; overflow: hidden; }
.leise { color: #5b6773; }
.platz { flex: 1; }

.leiste {
  display: flex; align-items: center; gap: .5rem; flex-wrap: wrap;
  padding: .45rem .75rem; padding-top: max(.45rem, env(safe-area-inset-top));
  background: #16202c; color: #fff;
}
.leiste .leise { color: #b9c4cf; }
.marke { font-size: 1.1rem; letter-spacing: .02em; }

.knopf {
  font: inherit; font-size: .95rem; border: 1px solid #c5ced8; background: #fff; color: #16202c;
  border-radius: .5rem; padding: .4rem .75rem; cursor: pointer; min-height: 2.4rem;
}
.leiste .knopf { background: #243243; color: #fff; border-color: #3a4c60; }
.knopf:disabled { opacity: .45; cursor: default; }
.knopf.haupt { background: #1f5fa8; color: #fff; border-color: #1f5fa8; }
.knopf.gefahr { color: #b3261e; border-color: #e0b4b0; }

.karte { margin: 1rem; padding: .75rem 1rem; border-radius: .75rem; background: #fff; border: 1px solid #d5dde5; }
.karte.warn { border-color: #e3c35a; background: #fff8df; }

.arbeit { flex: 1; display: flex; min-height: 0; }
.werkzeuge {
  display: flex; flex-direction: column; gap: .35rem; padding: .5rem; overflow-y: auto;
  background: #fff; border-right: 1px solid #d5dde5; width: 6.2rem; flex: none;
}
.werkzeug {
  display: flex; flex-direction: column; align-items: center; gap: .15rem;
  border: 2px solid transparent; border-radius: .6rem; background: #f4f6f8;
  padding: .3rem .2rem; cursor: pointer; font: inherit; font-size: .72rem; color: #16202c;
}
.werkzeug svg { width: 3.4rem; height: 1.9rem; }
.werkzeug[aria-pressed="true"] { border-color: #1f5fa8; background: #e4eefa; }

.flaeche { position: relative; flex: 1; min-width: 0; }
#plan { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; user-select: none; -webkit-user-select: none; background: #fff; }

.hinweis {
  position: absolute; left: 50%; top: .6rem; transform: translateX(-50%);
  background: #16202c; color: #fff; padding: .4rem .8rem; border-radius: .5rem;
  font-size: .9rem; pointer-events: none; opacity: 0; transition: opacity .25s; max-width: 90%; text-align: center;
}
.hinweis.zeigen { opacity: .92; }
.hinweis.alarm { background: #b3261e; opacity: .95; }

.panel {
  position: absolute; right: .6rem; bottom: .6rem; width: min(20rem, calc(100% - 1.2rem));
  background: #fff; border: 1px solid #c5ced8; border-radius: .75rem; padding: .7rem .8rem;
  box-shadow: 0 6px 24px rgba(22, 32, 44, .18); font-size: .95rem;
}
.panel h3 { margin: 0 0 .4rem; font-size: 1rem; }
.panel .zeile { display: flex; align-items: center; gap: .5rem; margin: .35rem 0; }
.panel .zeile label { flex: 1; }
.panel input[type="number"], .panel select { width: 6.5rem; font: inherit; padding: .25rem .35rem; border: 1px solid #c5ced8; border-radius: .4rem; }
.panel input[type="range"] { width: 100%; }
.panel .knoepfe { display: flex; gap: .4rem; flex-wrap: wrap; margin-top: .5rem; }
.panel .werte { font-variant-numeric: tabular-nums; background: #f4f6f8; border-radius: .4rem; padding: .3rem .5rem; margin: .4rem 0; }
.panel .info { color: #5b6773; font-size: .85rem; }

/* Schaltplan */
.punkt { fill: #c9d2db; }
.draht { stroke: #16202c; stroke-width: 3; stroke-linecap: round; fill: none; }
.symbol { stroke: #16202c; stroke-width: 3; fill: #fff; stroke-linejoin: round; }
.symbol-linie { stroke: #16202c; stroke-width: 3; fill: none; stroke-linecap: round; }
.dicke-platte { stroke: #16202c; stroke-width: 8; }
.knotenpunkt { fill: #16202c; }
.treffer { stroke: transparent; stroke-width: 26; fill: none; stroke-linecap: round; pointer-events: stroke; }
.gewaehlt .draht, .gewaehlt .symbol, .gewaehlt .symbol-linie { stroke: #1f5fa8; }
.vorschau { opacity: .55; }
.vorschau.ungueltig .draht, .vorschau.ungueltig .symbol, .vorschau.ungueltig .symbol-linie { stroke: #b3261e; }
.beschriftung { font-size: 15px; fill: #16202c; font-variant-numeric: tabular-nums; }
.messfeld { fill: #10202f; rx: 5; }
.messwert { font-size: 16px; fill: #7cf0a0; font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-variant-numeric: tabular-nums; }
.messfehler { fill: #ffb4a8; }
.glut { fill: #ffd34d; }
.kurz .symbol, .kurz .symbol-linie, .kurz .dicke-platte { stroke: #b3261e; }
.durch { stroke: #b3261e; }

@media (max-width: 640px) {
  .arbeit { flex-direction: column-reverse; }
  .werkzeuge { flex-direction: row; width: auto; border-right: 0; border-top: 1px solid #d5dde5; overflow-x: auto; overflow-y: hidden; }
  .werkzeug { min-width: 4.4rem; }
  .knopf { padding: .35rem .55rem; }
}
.buchstabe { font-size: 18px; font-weight: 600; }
.kontakt { stroke-width: 2.5; }
.quer { display: none; }
@media (max-width: 640px) and (orientation: portrait) {
  .quer { display: block; position: absolute; left: .6rem; right: .6rem; bottom: .6rem; margin: 0;
    background: #fff8df; border: 1px solid #e3c35a; border-radius: .5rem; padding: .4rem .6rem; font-size: .9rem; text-align: center; }
}
