/* AO7 Büro – hell, klar, Plus Jakarta Sans (lokal), Squircle-Symbole. Die Büroszene darf bunt sein. */
@font-face {
  font-family: 'Plus Jakarta Sans';
  src: url('/schriften/PlusJakartaSans-var.woff2') format('woff2');
  font-weight: 200 800;
  font-display: swap;
}

:root {
  --grund: #F4F6F9;
  --karte: #FFFFFF;
  --karte-2: #F8FAFC;
  --karte-3: #ECEAE5;
  --tinte: #0A0D14;
  --tinte-2: #5A6474;
  --tinte-3: #9AA4B2;
  --rand: rgba(11, 18, 32, .07);
  --rand-2: rgba(11, 18, 32, .12);
  --hoch: #0FA968;
  --runter: #E5484D;
  --achtung: #F79009;
  --blau: #2563EB;
  --schatten: 0 1px 2px rgba(11, 18, 32, .04), 0 4px 14px rgba(11, 18, 32, .06), 0 18px 40px -18px rgba(11, 18, 32, .16);
  --schatten-hoch: 0 2px 4px rgba(11, 18, 32, .05), 0 12px 28px rgba(11, 18, 32, .10), 0 30px 60px -24px rgba(11, 18, 32, .22);
  --kurve: cubic-bezier(.22, .8, .28, 1);
  --radius: 20px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  background: var(--grund);
  color: var(--tinte);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: tabular-nums;
  overscroll-behavior-y: none;
}
button, input, textarea, select { font: inherit; color: inherit; }
a { color: var(--blau); }
h1, h2, h3 { letter-spacing: -.025em; margin: 0; line-height: 1.2; }
[hidden] { display: none !important; }
:focus-visible { outline: 2.5px solid #5AA9FF; outline-offset: 2px; border-radius: 8px; }

/* ---------- Symbole ---------- */
.sq {
  --g: 40px;
  width: var(--g); height: var(--g); flex: none;
  display: inline-grid; place-items: center;
  border-radius: 28%;
  color: #fff;
  background: linear-gradient(180deg, rgba(255, 255, 255, .34), transparent 52%), linear-gradient(155deg, var(--a), var(--b));
  box-shadow: inset 0 0 0 .5px rgba(255, 255, 255, .42), 0 6px 14px -6px var(--b);
  transition: transform .35s var(--kurve);
}
.glyph { display: block; }

/* ---------- Kopf ---------- */
.kopf {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 14px;
  padding: calc(10px + env(safe-area-inset-top)) 22px 10px;
  background: rgba(244, 246, 249, .82);
  backdrop-filter: saturate(1.6) blur(14px);
  -webkit-backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid var(--rand);
}
.marke { display: flex; align-items: center; gap: 11px; text-decoration: none; color: inherit; }
.marke-zeichen {
  width: 38px; height: 38px; border-radius: 28%;
  display: grid; place-items: center;
  font-weight: 800; font-size: 13px; letter-spacing: -.02em; color: #fff;
  background: linear-gradient(180deg, rgba(255, 255, 255, .3), transparent 55%), linear-gradient(155deg, #3A4256, #0A0D14);
  box-shadow: inset 0 0 0 .5px rgba(255, 255, 255, .3), 0 6px 14px -6px #0A0D14;
}
.marke-text b { display: block; font-size: 16px; font-weight: 800; letter-spacing: -.02em; }
.marke-text b span { display: inline; }
.marke-unter { display: block; font-size: 12.5px; color: var(--tinte-2); }
.gruss-wort { background: linear-gradient(100deg, #7C3AED, #2563EB 60%, #0FA968); -webkit-background-clip: text; background-clip: text; color: transparent; }
.kopf-rechts { margin-left: auto; display: flex; gap: 8px; align-items: center; }

.knopf {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; cursor: pointer;
  padding: 10px 16px; border-radius: 13px;
  font-weight: 700; font-size: 14.5px;
  background: var(--karte); color: var(--tinte);
  box-shadow: 0 0 0 1px var(--rand-2), 0 1px 2px rgba(11, 18, 32, .05);
  transition: transform .25s var(--kurve), box-shadow .25s var(--kurve), background .2s;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
.knopf:hover { transform: translateY(-1px); box-shadow: 0 0 0 1px var(--rand-2), 0 6px 16px -6px rgba(11, 18, 32, .2); }
.knopf:active { transform: translateY(0) scale(.98); }
.knopf.primaer { background: #0A0D14; color: #fff; box-shadow: 0 8px 20px -8px rgba(10, 13, 20, .55); }
.knopf.gruen { background: linear-gradient(155deg, #22C55E, #0FA968); color: #fff; box-shadow: 0 8px 20px -8px #0FA968; }
.knopf.rot { background: #fff; color: var(--runter); box-shadow: 0 0 0 1px rgba(229, 72, 77, .35); }
.knopf.gelb { background: #fff; color: #B54708; box-shadow: 0 0 0 1px rgba(247, 144, 9, .4); }
.knopf.rund { width: 42px; height: 42px; padding: 0; border-radius: 13px; }
.knopf.klein { padding: 7px 12px; font-size: 13px; border-radius: 11px; }
.knopf:disabled { opacity: .5; pointer-events: none; }

/* ---------- Büro-Layout ---------- */
.buero-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 20px;
  padding: 18px 22px 28px;
  max-width: 1680px; margin: 0 auto;
}
.szene-karte {
  position: relative;
  background: radial-gradient(120% 90% at 50% 10%, #FFFFFF 0%, #EEF2F8 60%, #E6ECF5 100%);
  border-radius: 26px;
  box-shadow: var(--schatten);
  overflow: hidden;
  height: calc(100vh - 100px);
  min-height: 520px;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
.szene-karte[data-ansicht="kacheln"] { height: auto; min-height: 0; touch-action: auto; background: transparent; box-shadow: none; overflow: visible; }
.szene-flaeche { position: absolute; inset: 0; cursor: grab; }
.szene-flaeche.ziehen { cursor: grabbing; }
.szene-flaeche svg { width: 100%; height: 100%; display: block; }
.szene-werkzeuge { position: absolute; z-index: 3; right: 14px; bottom: 14px; display: flex; flex-direction: column; gap: 8px; }
.szene-werkzeuge .knopf { width: 40px; height: 40px; padding: 0; border-radius: 12px; background: rgba(255, 255, 255, .92); }
.szene-kopf { position: absolute; z-index: 3; left: 14px; top: 14px; right: 14px; display: flex; gap: 10px; align-items: flex-start; pointer-events: none; }
.szene-kopf > * { pointer-events: auto; }
.umschalter { display: inline-flex; padding: 4px; gap: 2px; background: rgba(255, 255, 255, .9); border-radius: 14px; box-shadow: 0 0 0 1px var(--rand-2), 0 4px 12px -6px rgba(11, 18, 32, .2); backdrop-filter: blur(8px); }
.umschalter button { border: 0; background: transparent; padding: 7px 12px; border-radius: 10px; font-weight: 700; font-size: 13px; color: var(--tinte-2); display: inline-flex; gap: 6px; align-items: center; cursor: pointer; }
.umschalter button[aria-pressed="true"] { background: #0A0D14; color: #fff; }
.legende { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; background: rgba(255, 255, 255, .9); box-shadow: 0 0 0 1px var(--rand); font-size: 12px; font-weight: 600; color: var(--tinte-2); white-space: nowrap; }
.punkt { width: 8px; height: 8px; border-radius: 50%; background: var(--tinte-3); flex: none; }
.punkt.arbeitet { background: #0FA968; box-shadow: 0 0 0 3px rgba(15, 169, 104, .18); }
.punkt.wartet { background: #F79009; box-shadow: 0 0 0 3px rgba(247, 144, 9, .18); }
.punkt.fehler { background: #E5484D; box-shadow: 0 0 0 3px rgba(229, 72, 77, .2); }
.punkt.bereit { background: #2563EB; box-shadow: 0 0 0 3px rgba(37, 99, 235, .16); }
.punkt.frei { background: #9AA4B2; }
.punkt.besprechung { background: #8B5CF6; box-shadow: 0 0 0 3px rgba(139, 92, 246, .18); }

.seite { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.karte { background: var(--karte); border-radius: var(--radius); box-shadow: var(--schatten); padding: 18px; }
.karte h2 { font-size: 16px; font-weight: 800; }
.karte-kopf { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.karte-kopf .rechts { margin-left: auto; }
.klein-text { font-size: 12.5px; color: var(--tinte-2); }
.leise { color: var(--tinte-3); }

/* CEO-Karte */
.ceo-karte { position: relative; overflow: hidden; cursor: pointer; transition: transform .3s var(--kurve), box-shadow .3s var(--kurve); }
.ceo-karte:hover { transform: translateY(-2px); box-shadow: var(--schatten-hoch); }
.ceo-karte::after { content: ''; position: absolute; inset: auto -40px -60px auto; width: 180px; height: 180px; border-radius: 50%; background: radial-gradient(circle, rgba(181, 123, 255, .16), transparent 70%); }
.ceo-zahlen { display: flex; align-items: flex-end; gap: 16px; }
.ceo-zahl { font-size: 44px; font-weight: 800; letter-spacing: -.04em; line-height: 1; }
.ceo-zahl small { font-size: 14px; font-weight: 700; color: var(--tinte-2); letter-spacing: 0; margin-left: 4px; }
.mini-stapel { width: 132px; margin: -14px -6px -8px auto; flex: none; }
.mini-stapel svg { width: 100%; height: auto; display: block; }
.ceo-zeilen { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.ceo-zeile { flex: 1; min-width: 110px; display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 14px; background: var(--karte-2); box-shadow: 0 0 0 1px var(--rand); text-decoration: none; color: inherit; }
.ceo-zeile b { font-size: 18px; display: block; line-height: 1.1; }
.ceo-zeile span { font-size: 12px; color: var(--tinte-2); }

/* Team-Liste und Ticker */
.team-liste { display: flex; flex-direction: column; gap: 2px; }
.team-zeile { display: flex; align-items: center; gap: 11px; padding: 8px; border-radius: 13px; text-decoration: none; color: inherit; transition: background .2s; }
.team-zeile:hover { background: var(--karte-2); }
.team-zeile .text { min-width: 0; flex: 1; }
.team-zeile b { font-size: 14px; display: block; }
.team-zeile .unter { font-size: 12.5px; color: var(--tinte-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.ticker { display: flex; flex-direction: column; gap: 10px; max-height: 300px; overflow: auto; }
.ticker-zeile { display: flex; gap: 10px; font-size: 13px; line-height: 1.4; }
.ticker-zeile .zeit { color: var(--tinte-3); font-size: 11.5px; white-space: nowrap; min-width: 54px; }

/* Kacheln */
.kacheln { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.kachel { background: var(--karte); border-radius: var(--radius); box-shadow: var(--schatten); padding: 16px; text-decoration: none; color: inherit; display: flex; flex-direction: column; gap: 12px; transition: transform .3s var(--kurve), box-shadow .3s var(--kurve); position: relative; }
.kachel:hover { transform: translateY(-3px); box-shadow: var(--schatten-hoch); }
.kachel:hover .sq { transform: scale(1.06); }
.kachel-kopf { display: flex; gap: 12px; align-items: center; }
.kachel-kopf b { display: block; font-size: 15.5px; }
.kachel-kopf span { font-size: 12.5px; color: var(--tinte-2); }
.kachel .auftrag { font-size: 13.5px; font-weight: 600; min-height: 40px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.kachel-status { display: flex; flex-wrap: wrap; gap: 6px; }
.kachel-status .status { white-space: normal; }
.kachel .auftrag.leer { color: var(--tinte-3); font-weight: 500; }
.portrait { width: 52px; height: 52px; border-radius: 16px; flex: none; overflow: hidden; background: linear-gradient(160deg, #F1F5FB, #E3E9F3); box-shadow: inset 0 0 0 1px var(--rand); }
.portrait svg { width: 100%; height: 100%; display: block; }
.portrait img { width: 100%; height: 100%; display: block; object-fit: cover; }
.foto { width: var(--g, 40px); height: var(--g, 40px); flex: none; border-radius: 32%; object-fit: cover; background: #E9EDF3; box-shadow: 0 0 0 1px var(--rand), 0 4px 10px -6px rgba(10, 13, 20, .35); }
.status { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; padding: 4px 9px; border-radius: 999px; background: var(--karte-2); color: var(--tinte-2); box-shadow: 0 0 0 1px var(--rand); white-space: nowrap; }
.status.arbeitet { color: #067647; background: #ECFDF3; box-shadow: 0 0 0 1px #ABEFC6; }
.status.wartet { color: #B54708; background: #FFFAEB; box-shadow: 0 0 0 1px #FEDF89; }
.status.fehler { color: #B42318; background: #FEF3F2; box-shadow: 0 0 0 1px #FECDCA; }
.status.bereit { color: #1849A9; background: #EFF8FF; box-shadow: 0 0 0 1px #B2DDFF; }
.status.besprechung { color: #6D28D9; background: #F5F3FF; box-shadow: 0 0 0 1px #DDD6FE; }
.fortschritt { height: 7px; border-radius: 99px; background: #EEF1F5; overflow: hidden; }
.fortschritt i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--a, #5AA9FF), var(--b, #2563EB)); transition: width .6s var(--kurve); }

.fab { display: none; }

/* ---------- Blätter (Detailseiten) ---------- */
#blatt-huelle { position: fixed; inset: 0; z-index: 50; display: flex; justify-content: flex-end; }
.blatt-schleier { position: absolute; inset: 0; background: rgba(15, 22, 40, .28); backdrop-filter: blur(2px); animation: einblenden .25s var(--kurve); }
.blatt {
  position: relative; z-index: 1;
  width: min(620px, 100%); height: 100%;
  background: var(--grund);
  box-shadow: -20px 0 60px -20px rgba(11, 18, 32, .35);
  display: flex; flex-direction: column;
  animation: hereinschieben .38s var(--kurve);
}
.blatt-kopf { display: flex; align-items: center; gap: 12px; padding: calc(14px + env(safe-area-inset-top)) 18px 14px; background: rgba(244, 246, 249, .9); backdrop-filter: blur(12px); border-bottom: 1px solid var(--rand); }
.blatt-kopf h1 { font-size: 18px; font-weight: 800; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.blatt-inhalt { flex: 1; overflow: auto; padding: 18px 18px calc(28px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 14px; }
.blatt-fuss { padding: 12px 18px calc(12px + env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid var(--rand); display: flex; gap: 10px; flex-wrap: wrap; }
.blatt-fuss .knopf { flex: 1; min-width: 120px; }
@keyframes hereinschieben { from { transform: translateX(40px); opacity: 0; } }
@keyframes einblenden { from { opacity: 0; } }

.reiter { display: flex; gap: 4px; padding: 4px; background: #E9EDF3; border-radius: 14px; }
.reiter button { flex: 1; border: 0; background: transparent; padding: 8px 10px; border-radius: 11px; font-weight: 700; font-size: 13.5px; color: var(--tinte-2); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.reiter button[aria-selected="true"] { background: #fff; color: var(--tinte); box-shadow: 0 1px 3px rgba(11, 18, 32, .1); }
.zahl-blase { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: var(--runter); color: #fff; font-size: 11.5px; font-weight: 800; display: inline-grid; place-items: center; }
.zahl-blase.blau { background: var(--blau); }

/* Papier-Liste (Stapel) */
.papier-liste { display: flex; flex-direction: column; gap: 10px; }
.papier {
  position: relative; display: flex; gap: 12px; align-items: flex-start;
  background: #fff; border-radius: 16px; padding: 14px 14px 14px 16px;
  box-shadow: 0 1px 0 rgba(11, 18, 32, .04), 0 0 0 1px var(--rand), 0 8px 18px -12px rgba(11, 18, 32, .3);
  text-decoration: none; color: inherit;
  transition: transform .25s var(--kurve), box-shadow .25s var(--kurve);
}
.papier::before { content: ''; position: absolute; left: 0; top: 14px; bottom: 14px; width: 4px; border-radius: 0 4px 4px 0; background: var(--streifen, #F79009); }
.papier:hover { transform: translateY(-2px) rotate(-.2deg); box-shadow: 0 0 0 1px var(--rand-2), 0 14px 26px -14px rgba(11, 18, 32, .35); }
.papier .text { flex: 1; min-width: 0; }
.papier b { display: block; font-size: 14.5px; line-height: 1.35; }
.papier .meta { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; align-items: center; }
.etikett { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 700; padding: 3px 8px; border-radius: 7px; background: var(--karte-2); color: var(--tinte-2); box-shadow: 0 0 0 1px var(--rand); }
.etikett.freigabe { background: #FFF4E5; color: #B54708; box-shadow: none; }
.etikett.frage { background: #F4EBFF; color: #6941C6; box-shadow: none; }
.etikett.ansicht { background: #EFF8FF; color: #1849A9; box-shadow: none; }
.etikett.kosten { background: #FEF3F2; color: #B42318; box-shadow: none; }
.etikett.kosten.null { background: #ECFDF3; color: #067647; }
.leer-zustand { text-align: center; padding: 40px 20px; color: var(--tinte-2); }
.leer-zustand .sq { margin-bottom: 12px; }

/* Detail */
.abschnitt { background: #fff; border-radius: 18px; box-shadow: 0 0 0 1px var(--rand), 0 6px 16px -12px rgba(11, 18, 32, .2); padding: 16px; }
.abschnitt h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--tinte-3); font-weight: 800; margin-bottom: 8px; }
.abschnitt p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.wer { display: flex; align-items: center; gap: 12px; }
.wer b { display: block; }
.vorschau-gitter { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.vorschau-gitter img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 12px; box-shadow: 0 0 0 1px var(--rand); background: var(--karte-2); cursor: zoom-in; }
.link-zeile { display: flex; gap: 8px; align-items: center; padding: 8px 0; border-top: 1px solid var(--rand); font-size: 14px; overflow-wrap: anywhere; }
.link-zeile:first-of-type { border-top: 0; }
.entscheidung-box { display: flex; flex-direction: column; gap: 10px; }
.feld { display: flex; flex-direction: column; gap: 6px; }
.feld label, .feld .beschriftung { font-size: 13px; font-weight: 700; color: var(--tinte-2); }
.eingabe, textarea.eingabe, select.eingabe {
  width: 100%; border: 0; border-radius: 13px; padding: 12px 14px;
  background: #fff; box-shadow: 0 0 0 1px var(--rand-2); font-size: 15px;
  transition: box-shadow .2s;
}
.eingabe:focus { outline: none; box-shadow: 0 0 0 2px #5AA9FF; }
textarea.eingabe { min-height: 110px; resize: vertical; line-height: 1.5; }
textarea.eingabe.gross { min-height: 360px; font-size: 13.5px; font-family: ui-monospace, 'Cascadia Mono', Consolas, monospace; }
.hinweis { font-size: 12.5px; color: var(--tinte-3); display: flex; gap: 6px; align-items: center; }
.check { display: flex; gap: 8px; align-items: center; font-size: 14px; }
.check input { width: 18px; height: 18px; accent-color: #E5484D; }

.rollen-wahl { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.rollen-wahl button { position: relative; border: 0; background: #fff; border-radius: 14px; padding: 10px 8px; box-shadow: 0 0 0 1px var(--rand-2); display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; cursor: pointer; color: var(--tinte-2); transition: box-shadow .2s, transform .2s var(--kurve); }
.rollen-wahl button[aria-pressed="true"] { box-shadow: 0 0 0 2px #0A0D14; color: var(--tinte); }
.rollen-wahl .vorschlag-marke { position: absolute; top: -7px; right: -4px; font-size: 10px; padding: 2px 6px; border-radius: 6px; background: linear-gradient(135deg, #7C3AED, #2563EB); color: #fff; }
.segment { display: flex; gap: 4px; padding: 4px; background: #E9EDF3; border-radius: 13px; }
.segment button { flex: 1; border: 0; background: transparent; border-radius: 10px; padding: 8px; font-weight: 700; font-size: 13.5px; color: var(--tinte-2); cursor: pointer; }
.segment button[aria-pressed="true"] { background: #fff; color: var(--tinte); box-shadow: 0 1px 3px rgba(11, 18, 32, .12); }

/* Mitarbeiter-Seite */
.held { display: flex; gap: 16px; align-items: center; padding: 18px; border-radius: 22px; color: #fff; position: relative; overflow: hidden; background: linear-gradient(155deg, var(--a), var(--b)); box-shadow: 0 18px 36px -18px var(--b); }
.held::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(255, 255, 255, .22), transparent 55%); pointer-events: none; }
.held .portrait { width: 84px; height: 84px; border-radius: 24px; background: rgba(255, 255, 255, .92); box-shadow: 0 0 0 3px rgba(255, 255, 255, .85); }
.held h2 { font-size: 22px; font-weight: 800; }
.held .unter { opacity: .9; font-size: 14px; }
.held .status { margin-top: 8px; }
.schritte { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.schritte li { display: flex; gap: 10px; align-items: center; font-size: 14px; }
.schritte .kreis { width: 20px; height: 20px; border-radius: 50%; box-shadow: inset 0 0 0 2px #D0D5DD; display: grid; place-items: center; flex: none; }
.schritte li.fertig .kreis { background: #0FA968; box-shadow: none; color: #fff; }
.schritte li.fertig span { color: var(--tinte-2); text-decoration: line-through; text-decoration-color: rgba(90, 100, 116, .4); }
.verlauf { list-style: none; margin: 0; padding: 0; position: relative; }
.verlauf::before { content: ''; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 2px; background: #E4E7EC; border-radius: 2px; }
.verlauf li { position: relative; padding: 0 0 12px 26px; font-size: 13.5px; }
.verlauf li::before { content: ''; position: absolute; left: 2px; top: 5px; width: 12px; height: 12px; border-radius: 50%; background: #fff; box-shadow: inset 0 0 0 2.5px var(--farbe, #98A2B3); }
.verlauf .zeit { color: var(--tinte-3); font-size: 11.5px; display: block; }
.ergebnis-gitter { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.ergebnis { background: var(--karte-2); border-radius: 14px; padding: 10px; box-shadow: 0 0 0 1px var(--rand); font-size: 13px; display: flex; flex-direction: column; gap: 6px; overflow-wrap: anywhere; }
.ergebnis img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 10px; cursor: zoom-in; }
.briefing-text h1, .briefing-text h2, .briefing-text h3 { margin: 16px 0 6px; }
.briefing-text h1 { font-size: 19px; }
.briefing-text h2 { font-size: 15px; }
.briefing-text p { margin: 6px 0; white-space: normal; }
.briefing-text ul { margin: 6px 0; padding-left: 20px; }
.briefing-text li { margin: 3px 0; }
.briefing-text code { font-size: 12.5px; background: #F2F4F7; padding: 1px 5px; border-radius: 5px; }
.zeilen-liste { display: flex; flex-direction: column; }
.zeilen-liste a, .zeilen-liste .zeile { display: flex; gap: 10px; align-items: center; padding: 10px 2px; border-top: 1px solid var(--rand); text-decoration: none; color: inherit; font-size: 14px; }
.zeilen-liste > :first-child { border-top: 0; }
.zeilen-liste .rechts { margin-left: auto; }

/* Lightbox */
.leuchtkasten { position: fixed; inset: 0; z-index: 80; background: rgba(8, 12, 22, .86); display: grid; place-items: center; padding: 20px; cursor: zoom-out; animation: einblenden .2s; }
.leuchtkasten img { max-width: 100%; max-height: 100%; border-radius: 12px; box-shadow: 0 20px 60px rgba(0, 0, 0, .5); }

/* Meldung (Toast) */
#meldung { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 90; background: #0A0D14; color: #fff; padding: 12px 18px; border-radius: 14px; font-weight: 600; font-size: 14px; box-shadow: 0 12px 30px -10px rgba(0, 0, 0, .5); animation: hochkommen .3s var(--kurve); max-width: calc(100% - 32px); }
#meldung.fehler { background: #B42318; }
@keyframes hochkommen { from { transform: translate(-50%, 16px); opacity: 0; } }

/* ---------- Anmeldung ---------- */
.anmeldung { min-height: 100%; display: grid; grid-template-columns: 1.15fr 1fr; }
.anmeldung-bild { position: relative; overflow: hidden; background: radial-gradient(120% 90% at 50% 20%, #FFFFFF 0%, #EAF0F8 70%); }
.anmeldung-bild svg { position: absolute; inset: 4% 2%; width: 96%; height: 92%; }
.anmeldung-form { display: flex; align-items: center; justify-content: center; padding: 32px 22px; }
.anmeldung-karte { width: min(420px, 100%); display: flex; flex-direction: column; gap: 16px; }
.anmeldung-karte h1 { font-size: 30px; font-weight: 800; }
.anmeldung-karte p { margin: 0; color: var(--tinte-2); }
.anmeldung-karte .knopf { padding: 14px 18px; font-size: 15.5px; }
.trenner { display: flex; align-items: center; gap: 10px; color: var(--tinte-3); font-size: 12.5px; }
.trenner::before, .trenner::after { content: ''; flex: 1; height: 1px; background: var(--rand-2); }

.lade-bild { min-height: 100vh; display: grid; place-items: center; }
.lade-punkt { width: 12px; height: 12px; border-radius: 50%; background: #0A0D14; animation: puls 1s infinite ease-in-out; }

/* ---------- Büroszene: Zustände & Animationen ---------- */
.szene-svg text { font-family: 'Plus Jakarta Sans', system-ui, sans-serif; }
.szene-svg .wand-text { font-size: 15px; font-weight: 800; fill: #5A6474; }
.szene-svg .neon-text { font-size: 50px; font-weight: 800; fill: #FFF; letter-spacing: 2px; filter: drop-shadow(0 0 6px #B57BFF) drop-shadow(0 0 14px #7C3AED); }
.szene-svg .neon-klein { font-size: 11px; font-weight: 700; fill: #C4B5FD; letter-spacing: 3px; }
.szene-svg .mono { font-size: 12px; font-weight: 800; }
.szene-svg .schoner-text { font-size: 26px; font-weight: 800; fill: rgba(255, 255, 255, .92); }
.szene-svg .frage-text { font-size: 44px; font-weight: 800; fill: #FFC94D; }
.szene-svg .schild-name { font-size: 12.5px; font-weight: 800; fill: #0A0D14; }
.szene-svg .schild-rolle { font-size: 9.5px; font-weight: 600; fill: #5A6474; }
.szene-svg .zaehler-text, .szene-svg .plakette-text { font-size: 12px; font-weight: 800; fill: #fff; }
.szene-svg .plakette-text.klein { font-size: 10.5px; }
.szene-svg .blase-text { font-size: 19px; font-weight: 800; }
.szene-svg .ceo-schild { font-size: 34px; font-weight: 800; fill: #fff; letter-spacing: 6px; }
.szene-svg .besprechung-schild { font-size: 15px; font-weight: 800; fill: #FFFFFF; letter-spacing: 2.4px; }
.szene-svg .ceo-tischschild { font-size: 9.5px; font-weight: 800; fill: #5B3A00; letter-spacing: 1.2px; }

.tisch, .tisch-oben, .stapel-klick { cursor: pointer; }
.tisch .markierung { opacity: 0; transition: opacity .25s; }
.tisch:hover .markierung, .tisch:focus-visible .markierung, .tisch.hervor .markierung { opacity: 1; }
.tisch:focus { outline: none; }
.tisch-oben .schild { transition: transform .3s var(--kurve); }

/* Posen */
.tisch .pose-vorne, .tisch .arme-kopf, .tisch .arm-meldung, .tisch .post, .tisch .fehlerlampe { display: none; }
.tisch[data-zustand="frei"] .pose-ruecken, .tisch[data-zustand="bereit"] .pose-ruecken, .tisch[data-zustand="wartet"] .pose-ruecken { display: none; }
.tisch[data-zustand="frei"] .pose-vorne, .tisch[data-zustand="bereit"] .pose-vorne, .tisch[data-zustand="wartet"] .pose-vorne { display: inline; }
.tisch[data-zustand="wartet"] .arm-tasse { display: none; }
.tisch[data-zustand="wartet"] .arm-meldung { display: inline; }
.tisch[data-zustand="fehler"] .arme-tippen { display: none; }
.tisch[data-zustand="fehler"] .arme-kopf { display: inline; }
.tisch[data-zustand="fehler"] .fehlerlampe { display: inline; }
.tisch[data-zustand="bereit"] .post { display: inline; }

/* Bildschirm */
.bildschirm .inhalt-schoner, .bildschirm .inhalt-fehler, .bildschirm .inhalt-warten { display: none; }
.tisch[data-zustand="frei"] .inhalt-arbeit, .tisch[data-zustand="bereit"] .inhalt-arbeit { display: none; }
.tisch[data-zustand="frei"] .inhalt-schoner, .tisch[data-zustand="bereit"] .inhalt-schoner { display: inline; }
.tisch[data-zustand="fehler"] .inhalt-arbeit { display: none; }
.tisch[data-zustand="fehler"] .inhalt-fehler { display: inline; }
.tisch[data-zustand="wartet"] .inhalt-warten { display: inline; }
.tisch .lichtkegel { opacity: 0; transition: opacity .6s; }
.tisch[data-zustand="arbeitet"] .lichtkegel { opacity: 1; animation: flackern 3.2s infinite; }
.tisch[data-zustand="fehler"] .lichtkegel { opacity: .5; }

/* Überlagerung: Sprechblase, Zähler, Statuspunkt */
.tisch-oben .blase { display: none; }
.tisch-oben[data-wartet="ja"] .blase { display: inline; }
.tisch-oben .status-punkt { fill: #9AA4B2; }
.tisch-oben[data-zustand="arbeitet"] .status-punkt { fill: #0FA968; }
.tisch-oben[data-zustand="wartet"] .status-punkt { fill: #F79009; }
.tisch-oben[data-zustand="fehler"] .status-punkt { fill: #E5484D; }
.tisch-oben[data-zustand="bereit"] .status-punkt { fill: #2563EB; }
.tisch-oben .zaehler { display: none; }

/* Bewegung */
.szene-svg .arm-l { animation: tippen-l .34s infinite ease-in-out; }
.szene-svg .arm-r, .szene-svg .hand-r { animation: tippen-r .3s infinite ease-in-out; }
.szene-svg .atmen { animation: atmen 4.2s infinite ease-in-out; transform-box: fill-box; transform-origin: 50% 100%; }
.szene-svg .zuruecklehnen { transform: rotate(-7deg); transform-box: fill-box; transform-origin: 50% 90%; }
.szene-svg .dampf { animation: dampf 2.6s infinite ease-out; }
.szene-svg .augen { animation: blinzeln 5s infinite; transform-box: fill-box; transform-origin: center; }
.szene-svg .rollen { animation: rollen 6s infinite linear; }
.szene-svg .blink { animation: blink 1.1s infinite steps(2); }
.szene-svg .blink.b1 { animation-delay: .35s; }
.szene-svg .blink.b2 { animation-delay: .7s; }
.szene-svg .puls { animation: puls 1.8s infinite ease-in-out; transform-box: fill-box; transform-origin: center; }
.szene-svg .haken { animation: haken 5s infinite; }
.szene-svg .haken.h1 { animation-delay: .5s; } .szene-svg .haken.h2 { animation-delay: 1s; } .szene-svg .haken.h3 { animation-delay: 1.5s; } .szene-svg .haken.h4 { animation-delay: 2s; }
.szene-svg .kurve { stroke-dasharray: 220; animation: zeichnen 4s infinite linear; }
.szene-svg .balken { animation: balken 3s infinite ease-in-out; transform-box: fill-box; transform-origin: 50% 100%; }
.szene-svg .tippen circle { animation: blink 1.2s infinite; }
.szene-svg .tippen circle:nth-child(2) { animation-delay: .2s; } .szene-svg .tippen circle:nth-child(3) { animation-delay: .4s; }
.szene-svg .wandern { animation: wandern 5s infinite ease-in-out; }
.szene-svg .schoner-logo { animation: schweben 6s infinite ease-in-out; }
.szene-svg .schweben { animation: schweben 2s infinite ease-in-out; }
.szene-svg .pulsieren { animation: pulsieren 1.6s infinite ease-in-out; transform-box: fill-box; transform-origin: 30% 100%; }
.szene-svg .blitz { animation: blitz 1s infinite; }
.szene-svg .wiegen { animation: wiegen 7s infinite ease-in-out; transform-box: fill-box; transform-origin: 50% 100%; }
.szene-svg .wolke-1400 { animation: wolken-1400 200s infinite linear; }
.szene-svg .wolke-1800 { animation: wolken-1800 260s infinite linear; }
.szene-svg .huepfen { animation: huepfen 2.4s infinite var(--kurve); }
.szene-svg .notiz { transition: transform .3s; }

@keyframes tippen-l { 50% { transform: translate(0, 1.4px); } }
@keyframes tippen-r { 50% { transform: translate(0, -1.4px); } }
@keyframes atmen { 50% { transform: scale(1.012, .99); } }
@keyframes dampf { 0% { transform: translateY(2px); opacity: 0; } 30% { opacity: .9; } 100% { transform: translateY(-7px); opacity: 0; } }
@keyframes blinzeln { 0%, 94%, 100% { transform: scaleY(1); } 96% { transform: scaleY(.1); } }
@keyframes rollen { to { transform: translateY(-72px); } }
@keyframes blink { 50% { opacity: .25; } }
@keyframes puls { 50% { transform: scale(.82); opacity: .7; } }
@keyframes haken { 0%, 15% { opacity: .25; } 25%, 85% { opacity: 1; } 100% { opacity: .25; } }
@keyframes zeichnen { from { stroke-dashoffset: 220; } to { stroke-dashoffset: -220; } }
@keyframes balken { 50% { transform: scaleY(.75); } }
@keyframes wandern { 0%, 20% { transform: translate(0, 0); } 45%, 70% { transform: translate(40px, 38px); } 95%, 100% { transform: translate(0, 0); } }
@keyframes schweben { 50% { transform: translateY(-3px); } }
@keyframes pulsieren { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.1); } }
@keyframes blitz { 50% { opacity: .15; } }
@keyframes wiegen { 50% { transform: rotate(2.4deg); } }
@keyframes wolken-1400 { to { transform: translateX(1400px); } }
@keyframes wolken-1800 { to { transform: translateX(1800px); } }
@keyframes huepfen { 0%, 70%, 100% { transform: translateY(0); } 80% { transform: translateY(-5px); } 90% { transform: translateY(0); } }
@keyframes flackern { 0%, 100% { opacity: 1; } 47% { opacity: .82; } 50% { opacity: 1; } 75% { opacity: .9; } }

/* Tageszeit */
.szene-svg .nacht-schleier, .szene-svg .nacht-vignette { pointer-events: none; opacity: 0; transition: opacity 2s; mix-blend-mode: multiply; }
.szene-svg .sterne { opacity: 0; }
.szene-svg .lichtfenster, .szene-svg .fenster-aus { fill: #DCE6F4; opacity: .38; }
.szene-svg .lichtkegel-lampe, .szene-svg .lampenlicht { opacity: 0; transition: opacity 2s; pointer-events: none; }
.szene-svg .sonne { opacity: .7; transition: opacity 2s; }
.szene-svg[data-tageszeit="morgen"] .sonne { opacity: .5; }
.szene-svg[data-tageszeit="abend"] .sonne { opacity: 0; }
/* Aleks 19.10.: im Büro bleibt das Licht an, auch nachts – nur draußen wird es dunkel */
.szene-svg[data-tageszeit="abend"] .lichtfenster, .szene-svg[data-tageszeit="nacht"] .lichtfenster { fill: #FFD978; opacity: 1; }
.szene-svg[data-tageszeit="abend"] .lichtkegel-lampe, .szene-svg[data-tageszeit="abend"] .lampenlicht { opacity: .7; }
.szene-svg[data-tageszeit="nacht"] .sonne { opacity: 0; }


.szene-svg[data-tageszeit="nacht"] .sterne { opacity: 1; }
.szene-svg[data-tageszeit="nacht"] .wolken { opacity: .25; }
.szene-svg[data-tageszeit="nacht"] .lichtkegel-lampe, .szene-svg[data-tageszeit="nacht"] .lampenlicht { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  .szene-svg * { animation: none !important; }
  .blatt, .blatt-schleier { animation: none; }
}

/* ---------- Handy ---------- */
@media (max-width: 980px) {
  .buero-layout { grid-template-columns: 1fr; padding: 12px 12px 96px; gap: 14px; }
  .szene-karte { height: 58vh; min-height: 360px; border-radius: 22px; }
  .seite { gap: 14px; }
}
@media (max-width: 640px) {
  body { font-size: 14.5px; }
  .kopf { padding: calc(8px + env(safe-area-inset-top)) 14px 8px; gap: 10px; }
  .marke-unter { display: none !important; }
  .kopf-rechts .knopf.primaer { display: none; }
  .szene-karte { height: 440px; min-height: 0; }
  .legende { display: none; }
  .kacheln { grid-template-columns: 1fr 1fr; gap: 10px; }
  .kachel { padding: 12px; gap: 10px; border-radius: 18px; }
  .kachel-kopf { flex-direction: column; align-items: flex-start; gap: 8px; }
  .kachel .portrait { width: 44px; height: 44px; border-radius: 14px; }
  .kachel .auftrag { font-size: 12.5px; min-height: 34px; }
  .fab { display: inline-flex; position: fixed; z-index: 30; right: 16px; bottom: calc(18px + env(safe-area-inset-bottom)); padding: 15px 20px; border-radius: 18px; }
  .blatt { width: 100%; animation-name: hochschieben; }
  .anmeldung { grid-template-columns: 1fr; grid-template-rows: 42vh auto; }
  .rollen-wahl { grid-template-columns: repeat(3, 1fr); }
  .ceo-zahl { font-size: 38px; }
}
@keyframes hochschieben { from { transform: translateY(30px); opacity: 0; } }

/* Nachtlicht, Blatt-Inhalt, Feinschliff */
.blatt-inhalt > * { flex-shrink: 0; }
.anmeldung { min-height: 100vh; }
.portrait .stuhl-vorne { display: none; }
.stapel-kopf { display: flex; align-items: center; gap: 16px; padding: 10px 16px 10px 6px; border-radius: 20px; background: radial-gradient(120% 120% at 20% 0%, #FFFFFF, #F1EDFB); box-shadow: 0 0 0 1px var(--rand), 0 10px 24px -16px rgba(79, 70, 229, .4); }
.stapel-buehne { width: 230px; flex: none; }
.stapel-buehne svg { width: 100%; height: auto; display: block; }
.stapel-kopf p { margin: 6px 0 0; }
@media (max-width: 640px) { .stapel-buehne { width: 160px; } .reiter button { white-space: nowrap; font-size: 12.5px; padding: 8px 6px; } }
.szene-svg .nacht-licht { pointer-events: none; mix-blend-mode: screen; opacity: 0; transition: opacity 2s; }
.szene-svg .nachtglut { display: none; }
.szene-svg .nachtglut[data-zustand="arbeitet"] { display: inline; animation: flackern 3.2s infinite; }
.szene-svg .nachtglut[data-zustand="fehler"] { display: inline; }
.szene-svg .nachtglut[data-zustand="fehler"] ellipse { fill: url(#gRot); }
.szene-svg .nachtglut-ceo { opacity: 0; }
.szene-svg[data-tageszeit="abend"] .nacht-licht { opacity: .25; }
.szene-svg[data-tageszeit="nacht"] .nacht-licht { opacity: .4; }
.szene-svg[data-tageszeit="nacht"] .nachtglut-ceo { opacity: 1; }
@media (max-width: 640px) {
  .szene-werkzeuge { right: 10px; bottom: 10px; gap: 6px; }
  .szene-werkzeuge .knopf { width: 36px; height: 36px; border-radius: 11px; }
  .ceo-zeilen { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
  .ceo-zeile { min-width: 0; flex-direction: column; align-items: flex-start; gap: 6px; padding: 10px; }
  .umschalter button { padding: 6px 10px; }
}

/* ---------- Szene v2: Glasfronten, Besprechung, laufende Figuren ---------- */
.szene-svg .mond, .szene-svg .bake, .szene-svg .glas-spiegel { opacity: 0; transition: opacity 2s; }
.szene-svg .bake { fill: #FF5A5A; }
.szene-svg .sonnenball { opacity: .9; transition: opacity 2s; }
.szene-svg[data-tageszeit="morgen"] .sonnenball { opacity: .6; }
.szene-svg[data-tageszeit="abend"] .sonnenball, .szene-svg[data-tageszeit="nacht"] .sonnenball { opacity: 0; }
.szene-svg[data-tageszeit="abend"] .bake { opacity: .7; }
.szene-svg[data-tageszeit="abend"] .glas-spiegel { opacity: .5; }
.szene-svg[data-tageszeit="nacht"] .mond, .szene-svg[data-tageszeit="nacht"] .bake, .szene-svg[data-tageszeit="nacht"] .glas-spiegel { opacity: 1; }
.szene-svg[data-tageszeit="abend"] .fenster-aus, .szene-svg[data-tageszeit="nacht"] .fenster-aus { fill: #2A3658; opacity: .55; }

/* Schreibtisch, wenn die Figur unterwegs ist */
.tisch .stuhl-leer { display: none; }
.tisch[data-weg="ja"] .figur { display: none; }
.tisch[data-weg="ja"] .stuhl-leer { display: inline; }
.tisch-oben[data-weg="ja"] .blase { display: none; }
.tisch-oben[data-besprechung="ja"] .status-punkt { fill: #8B5CF6; }
.besprechung-stuhl.besetzt { display: none; }

/* Laufende Figuren */
.laeufer { pointer-events: none; }
.laeufer .stehend, .laeufer .sitzend-vorne, .laeufer .sitzend-ruecken, .laeufer .sprechblase, .laeufer .blatt-trage { display: none; }
.laeufer[data-pose^="geht"] .stehend, .laeufer[data-pose^="steht"] .stehend { display: inline; }
.laeufer[data-pose$="vorne"] .kopf-ruecken, .laeufer[data-pose$="ruecken"] .kopf-vorne { display: none; }
.laeufer[data-pose="sitzt-vorne"] .sitzend-vorne, .laeufer[data-pose="sitzt-ruecken"] .sitzend-ruecken { display: inline; }
.laeufer.ohne-stuhl .stuhl-vorne { display: none; }
.laeufer .arm-meldung, .laeufer .arme-kopf { display: none; }
.szene-svg .laeufer .arm-l, .szene-svg .laeufer .arm-r, .szene-svg .laeufer .hand-r { animation: none; }
.laeufer[data-blatt="ja"] .blatt-trage { display: inline; }
.laeufer .bein, .laeufer .schwung { transform-box: fill-box; transform-origin: 50% 0; }
.laeufer[data-pose^="geht"] .bein-l, .laeufer[data-pose^="geht"] .schwung-r { animation: schritt-a .64s infinite ease-in-out; }
.laeufer[data-pose^="geht"] .bein-r, .laeufer[data-pose^="geht"] .schwung-l { animation: schritt-b .64s infinite ease-in-out; }
.laeufer[data-pose^="geht"] .oberkoerper { animation: wippen .32s infinite ease-in-out; }
.laeufer .sprechblase { transform: translate(10px, -88px); }
.laeufer[data-pose^="sitzt"] .sprechblase { transform: translate(12px, -80px); }
.laeufer .arme-tippen { transform: translate(-1px, 6px) rotate(8deg); transform-box: fill-box; transform-origin: 50% 50%; }
.laeufer[data-spricht="a"] .sprechblase, .laeufer[data-spricht="b"] .sprechblase { display: inline; }
.laeufer .blase-innen { animation: reden 5s infinite; transform-box: fill-box; transform-origin: 30% 100%; }
.laeufer[data-spricht="b"] .blase-innen { animation-delay: -2.5s; }
@keyframes schritt-a { 0%, 100% { transform: rotate(15deg); } 50% { transform: rotate(-15deg); } }
@keyframes schritt-b { 0%, 100% { transform: rotate(-15deg); } 50% { transform: rotate(15deg); } }
@keyframes wippen { 50% { transform: translateY(-1.3px); } }
@keyframes reden { 0%, 42% { opacity: 1; transform: scale(1); } 50%, 92% { opacity: 0; transform: scale(.55); } 100% { opacity: 1; transform: scale(1); } }
