/* ---------------------------------------------------------------------------
   Das Resteregal als Bild (06.11.2026), Vorsilbe rr-. Gezeichnet in
   oeffentlich/js/restregal.js, Maße in mm, deshalb stehen Schriftgrößen und
   Strichstärken hier in mm des Bildes, nicht in Punkten.
   Die Ampel ist grün, gelb, rot. Das Leuchten ist bewusst BLAU, damit ein
   gesuchtes Fach nie mit einem gelben "wird voll" verwechselt wird.
   --------------------------------------------------------------------------- */

.rr { --rr-leucht-rgb: var(--blau-rgb); margin-bottom: 14px; }
.rr-regale {
  display: flex; flex-wrap: wrap; align-items: flex-end; gap: 14px;
  background: var(--ink-2); border: 1px solid var(--linie-zart); border-radius: var(--r);
  padding: 12px;
}
.rr-regal { min-width: 0; flex-shrink: 1; }
.rr-regal__svg { display: block; width: 100%; height: auto; overflow: visible; }
.rr-regal__name { fill: var(--smoke); font-size: 130px; font-weight: 600; text-anchor: middle; font-family: var(--ff-text); }
.rr-regal__rahmen { fill: none; stroke: var(--linie); stroke-width: 16; pointer-events: none; }

.rr-kein { fill: rgba(var(--bone-rgb), .05); stroke: rgba(var(--bone-rgb), .14); stroke-width: 10; stroke-dasharray: 60 40; }
.rr-kein__text { fill: var(--smoke-dim); font-size: 92px; text-anchor: middle; dominant-baseline: middle; font-family: var(--ff-text); }

.rr-fach { cursor: default; }
.rr-fach[role="button"] { cursor: pointer; }
.rr-fach:focus { outline: none; }
.rr-fach:focus-visible .rr-fach__flaeche { stroke: var(--bone); stroke-width: 30; }
.rr-fach__flaeche { fill: var(--ink-3); stroke: var(--linie); stroke-width: 12; }
.rr-fach--gruen .rr-fach__flaeche { fill: rgba(var(--gut-rgb), .16); stroke: rgba(var(--gut-rgb), .55); }
.rr-fach--gelb .rr-fach__flaeche { fill: rgba(var(--achtung-rgb), .2); stroke: rgba(var(--achtung-rgb), .7); }
.rr-fach--rot .rr-fach__flaeche { fill: rgba(var(--schlecht-rgb), .24); stroke: rgba(var(--schlecht-rgb), .8); }
.rr-fach--aus { opacity: .45; }
.rr-fach__nr { fill: var(--bone); font-weight: 700; text-anchor: middle; font-family: var(--ff-display); }
.rr-fach__anzahl, .rr-fach__prozent { fill: var(--smoke); text-anchor: middle; font-family: var(--ff-text); }
.rr-fach__prozent { font-weight: 600; fill: var(--bone); }
.rr-fach__balken { fill: rgba(var(--bone-rgb), .1); }
.rr-fach--gruen .rr-fach__fuellung { fill: var(--gut); }
.rr-fach--gelb .rr-fach__fuellung { fill: var(--achtung); }
.rr-fach--rot .rr-fach__fuellung { fill: var(--schlecht); }

/* Gewählt (die Liste ist auf dieses Fach gefiltert): kräftiger heller Rand. */
.rr-fach--gewaehlt .rr-fach__flaeche { stroke: var(--bone); stroke-width: 34; }

/* Gesuchter Rest: blauer Rahmen außen, der pulsiert, dazu blaue Fläche. */
/* Die Ampelfarbe bleibt, damit ein volles Fach auch leuchtend rot ist. */
.rr-fach--an .rr-fach__flaeche { stroke: rgb(var(--rr-leucht-rgb)); stroke-width: 30; }
.rr-fach__leuchten { fill: none; stroke: rgb(var(--rr-leucht-rgb)); stroke-width: 44; pointer-events: none; }
@media (prefers-reduced-motion: no-preference) {
  .rr-fach__leuchten { animation: rr-pulsieren 1.2s ease-in-out infinite; }
  .rr-arbeitsplatz--an, .rr-uebrig__fach--an { animation: rr-pulsieren-kasten 1.2s ease-in-out infinite; }
}
@keyframes rr-pulsieren {
  0%, 100% { stroke-opacity: 1; stroke-width: 56; }
  50% { stroke-opacity: .35; stroke-width: 22; }
}
@keyframes rr-pulsieren-kasten {
  0%, 100% { box-shadow: 0 0 0 6px rgb(var(--rr-leucht-rgb)); }
  50% { box-shadow: 0 0 0 2px rgba(var(--rr-leucht-rgb), .4); }
}

