/* Das Arbeitslicht (js/arbeitslicht.js): Die Vorstellung ruht. Flaches, helles Licht statt Scheinwerfer; Saum und Leiste
   schlicht im Saal-Ton, kein Bällebad, keine Puppen, kein Dunst, kein Konfetti. Die Schilder stehen gerade und ohne Stab,
   und was die beiden geschrieben haben, steht gemischt statt in Versalien: Im Arbeitslicht wird gelesen, nicht gemalt.
   Die Farben bleiben die der Spielzeit: Vorn wird der Rundhorizont zu seinem Taglicht-Ton (--prospekt-blass), hinten
   bleibt der Nessel als blasses Leinen, damit man weiter sieht, wo man ist. */

/* Der Schalter steht immer im Saum; Leiste und Schnellzeile gibt es nur im Arbeitslicht */
.knopf-arbeitslicht[aria-pressed="true"] { background: var(--spot); color: var(--tinte); }
.knopf-arbeitslicht[aria-pressed="true"] svg { filter: none; }
.arbeitsleiste, .schnellzeile { display: none; }

:root.arbeitslicht {
  --saum-h: 52px;
  --al-leiste: 60px;
  --al-grund: color-mix(in oklab, var(--prospekt-blass) 70%, var(--weiss));
  --al-grund-hinten: color-mix(in oklab, #D2BF9A 34%, var(--weiss));
  --al-kante: 2px;
  --al-schatten: 0 1px 0 color-mix(in srgb, var(--tinte) 22%, transparent), 0 4px 10px -4px color-mix(in srgb, var(--wurf) 30%, transparent);
  --al-schatten-hoch: 0 1px 0 color-mix(in srgb, var(--tinte) 26%, transparent), 0 10px 20px -8px color-mix(in srgb, var(--wurf) 36%, transparent);
  --al-hover: color-mix(in srgb, var(--weiss) 13%, var(--saal));
}
@media (min-width: 900px) {
  :root.arbeitslicht { --saum-h: 60px; --al-leiste: 0px; }
}

/* ---------- Was ruht ---------- */

/* nichts atmet, wabert, flackert oder federt; Übergänge (Hover, Farbe) bleiben */
:root.arbeitslicht :is(.saal, .rueckseite, .puppen, .vorbuehne, .rampe, .tuer, .neu-schild) *,
:root.arbeitslicht :is(.saal, .rueckseite, .puppen, .vorbuehne, .rampe, .tuer, .neu-schild) *::before,
:root.arbeitslicht :is(.saal, .rueckseite, .puppen, .vorbuehne, .rampe, .tuer, .neu-schild) *::after { animation: none !important; }

:root.arbeitslicht :is(.prospekt, .kulisse, .dunst, .umbau, .bp-ebene, .knopf-hinten, .bild-name, .souffleur-seil, .schiene,
  .schild-stab, .schild-fuss, .schild-kiste, .zwecke, .disco-kugel, .disco-licht, .disco-luft, .disco-schalter) { display: none !important; }
/* Bad, Puppen und Tür bleiben vermessen und kommen beim Ausschalten genau so zurück, nur unsichtbar und nicht erreichbar */
:root.arbeitslicht :is(.vorbuehne, .puppen, .rampe, .konfetti, .neu-schild, .tuer, .lichterkette, .gucker, .kanone, .sack) {
  visibility: hidden !important; pointer-events: none !important;
}
:root.arbeitslicht .saal::before, :root.arbeitslicht .saal::after { content: none; }

/* ---------- Der Saal ---------- */

:root.arbeitslicht .saal {
  inset: 0 0 calc(var(--al-leiste) + var(--sicher-unten)) 0;
  grid-template-rows: auto auto auto minmax(0, 1fr);
  background: var(--al-grund);
}
:root.arbeitslicht.hinten .saal { background: var(--al-grund-hinten); }
:root.arbeitslicht .saum { grid-row: 1; }
:root.arbeitslicht .schnellzeile { grid-row: 2; }
:root.arbeitslicht .suchleiste { grid-row: 3; }
:root.arbeitslicht .buehne { grid-row: 4; padding-bottom: 40px; scroll-padding-bottom: 24px; }
@media (min-width: 900px) {
  :root.arbeitslicht :is(.buehne, .suchleiste) { margin: 0; }
  :root.arbeitslicht .buehne { padding-inline: 28px; }
  :root.arbeitslicht .suchleiste { padding-inline: 28px; }
  :root.arbeitslicht .zeitleiste { margin-inline: -28px; padding-inline: 28px; scroll-padding-inline: 28px; }
  :root.arbeitslicht .reihe-schilder { margin-inline: -42px -28px; padding-inline: 46px; scroll-padding-inline: 46px; }
}

/* ---------- Der Saum: schlicht im Saal-Ton, die Leuchtschrift ist aus ---------- */

:root.arbeitslicht .saum { background: var(--saal); color: var(--weiss); filter: none; }
:root.arbeitslicht .saum::after { content: none; }
:root.arbeitslicht .saum-innen { gap: 2px; }
:root.arbeitslicht .marke { height: 22px; opacity: .8; }
:root.arbeitslicht .marke .neon-licht { opacity: 0 !important; }
:root.arbeitslicht .marke .neon-glas { filter: none; }
:root.arbeitslicht .titelblock { justify-content: center; }
:root.arbeitslicht .knopf-rund { color: var(--weiss); }
:root.arbeitslicht .knopf-rund svg { filter: none; }
:root.arbeitslicht .knopf-rund:hover { background: var(--al-hover); }
:root.arbeitslicht .knopf-rund[aria-expanded="true"], :root.arbeitslicht .knopf-arbeitslicht[aria-pressed="true"] { background: var(--spot); color: var(--tinte); }

/* ---------- Die Leiste mit den Bühnenbildern ---------- */

/* am Handy unten, wo vorher das Bad lag: in Daumennähe */
:root.arbeitslicht .arbeitsleiste {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 45;
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); align-items: center;
  height: calc(var(--al-leiste) + var(--sicher-unten));
  padding: 0 max(4px, env(safe-area-inset-right)) var(--sicher-unten) max(4px, env(safe-area-inset-left));
  background: var(--saal); box-shadow: 0 -1px 0 color-mix(in srgb, var(--weiss) 10%, transparent);
}
/* dort steht sie neben dem Saal, nicht in ihm (js/arbeitslicht.js): Ist er zu, ist sie es auch */
#saal[hidden] + .arbeitsleiste { display: none; }
.arbeitsleiste a {
  display: grid; justify-items: center; align-content: center; gap: 4px; min-height: 52px; padding: 2px 0;
  color: color-mix(in srgb, var(--weiss) 74%, var(--saal)); text-decoration: none;
  font: 700 12px/1 var(--schrift); letter-spacing: .01em; -webkit-tap-highlight-color: transparent;
}
.arbeitsleiste svg { box-sizing: content-box; width: 22px; height: 22px; padding: 3px 14px; border-radius: 999px; transition: background-color .2s var(--aus), color .2s var(--aus); }
.arbeitsleiste a:hover svg { background: var(--al-hover); }
.arbeitsleiste a[aria-current="page"] { color: var(--weiss); }
.arbeitsleiste a[aria-current="page"] svg { background: var(--spot); color: var(--tinte); }
:where(:root:not(.lichter)) .arbeitsleiste a:focus-visible { outline: 0; box-shadow: none; }
:where(:root:not(.lichter)) .arbeitsleiste a:focus-visible svg { outline: 3px solid var(--spot); outline-offset: 2px; }

