/* Baukasten · schwarz-weiß und schlicht. Links die Angaben, rechts die Live-Vorschau. */

@font-face {
  font-family: "Instrument Sans";
  src: url("fonts/instrument-sans.woff2") format("woff2");
  font-weight: 400 700;
  font-stretch: 75% 100%;
  font-display: swap;
}

:root {
  --schrift: "Instrument Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --bg: #ffffff;
  --text: #111111;
  --leise: #6b6b6b;
  --linie: rgba(17, 17, 17, 0.1);
  --feld-linie: rgba(17, 17, 17, 0.18);
  --flaeche: #f4f4f2;
  --gruen: #1f7a4d;
  --fehler: #b3261e;
  --weich: cubic-bezier(0.2, 0.7, 0.2, 1);
  --kopf: 64px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--schrift); font-size: 15px; line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button, input, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }
.bk-leise { color: var(--leise); font-weight: 400; }
.bk-klein { font-size: 12.5px; margin: 0; }

/* Pillen und Knöpfe */
.bk-pille {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 34px; padding: 0 13px; border: 1px solid var(--feld-linie); border-radius: 999px;
  background: #fff; font-size: 13.5px; font-weight: 600; line-height: 1; text-decoration: none; white-space: nowrap;
  cursor: pointer; transition: background-color 0.15s, border-color 0.15s, transform 0.15s var(--weich);
}
.bk-pille:hover { border-color: rgba(17, 17, 17, 0.45); }
.bk-pille:active { transform: scale(0.97); }
.bk-pille[aria-pressed="true"], .bk-pille-voll { background: var(--text); color: #fff; border-color: var(--text); }
.bk-nur-icon { width: 34px; padding: 0; }
.bk-knopf {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 40px; padding: 0 18px; border: 0; border-radius: 999px;
  background: var(--text); color: #fff; font-size: 14.5px; font-weight: 650; cursor: pointer;
  transition: transform 0.15s var(--weich), opacity 0.15s;
}
.bk-knopf:active { transform: scale(0.97); }
.bk-knopf[disabled] { opacity: 0.55; cursor: progress; }
.bk-datei { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
label.bk-pille { position: relative; }
label.bk-pille:focus-within { outline: 2px solid var(--text); outline-offset: 2px; }

/* Kopfzeile */
.bk-kopf {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 12px;
  height: var(--kopf); padding: 0 16px;
  background: rgba(255, 255, 255, 0.92); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--linie);
}
.bk-titel { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; }
.bk-titel strong { font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bk-kopf-aktionen { display: flex; align-items: center; gap: 8px; }
.bk-stand { font-size: 13px; color: var(--leise); white-space: nowrap; }
.bk-stand.ist-ungespeichert::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #d08a00; margin-right: 6px; vertical-align: 1px; }
.bk-marke { font-weight: 700; font-size: 16px; letter-spacing: -0.01em; }
.bk-marke span { font-weight: 400; color: var(--leise); margin-left: 6px; }

.bk-status { display: inline-flex; align-items: center; gap: 6px; flex: none; font-size: 12.5px; font-weight: 600; color: var(--leise); padding: 4px 10px; border-radius: 999px; background: var(--flaeche); }
.bk-status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #b5b5b0; }
.bk-status.ist-online { color: var(--gruen); background: color-mix(in oklab, var(--gruen) 10%, #fff); }
.bk-status.ist-online::before { background: var(--gruen); }

/* Aufbau: Formular links, Vorschau rechts */
.bk-rahmen { display: block; }
.bk-formular { padding: 8px 16px 120px; max-width: 560px; margin: 0 auto; }
.bk-vorschau { display: none; }

.bk-fehlt { margin: 16px 0 0; padding: 14px 16px; border-radius: 14px; background: #fff7e6; border: 1px solid #f1d9a6; font-size: 14px; }
.bk-fehlt strong { display: block; margin-bottom: 4px; }
.bk-fehlt ul { margin: 0; padding-left: 18px; }

.bk-teil { padding: 28px 0 8px; border-bottom: 1px solid var(--linie); }
.bk-teil:last-child { border-bottom: 0; }
.bk-teil h2 { font-size: 17px; font-weight: 650; letter-spacing: -0.01em; margin: 0 0 4px; }
.bk-teil > p { margin: 0 0 4px; font-size: 14px; }

.bk-feld { margin: 16px 0 0; border: 0; padding: 0; min-width: 0; }
.bk-feld > label, .bk-feld > legend, .bk-label { display: block; font-size: 13.5px; font-weight: 600; margin: 0 0 6px; padding: 0; }
.bk-feld input[type="text"], .bk-feld input[type="email"], .bk-feld input[type="url"], .bk-feld textarea, .bk-kopierzeile input, .bk-neu input {
  width: 100%; min-height: 44px; padding: 10px 13px;
  border: 1px solid var(--feld-linie); border-radius: 11px; background: #fff;
  font-size: 16px; line-height: 1.35; transition: border-color 0.15s, box-shadow 0.15s;
}
.bk-feld textarea { resize: vertical; min-height: 84px; }
.bk-feld input:focus, .bk-feld textarea:focus, .bk-neu input:focus { outline: none; border-color: var(--text); box-shadow: 0 0 0 3px rgba(17, 17, 17, 0.08); }
.bk-feld input::placeholder, .bk-feld textarea::placeholder { color: #a2a29d; }
.bk-zwei { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.bk-zwei .bk-feld { margin-top: 16px; }

.bk-pillen { display: flex; flex-wrap: wrap; gap: 6px; }
.bk-wahl { position: relative; }
.bk-wahl input { position: absolute; inset: 0; opacity: 0; margin: 0; pointer-events: none; }
.bk-wahl span {
  display: inline-flex; align-items: center; min-height: 34px; padding: 0 13px;
  border: 1px solid var(--feld-linie); border-radius: 999px; font-size: 13.5px; font-weight: 600; cursor: pointer; user-select: none;
  transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}
.bk-wahl input:checked + span { background: var(--text); color: #fff; border-color: var(--text); }
.bk-wahl input:focus-visible + span { outline: 2px solid var(--text); outline-offset: 2px; }

.bk-farbe { display: flex; gap: 8px; align-items: center; }
.bk-farbe input[type="color"] { width: 44px; height: 44px; padding: 3px; border: 1px solid var(--feld-linie); border-radius: 11px; background: #fff; cursor: pointer; flex: none; }
.bk-farbe input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
.bk-farbe input[type="color"]::-webkit-color-swatch { border: 0; border-radius: 7px; }
.bk-farbe input[type="text"] { max-width: 140px; font-variant-numeric: tabular-nums; text-transform: lowercase; }

.bk-bild-zeile, .bk-video-zeile { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.bk-bild-vorschau {
  display: grid; place-items: center; width: 132px; height: 56px; padding: 8px;
  border: 1px solid var(--linie); border-radius: 11px; font-size: 12.5px;
  background: #fff repeating-conic-gradient(#f2f2ef 0 25%, #fff 0 50%) 0 0 / 14px 14px;
}
.bk-bild-vorschau.auf-dunkel { background: #222; color: #aaa; }
.bk-bild-vorschau img { max-height: 40px; width: auto; object-fit: contain; }
.bk-bild-vorschau.ist-foto { width: 56px; height: 56px; padding: 0; border-radius: 50%; overflow: hidden; background: var(--flaeche); font-size: 10px; text-align: center; }
.bk-bild-vorschau.ist-foto img { width: 100%; height: 100%; max-height: none; object-fit: cover; }

.bk-stelle { margin: 12px 0 0; border: 1px solid var(--linie); border-radius: 16px; background: #fcfcfb; overflow: hidden; }
.bk-stelle-kopf {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 14px 16px; cursor: pointer; list-style: none; user-select: none;
}
.bk-stelle-kopf::-webkit-details-marker { display: none; }
.bk-stelle-name { display: flex; flex-direction: column; min-width: 0; }
.bk-stelle-name strong { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bk-pfeil { flex: none; display: grid; place-items: center; color: var(--leise); transition: transform 200ms var(--weich); }
.bk-stelle[open] .bk-pfeil { transform: rotate(180deg); }
.bk-stelle-inhalt { padding: 0 16px 18px; border-top: 1px solid var(--linie); }
.bk-stelle-weg { margin-top: 18px; color: var(--fehler); }

/* Fragen an Bewerber */
.bk-fragen { padding-top: 4px; }
.bk-erklaerung { margin: 0 0 10px; line-height: 1.45; }
.bk-erklaerung strong { color: var(--fehler); font-weight: 600; }
.bk-frage { margin: 10px 0 0; padding: 12px; border-radius: 14px; background: #fff; border: 1px solid var(--linie); }
.bk-frage-kopf { display: flex; gap: 8px; align-items: center; }
.bk-frage-kopf input { flex: 1; min-width: 0; min-height: 40px; padding: 8px 12px; border: 1px solid var(--feld-linie); border-radius: 10px; font-size: 15px; font-weight: 550; background: #fff; }
.bk-frage-kopf input:focus { outline: none; border-color: var(--text); }
.bk-antworten { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 10px; }
.bk-antwort {
  display: inline-flex; align-items: center; border: 1px solid var(--feld-linie); border-radius: 999px; background: #fff;
  transition: background-color 150ms, border-color 150ms, color 150ms;
}
.bk-antwort button { border: 0; background: transparent; cursor: pointer; font-size: 13.5px; font-weight: 600; }
.bk-antwort [data-antwort-umschalten] { padding: 7px 4px 7px 12px; }
.bk-antwort-x { display: grid; place-items: center; width: 26px; height: 30px; padding: 0 6px 0 2px; color: var(--leise); }
.bk-antwort.ist-aus { background: color-mix(in oklab, var(--fehler) 9%, #fff); border-color: color-mix(in oklab, var(--fehler) 55%, #fff); color: var(--fehler); }
.bk-antwort.ist-aus [data-antwort-umschalten] { text-decoration: line-through; text-decoration-thickness: 1.5px; }
.bk-feld input.bk-antwort-neu { width: 110px; min-height: 32px; padding: 4px 12px; border: 1px dashed var(--feld-linie); border-radius: 999px; font-size: 13.5px; background: transparent; box-shadow: none; }
.bk-feld input.bk-antwort-neu:focus { border-style: solid; border-color: var(--text); width: 170px; }
.bk-feld .bk-frage-kopf input { min-height: 40px; padding: 8px 12px; border-radius: 10px; font-size: 15px; font-weight: 550; }
.bk-vorschlaege { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 8px; }
.bk-pille-klein { min-height: 30px; padding: 0 11px; font-size: 12.5px; gap: 4px; }
[data-stelle-neu] { margin-top: 14px; }

.bk-video-vorschau {
  display: grid; place-items: center; flex: none;
  width: 54px; height: 96px; border-radius: 9px; overflow: hidden;
  background: var(--flaeche); border: 1px solid var(--linie);
  font-size: 11px; color: var(--leise); text-align: center; line-height: 1.2; padding: 4px;
}
.bk-video-vorschau img { width: 100%; height: 100%; object-fit: cover; }
.bk-video-vorschau:has(img) { padding: 0; }
.bk-video-steuer { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; min-width: 0; flex: 1; }
.bk-video-steuer > div:first-child, .bk-video-steuer .bk-reihe { display: flex; gap: 6px; }
.bk-balken { width: 100%; max-width: 220px; height: 5px; border-radius: 99px; background: var(--flaeche); overflow: hidden; }
.bk-balken i { display: block; height: 100%; background: var(--text); transform-origin: left; transform: scaleX(var(--p, 0)); transition: transform 0.2s linear; }
.bk-fehler { color: var(--fehler); font-size: 13px; font-weight: 550; margin: 6px 0 0; }

.bk-kopierzeile { display: flex; gap: 8px; margin-top: 10px; }
.bk-kopierzeile input { font-size: 13px; color: var(--leise); min-width: 0; }

/* Vorschau */
.bk-vorschau-leiste { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 16px; }
.bk-geraet-platz { position: relative; flex: 1; min-height: 0; display: grid; place-items: start center; padding: 0 16px 16px; overflow: hidden; }
/* Ohne Handy-Rahmen drumherum (Lipo, 22.10.2026: „ohne Handy im Hintergrund") */
.bk-geraet { position: relative; border-radius: 14px; overflow: hidden; background: #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.12), 0 24px 50px -24px rgba(0, 0, 0, 0.3); }
.bk-geraet.ist-desktop { border-radius: 10px; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.12), 0 24px 50px -24px rgba(0, 0, 0, 0.3); }
.bk-geraet iframe { display: block; border: 0; transform-origin: 0 0; background: #fff; }

.bk-vorschau-auf { position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 25; box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.4); }
.bk-nur-schmal { display: inline-flex; }
.bk-nur-breit { display: none; }

/* Handy: Vorschau als Vollbild-Ebene */
body.vorschau-offen { overflow: hidden; }
body.vorschau-offen .bk-vorschau {
  display: flex; flex-direction: column; position: fixed; inset: 0; z-index: 40; background: var(--flaeche);
}
body.vorschau-offen .bk-vorschau-auf { display: none; }

@media (min-width: 1000px) {
  .bk-nur-breit { display: inline-flex; }
  .bk-nur-schmal, .bk-vorschau-auf { display: none !important; }
  .bk-rahmen { display: grid; grid-template-columns: minmax(420px, 500px) 1fr; height: calc(100vh - var(--kopf)); }
  .bk-formular { overflow-y: auto; max-width: none; margin: 0; padding: 8px 28px 80px; border-right: 1px solid var(--linie); }
  .bk-vorschau { display: flex; flex-direction: column; background: var(--flaeche); min-width: 0; }
  .bk-vorschau-leiste { padding: 14px 24px; }
  .bk-geraet-platz { padding: 4px 24px 28px; }
  .bk-kopf { padding: 0 20px; }
}

/* Übersicht */
.bk-einfach { background: #fafaf8; }
.bk-uebersicht { max-width: 860px; margin: 0 auto; padding: 32px 16px 80px; }
.bk-uebersicht h1 { font-size: clamp(1.8rem, 5vw, 2.4rem); letter-spacing: -0.025em; margin: 0 0 20px; }
.bk-neu { background: #fff; border: 1px solid var(--linie); border-radius: 18px; padding: 18px; }
.bk-neu label { display: block; font-size: 13.5px; font-weight: 600; margin-bottom: 8px; }
.bk-neu-zeile { display: flex; gap: 8px; }
.bk-liste { list-style: none; margin: 24px 0 0; padding: 0; }
.bk-zeile { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 16px 0; border-top: 1px solid var(--linie); }
.bk-zeile-text { flex: 1; min-width: 160px; display: flex; flex-direction: column; }
.bk-zeile-text strong { font-size: 16px; }
.bk-zeile-aktionen { display: flex; flex-wrap: wrap; gap: 6px; }
.bk-leer { padding: 16px 0; color: var(--leise); }

/* Kurze Meldung unten */
.bk-meldung {
  position: fixed; left: 50%; bottom: 24px; z-index: 60; transform: translate(-50%, 20px); opacity: 0;
  padding: 10px 16px; border-radius: 999px; background: var(--text); color: #fff; font-size: 14px; font-weight: 550;
  pointer-events: none; transition: opacity 0.2s, transform 0.25s var(--weich); max-width: calc(100vw - 32px); text-align: center;
}
.bk-meldung.zeigen { opacity: 1; transform: translate(-50%, 0); }
.bk-meldung.ist-fehler { background: var(--fehler); }

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