/* Der Arbeitsplatz steht als kleines Kästchen daneben, am Boden. */
.rr-arbeitsplatz {
  flex: 0 0 auto; align-self: flex-end;
  display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 4px;
  min-width: 120px; min-height: 96px; padding: 10px 14px;
  background: var(--ink-3); color: var(--bone); border: 2px solid var(--linie); border-radius: var(--r-klein);
  font: inherit; text-align: center;
}
button.rr-arbeitsplatz { cursor: pointer; }
.rr-arbeitsplatz__name { font-weight: 700; }
.rr-arbeitsplatz__anzahl { color: var(--smoke); font-size: .95rem; }
.rr-arbeitsplatz--gewaehlt { border-color: var(--bone); border-width: 4px; }
.rr-arbeitsplatz--an { background: rgba(var(--rr-leucht-rgb), .38); border-color: rgb(var(--rr-leucht-rgb)); box-shadow: 0 0 0 6px rgb(var(--rr-leucht-rgb)); }

.rr-uebrig { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 10px; color: var(--smoke); }
.rr-uebrig__fach {
  min-height: 44px; padding: 8px 14px; border-radius: var(--r-klein); font: inherit;
  background: var(--ink-3); color: var(--bone); border: 1px solid var(--linie);
}
button.rr-uebrig__fach { cursor: pointer; }
.rr-uebrig__fach--an { background: rgba(var(--rr-leucht-rgb), .38); border-color: rgb(var(--rr-leucht-rgb)); }

.rr-legende { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 8px; color: var(--smoke); font-size: .9rem; }
.rr-legende__eintrag { display: inline-flex; align-items: center; gap: 6px; }
.rr-legende__punkt { width: 14px; height: 14px; border-radius: 4px; display: inline-block; }
.rr-legende__eintrag--gruen .rr-legende__punkt { background: var(--gut); }
.rr-legende__eintrag--gelb .rr-legende__punkt { background: var(--achtung); }
.rr-legende__eintrag--rot .rr-legende__punkt { background: var(--schlecht); }
.rr-legende__eintrag--an .rr-legende__punkt { background: transparent; border: 3px solid rgb(var(--blau-rgb)); }

.rr--klein .rr-regale { padding: 8px; gap: 10px; }
.rr--klein .rr-arbeitsplatz { min-width: 96px; min-height: 64px; }

/* Unter dem Regalbild im Reiter Regal: was gefiltert ist. */
.rl-regal-filter { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 4px 0 10px; }
.rl-regal-filter .rl-marke { min-height: 44px; padding: 8px 14px; cursor: pointer; }

/* Am Handy jeden Punkt Breite fürs Bild: die schmalen Fächer im
   Handrestregal (400 mm) bleiben so mindestens 44 Punkte breit. */
@media (max-width: 560px) {
  .rr-regale { padding: 6px 4px; gap: 10px; }
}
.rl-ansage .rr { margin-top: 12px; margin-bottom: 0; }
/* Die Ansage ist ab 700 Punkten ein Raster aus zwei Spalten, das Regalbild geht über beide. */
.rl-ansage__regal { grid-column: 1 / -1; min-width: 0; }

/* ---------------------------------------------------------------------------
   Die Säge-Ansicht (06.11.2026), Vorsilbe rs-. Vollbild, aus drei Metern
   lesbar: große Schrift, wenig Text, kein Menü.
   --------------------------------------------------------------------------- */