/* am Rechner im Saum, zwischen Wortmarke und Knöpfen */
@media (min-width: 900px) {
  :root.arbeitslicht .titelblock { flex: 0 0 auto; }
  :root.arbeitslicht .marke { height: 24px; }
  :root.arbeitslicht .arbeitsleiste {
    position: static; display: flex; gap: 2px; height: auto; margin: 0 auto; padding: 0; background: none; box-shadow: none;
  }
  .arbeitsleiste a { display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px 0 11px; border-radius: 999px; font-size: 15px; transition: background-color .2s var(--aus); }
  .arbeitsleiste svg { width: 20px; height: 20px; padding: 0; background: none !important; }
  .arbeitsleiste a:hover { background: var(--al-hover); color: var(--weiss); }
  .arbeitsleiste a[aria-current="page"] { background: var(--spot); color: var(--tinte); }
  :where(:root:not(.lichter)) .arbeitsleiste a:focus-visible { outline: 3px solid var(--spot); outline-offset: 2px; }
  :where(:root:not(.lichter)) .arbeitsleiste a:focus-visible svg { outline: 0; }
}
@media (min-width: 900px) and (max-width: 1080px) {
  .arbeitsleiste a { padding: 0 10px; font-size: 14px; gap: 6px; }
}

/* ---------- Die Zeile für die neue Idee ---------- */

