/*
  Bewerbungen — Oberfläche für Formular und Cockpit.

  Dieselbe Familie wie die Belege-App: helles Papierweiß, Blau bis Cyan als
  Leitfarbe, keine Webfonts. Das Cockpit bekommt dazu eine dunkle Seitenleiste
  — sie rahmt die Arbeitsfläche wie ein Instrumentenbrett, ohne dass der
  Inhalt selbst dunkel und schwer lesbar wird.
*/

:root {
  --bg: #f2f6fd;
  --flaeche: #ffffff;
  --flaeche-hoch: #e9f0ff;
  --rand: rgba(12, 38, 86, 0.10);
  --rand-fest: rgba(12, 38, 86, 0.18);
  --ink: #0b1b33;
  --ink-dim: #5b6b86;
  --blau: #0f6fff;
  --blau-weich: rgba(15, 111, 255, 0.11);
  --cyan: #00c2f0;
  --leucht: #27e0ff;
  --violett: #7b5cff;
  --gruen: #0a9d6c;
  --gruen-weich: rgba(10, 157, 108, 0.12);
  --warn: #c76a00;
  --warn-weich: rgba(199, 106, 0, 0.12);
  --rot: #d92d20;
  --rot-weich: rgba(217, 45, 32, 0.10);
  --nacht: #0a1830;
  --nacht-hoch: #12284d;
  --verlauf: linear-gradient(135deg, #0f6fff 0%, #00c2f0 100%);
  --verlauf-weich: linear-gradient(135deg, rgba(15,111,255,0.14), rgba(0,194,240,0.07));
  --glanz: 0 8px 26px rgba(15, 111, 255, 0.14);
  --glanz-hoch: 0 14px 40px rgba(15, 111, 255, 0.22);
  --schatten: 0 1px 2px rgba(12, 38, 86, 0.05), 0 6px 20px rgba(12, 38, 86, 0.06);
  --radius: 14px;
  --radius-gross: 20px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html, body { margin: 0; min-height: 100%; }
body {
  background:
    radial-gradient(60rem 36rem at 12% -8%, rgba(15, 111, 255, 0.10), transparent 70%),
    radial-gradient(48rem 30rem at 94% 4%, rgba(0, 194, 240, 0.10), transparent 70%),
    var(--bg);
  background-attachment: fixed;
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p { margin: 0; }
h1, h2 { text-wrap: balance; letter-spacing: -0.3px; }
h1 { font-size: 28px; font-weight: 720; }
h2 { font-size: 20px; font-weight: 680; }
h3 {
  font-size: 12px; font-weight: 650; text-transform: uppercase;
  letter-spacing: 0.8px; color: var(--ink-dim);
}
a { color: var(--blau); }
button, input, select, textarea { font: inherit; color: inherit; }
button { border: 0; background: none; cursor: pointer; -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--blau); outline-offset: 2px; }

/* ---------- Gemeinsame Bausteine ---------- */

.karte {
  background: var(--flaeche);
  border: 1px solid var(--rand);
  border-radius: var(--radius-gross);
  box-shadow: var(--schatten);
}

.haupt {
  min-height: 48px; padding: 0 24px; border-radius: 999px;
  background: var(--verlauf); color: #fff; font-weight: 650;
  box-shadow: var(--glanz);
  transition: transform 140ms cubic-bezier(0.2, 0.9, 0.3, 1), box-shadow 140ms;
}
.haupt:hover { box-shadow: var(--glanz-hoch); }
.haupt:active { transform: translateY(1px) scale(0.985); }
.haupt:disabled { background: var(--flaeche-hoch); color: var(--ink-dim); box-shadow: none; cursor: default; }

.leise {
  min-height: 40px; padding: 0 16px; border-radius: 999px;
  background: var(--flaeche); border: 1px solid var(--rand-fest);
  color: var(--blau); font-weight: 600; font-size: 14px;
  display: inline-flex; align-items: center; gap: 6px; text-decoration: none;
}
.leise:hover { background: var(--flaeche-hoch); }
.leise.gefahr { color: var(--rot); }
.leise.klein { min-height: 32px; padding: 0 12px; font-size: 13px; }

.symbol {
  width: 32px; height: 32px; border-radius: 10px; color: var(--ink-dim);
  display: inline-grid; place-items: center; font-size: 15px; flex: none;
}
.symbol:hover { background: var(--flaeche-hoch); color: var(--ink); }
.symbol:disabled { opacity: 0.3; cursor: default; background: none; }

.feld { display: grid; gap: 6px; }
.feld > label, .feld > .beschriftung { font-weight: 620; font-size: 14px; }
.feld .stern { color: var(--blau); margin-left: 3px; }
.feld .hilfe { font-size: 13px; color: var(--ink-dim); }
.feld .fehler { font-size: 13px; color: var(--rot); font-weight: 550; }

input[type="text"], input[type="email"], input[type="tel"], input[type="date"],
input[type="number"], input[type="password"], input[type="search"], select, textarea {
  width: 100%; min-height: 46px; padding: 10px 14px;
  background: var(--flaeche); border: 1px solid var(--rand-fest); border-radius: 12px;
  transition: border-color 120ms, box-shadow 120ms;
}
textarea { min-height: 96px; resize: vertical; line-height: 1.45; }
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--blau); box-shadow: 0 0 0 4px var(--blau-weich);
}
.ungueltig input, .ungueltig select, .ungueltig textarea { border-color: var(--rot); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  min-height: 42px; padding: 0 16px; border-radius: 999px;
  background: var(--flaeche); border: 1px solid var(--rand-fest);
  font-weight: 560; font-size: 14.5px;
  transition: background 120ms, border-color 120ms, color 120ms;
}
.chip:hover { border-color: var(--blau); }
.chip[aria-pressed="true"] {
  background: var(--blau); border-color: var(--blau); color: #fff;
  box-shadow: 0 4px 14px rgba(15, 111, 255, 0.25);
}

