/* ===== Kostenlose Werkzeuge · Lärmampel (28.10.2026, Paket noten-laerm) – nur /tools/laermampel, nach tools.css einbinden =====
   Zustände an .lm-buehne/.lm-ampel[data-stufe]: aus · gruen · gelb · rot. Nicht nur Farbe: Position des Lichts
   (Rot oben, Gelb Mitte, Grün unten), weißer Ring am leuchtenden Licht, großer Text („Zu laut“) und „Ampel: Rot“.
   Das Gehäuse bleibt in hell und dunkel dunkel (wie eine echte Ampel), die Fläche der Bühne färbt sich mit. */
.lm-buehne .wz-buehne-inhalt{gap:14px}
.lm-anzeige{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:16px 36px;width:100%}
.lm-ampel{flex:0 0 auto;display:flex;flex-direction:column;align-items:center;gap:clamp(8px,1.5vw,14px);padding:clamp(10px,1.8vw,16px);
  background:#1d262e;border:2px solid #0e1418;border-radius:clamp(22px,4vw,36px);box-shadow:0 6px 18px rgba(0,0,0,.18)}
.lm-licht{display:block;width:clamp(3.3rem,12vw,5.2rem);height:clamp(3.3rem,12vw,5.2rem);border-radius:50%}
.lm-licht-rot{background:#4d2522}
.lm-licht-gelb{background:#4b401c}
.lm-licht-gruen{background:#1c3b29}
.lm-ampel[data-stufe="rot"] .lm-licht-rot{background:#ff4b3e;box-shadow:inset 0 0 0 4px rgba(255,255,255,.9),0 0 26px 6px rgba(255,75,62,.55)}
.lm-ampel[data-stufe="gelb"] .lm-licht-gelb{background:#ffc21a;box-shadow:inset 0 0 0 4px rgba(255,255,255,.9),0 0 26px 6px rgba(255,194,26,.5)}
.lm-ampel[data-stufe="gruen"] .lm-licht-gruen{background:#2fd06f;box-shadow:inset 0 0 0 4px rgba(255,255,255,.9),0 0 26px 6px rgba(47,208,111,.5)}
@media (prefers-reduced-motion: no-preference){
  .lm-licht{transition:background .25s ease,box-shadow .25s ease}
  .lm-buehne{transition:background-color .3s ease}
}
.wz-gross[data-thema="dunkel"] .lm-ampel{border-color:#3d4c58}
.wz-gross[data-thema="dunkel"] .lm-ampel{border-color:#3d4c58}
.wz-gross[data-thema="hell"] .lm-ampel{border-color:#0e1418}

.lm-text{display:flex;flex-direction:column;align-items:center;gap:6px;min-width:0;max-width:100%}
.lm-botschaft{font-family:'Baloo 2',system-ui,sans-serif;font-weight:800;line-height:1.05;font-size:clamp(2.2rem,8vw,4.2rem);margin:0;color:var(--text);
  overflow-wrap:anywhere;text-align:center}
.lm-buehne[data-stufe="aus"] .lm-botschaft{color:var(--text-leicht)}
.lm-buehne[data-stufe="gruen"]{background:var(--wz-gut)}
.lm-buehne[data-stufe="gruen"] .lm-botschaft{color:var(--wz-gut-text)}
.lm-buehne[data-stufe="gelb"]{background:var(--wz-warn)}
.lm-buehne[data-stufe="gelb"] .lm-botschaft{color:var(--wz-warn-text)}
.lm-buehne[data-stufe="rot"]{background:var(--wz-alarm)}
.lm-buehne[data-stufe="rot"] .lm-botschaft{color:var(--wz-alarm-text)}
.lm-buehne .wz-unterzeile{color:var(--text);text-align:center}

/* Pegel mit den Grenzen für Gelb und Rot */
.lm-pegel{width:min(100%,30rem)}
.lm-pegel-spur{position:relative;height:18px;border-radius:999px;background:var(--weiss);border:2px solid var(--wz-feldrand)}
.lm-pegel-fuell{position:absolute;left:0;top:0;bottom:0;width:0;border-radius:999px;background:#2F6A91}
.lm-buehne[data-stufe="gelb"] .lm-pegel-fuell{background:#8a4b00}
.lm-buehne[data-stufe="rot"] .lm-pegel-fuell{background:#a8322a}
.wz-gross[data-thema="hell"] .lm-pegel-fuell{background:#2F6A91}
.wz-gross[data-thema="hell"][data-stufe="gelb"] .lm-pegel-fuell{background:#8a4b00}
.wz-gross[data-thema="hell"][data-stufe="rot"] .lm-pegel-fuell{background:#a8322a}
.wz-gross[data-thema="dunkel"] .lm-pegel-fuell{background:#8cc0e6}
.wz-gross[data-thema="dunkel"][data-stufe="gelb"] .lm-pegel-fuell{background:#f5d08a}
.wz-gross[data-thema="dunkel"][data-stufe="rot"] .lm-pegel-fuell{background:#f6a9a1}
@media (prefers-reduced-motion: no-preference){.lm-pegel-fuell{transition:width .12s linear}}
.lm-marke{position:absolute;top:-7px;bottom:-7px;width:4px;margin-left:-2px;background:var(--text);border-radius:2px}
.lm-marke b{position:absolute;top:calc(100% + 2px);left:50%;transform:translateX(-50%);font-size:.8rem;font-weight:700;color:var(--text);white-space:nowrap}
.lm-pegel-skala{display:flex;justify-content:space-between;font-size:.85rem;color:var(--text);margin-top:22px}

/* Bedienung */
.lm-steuer .wz-knopf-haupt{min-width:11em}
.lm-hand{min-width:6.2em}
.lm-hand::before{content:"";flex:0 0 auto;width:.95em;height:.95em;border-radius:50%;border:2px solid #1d262e}
.lm-hand[data-lm-hand="rot"]::before{background:#ff4b3e}
.lm-hand[data-lm-hand="gelb"]::before{background:#ffc21a}
.lm-hand[data-lm-hand="gruen"]::before{background:#2fd06f}
.lm-hand[aria-pressed="true"]::before{border-color:#fff}
.lm-mikro-status{display:inline-flex;align-items:center;gap:6px;min-height:32px;padding:3px 12px;border-radius:999px;background:var(--weiss);border:1px solid var(--rand);
  color:var(--text);font-weight:700;font-size:.9rem;line-height:1.3;margin-right:auto}
.lm-mikro-status svg{width:1.15em;height:1.15em;flex:0 0 auto;color:var(--wz-alarm-text)}
.lm-vorab{display:flex;gap:8px;align-items:flex-start;max-width:34rem;margin:0;font-size:.93rem;line-height:1.5;color:var(--text);text-align:left}
.lm-vorab svg{flex:0 0 auto;width:1.15em;height:1.15em;margin-top:.15em;color:var(--wz-ton-text)}

/* Einstellungen */
.lm-seite .lm-empf input[type="range"]{display:block;width:100%;min-height:44px;margin:0;accent-color:#2F6A91;cursor:pointer}
.lm-skala{display:flex;justify-content:space-between;gap:10px;font-size:.88rem;color:var(--text-leicht);margin:-4px 0 6px}
.lm-formen{grid-template-columns:repeat(auto-fill,minmax(7.4rem,1fr))}

/* Großansicht (Beamer) */
.wz-buehne.wz-gross .lm-licht{width:min(15vh,13vw);height:min(15vh,13vw)}
.wz-buehne.wz-gross .lm-ampel{border-radius:min(5vh,4vw)}
.wz-buehne.wz-gross .lm-botschaft{font-size:min(11vw,15vh)}
.wz-buehne.wz-gross .lm-pegel{width:min(80vw,46rem)}
.wz-buehne.wz-gross .lm-anzeige{gap:2vh 6vw}