:root.arbeitslicht .schnellzeile {
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; position: relative; z-index: 15;
  padding: 10px max(14px, env(safe-area-inset-right)) 10px max(14px, env(safe-area-inset-left));
  border-bottom: 1px solid color-mix(in srgb, var(--tinte) 12%, transparent);
}
.sz-reihe, .sz-wahl { width: 100%; max-width: 780px; margin: 0 auto; }
.sz-reihe { display: flex; gap: 8px; }
.sz-feld {
  flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 14px 0 12px;
  background: var(--weiss); border: var(--al-kante) solid var(--tinte); border-radius: var(--rund); cursor: text;
  transition: box-shadow .15s var(--aus);
}
.sz-feld svg { width: 20px; height: 20px; color: var(--tinte-leise); }
.sz-feld input { flex: 1; min-width: 0; margin: 0; padding: 12px 0; border: 0; outline: 0; background: none; font: 600 17px/1.3 var(--schrift); }
.sz-feld input::placeholder { color: var(--platzhalter); opacity: 1; }
.sz-feld:focus-within { box-shadow: 0 0 0 3px var(--spot), 0 0 0 5px var(--tinte); }
/* den Ring trägt das ganze Feld, nicht die Eingabe darin; der Titel der Rückseite hat seinen Textmarker */
.sz-feld input:focus-visible, :root.arbeitslicht :is(.suchfeld input, .rs-titel):focus-visible { outline: 0; box-shadow: none; }
.sz-feld:focus-within svg { color: var(--tinte); }
.schnellzeile .knopf { min-height: 48px; flex: none; border-width: var(--al-kante); }
/* am Handy erst, wenn man schreibt: vorher hat das Feld die ganze Breite, und Enter stellt auch auf */
@media (max-width: 559px) {
  .schnellzeile:is(:not(.offen), :has(input:placeholder-shown)) .knopf { display: none; }
  .schnellzeile .knopf { padding: 0 14px; font-size: 14px; }
}
/* Wem, Kategorie, Nur ich: eine wischbare Reihe, damit die Liste darunter nicht wegspringt */
.sz-wahl {
  display: flex; align-items: center; gap: 6px; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none;
  margin-block: -2px -4px; padding: 2px 2px 4px;
}
.sz-wahl::-webkit-scrollbar { display: none; }
.sz-wahl[hidden] { display: none; }
.sz-gruppe { display: flex; gap: 6px; flex: none; }
.sz-gruppe:empty { display: none; }
.sz-gruppe + .sz-gruppe, .sz-gruppe + .wahl { margin-left: 4px; padding-left: 10px; border-left: 2px solid color-mix(in srgb, var(--tinte) 16%, transparent); }
.sz-wahl .wahl { flex: none; min-height: 40px; border-width: var(--al-kante); box-shadow: none; white-space: nowrap; }
.sz-wahl .wahl[aria-checked="true"], .sz-wahl .wahl[aria-pressed="true"] { background: var(--spot); }
.sz-wahl .wahl svg { width: 16px; height: 16px; }
.sz-wahl .koepfchen { width: 22px; height: 26px; margin: -4px 0 -4px -4px; }
.sz-wahl .koepfchen + .koepfchen { margin-left: -10px; }

/* ---------- Die Suchleiste ---------- */

:root.arbeitslicht .suchleiste { padding-top: 10px; padding-bottom: 10px; background: color-mix(in oklab, var(--al-grund) 80%, var(--tinte)); border-bottom: 0; }
:root.arbeitslicht .suchfeld { border-width: var(--al-kante); }

/* ---------- Schilder: gerade, ohne Stab, gelesen ---------- */