.meldung {
  padding: 10px 14px; border-radius: 12px; font-size: 14px;
  background: var(--rot-weich); color: var(--rot);
}
.meldung.gut { background: var(--gruen-weich); color: var(--gruen); }
.dim { color: var(--ink-dim); }
.klein { font-size: 13px; }

/* ---------- Begleiter ---------- */

.bot { display: inline-block; line-height: 0; }
.botBild { display: block; overflow: visible; }
.bot-gross .botBild { width: 104px; }
.bot-mittel .botBild { width: 68px; }
.bot-klein .botBild { width: 40px; }
.botKoerper, .botSchatten, .botAugen { transform-box: fill-box; transform-origin: center; }
.botFroh, .botFlach { opacity: 0; }
.botKoerper { animation: botSchweben 3.8s ease-in-out infinite; }
.botSchatten { animation: botAtmen 3.8s ease-in-out infinite; }
.botLampe { animation: botLampe 2.6s ease-in-out infinite; }
[data-zustand="ruhig"] .botAugen { animation: botBlinken 5.4s infinite; }
[data-zustand="froh"] .botAugen, [data-zustand="fehler"] .botAugen { opacity: 0; }
[data-zustand="froh"] .botFroh, [data-zustand="fehler"] .botFlach { opacity: 1; }
[data-zustand="froh"] .botKoerper { animation: botHuepfen 700ms cubic-bezier(0.3, 1.6, 0.5, 1) 2, botSchweben 3.8s ease-in-out 1.4s infinite; }
@keyframes botSchweben { 50% { transform: translateY(-3px); } }
@keyframes botAtmen { 50% { transform: scaleX(0.88); opacity: 0.65; } }
@keyframes botLampe { 50% { opacity: 0.4; } }
@keyframes botBlinken { 0%, 46%, 50%, 100% { transform: scaleY(1); } 48% { transform: scaleY(0.1); } }
@keyframes botHuepfen { 40% { transform: translateY(-9px); } }

/* =====================================================================
   Bewerbungsformular
   ===================================================================== */

.bewerben #buehne {
  max-width: 980px; margin: 0 auto;
  padding: 28px 16px calc(env(safe-area-inset-bottom, 0px) + 48px);
}
.kopf { display: flex; align-items: center; gap: 16px; margin-bottom: 24px; }
.kopf p { color: var(--ink-dim); margin-top: 4px; }

.ablauf { display: grid; grid-template-columns: 250px 1fr; gap: 20px; align-items: start; }