.rs {
  min-height: 100vh; min-height: 100dvh; box-sizing: border-box;
  padding: 16px clamp(16px, 2vw, 32px) 24px;
  background: var(--ink); color: var(--bone);
  display: flex; flex-direction: column; gap: 16px;
}
.rs-kopf { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 20px; }
.rs-kopf h1 { margin: 0; font-family: var(--ff-display); font-size: clamp(1.6rem, 3vw, 2.8rem); }
.rs-stand { color: var(--smoke); font-size: clamp(.95rem, 1.3vw, 1.3rem); }
.rs .rr { margin-bottom: 0; }
/* Querformat: Regal links, Liste rechts, beides ohne Rollen sichtbar. Die
   Regale stehen links untereinander, die Liste rechts bekommt die volle
   Höhe. */
.rs-inhalt { display: flex; flex-direction: column; gap: 16px; }
.rs-rechts { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
@media (min-width: 1100px) and (orientation: landscape) {
  .rs-inhalt { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); align-items: start; }
  .rs-links { position: sticky; top: 12px; }
  .rs .rr-regal__svg { max-height: calc(50vh - 70px); }
}
.rs .rr-regale { padding: clamp(8px, 1.4vw, 20px); gap: clamp(10px, 1.6vw, 28px); }
.rs .rr-arbeitsplatz { min-width: clamp(110px, 10vw, 200px); min-height: clamp(80px, 9vw, 170px); font-size: clamp(1rem, 1.6vw, 1.8rem); }
.rs .rr-legende { font-size: clamp(.95rem, 1.3vw, 1.4rem); }
.rs-abschnitt h2 { margin: 0 0 10px; font-size: clamp(1.25rem, 2.2vw, 2.2rem); color: var(--sand); }
.rs-liste { display: grid; gap: 10px; }
.rs-zeile {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 18px; align-items: center;
  background: var(--ink-3); border: 2px solid var(--linie-zart); border-left: 10px solid rgb(var(--blau-rgb));
  border-radius: var(--r-klein); padding: clamp(10px, 1.2vw, 18px) clamp(12px, 1.6vw, 24px);
}
.rs-zeile--vorgegeben { border-color: rgb(var(--blau-rgb)); background: rgba(var(--blau-rgb), .16); }
.rs-zeile--weg { border-left-color: var(--smoke-dim); opacity: .7; }
.rs-zeile__links { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.rs-zeile__oben { display: flex; flex-wrap: wrap; gap: 4px 16px; align-items: baseline; }
.rs-zeile__nummer { font-family: var(--ff-display); font-weight: 700; font-size: clamp(1.4rem, 2.6vw, 2.6rem); }
.rs-zeile__dekor { font-size: clamp(1.15rem, 2vw, 2rem); font-weight: 600; overflow-wrap: anywhere; }
.rs-zeile__klartext, .rs-zeile__auftrag { color: var(--smoke); font-size: clamp(1rem, 1.6vw, 1.6rem); overflow-wrap: anywhere; }
.rs-zeile__mass { font-size: clamp(1.15rem, 2vw, 2rem); }
.rs-zeile__fach {
  text-align: center; font-family: var(--ff-display); font-weight: 700;
  font-size: clamp(1.6rem, 3.4vw, 3.6rem); line-height: 1.05;
  padding: 6px 14px; border-radius: var(--r-klein); background: rgba(var(--blau-rgb), .3); color: var(--bone);
  min-width: 3.4em;
}
.rs-zeile__fach--neu { background: rgba(var(--bone-rgb), .08); font-size: clamp(1.2rem, 2.2vw, 2.2rem); max-width: 9em; }
.rs-zeile__fach small { display: block; font-family: var(--ff-text); font-weight: 600; font-size: .4em; color: var(--smoke); }
.rs-auftrag-kopf { margin: 14px 0 6px; font-size: clamp(1.05rem, 1.8vw, 1.8rem); color: var(--smoke); font-weight: 600; }
.rs-auftrag-kopf:first-child { margin-top: 0; }
.rs-leer { color: var(--smoke); font-size: clamp(1.1rem, 1.8vw, 1.8rem); margin: 0; }
.rs-fuss { margin-top: auto; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; color: var(--smoke-dim); }
.rs-fuss .knopf { width: auto; }