:root.arbeitslicht .schild-platte {
  gap: 6px; padding: 10px 12px 9px; transform: none;
  background: var(--weiss); border-width: var(--al-kante); box-shadow: var(--al-schatten);
}
:root.arbeitslicht .schild:hover .schild-platte { transform: none; box-shadow: var(--al-schatten-hoch); }
:root.arbeitslicht .schild.zieht .schild-platte { transform: scale(1.02); box-shadow: var(--versatz-hoch); }
:root.arbeitslicht .schild.im-spot .schild-platte { background: color-mix(in oklab, var(--spot) 62%, var(--weiss)); }
:root.arbeitslicht .schild.gedimmt { opacity: .34; }
:root.arbeitslicht .schild-titel {
  font: 800 17px/1.25 var(--schrift); text-transform: none; letter-spacing: 0; -webkit-line-clamp: 4; padding-right: 32px;
}
:root.arbeitslicht .schild-platte:has(.koepfchen + .koepfchen) .schild-titel { padding-right: 46px; }
:root.arbeitslicht .feld .schild-titel { font-size: 16px; }
@media (min-width: 900px) { :root.arbeitslicht .feld .schild-titel { font-size: 17px; } }
/* das Köpfchen klebt nicht mehr über der Kante, es sitzt in der Ecke */
:root.arbeitslicht .koepfe { right: 7px; top: 6px; }
:root.arbeitslicht .koepfe .koepfchen { width: 26px; height: 30px; filter: none; }
:root.arbeitslicht .koepfe .koepfchen + .koepfchen { margin-right: -10px; transform: none; }
/* der Stempel wird zum Etikett über dem Titel */
:root.arbeitslicht .schild-platte > .stempel {
  position: static; order: -1; justify-self: start; transform: none;
  padding: 3px 6px 2px; font-size: 12px; border-width: 2px;
}
:root.arbeitslicht .schild-fuss-zeile { font-size: 13px; }
:root.arbeitslicht .feld .schild.hinten { scale: 1; filter: none; }
:root.arbeitslicht .feld .schild.hinten .schild-platte { box-shadow: var(--al-schatten); }

/* ---------- Bühnenbilder ---------- */

:root.arbeitslicht :is(.gasse-kopf, .abschnitt-kopf, .leer-tafel, .aushang-kopf) { transform: none; rotate: none; }
:root.arbeitslicht :is(.gasse-kopf, .abschnitt-kopf) { font-size: 15px; letter-spacing: .04em; padding: 8px 11px 7px; }
:root.arbeitslicht .gasse[data-status="laeuft"]::before { content: none; }
:root.arbeitslicht .board { padding-top: 16px; }
:root.arbeitslicht .gasse { gap: 12px; padding-bottom: 20px; }
:root.arbeitslicht .gasse-unter { margin-top: -6px; }
:root.arbeitslicht .spielplan { padding-top: 16px; gap: 20px; }
:root.arbeitslicht .monat-schilder { gap: 14px; padding-top: 6px; }
:root.arbeitslicht .monat-name { border-width: var(--al-kante); box-shadow: none; }
:root.arbeitslicht .reihe-schilder { padding-top: 12px; padding-bottom: 24px; }
:root.arbeitslicht .leer-tafel { border-width: var(--al-kante); box-shadow: var(--al-schatten); }
/* der Programmzettel wird breiter und liegt flach */
:root.arbeitslicht .zettel { max-width: 960px; margin-top: 14px; border-width: var(--al-kante); border-radius: 8px; box-shadow: var(--al-schatten); }
:root.arbeitslicht .zettel-kopf h2 { font-size: clamp(22px, 5vw, 30px); }
:root.arbeitslicht .zettel-kopf { border-bottom-width: 2px; border-bottom-style: solid; }

/* ---------- Hinterbühne: kein Brett, kein Tisch, dieselben Zettel und Schilder ---------- */