.baum { padding: 14px; position: sticky; top: 20px; }
.baum h3 { padding: 6px 10px 10px; }
.baum ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.baum button {
  width: 100%; display: flex; align-items: center; gap: 10px; text-align: left;
  padding: 10px; border-radius: 12px; font-weight: 560; color: var(--ink-dim);
}
.baum button:disabled { cursor: default; }
.baum button:not(:disabled):hover { background: var(--flaeche-hoch); }
.baum .marke {
  width: 30px; height: 30px; border-radius: 50%; flex: none;
  display: grid; place-items: center; font-size: 14px;
  background: var(--flaeche-hoch);
}
.baum li.fertig button { color: var(--ink); }
.baum li.fertig .marke { background: var(--gruen-weich); color: var(--gruen); font-weight: 700; }
.baum li.aktiv button { background: var(--verlauf-weich); color: var(--ink); }
.baum li.aktiv .marke { background: var(--verlauf); box-shadow: var(--glanz); }
.baum .wahl { margin: 2px 0 6px 50px; font-size: 13px; color: var(--ink-dim); }

.fortschritt { display: none; }

.schritt { padding: 26px; display: grid; gap: 22px; }
.schritt > header { display: flex; align-items: center; gap: 12px; }
.schritt > header .marke {
  width: 44px; height: 44px; border-radius: 14px; font-size: 22px;
  display: grid; place-items: center; background: var(--verlauf-weich);
}
.felder { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 16px; }
.felder .breit { grid-column: 1 / -1; }

