.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 16px; }
button, .btnlink { font: inherit; padding: 6px 14px; border-radius: 4px; border: 1px solid var(--accent); background: var(--accent); color: #fff; cursor: pointer; text-decoration: none; display: inline-block; }
button.ghost { background: transparent; color: inherit; border-color: currentColor; }
button.small { padding: 2px 8px; font-size: 13px; }
input { font: inherit; padding: 5px 8px; border: 1px solid #b8c2ca; border-radius: 4px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 8px 0; }

.notice { max-width: 1280px; margin: 10px auto 0; padding: 9px 14px; border-radius: 6px; border: 1px solid; width: calc(100% - 48px); }
.notice.ok { background: #eaf4ec; border-color: #9cc5a5; color: var(--ok); }
.notice.err { background: #fbecec; border-color: #e0a3a5; color: var(--bad); }

.hero { background: var(--panel); border: 1px solid var(--line); border-left: 5px solid var(--head); padding: 22px 26px; border-radius: 6px; }
.hero h1 { font-size: 27px; } .hero p { max-width: 760px; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin-top: 14px; }
.facts div { border-top: 2px solid var(--line); padding-top: 8px; display: flex; flex-direction: column; }
.facts span { color: var(--muted); font-size: 14px; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 16px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 16px; }
.card header { display: flex; justify-content: space-between; align-items: baseline; }
.simclock { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 20px; font-weight: 600; }
.ilklist { list-style: none; padding: 0; margin: 10px 0 14px; }
.ilklist li { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid var(--line); }
.mode { font-size: 13px; } .mode-auto { color: var(--muted); } .mode-human { color: var(--ok); font-weight: 600; } .mode-disconnected { color: #8a5a00; }

.stwhead { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; }
.status { flex: 1; } .status h2 { margin-top: 0; }
.bigclock { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 30px; font-weight: 600; background: var(--gb-bg); color: #f6f1d6; padding: 6px 14px; border-radius: 4px; }
.afk { background: #fff5dc; border: 1px solid #e8c56f; padding: 8px 12px; border-radius: 4px; margin: 8px 0; }
.ophint { min-height: 1.5em; } .ophint button { margin: 0 4px; }

.gbhost { background: var(--gb-bg); border-radius: 6px; overflow: hidden; border: 1px solid #0d1110; }
.gleisbild { width: 100%; height: 420px; display: block; cursor: grab; user-select: none; }
.gbhost.overview .gleisbild { height: 300px; }
.gb-bg { fill: var(--gb-bg); }
.gb-line { fill: none; stroke: var(--gb-track); stroke-width: 4; stroke-linecap: square; }
.gb-mark { fill: none; stroke: transparent; stroke-width: 4; }
.gb-sec.gb-foreign .gb-line { stroke: var(--gb-dim); stroke-width: 3; }
.gb-sec.gb-switch-off .gb-line { stroke-width: 2; stroke-dasharray: 3 5; }
.gb-sec.route .gb-line { stroke: var(--gb-route); stroke-width: 6; stroke-dasharray: none; }
.gb-sec.overlap .gb-line { stroke: var(--gb-route); stroke-width: 4; } /* D-Weg-Gleismelder gelb wie Fahrweg; Verschluss zeigt der D-Weg-Melder */
.gb-sec.occupied .gb-line { stroke: var(--gb-occ); stroke-width: 6; stroke-dasharray: none; }
.gb-sec.occupied .gb-mark { stroke: #ffffff55; stroke-dasharray: 8 10; stroke-width: 2; }
.gb-tracklabel, .gb-switchlabel, .gb-boundary { fill: var(--gb-text); font-size: 12px; font-family: ui-monospace, Menlo, monospace; }
.gb-boundary { fill: var(--gb-dim); }
.gb-switchlock { fill: transparent; stroke: none; } .gb-switch.locked .gb-switchlock { fill: var(--gb-route); }
.gb-signalpost { stroke: var(--gb-text); stroke-width: 1.5; }
.gb-lamp { fill: #8a1d17; stroke: #0d0d0d; stroke-width: 1; }
.gb-signal[data-aspect="fahrt"] .gb-lamp { fill: #3fc560; }
.gb-signal[data-aspect="langsam"] .gb-lamp { fill: #3fc560; stroke: var(--gb-route); stroke-width: 3; }
.gb-signal[data-aspect="halt"] .gb-lamp { fill: #e2483d; }
.gb-signallabel { fill: var(--gb-text); font-size: 12px; font-family: ui-monospace, Menlo, monospace; }
.gb-signal.gb-main { cursor: pointer; }
.gb-hit { fill: transparent; }
.gb-signal.gb-main:hover .gb-hit { fill: #ffffff14; }
.gb-signal.gb-foreign { opacity: .55; }
.gb-signal.selected .gb-lamp { stroke: #fff; stroke-width: 3; }
.gb-signal:focus { outline: none; } .gb-signal:focus-visible .gb-lamp { stroke: var(--focus); stroke-width: 3; }
.gb-zn { fill: #0b0f0d; stroke: var(--gb-text); stroke-width: 1; }
.gb-zntext { fill: #f6f1d6; font-size: 12px; font-family: ui-monospace, Menlo, monospace; }
.gb-train.late .gb-zn { stroke: var(--gb-occ); }

.legend { display: flex; gap: 14px; align-items: center; margin: 8px 0 16px; flex-wrap: wrap; font-size: 13px; }
.lg::before { content: ""; display: inline-block; width: 26px; height: 5px; margin-right: 6px; vertical-align: middle; background: var(--gb-track); }
.lg.route::before { background: var(--gb-route); } .lg.occ::before { background: var(--gb-occ); }
.lg.fsm::before { width: 10px; height: 10px; background: #f2c400; }
.lg.dwm::before { width: 10px; height: 10px; border-radius: 50%; background: #f2c400; }
.cols { display: grid; grid-template-columns: 3fr 2fr; gap: 18px; }
@media (max-width: 900px) { .cols { grid-template-columns: 1fr; } .stwhead { flex-direction: column; } }
table { width: 100%; border-collapse: collapse; background: var(--panel); font-size: 14px; }
th, td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-size: 13px; font-weight: 600; }
td.num { text-align: right; font-variant-numeric: tabular-nums; }
tr.late td { color: var(--bad); }
.log { list-style: none; margin: 0; padding: 8px; background: var(--panel); border: 1px solid var(--line); border-radius: 4px; max-height: 320px; overflow: auto; font-size: 13px; }
.log li { padding: 3px 0; border-bottom: 1px dotted var(--line); }
.log li.err { color: var(--bad); } .log li.ok { color: var(--ok); }
.log time { font-family: ui-monospace, Menlo, monospace; color: var(--muted); }
.tt .halt { font-weight: 600; } .tt .pass { color: var(--muted); }
details { margin-top: 16px; } summary { cursor: pointer; font-weight: 600; }
.foot { display: flex; justify-content: space-between; gap: 12px; padding: 14px 24px; color: var(--muted); font-size: 13px; border-top: 1px solid var(--line); flex-wrap: wrap; }

/* Stelltisch SpDrS60 – Melder */
.gb-sechit { fill: none; stroke: transparent; stroke-width: 16; cursor: pointer; pointer-events: stroke; }
.gb-sechit:hover { stroke: #ffffff12; } .gb-sechit:focus-visible { outline: none; stroke: #ffffff30; }
.gb-sperr { fill: none; stroke: transparent; stroke-width: 2; }
.gb-sec.blocked .gb-sperr { stroke: #ff5a4f; stroke-width: 10; stroke-dasharray: 4 14; }
.gb-switch.gb-own { cursor: pointer; } .gb-switch.gb-own:hover .gb-hit { fill: #ffffff14; }
.gb-switch:focus { outline: none; } .gb-switch:focus-visible .gb-switchsperr { stroke: var(--focus); }
.gb-switchsperr { fill: none; stroke: transparent; stroke-width: 2; }
.gb-switch.blocked .gb-switchsperr { stroke: #ff5a4f; }
.gb-switch.moving .gb-switchlabel { animation: gb-blink .6s steps(2, start) infinite; }
.gb-sigsperr { fill: transparent; } .gb-signal.sig-locked .gb-sigsperr { fill: #ff5a4f; }
.gb-zs1 { fill: transparent; } .gb-signal.zs1 .gb-zs1 { fill: #fff; animation: gb-blink 1s steps(2, start) infinite; }
.gb-selfset { fill: transparent; font-size: 9px; font-family: ui-monospace, Menlo, monospace; }
.gb-signal.selfset .gb-selfset { fill: var(--gb-route); }
svg.no-overlap .gb-sec.overlap:not(.occupied) .gb-line { stroke: var(--gb-track); stroke-width: 4; stroke-dasharray: none; }
@keyframes gb-blink { to { visibility: hidden; } }
@media (prefers-reduced-motion: reduce) { .gb-switch.moving .gb-switchlabel, .gb-signal.zs1 .gb-zs1 { animation: none; } }

.pult { display: grid; grid-template-columns: 1fr auto; gap: 12px; margin: 10px 0; align-items: start; }
.tasten { display: flex; flex-wrap: wrap; gap: 10px; }
.tgrp { border: 1px solid #c9cfca; border-radius: 6px; padding: 4px 8px 8px; margin: 0; }
.tgrp legend { font-size: 12px; color: #555; padding: 0 4px; }
.taste { font: 600 12px ui-monospace, Menlo, monospace; min-width: 52px; padding: 6px 6px; margin: 2px; border-radius: 4px; border: 1px solid #444; background: #e9ecea; color: #111; cursor: pointer; }
.taste.gt { background: #2c3a8c; color: #fff; } .taste.rot { background: #a8261d; color: #fff; } .taste.np { background: #e9ecea; color: #888; border-style: dashed; }
.taste.armed { outline: 3px solid #f0c230; outline-offset: 1px; }
.taste:focus-visible { outline: 3px solid var(--focus); }
.melder { display: grid; grid-template-columns: auto auto; gap: 4px 12px; font-size: 13px; background: #f3f5f3; border-radius: 6px; padding: 8px 12px; min-width: 220px; }
.melder .lamp { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: #9aa19c; margin-right: 6px; vertical-align: middle; }
.melder .lamp.on { background: #f0c230; } .melder .lamp.red { background: #e2483d; } .melder .lamp.white { background: #fff; border: 1px solid #999; }
.zw { font: 600 14px ui-monospace, Menlo, monospace; background: #111; color: #f6f1d6; padding: 1px 6px; border-radius: 3px; }
.eingabe { font: 13px ui-monospace, Menlo, monospace; min-height: 20px; }
.fsl { list-style: none; padding: 0; margin: 4px 0; font-size: 13px; }
.fsl li { display: flex; gap: 8px; align-items: center; }

/* Netzeditor */
.formgrid { display: grid; grid-template-columns: max-content minmax(260px, 520px); gap: 8px 12px; align-items: center; }
select, textarea { font: inherit; padding: 5px 8px; border: 1px solid #b8c2ca; border-radius: 4px; background: #fff; }
textarea { width: 100%; }
.ilkpick { display: flex; flex-direction: column; gap: 4px; margin: 6px 0 10px; }
.st { font-size: 13px; padding: 1px 8px; border-radius: 10px; background: #e7ebee; }
.st-submitted { background: #fff1c9; } .st-rejected { background: #fbdcdc; } .st-published { background: #dcefe0; } .st-withdrawn { color: var(--muted); }
.editor main, .editor { max-width: none; }
.edtitle h1 { margin-bottom: 2px; }
.edtop { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 6px 0; }
.edtop .spacer { flex: 1; }
.tools { display: flex; gap: 0; border: 1px solid var(--accent); border-radius: 4px; overflow: hidden; }
.tool { border: 0; border-radius: 0; background: var(--panel); color: var(--ink); border-right: 1px solid var(--accent); padding: 6px 12px; }
.tool:last-child { border-right: 0; } .tool.on { background: var(--accent); color: #fff; }
.edhint { min-height: 1.4em; margin: 4px 0; }
.edmain { display: grid; grid-template-columns: 1fr 370px; gap: 12px; align-items: start; }
.edhost { background: #1a201d; border-radius: 6px; border: 1px solid #0d1110; height: 560px; overflow: hidden; }
.edhost:focus { outline: none; } .edhost:focus-visible { outline: 3px solid var(--focus); }
.edsvg { width: 100%; height: 100%; display: block; touch-action: none; user-select: none; }
.ed-bg { fill: #1a201d; }
.ed-grid line { stroke: #2a332e; stroke-width: 1; } .ed-grid line.half { stroke: #222a26; }
.ed-line { fill: none; stroke: #a7b0aa; stroke-width: 4; }
.ed-hit { fill: none; stroke: transparent; stroke-width: 16; pointer-events: stroke; cursor: pointer; }
.ed-sig .ed-hit { fill: transparent; stroke: none; pointer-events: all; }
.ed-sec.k-line .ed-line { stroke-dasharray: 14 4; }
.ed-sec.foreign .ed-line { stroke: #59625c; }
.ed-sec.sel .ed-line { stroke: #f2b134; stroke-width: 6; }
.ed-sec.hi-r .ed-line { stroke: #f0c230; stroke-width: 7; } .ed-sec.hi-o .ed-line { stroke: #f0c230; stroke-dasharray: 3 5; stroke-width: 5; }
.ed-seclabel, .ed-lbl { fill: #dfe6e1; font: 12px ui-monospace, Menlo, monospace; pointer-events: none; } .ed-lbl.dim { fill: #8c958f; }
.ed-node { cursor: pointer; } .ed-node circle, .ed-node path, .ed-node rect { fill: #1a201d; stroke: #dfe6e1; stroke-width: 2; }
.ed-node.foreign circle, .ed-node.foreign path, .ed-node.foreign rect { stroke: #6d766f; }
.ed-node.n-switch path { fill: #3a4a6a; } .ed-node.n-boundary rect { fill: #5a3b3b; }
.ed-node.sel circle, .ed-node.sel path, .ed-node.sel rect, .ed-node.chain circle { stroke: #f2b134; stroke-width: 3; }
.ed-sig { cursor: pointer; } .ed-sig line { stroke: #dfe6e1; stroke-width: 1.5; }
.ed-sigshape { fill: #c0392b; stroke: #0d0d0d; } .ed-sig.k-block .ed-sigshape { fill: #3fa85a; } .ed-sig.k-end .ed-sigshape { fill: #777; }
.ed-sig.foreign { opacity: .5; } .ed-sig.sel .ed-sigshape, .ed-sig.hi .ed-sigshape { stroke: #f2b134; stroke-width: 3; }
.ed-preview { stroke: #f2b134; stroke-width: 2; stroke-dasharray: 6 4; } .ed-cursor { fill: #f2b134; pointer-events: none; }
.edside { background: var(--panel); border: 1px solid var(--line); border-radius: 6px; min-height: 520px; }
.tabs { display: flex; border-bottom: 1px solid var(--line); flex-wrap: nowrap; overflow-x: auto; }
.tabs button { background: transparent; color: var(--ink); border: 0; border-bottom: 3px solid transparent; border-radius: 0; padding: 8px 6px; font-size: 13px; white-space: nowrap; }
.tabs button.on { border-bottom-color: var(--accent); font-weight: 600; }
.tabbody { padding: 12px; max-height: 640px; overflow: auto; }
.fld { display: grid; grid-template-columns: 130px 1fr; gap: 8px; align-items: center; margin: 6px 0; font-size: 14px; }
.fld input, .fld select { width: 100%; }
.ilkbox { border: 1px solid var(--line); border-radius: 6px; margin: 0 0 10px; }
.tag { display: inline-flex; gap: 4px; align-items: center; background: #eef1f3; border-radius: 10px; padding: 0 8px; margin: 2px; }
button.x { background: transparent; border: 0; color: var(--bad); padding: 0 4px; font-size: 15px; line-height: 1; }
.rlist { list-style: none; padding: 0; margin: 6px 0 10px; font-size: 14px; }
.rlist li { padding: 4px 0; border-bottom: 1px solid var(--line); display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.rlist .vmax { width: 70px; padding: 1px 4px; }
.report { border: 1px solid; border-radius: 6px; padding: 8px 10px; margin: 8px 0; }
.report.ok { border-color: #9cc5a5; background: #eaf4ec; } .report.bad { border-color: #e0a3a5; background: #fbecec; }
.errs { margin: 6px 0; padding-left: 18px; font-size: 13px; }
.review { background: #fff5dc; border: 1px solid #e8c56f; padding: 6px 8px; border-radius: 4px; }
@media (max-width: 1000px) { .edmain { grid-template-columns: 1fr; } }
.ed-node.conn path, .ed-node.conn circle { stroke: #6fc3ff; fill: #1a201d; stroke-width: 2.5; } .ed-lbl.conn { fill: #9fd6ff; }
.conns { list-style: none; padding: 0; } .conns li { padding: 6px 0; border-bottom: 1px solid var(--line); }
.panel.connect { margin-bottom: 12px; }
.st-approved { background: #e3f0ff; }

/* Zugkarte (Fdl) */
.zugkarte:empty { display: none; }
.zugkarte { background: var(--panel); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 6px; padding: 10px 14px; margin: 12px 0; }
.zugkarte header { justify-content: space-between; } .zugkarte h3 { margin: 0; }
.gefahr { color: #8a3b00; font-weight: 600; }
button.linkish { background: none; border: 0; color: var(--accent); padding: 0; text-decoration: underline; cursor: pointer; }
.trains tr.sel td { background: #eef4fa; }

/* Fahrplaneditor */
.tegrid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.tegrid fieldset { border: 1px solid var(--line); border-radius: 6px; background: var(--panel); }
.tegrid .fld { grid-template-columns: 150px 1fr; }
table.stops td { vertical-align: top; } table.stops select { max-width: 190px; }
.notes { display: flex; flex-direction: column; gap: 3px; } .noterow { display: flex; gap: 3px; flex-wrap: wrap; align-items: center; }
.noterow input, .noterow select { font-size: 13px; padding: 2px 4px; }
.err { color: var(--bad); } .nowrap { white-space: nowrap; }
.reqs { list-style: none; padding: 0; } .reqs li { margin: 8px 0; }
@media (max-width: 1000px) { .tegrid { grid-template-columns: 1fr; } }

/* Rangieren */
.gb-signal[data-aspect="sh1"] .gb-lamp { fill: #f2f2f2; }
.gb-signal.gb-shunt { cursor: pointer; } .gb-signal.gb-shunt .gb-lamp { stroke: #0d0d0d; }
.gb-signal.gb-hsperr[data-aspect="sh1"] .gb-lamp { fill: #e2483d; stroke: #f2f2f2; stroke-width: 3; }
.gb-rtmark { fill: #9fd6ff; } .gb-signal.gb-shunt_target { cursor: pointer; }
.gb-rt { cursor: pointer; } .gb-rt rect { fill: #2c3a8c; stroke: #dfe6e1; stroke-width: .8; } .gb-rt text { fill: #fff; font: 600 8px ui-monospace, monospace; pointer-events: none; }
.gb-rt:focus { outline: none; } .gb-rt:focus-visible rect { stroke: var(--focus); stroke-width: 2; }
.gb-buffer { stroke: #dfe6e1; stroke-width: 4; }
.gb-signallabel.small { font-size: 10px; }
.gb-train.k-wagons .gb-zn { fill: #2d2a1f; stroke: #8c7a4a; } .gb-train.k-shunt .gb-zn { stroke: #9fd6ff; }
.wishes { list-style: none; padding: 0; } .wishes li { display: flex; gap: 8px; align-items: center; padding: 4px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }

.ed-buffer{fill:var(--fg,#ddd)}
.ed-sigshape.sh{fill:#bbb;stroke:#222}
.ed-sigshape.rz{stroke:#e8c33a;stroke-width:2;fill:none}
label.chk{display:block;margin:.3rem 0}
.scrollx{overflow-x:auto;max-width:100%}
.groups input{max-width:9rem}

/* Stufe 7A: Telefon und Störungen */
.phonerow{display:grid;grid-template-columns:1fr 1fr;gap:1rem;margin:.8rem 0}
@media (max-width:900px){.phonerow{grid-template-columns:1fr}}
.phone,.faults{border:1px solid var(--line,#ccc);border-radius:6px;padding:.5rem .8rem;background:var(--panel)}
.phone h3,.faults h3{margin:.1rem 0 .4rem}
.phone.ringing{border-color:#c0392b;animation:ring 1s steps(2) infinite}
@keyframes ring{50%{box-shadow:0 0 0 3px rgba(192,57,43,.45)}}
.phone .call{margin:.3rem 0}
.phone .missed{margin-right:.6rem}
.phone .convo{background:#f4f1e8;border-left:3px solid #2a6;padding:.4rem .6rem;margin:.5rem 0 0}
.faultlist{margin:0;padding-left:1.1rem}
.faultlist li{margin:.25rem 0}
.faultlist li.st-active strong,.faultlist li.st-failed strong{color:#c0392b}
@keyframes blinkred{50%{opacity:.15}}
.gb-switch.fault .gb-switchsperr{stroke:#e33;stroke-width:3;animation:blinkred 1s steps(2) infinite}
.gb-switch.nolage .gb-switchlock{fill:#e8c33a;animation:blinkred .8s steps(2) infinite}
.gb-signal.sig-fault path,.gb-signal.sig-fault circle{animation:blinkred 1s steps(2) infinite;stroke:#e33}

/* Festlegemelder (quadratisch) und D-Weg-Melder (rund) */
.gb-fsm,.gb-dwm{fill:#2a2a2a;stroke:#555;stroke-width:.8}
.gb-signal.festgelegt .gb-fsm{fill:#f2c400}
.gb-signal.dweg .gb-dwm{fill:#f2c400}

.lamp.blink{animation:blinkred 1s steps(2) infinite}
.phone .finding,.faults .finding{display:inline-flex;flex-wrap:wrap;gap:.3rem;align-items:center}
.faults h4{margin:.6rem 0 .2rem}
.phone .mute{display:block;margin-top:.4rem}

/* ---- Stelltisch Sp Dr S60 aus Tischfeldern (54 × 34 mm, kieselgrau, Fugen) ---- */
.tf-wrap{overflow:auto;background:#57554f;border-radius:6px;padding:6px;max-width:100%}
svg.tischfeld{display:block;height:auto;font-family:"DIN Alternate","Arial Narrow",Arial,sans-serif}
.tf-rahmen{fill:#6b6961}
.tf-feld{fill:#a0a0a0;stroke:#7a7a7a;stroke-width:.6}
.tf-gleis{stroke:#1c1c1a;stroke-width:4.6;stroke-linecap:butt}
.tf-melder{stroke:#404040;stroke-width:1.7;stroke-linecap:butt}
.tf-melder.route,.tf-melder.overlap{stroke:#f2c400}
.tf-melder.occ{stroke:#e0301e}
/* Weichenausleuchtung (DS 482/9 § 1 Abs. 12): Stellungsmelder freier Weichen leuchten gelb */
svg.ausleuchtung .tf-melder.stm:not(.aus):not(.occ):not(.route):not(.overlap){stroke:#f2c400}
svg.no-overlap .tf-melder.overlap{stroke:#3d3c38}
.tf-melder.aus{stroke:#3d3c38 !important;opacity:1}
.tf-melder.blink{animation:blinkred .8s steps(2) infinite;stroke:#f2c400}
.tf-melder.gesperrt{stroke-dasharray:2 1.4}
.tf-prellbock{fill:#1c1c1a}
.tf-text{fill:#222;font-size:4.2px}
.tf-text.gross{font-size:5px;font-weight:600}
.tf-text.sig{font-size:4.8px;font-weight:700}
.tf-taste-rund{fill:#ecebe4;stroke:#4a4944;stroke-width:.7}
.tf-taste-rund.zt{fill:#ecebe4}
.tf-taste rect,.tf-taste.glt rect{fill:#ecebe4;stroke:#4a4944;stroke-width:.7}
.tf-taste text{font-size:4px;fill:#222;font-weight:700}
.tischfeld [role=button]{cursor:pointer}
.tischfeld [role=button]:focus{outline:none}
.tischfeld [role=button]:focus-visible .tf-taste-rund,.tischfeld .tf-taste:focus-visible rect{stroke:#0a6;stroke-width:1.4}
.tischfeld .gb-switchsperr{fill:none;stroke:transparent;stroke-width:1}
.tischfeld .gb-switch.blocked .gb-switchsperr{stroke:#e0301e}
.tischfeld .gb-switch.fault .gb-switchsperr{stroke:#e0301e;animation:blinkred 1s steps(2) infinite}
.tischfeld .gb-switchlock{fill:none}
.tischfeld .gb-switch.locked .gb-switchlock{fill:#f2c400}
.tischfeld .gb-switch.moving .tf-taste-rund{fill:#f6e27a}
.tischfeld .gb-signalpost{stroke:#1c1c1a;stroke-width:.8}
.tischfeld .gb-lamp{fill:#4a4944;stroke:#1c1c1a;stroke-width:.4}
.tischfeld .gb-signal[data-aspect=halt] .gb-lamp{fill:#e0301e}
.tischfeld .gb-signal[data-aspect=fahrt] .gb-lamp,.tischfeld .gb-signal[data-aspect=langsam] .gb-lamp{fill:#22b14c}
.tischfeld .gb-signal[data-aspect=sh1] .gb-lamp{fill:#f2c400}
.tischfeld .k-shunt[data-aspect=halt] .gb-lamp{fill:#e0301e}
.tischfeld .gb-sigsperr{fill:transparent}
.tischfeld .gb-signal.sig-locked .gb-sigsperr{fill:#f2c400}
.tischfeld .gb-zs1{fill:#4a4944}
.tischfeld .gb-signal.zs1 .gb-zs1{fill:#f2c400;stroke:#555;stroke-width:.3;animation:none}
.tischfeld .gb-selfset{fill:transparent;font-size:3.6px;font-weight:700}
.tischfeld .gb-signal.selfset .gb-selfset{fill:#c99a00}
.tischfeld .gb-fsm,.tischfeld .gb-dwm{fill:#3d3c38;stroke:#1c1c1a;stroke-width:.3}
.tischfeld .gb-signal.festgelegt .gb-fsm,.tischfeld .gb-signal.dweg .gb-dwm{fill:#f2c400}
.tischfeld .gb-signal.selected .tf-taste-rund{fill:#fff3a8;stroke:#c08a00;stroke-width:1.2}
.tischfeld .gb-signal.sig-fault .gb-lamp{animation:blinkred 1s steps(2) infinite}
.tischfeld .gb-rtmark{fill:#1c1c1a}
.tischfeld .gb-zn{fill:#1c1c1a}
.tischfeld .tf-zntext{fill:#f5e663;font-size:4.6px;font-weight:700}
.tischfeld .tf-train.late .tf-zntext{fill:#ff8a7a}
.tischfeld .tf-train.k-shunt .gb-zn,.tischfeld .tf-train.k-wagons .gb-zn{fill:#45433e}

/* Feldzeichnungen der Projektleitung: Melder hinter den Ausschnitten, vom Spiel eingefärbt; Tasten als Ringe */
.tf-r.melder{fill:#404040}
.tf-r.melder[data-an=gelb]{fill:#f2c400}
.tf-r.melder[data-an=rot]{fill:#e0301e}
.tf-r.melder[data-an=gruen]{fill:#22b14c}
.tf-r.melder[data-an=weiss]{fill:#f4f4ee}
.tf-r.melder.blink{animation:blinkred .8s steps(2) infinite}
svg.ausleuchtung .tf-r.melder.gl:not([data-an]){fill:#f2c400}
.tf-r.taste{fill:transparent;stroke:transparent;stroke-width:1;cursor:pointer;pointer-events:all}
.tf-r.taste:hover{stroke:rgba(0,0,0,.35)}
.tf-r.taste:focus{outline:none}.tf-r.taste:focus-visible{stroke:#0a6;stroke-width:1.4}
.tf-r.taste.armed{stroke:#0a6;stroke-width:1.4;fill:rgba(0,170,102,.18)}
.tf-r.taste.selected{fill:rgba(255,243,168,.55);stroke:#c08a00;stroke-width:1.2}
.tf-r.zw{fill:#f2f2ee;font-family:ui-monospace,Menlo,monospace;font-weight:700}
.tf-r.schrift{fill:#222;font-weight:700}
@media (prefers-reduced-motion: reduce){.tf-r.melder.blink{animation:none}}

/* Feldtyp-Editor */
.ft-list td{vertical-align:middle}
.ft-thumb{display:block;border-radius:2px}
.ft-head{display:grid;grid-template-columns:max-content minmax(14rem,28rem);gap:.4rem .8rem;align-items:center;margin-bottom:.8rem}
.ft-logic label{margin-right:.6rem}
.ft-logic input#ft-tracks{min-width:18rem}
.ft-tools{display:flex;gap:.3rem;flex-wrap:wrap;margin:.3rem 0}
.ft-tools button[aria-pressed=true]{outline:2px solid #0a6}
#ft-ref{max-width:100%}
.ft-canvas-wrap{overflow:auto;background:#57554f;padding:8px;border-radius:6px;max-width:100%}
.ft-canvas{display:block;touch-action:none;cursor:crosshair}
.ft-grid{stroke:rgba(0,0,0,.12);stroke-width:.08}
.ft-fuge{stroke:#555;stroke-width:.3;stroke-dasharray:1 1}
.ft-r{stroke-width:.25;fill-opacity:.45}
.ft-r.k-melder{fill:#f2c400;stroke:#8a6d00}
.ft-r.k-taste,.ft-r.k-schluessel{fill:#22b14c;stroke:#0d5c25}
.ft-r.k-zaehlwerk,.ft-r.k-beschriftung{fill:#3b7dd8;stroke:#1d4580}
.ft-r.sel{stroke:#d01;stroke-width:.5;fill-opacity:.65}
.ft-r.preview{fill:rgba(255,255,255,.3);stroke:#fff;stroke-width:.3;stroke-dasharray:.8 .5}
.ft-pt{fill:#fff;stroke:#000;stroke-width:.15}
.ft-rnum{font-size:2.2px;fill:#000;font-weight:700;pointer-events:none}
.ft-regions table{border-collapse:collapse}.ft-regions td,.ft-regions th{padding:.2rem .4rem;border-bottom:1px solid #ddd}
.ft-regions tr.sel{background:#fff6cc}
.ft-regions input.num{width:4.2rem}
.ft-regions select{max-width:22rem}

/* Netzeditor im Tischfeld-Raster */
.te-area{display:flex;flex-direction:column;gap:.5rem;min-width:0}
.te-host{overflow:auto;max-height:70vh;background:#57554f;border-radius:6px;padding:6px;outline:none}
.te-host:focus-visible{box-shadow:0 0 0 3px var(--focus,#0a6)}
.te-svg{display:block}
.te-leer{fill:#8f8f8f;stroke:none;cursor:pointer}
.te-leer:hover{fill:#b5b5b5}
.te-feld{cursor:pointer}
.te-feld .te-hit{fill:transparent}
.te-feld:hover .te-hit{fill:rgba(255,255,255,.12)}
.te-feld.sel .te-hit{fill:rgba(255,243,168,.35);stroke:#d01;stroke-width:1}
.te-feld.same-sec .te-hit{fill:rgba(242,196,0,.28)}
.te-feld.unbekannt .tf-feld{fill:#c66}
.te-lbl{font-size:4px;font-weight:700;fill:#111}
.te-sec{font-size:3.4px;fill:#1d1d1d}
.te-sec.fehlt{fill:#a00;font-weight:700}
.te-sig{fill:#e0301e;stroke:#222;stroke-width:.4}
.te-buffer{fill:#222}
.te-edge{stroke:#1d4580;stroke-width:1.6}
.te-typname{font-size:4px;fill:#222}
.te-palette{display:flex;flex-wrap:wrap;gap:.6rem;align-items:flex-start}
.te-pgroup{display:flex;flex-direction:column;gap:.2rem}
.te-pitems{display:flex;flex-wrap:wrap;gap:.2rem;max-width:34rem}
.te-pitem{padding:2px;background:#eee;border:1px solid #bbb;border-radius:3px;line-height:0}
.te-pitem.on{outline:2px solid #0a6;background:#dff5ea}
.edtop input.num,.ilkbox input.num{width:4.5rem}
.te-svg .tf-fuge{stroke:#6f6f6f;stroke-width:.4;pointer-events:none}

/* Zugmeldungen */
.call.zm q{font-style:italic}
.call.derb{border-left:4px solid #c0392b}
.zmbuch{margin:.8rem 0}
.zmtab td,.zmtab th{padding:.15rem .5rem}
.phone .dial input{max-width:16rem}

/* Telefon-Tastenfeld (Vorbild Fernsprech-/Funkbedienfeld) */
.telfeld{display:grid;grid-template-columns:repeat(8,minmax(0,1fr));background:linear-gradient(#9aa5b1,#7f8b98);border:1px solid #5d6670;border-radius:4px;padding:6px 4px 0;gap:0;max-width:34rem}
.telzelle{display:flex;flex-direction:column;align-items:center;gap:2px;padding:4px 0 0}
.telzelle .tellabel{display:block;width:100%;min-height:1.15em;background:#c9ced4;color:#111;font:600 .72rem/1.15 system-ui,sans-serif;text-align:center;border-top:1px solid #aeb5bd;padding:1px 0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.teltaste{width:26px;height:26px;border-radius:50%;border:2px solid #6d6a5e;background:radial-gradient(circle at 40% 35%,#f4ecd6,#d9cdae);box-shadow:inset 0 -2px 3px rgba(0,0,0,.25);padding:0;cursor:pointer}
.teltaste.aus{opacity:1}
span.teltaste{cursor:default;opacity:.55}
.teltaste.an{background:radial-gradient(circle at 40% 35%,#fff6a0,#f2c400)}
.teltaste.blink{background:radial-gradient(circle at 40% 35%,#fff6a0,#f2c400);animation:telblink .9s steps(2) infinite}
@keyframes telblink{50%{background:radial-gradient(circle at 40% 35%,#f4ecd6,#d9cdae)}}
.teltaste.fn-ruf.an,.teltaste.fn-ruf.blink{background:radial-gradient(circle at 40% 35%,#6fdc79,#16821f)}
.teltaste.fn-ende.an{background:radial-gradient(circle at 40% 35%,#6f8cff,#1532a8)}
.teltaste.fn-notruf112.an,.teltaste.fn-notruf.an{background:radial-gradient(circle at 40% 35%,#ff6a6a,#b40f17)}
.teltaste.gewaehlt{outline:3px solid #0a6;outline-offset:1px}
.teltaste:focus-visible{outline:3px solid #fff;outline-offset:1px}
@media (prefers-reduced-motion: reduce){.teltaste.blink{animation:none;outline:3px dashed #f2c400}}
.telrufe{list-style:none;padding:0;margin:.4rem 0}
.telfenster{border:1px solid #c9ced4;border-radius:4px;padding:.4rem .6rem;margin:.5rem 0;background:#fbfbf8}
.telfenster h4{margin:.1rem 0 .3rem}
.telrede{font-style:italic;margin:.2rem 0 .4rem}
button.warn{background:#b40f17;color:#fff}
.tel-lbl{width:9rem}

/* Streckenblock */
.strecken .strecke{display:flex;flex-wrap:wrap;align-items:center;gap:.25rem;margin:.2rem 0;font-size:.88rem}
.lamp.blue{background:#2a5bd7;box-shadow:0 0 4px #2a5bd7}
.tf-r.melder[data-an=blau]{fill:#2a5bd7}
.strecken{background:#f3f5f3;border-radius:6px;padding:6px 12px;margin-top:6px}
.strecken h3{margin:.1rem 0 .3rem;font-size:1rem}
.strecken .lamp{display:inline-block;width:10px;height:10px;border-radius:50%;background:#9aa19c;margin:0 3px 0 6px;vertical-align:middle}
.strecken .lamp.on{background:#f0c230}.strecken .lamp.red{background:#e2483d}.strecken .lamp.blue{background:#2a5bd7}

/* Trapeztafel Ne 1 */
.gb-ne1{fill:#fff;stroke:#222;stroke-width:1}
.schluesselwand{border:1px solid #8a6d3b;background:#f7f1e3;padding:.4rem .6rem;border-radius:4px;margin:.3rem 0}.schluesselwand ul{list-style:none;margin:.3rem 0;padding:0}.plombe.ausgegeben,.plombe.zurueck{filter:grayscale(1);opacity:.5}

/* Spieleabende und Wetter */
.wetterbox{font-size:.9rem;color:#334;text-align:right;margin-top:.2rem}
.wetterbox[data-w=schnee],.wetterbox[data-w=sturm],.wetterbox[data-w=nebel]{font-weight:600}
.mode-event{background:#efe6ff;color:#3d2a6b}
.wetter{margin-left:.4rem;color:#456}
.evlist{list-style:none;padding:0;margin:0}.evlist li{border:1px solid #d8dce3;border-radius:4px;padding:.6rem .8rem;margin:.5rem 0;background:#fff}
.evlist .when{color:#456;font-size:.9rem}
.evstations{width:100%;border-collapse:collapse}.evstations td,.evstations th{border-bottom:1px solid #e3e6ea;padding:.3rem .4rem;text-align:left}
.evform fieldset{margin:.6rem 0}.evform .rowlist>div{display:flex;gap:.4rem;align-items:center;flex-wrap:wrap;margin:.25rem 0}
.wettertab td,.wettertab th{padding:.25rem .5rem;border-bottom:1px solid #e3e6ea;text-align:left}

/* ===================================================================== Störungen DS 482/9 §11–15 */
.gb-signal.sig-dark .gb-lamp, .tischfeld .gb-signal.sig-dark .gb-lamp { fill: #2a2a2a !important; stroke: #555; animation: none; }
.gb-signal.sig-lampe .gb-lamp { animation: blinkred 1.2s steps(2) infinite; }
.gb-switch.auffahr .gb-switchsperr { stroke: #f0c230; stroke-width: 3; animation: blinkred .8s steps(2) infinite; }
.gb-switch.halb .gb-switchsperr { stroke: #f0c230; stroke-dasharray: 2 2; }
.gb-sec.unfall .gb-mark { stroke: #e2483d; stroke-dasharray: 6 4; opacity: 1; }
.tischfeld .unfall { stroke: #e2483d !important; stroke-dasharray: 4 3; }
.gbhost.stw-dunkel { filter: brightness(.18) grayscale(.6); transition: filter .4s; }
.melder .mgrp { font-weight: 600; margin-top: 6px; }
.faultlist.incidents li { border-left: 3px solid var(--w-busy, #a3312b); padding-left: 8px; }
.faultlist.incidents li.inc-ermittlung { border-left-color: #c48a00; }

/* DS 482/9 §10: Stelltischausleuchtung ausgefallen – Gleisbild und Melder dunkel, Signale draußen leuchten weiter */
.gbhost.stw-ausleuchtung { filter: brightness(.06); }
.melder.stw-ausleuchtung .lamp { background: #555 !important; animation: none !important; box-shadow: none !important; }

/* Lernsystem: Sprechblase, Hervorhebung des aktuellen Schritts, Kursübersicht */
.lesson { border: 2px solid #2b6b3a; background: #f3f8f2; border-radius: 6px; padding: 10px 14px; margin: 6px 0; max-width: 72ch; position: relative; }
.lesson::before { content: ""; position: absolute; left: 22px; bottom: -9px; width: 14px; height: 14px; background: #f3f8f2; border-right: 2px solid #2b6b3a; border-bottom: 2px solid #2b6b3a; transform: rotate(45deg); }
.lesson p { margin: 4px 0; }
.lesson-text { font-size: 17px; line-height: 1.45; }
.lesson-fb { padding: 4px 8px; border-radius: 4px; }
.lesson-fb.ok { background: #dcefdc; color: #1f4d2a; }
.lesson-fb.hint { background: #fbe9d0; color: #6b3d00; }
.taste.hl, .taste.hl.gt, .taste.hl.rot { outline: 3px solid #2b6b3a; outline-offset: 2px; animation: hlpulse 1.4s ease-in-out infinite; }
.gb-hl { filter: drop-shadow(0 0 4px #7fe07f) drop-shadow(0 0 2px #7fe07f); }
.hl-area { outline: 3px dashed #2b6b3a; outline-offset: 4px; border-radius: 4px; }
@keyframes hlpulse { 50% { outline-color: #8fd68f; } }
@media (prefers-reduced-motion: reduce) { .taste.hl { animation: none; } }
.lektionen { padding-left: 1.4em; }
.lektionen li { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 8px 0; border-bottom: 1px solid #e3e7e4; }
.lektionen li.done strong { color: #2b6b3a; }
.lektionen .tag { margin-left: 8px; }
.kurs { margin: 18px 0 28px; }
.kursstand { font-weight: 600; } .kursstand.ok { color: #2b6b3a; }