:root.arbeitslicht .hinterbuehne { padding-top: 16px; gap: 22px; }
@media (min-width: 900px) { :root.arbeitslicht .hinterbuehne { padding-top: 20px; gap: 28px; } }
:root.arbeitslicht :is(.aushang, .tisch) { background: none; border: 0; box-shadow: none; padding: 0; }
:root.arbeitslicht :is(.aushang, .tisch)::before, :root.arbeitslicht :is(.aushang, .tisch, .tisch-zone + .tisch-zone, .kiste)::after { content: none; }
:root.arbeitslicht .tisch-zone { padding: 6px 0 18px; }
:root.arbeitslicht .tisch-zone::before { content: none; }
:root.arbeitslicht .tisch-reihe { justify-content: flex-start; gap: 14px; padding-inline: 0 !important; }
:root.arbeitslicht :is(.tisch-zone[data-status="idee"] .schild:not(.zieht), .kiste .schild) .schild-platte { scale: none; filter: none; box-shadow: var(--al-schatten); }
/* die Beschriftung der Plätze: Tafeln wie im Board statt Klebeband */
:root.arbeitslicht .band { margin-bottom: 12px; rotate: none; -webkit-mask-image: none; mask-image: none; background: var(--tinte); color: var(--weiss); letter-spacing: .04em; padding: 8px 11px 7px; border-radius: 6px; }
:root.arbeitslicht .band small { color: var(--bretter); }
:root.arbeitslicht .tisch-zone[data-status="laeuft"] .band { background: var(--spot); color: var(--tinte); box-shadow: inset 0 0 0 2px var(--tinte); }
:root.arbeitslicht .tisch-zone[data-status="laeuft"] .band small { color: var(--tinte-leise); }
:root.arbeitslicht .zone-leer { color: var(--tinte-leise); text-align: left; padding-inline: 0; }
:root.arbeitslicht .umriss { border: 2px dashed color-mix(in srgb, var(--tinte) 35%, transparent); color: var(--tinte); }
/* die Bravo-Kiste ist ein schlichter Kasten mit ihrem Stempel */
:root.arbeitslicht .kiste { justify-items: start; padding: 6px 0 18px; }
:root.arbeitslicht .kiste-deckel { background: var(--weiss); border-width: var(--al-kante); border-radius: 8px; box-shadow: var(--al-schatten); min-height: 76px; }
:root.arbeitslicht .kiste-deckel:hover, :root.arbeitslicht .kiste.offen .kiste-deckel { transform: none; box-shadow: var(--al-schatten-hoch); }
:root.arbeitslicht :is(.kiste-wort, .kiste-zahl) { rotate: none; }
:root.arbeitslicht .kiste-wort { font-size: 17px; }
:root.arbeitslicht :is(.anschlag, .aushang-leer) { rotate: none; transform: none; border-width: var(--al-kante); box-shadow: var(--al-schatten); }
:root.arbeitslicht .anschlag-titel { font: 800 15px/1.25 var(--schrift); text-transform: none; }
:root.arbeitslicht .anschlag .stempel.neu { transform: none; top: -10px; right: 8px; }
/* die Tafel war aufs Brett genagelt und ragte darüber; ohne Brett steht sie im Fluss über ihren Zetteln */
:root.arbeitslicht .aushang-kopf { margin: 0 0 12px; font-size: 15px; letter-spacing: .04em; padding: 8px 11px 7px; box-shadow: none; }
:root.arbeitslicht .tagesplan { transform: none; background: var(--weiss); border-width: var(--al-kante); border-radius: 8px; box-shadow: var(--al-schatten); }
:root.arbeitslicht .tp-kopf { border-bottom: 2px solid var(--tinte); }
:root.arbeitslicht .tp-kopf h2 { font-size: 17px; letter-spacing: .04em; }
:root.arbeitslicht .tp-stempel { transform: none; }
:root.arbeitslicht .anschlag-stapel::before, :root.arbeitslicht .anschlag-stapel::after { transform: none; }

/* ---------- Rückseite ---------- */

:root.arbeitslicht .rueckseite, :root.arbeitslicht .rueckseite-platte { max-height: calc(100dvh - env(safe-area-inset-top, 0px) - 12px); }
:root.arbeitslicht .rueckseite-platte { border-width: var(--al-kante); }
@media (min-width: 900px) {
  :root.arbeitslicht .rueckseite { inset: calc(var(--saum-h) + 12px) 14px auto auto; width: min(560px, 46vw); max-height: calc(100dvh - var(--saum-h) - 26px); }
  :root.arbeitslicht .rueckseite-platte { max-height: inherit; box-shadow: var(--al-schatten-hoch); }
}
@media (prefers-reduced-motion: no-preference) {
  :root.arbeitslicht .rueckseite .rueckseite-platte { animation: al-auf .2s var(--aus) both !important; }
}
/* nur ein kurzer Schub, keine Blende: bleibt die Animation hängen (Hintergrund-Tab), ist die Rückseite trotzdem ganz da */
@keyframes al-auf { from { transform: translateY(14px); } }
:root.arbeitslicht .rs-titel { font: 800 24px/1.2 var(--schrift); text-transform: none; }
:root.arbeitslicht .todo-name { font: 800 16px/1.2 var(--schrift); text-transform: none; letter-spacing: 0; }

/* ---------- Der Souffleur hängt nicht, er reicht nur seinen Zettel herein ---------- */

:root.arbeitslicht .souffleur { inset: auto 0 0 0; z-index: 40; }
:root.arbeitslicht .souffleur-blase {
  left: 50%; right: auto; top: auto; bottom: 14px; translate: -50% 0;
  max-width: min(460px, calc(100vw - 28px)); border-width: var(--al-kante); box-shadow: var(--al-schatten-hoch);
  transform: translateY(10px); transition-delay: 0s; transition-duration: .18s;
}
:root.arbeitslicht .souffleur-blase.da { transform: none; transition-delay: 0s; }
:root.arbeitslicht .souffleur-blase::after { content: none; }