.firmen { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.firma {
  padding: 18px; border-radius: 16px; text-align: left;
  background: var(--flaeche); border: 1.5px solid var(--rand-fest);
  display: flex; align-items: center; gap: 14px; font-weight: 650; font-size: 16px;
  transition: border-color 120ms, box-shadow 120ms, transform 120ms;
}
.firma:hover { border-color: var(--blau); transform: translateY(-1px); }
.firma .emoji { font-size: 30px; }
.firma[aria-pressed="true"] {
  border-color: var(--blau); background: var(--verlauf-weich); box-shadow: var(--glanz);
}

.ablage {
  border: 1.5px dashed var(--rand-fest); border-radius: 16px; padding: 22px;
  text-align: center; display: grid; gap: 6px; justify-items: center; cursor: pointer;
  transition: border-color 120ms, background 120ms;
}
.ablage:hover, .ablage.drueber { border-color: var(--blau); background: var(--verlauf-weich); }
.ablage .gross { font-size: 28px; }
.dateiliste { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.dateiliste li {
  display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 14px;
  background: var(--flaeche-hoch); border-radius: 12px; font-size: 14px;
}
.dateiliste .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.haken { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; cursor: pointer; }
.haken input { width: 20px; height: 20px; margin: 1px 0 0; flex: none; accent-color: var(--blau); }
.honig { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.weiter { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.weiter .haupt { margin-left: auto; min-width: 150px; }

.fertigseite { padding: 48px 26px; text-align: center; display: grid; gap: 14px; justify-items: center; }
.fertigseite p { max-width: 420px; color: var(--ink-dim); }

@media (max-width: 760px) {
  .ablauf { grid-template-columns: 1fr; }
  .baum { display: none; }
  .fortschritt { display: grid; gap: 8px; margin-bottom: 14px; }
  .fortschritt .leiste { height: 6px; border-radius: 3px; background: var(--flaeche-hoch); overflow: hidden; }
  .fortschritt .leiste span { display: block; height: 100%; background: var(--verlauf); border-radius: 3px; transition: width 300ms; }
  .schritt { padding: 20px 16px; }
  .felder { grid-template-columns: 1fr; }
  h1 { font-size: 24px; }
  input, select, textarea { font-size: 16px; }  /* sonst zoomt iOS beim Antippen */
}

/* =====================================================================
   Cockpit
   ===================================================================== */

.cockpit { height: 100vh; overflow: hidden; }
.cockpit #app { height: 100%; }

/* --- Anmeldung --- */
.tor { height: 100%; display: grid; place-items: center; padding: 20px; }
.tor form { width: min(380px, 100%); padding: 32px 28px; display: grid; gap: 16px; text-align: center; justify-items: stretch; }
.tor .bot { justify-self: center; }

/* --- Rahmen --- */
.rahmen { height: 100%; display: grid; grid-template-columns: 224px 1fr; }
.leiste-seite {
  background:
    radial-gradient(18rem 14rem at 0% 0%, rgba(39, 224, 255, 0.16), transparent 70%),
    linear-gradient(180deg, var(--nacht) 0%, var(--nacht-hoch) 100%);
  color: #dbe7ff; padding: 18px 12px; display: flex; flex-direction: column; gap: 4px;
}
.leiste-seite .marke { display: flex; align-items: center; gap: 10px; padding: 4px 8px 18px; }
.leiste-seite .marke strong { display: block; color: #fff; font-size: 16px; letter-spacing: -0.2px; }
.leiste-seite .marke span { font-size: 12px; color: #8fa6cc; }
.leiste-seite nav { display: grid; gap: 4px; }
.leiste-seite nav button, .leiste-seite .unten button {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  padding: 11px 12px; border-radius: 12px; color: #b9cbec; font-weight: 580;
}
.leiste-seite nav button:hover, .leiste-seite .unten button:hover { background: rgba(255,255,255,0.06); color: #fff; }
.leiste-seite nav button[aria-current="page"] {
  background: linear-gradient(135deg, rgba(15,111,255,0.55), rgba(0,194,240,0.30));
  color: #fff; box-shadow: inset 0 0 0 1px rgba(39,224,255,0.35), 0 6px 22px rgba(0,150,255,0.25);
}
.leiste-seite nav .emoji { font-size: 17px; width: 22px; text-align: center; }
.leiste-seite .zahl {
  margin-left: auto; min-width: 22px; padding: 1px 7px; border-radius: 999px; text-align: center;
  background: var(--leucht); color: var(--nacht); font-size: 12px; font-weight: 750;
}
.leiste-seite .unten { margin-top: auto; }

.flaeche { min-width: 0; height: 100%; overflow: auto; }
.seite { padding: 26px 28px 60px; max-width: 1240px; display: grid; gap: 20px; }
.seitenkopf { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.seitenkopf p { color: var(--ink-dim); margin-top: 2px; }
.reihe { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* --- Übersicht --- */
.kacheln { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; }
.kachel { padding: 18px; display: grid; gap: 4px; text-align: left; }
button.kachel:hover { box-shadow: var(--glanz); border-color: rgba(15,111,255,0.3); }
.kachel .wert { font-size: 34px; font-weight: 740; letter-spacing: -1px; line-height: 1.1; }
.kachel .name { color: var(--ink-dim); font-weight: 560; font-size: 13.5px; }
.kachel.leuchtet { background: var(--verlauf); color: #fff; border: 0; box-shadow: var(--glanz-hoch); }
.kachel.leuchtet .name { color: rgba(255,255,255,0.85); }

.raster { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; }
.tafel { padding: 18px; display: grid; gap: 12px; align-content: start; }
.balkenliste { display: grid; gap: 9px; }
.balkenzeile { display: grid; grid-template-columns: minmax(90px, 38%) 1fr 30px; gap: 10px; align-items: center; font-size: 14px; }
button.balkenzeile { width: 100%; text-align: left; padding: 3px 6px; margin: -3px -6px; border-radius: 8px; }
button.balkenzeile:hover { background: var(--flaeche-hoch); }
.balkenzeile .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.balkenzeile .bahn { height: 10px; border-radius: 5px; background: var(--flaeche-hoch); overflow: hidden; }
.balkenzeile .bahn span { display: block; height: 100%; border-radius: 5px; background: var(--verlauf); min-width: 3px; }
.balkenzeile .anzahl { text-align: right; font-weight: 650; font-variant-numeric: tabular-nums; }
.balkenzeile.unter .name { padding-left: 14px; color: var(--ink-dim); }
.balkenzeile.unter .bahn span { background: var(--cyan); opacity: 0.75; }

.wochen { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 8px; align-items: end; height: 130px; }
.wochen .saeule { display: grid; grid-template-rows: 18px 1fr 18px; gap: 4px; height: 100%; text-align: center; font-size: 12px; color: var(--ink-dim); }
.wochen .saeule .stab { align-self: end; border-radius: 6px 6px 3px 3px; background: var(--verlauf); min-height: 3px; }
.wochen .saeule .n { font-weight: 650; color: var(--ink); align-self: end; }

/* --- Postfach --- */
.postfach { height: 100%; display: grid; grid-template-columns: 212px minmax(330px, 430px) 1fr; }
.postfach > * { min-height: 0; min-width: 0; }

.orte { padding: 22px 10px 20px 16px; overflow: auto; display: grid; gap: 14px; align-content: start; border-right: 1px solid var(--rand); }
.orte ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.orte button {
  width: 100%; display: flex; align-items: center; gap: 8px; text-align: left;
  padding: 8px 10px; border-radius: 10px; font-weight: 560; font-size: 14px;
}
.orte button:hover { background: var(--flaeche-hoch); }
.orte button[aria-pressed="true"] { background: var(--blau); color: #fff; }
.orte .unter button { padding-left: 34px; font-weight: 500; color: var(--ink-dim); }
.orte .unter button[aria-pressed="true"] { color: #fff; }
.orte .n { margin-left: auto; font-size: 12.5px; font-variant-numeric: tabular-nums; opacity: 0.75; }
.orte .neu {
  min-width: 18px; padding: 0 5px; border-radius: 9px; background: var(--leucht); color: var(--nacht);
  font-size: 11px; font-weight: 750; text-align: center;
}

.eingang { display: grid; grid-template-rows: auto 1fr; border-right: 1px solid var(--rand); background: rgba(255,255,255,0.55); }
.werkzeuge { padding: 18px 14px 12px; display: grid; gap: 10px; border-bottom: 1px solid var(--rand); }
.werkzeuge .zeile { display: flex; gap: 8px; }
.werkzeuge select { width: auto; min-height: 40px; padding: 6px 10px; font-size: 14px; }
.werkzeuge input[type="search"] { min-height: 40px; }
.reiter { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.reiter::-webkit-scrollbar { display: none; }
.reiter button {
  flex: none; padding: 6px 12px; border-radius: 999px; font-size: 13.5px; font-weight: 600;
  background: var(--flaeche); border: 1px solid var(--rand-fest); color: var(--ink-dim);
}
.reiter button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.reiter .n { opacity: 0.6; margin-left: 5px; font-variant-numeric: tabular-nums; }

.liste { overflow: auto; }
.liste .gruppe { padding: 12px 16px 6px; position: sticky; top: 0; background: rgba(242,246,253,0.94); backdrop-filter: blur(6px); z-index: 1; }
.zeile-b {
  width: 100%; display: grid; grid-template-columns: 42px 1fr auto; gap: 12px; text-align: left;
  padding: 12px 14px; border-bottom: 1px solid var(--rand); align-items: start;
}
.zeile-b:hover { background: var(--flaeche); }
.zeile-b[aria-current="true"] { background: var(--flaeche); box-shadow: inset 3px 0 0 var(--blau); }
.zeile-b .wer { font-weight: 560; display: flex; align-items: center; gap: 7px; }
.zeile-b.neu .wer { font-weight: 720; }
.zeile-b.neu .wer::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--blau); box-shadow: 0 0 0 3px var(--blau-weich); flex: none; }
.zeile-b .kurz { display: block; font-size: 13.5px; color: var(--ink-dim); margin: 1px 0 7px; }
.zeile-b .rechts { text-align: right; font-size: 12.5px; color: var(--ink-dim); display: grid; gap: 4px; justify-items: end; }
.zeile-b .gold { color: #e0a100; letter-spacing: 1px; }

.bild {
  width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center;
  font-weight: 700; font-size: 14px; color: #fff; background: var(--verlauf); flex: none;
}
.bild.f1 { background: linear-gradient(135deg, #7b5cff, #b06cff); }
.bild.f2 { background: linear-gradient(135deg, #0a9d6c, #2fd0a0); }
.bild.f3 { background: linear-gradient(135deg, #e0711b, #f5b03c); }
.bild.gross { width: 58px; height: 58px; border-radius: 18px; font-size: 19px; }

.marken { display: flex; flex-wrap: wrap; gap: 5px; }
.marke-k {
  padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600;
  background: var(--flaeche-hoch); color: #33507d; white-space: nowrap;
}
.marke-k.art { background: var(--blau-weich); color: var(--blau); }
.marke-k.gut { background: var(--gruen-weich); color: var(--gruen); }
.marke-k.warn { background: var(--warn-weich); color: var(--warn); }
.marke-k.status-kontaktiert { background: rgba(123,92,255,0.12); color: var(--violett); }
.marke-k.status-eingeladen { background: var(--warn-weich); color: var(--warn); }
.marke-k.status-zusage { background: var(--gruen-weich); color: var(--gruen); }
.marke-k.status-absage { background: var(--rot-weich); color: var(--rot); }

.leer { padding: 60px 24px; text-align: center; color: var(--ink-dim); display: grid; gap: 10px; justify-items: center; align-content: center; }

.akte { overflow: auto; }
.akte .innen { padding: 24px 26px 60px; max-width: 760px; display: grid; gap: 18px; }
.akte .zurueck { display: none; }
.akte header { display: flex; gap: 16px; align-items: center; }
.akte header .kurz { color: var(--ink-dim); margin-top: 2px; }
.fakten { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.fakt { padding: 12px 14px; border-radius: 14px; background: var(--flaeche); border: 1px solid var(--rand); }
.fakt .was { font-size: 12px; color: var(--ink-dim); font-weight: 600; }
.fakt .wert { font-weight: 650; margin-top: 2px; overflow-wrap: anywhere; }
.statuswahl { display: flex; flex-wrap: wrap; gap: 6px; }
.statuswahl button {
  padding: 7px 14px; border-radius: 999px; font-size: 13.5px; font-weight: 600;
  background: var(--flaeche); border: 1px solid var(--rand-fest); color: var(--ink-dim);
}
.statuswahl button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.sterne button { font-size: 22px; color: #c9d3e4; padding: 0 1px; line-height: 1; }
.sterne button.an { color: #e0a100; }
.antworten { display: grid; gap: 0; padding: 4px 18px; }
.antworten > div { display: grid; grid-template-columns: minmax(120px, 34%) 1fr; gap: 14px; padding: 11px 0; border-bottom: 1px solid var(--rand); }
.antworten > div:last-child { border-bottom: 0; }
.antworten dt { color: var(--ink-dim); font-size: 13.5px; }
.antworten dd { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.anhaenge { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.anhang {
  border-radius: 14px; border: 1px solid var(--rand); background: var(--flaeche); overflow: hidden;
  text-decoration: none; color: var(--ink); display: grid; grid-template-rows: 110px auto;
}
.anhang:hover { box-shadow: var(--glanz); }
.anhang .vorschau { display: grid; place-items: center; font-size: 36px; background: var(--flaeche-hoch); overflow: hidden; }
.anhang .vorschau img { width: 100%; height: 110px; object-fit: cover; display: block; }
.anhang .unten { padding: 8px 10px; font-size: 12.5px; }
.anhang .unten strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }

/* --- Formular-Baukasten --- */
.baukasten { display: grid; gap: 16px; }
.block { padding: 18px; display: grid; gap: 14px; }
.block > header { display: flex; align-items: center; gap: 10px; }
.block > header input[type="text"] { font-weight: 650; font-size: 16px; }
.emoji-feld { width: 54px !important; text-align: center; padding: 10px 4px !important; flex: none; }
.zweispaltig { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.eintraege { display: grid; gap: 6px; align-content: start; }
.eintrag { display: flex; align-items: center; gap: 6px; }
.eintrag input[type="text"] { min-height: 38px; padding: 6px 12px; }
.eintrag.aus input[type="text"] { color: var(--ink-dim); text-decoration: line-through; }
.feldzeile { border: 1px solid var(--rand); border-radius: 14px; padding: 8px 8px 8px 12px; display: grid; gap: 10px; background: #fbfcff; }
.feldzeile.aus { opacity: 0.6; }
.feldzeile .oben { display: grid; grid-template-columns: 1fr 170px 300px; gap: 8px; align-items: center; }
.feldzeile .oben > .reihe { justify-content: flex-end; flex-wrap: nowrap; gap: 6px; }
.feldzeile .oben input, .feldzeile .oben select { min-height: 38px; padding: 6px 12px; }
.feldzeile .mehr { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 2px 4px 6px 0; }
.feldzeile .mehr .breit { grid-column: 1 / -1; }
.feldzeile .mehr label { font-size: 12.5px; color: var(--ink-dim); font-weight: 600; display: grid; gap: 4px; }
.feldzeile .mehr textarea { min-height: 110px; }
.schloss { font-size: 12px; color: var(--ink-dim); padding: 0 6px; white-space: nowrap; }

.schalter { position: relative; display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink-dim); font-weight: 600; cursor: pointer; flex: none; }
.schalter input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.schalter i { width: 34px; height: 20px; border-radius: 10px; background: #c9d3e4; position: relative; transition: background 140ms; flex: none; }
.schalter i::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform 140ms; box-shadow: 0 1px 3px rgba(0,0,0,0.2); }
.schalter input:checked + i { background: var(--blau); }
.schalter input:checked + i::after { transform: translateX(14px); }
.schalter input:disabled + i { opacity: 0.45; }
.schalter input:focus-visible + i { outline: 2px solid var(--blau); outline-offset: 2px; }

.speicherleiste {
  position: sticky; bottom: 16px; z-index: 5; padding: 12px 14px 12px 20px;
  display: flex; align-items: center; gap: 12px; justify-content: space-between;
  background: var(--nacht); color: #fff; border-radius: 999px; box-shadow: 0 14px 40px rgba(10,24,48,0.35);
}
.speicherleiste .leise { background: transparent; border-color: rgba(255,255,255,0.3); color: #fff; }
.speicherleiste .haupt { min-height: 40px; }

.linkzeile { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; }
.linkzeile input { font-size: 13.5px; font-family: ui-monospace, "SF Mono", Menlo, monospace; }
.formzeile { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }

.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 50;
  padding: 11px 20px; border-radius: 999px; background: var(--nacht); color: #fff; font-weight: 560;
  box-shadow: 0 12px 34px rgba(10,24,48,0.35); animation: toast 220ms cubic-bezier(0.2, 0.9, 0.3, 1);
}
.toast.schlecht { background: var(--rot); }
@keyframes toast { from { opacity: 0; transform: translate(-50%, 10px); } }

/* --- Schmaler --- */
@media (max-width: 1180px) {
  .postfach { grid-template-columns: minmax(300px, 400px) 1fr; grid-template-rows: auto 1fr; }
  .orte { grid-column: 1 / -1; border-right: 0; border-bottom: 1px solid var(--rand); padding: 12px 14px; display: flex; gap: 6px; overflow-x: auto; }
  .orte h3 { display: none; }
  .orte ul { display: flex; gap: 6px; }
  .orte li { display: flex; gap: 6px; }
  .orte button { width: auto; white-space: nowrap; border: 1px solid var(--rand-fest); border-radius: 999px; padding: 6px 12px; background: var(--flaeche); }
  .orte .unter button { padding-left: 12px; }
}
@media (max-width: 860px) {
  .cockpit { height: 100dvh; }
  .rahmen { grid-template-columns: 1fr; grid-template-rows: 1fr auto; }
  .leiste-seite { order: 2; flex-direction: row; padding: 6px 8px calc(env(safe-area-inset-bottom, 0px) + 6px); gap: 0; }
  .leiste-seite .marke, .leiste-seite .unten { display: none; }
  .leiste-seite nav { grid-auto-flow: column; grid-auto-columns: 1fr; width: 100%; }
  .leiste-seite nav button { flex-direction: column; gap: 2px; padding: 6px 4px; font-size: 11.5px; text-align: center; position: relative; }
  .leiste-seite .zahl { position: absolute; top: 2px; left: 54%; margin: 0; }
  .seite { padding: 18px 14px 40px; }
  .postfach { grid-template-columns: 1fr; position: relative; }
  .eingang { border-right: 0; }
  .akte { position: absolute; inset: 0; background: var(--bg); z-index: 3; display: none; }
  .postfach.offen .akte { display: block; }
  .akte .zurueck { display: inline-flex; }
  .akte .innen { padding: 14px 14px 50px; }
  .zweispaltig, .feldzeile .mehr { grid-template-columns: 1fr; }
  .feldzeile .oben { grid-template-columns: 1fr; }
  .feldzeile .oben > .reihe { flex-wrap: wrap; }
  input, select, textarea { font-size: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
