/* Content-Baukasten — Werkbank-Look: helle, kühle Fläche, Videos als Hauptdarsteller,
   ein Signal-Orange nur für „Hauptaktion“ und „ausgewählt“. */

:root {
  --canvas: #eef0f2;
  --surface: #ffffff;
  --surface-2: #f6f7f8;
  --ink: #121417;
  --ink-2: #474c54;
  --ink-3: #6f757e;
  --line: #dde0e4;
  --line-strong: #c4c9cf;
  --media: #17191c;

  --accent: #ff6a1f;        /* nur: Hauptaktion + Auswahl */
  --accent-hover: #f25a0d;
  --accent-ink: #121417;    /* Text auf Orange: dunkel, für Kontrast */
  --accent-soft: #fff0e7;
  --accent-line: #ffb48a;

  --ok: #11804c;
  --ok-soft: #e4f4eb;
  --danger: #c62b27;
  --danger-soft: #fdecea;

  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;
  --shadow-pop: 0 1px 2px rgb(18 20 23 / .06), 0 8px 24px rgb(18 20 23 / .10);

  --font: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", "SF Mono", Consolas, monospace;

  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font: 14px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
}
img, video { display: block; max-width: 100%; }
h1, h2, h3, h4 { margin: 0; font-family: var(--font-display); text-wrap: balance; }
p { margin: 0; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
.mono { font-family: var(--mono); font-size: .92em; font-variant-numeric: tabular-nums; }
.muted { color: var(--ink-3); }
.small { font-size: 12.5px; }
.break { word-break: break-all; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 12px; border-radius: var(--r-sm); z-index: 100; }
.skip:focus { left: 8px; }

/* ---------- Kopfleiste ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 28px;
  height: 56px; padding: 0 24px;
  background: var(--ink); color: #fff;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 650; letter-spacing: -.01em; white-space: nowrap; }
.brand-mark { display: grid; grid-template-columns: 10px 14px; grid-template-rows: 7px 4px 4px; gap: 2px; }
.brand-mark i { display: block; border-radius: 1.5px; background: #fff; }
.brand-mark i:nth-child(1) { grid-column: 1 / 3; width: 13px; background: var(--accent); }
.brand-mark i:nth-child(2) { grid-column: 1 / 3; }
.brand-mark i:nth-child(3) { grid-column: 1 / 3; width: 16px; }
.mainnav { display: flex; gap: 2px; height: 100%; overflow-x: auto; scrollbar-width: none; }
.mainnav a {
  position: relative; display: flex; align-items: center; padding: 0 14px;
  color: #b9bec5; text-decoration: none; font-weight: 550; white-space: nowrap;
}
.mainnav a:hover { color: #fff; }
.mainnav a.on { color: #fff; }
.mainnav a.on::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: 0; height: 3px; background: var(--accent); border-radius: 3px 3px 0 0; }
.mainnav a.has-draft::before { content: ""; position: absolute; top: 15px; right: 6px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.topbar-upload { margin-left: auto; background: transparent; color: #fff; border-color: #3a3f46; }
.topbar-upload:hover { background: #24272c; border-color: #4a5058; }

/* ---------- Seite ---------- */
.view { max-width: 1480px; margin: 0 auto; padding: 28px 24px 64px; outline: none; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head h1 { font-size: 26px; font-weight: 700; letter-spacing: -.02em; line-height: 1.15; }
.page-head p { margin-top: 4px; max-width: 72ch; }
.head-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.eyebrow { font-size: 11px; font-weight: 650; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-3); }
.count { color: var(--ink-3); font-size: 12.5px; }
.section-title { font-size: 15px; margin: 28px 0 10px; display: flex; gap: 8px; align-items: baseline; }

/* ---------- Bausteine: Buttons, Eingaben ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 36px; padding: 0 14px;
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--line-strong); border-radius: var(--r-sm);
  font-weight: 600; font-size: 13.5px; text-decoration: none; white-space: nowrap;
  cursor: pointer; transition: background .12s, border-color .12s, transform .06s;
}
.btn:hover { background: var(--surface-2); border-color: var(--ink-3); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn-sm { height: 30px; padding: 0 10px; font-size: 12.5px; gap: 5px; }
.btn-block { width: 100%; justify-content: flex-start; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-dark { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn-dark:hover { background: #2a2e34; border-color: #2a2e34; }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-danger:hover { background: #a82320; border-color: #a82320; }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-ghost:hover { background: var(--surface-2); border-color: var(--line); }
.btn-dashed { border-style: dashed; background: transparent; color: var(--ink-2); width: 100%; }
.icon-btn {
  display: inline-grid; place-items: center; width: 30px; height: 30px; flex: none;
  border: 1px solid transparent; border-radius: var(--r-sm); background: transparent; color: var(--ink-2); cursor: pointer;
}
.icon-btn:hover { background: var(--surface-2); border-color: var(--line); color: var(--ink); }
.icon-btn.danger:hover { background: var(--danger-soft); border-color: #f3c3c0; color: var(--danger); }
.icon-btn:disabled { opacity: .3; cursor: default; background: transparent; border-color: transparent; }
.link-btn { display: inline-flex; align-items: center; gap: 4px; background: none; border: 0; padding: 2px 4px; color: var(--ink-2); font-size: 12px; font-weight: 600; cursor: pointer; border-radius: 4px; }
.link-btn:hover { color: var(--ink); background: var(--surface-2); }

.input {
  width: 100%; height: 36px; padding: 0 11px;
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r-sm);
  transition: border-color .12s, box-shadow .12s;
}
.input:hover { border-color: var(--ink-3); }
.input:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgb(18 20 23 / .08); }
.textarea { height: auto; min-height: 60px; padding: 9px 11px; line-height: 1.5; resize: vertical; }
.select { padding-right: 28px; appearance: none; background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23474c54' stroke-width='2.4'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center; cursor: pointer; }
.input.num { width: 110px; }
.field { display: grid; gap: 5px; }
.field-row { display: flex; align-items: center; gap: 6px; min-height: 26px; }
.block-label { font-size: 11px; font-weight: 650; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-3); }
.inline-field { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-2); white-space: nowrap; }
.inline-field .input { width: auto; }

.segmented { display: inline-flex; padding: 3px; gap: 2px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 8px; }
.segmented button {
  display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 11px;
  border: 0; border-radius: 5px; background: transparent; color: var(--ink-2); font-weight: 600; font-size: 12.5px; cursor: pointer; white-space: nowrap;
}
.segmented button:hover { color: var(--ink); background: var(--surface-2); }
.segmented button.on { background: var(--ink); color: #fff; }

.badge { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 7px; border-radius: 5px; font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.badge-platform { background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line); }

.hint-box { padding: 12px 14px; border: 1px dashed var(--line-strong); border-radius: var(--r-md); color: var(--ink-3); font-size: 13px; }
.hint-box a { color: var(--ink); font-weight: 600; }

/* ---------- Bibliothek ---------- */
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.search { position: relative; flex: 1 1 280px; max-width: 440px; display: flex; align-items: center; }
.search .icon { position: absolute; left: 11px; color: var(--ink-3); pointer-events: none; }
.search-input { padding-left: 36px; height: 38px; }
.toolbar .count { margin-left: auto; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 20px; }
.chip {
  display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 12px;
  border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface);
  font-weight: 600; font-size: 13px; color: var(--ink-2); cursor: pointer;
}
.chip:hover { border-color: var(--ink-3); color: var(--ink); }
.chip.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip-count { font-size: 11px; color: var(--ink-3); }
.chip.on .chip-count { color: #9aa0a8; }

.vgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.vgrid-compact { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.vgrid[aria-busy="true"] { opacity: .55; transition: opacity .2s; }
.vgrid > .empty { grid-column: 1 / -1; }

.vcard { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; transition: border-color .15s, box-shadow .15s; }
.vcard:hover { border-color: var(--line-strong); box-shadow: var(--shadow-pop); }
.vcard.is-selected { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.vc-mediabtn { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: pointer; }
.vc-media { position: relative; aspect-ratio: 16 / 10; background: var(--media); overflow: hidden; }
.vc-poster, .vc-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.vc-media:not(.is-mobile) .vc-poster, .vc-media:not(.is-mobile) .vc-video { object-fit: cover; }
.vc-video { opacity: 0; transition: opacity .12s; }
.vc-media.scrubbing .vc-video { opacity: 1; }
.vc-noposter { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 6px; color: #7d838b; font-size: 12px; }
.vc-scrub { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgb(255 255 255 / .18); opacity: 0; transition: opacity .12s; }
.vc-scrub span { display: block; height: 100%; width: 0; background: var(--accent); }
.vc-media.scrubbing .vc-scrub { opacity: 1; }
.vc-duration { position: absolute; right: 8px; bottom: 9px; padding: 1px 6px; border-radius: 4px; background: rgb(0 0 0 / .72); color: #fff; font-size: 11.5px; }
.vc-used { position: absolute; left: 8px; top: 8px; display: inline-flex; align-items: center; gap: 4px; padding: 2px 7px 2px 5px; border-radius: 4px; background: var(--ok); color: #fff; font-size: 11.5px; font-weight: 650; }
.vc-body { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px 12px; flex: 1; }
.vc-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.vc-feature { font-size: 11px; font-weight: 650; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vc-title { font-size: 15px; font-weight: 650; line-height: 1.3; letter-spacing: -.005em; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.vc-actions { display: flex; justify-content: space-between; gap: 6px; margin-top: auto; padding-top: 4px; }
.vc-actions .btn-ghost { margin-left: -10px; }

.empty { display: grid; justify-items: center; gap: 8px; padding: 56px 20px; text-align: center; border: 1px dashed var(--line-strong); border-radius: var(--r-lg); background: rgb(255 255 255 / .5); }
.empty-mark { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); color: var(--ink-3); margin-bottom: 4px; }
.empty h3 { font-size: 17px; }
.empty p { color: var(--ink-3); max-width: 46ch; }
.empty .btn { margin-top: 8px; }

/* ---------- Dialoge ---------- */
.modal { width: min(520px, calc(100vw - 32px)); max-height: calc(100vh - 48px); padding: 0; border: 0; border-radius: var(--r-lg); background: var(--surface); color: var(--ink); box-shadow: 0 24px 64px rgb(0 0 0 / .28); }
.modal-wide { width: min(1100px, calc(100vw - 32px)); }
.modal::backdrop { background: rgb(18 20 23 / .55); }
.modal[open] { display: flex; flex-direction: column; animation: pop .16s ease-out; }
@keyframes pop { from { opacity: 0; transform: translateY(6px) scale(.99); } }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.modal-head h2 { font-size: 17px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.modal-body { padding: 20px; overflow: auto; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--line); background: var(--surface-2); border-radius: 0 0 var(--r-lg) var(--r-lg); flex-wrap: wrap; }
.preview-layout { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 24px; align-items: start; }
.player-well { background: var(--media); border-radius: var(--r-md); overflow: hidden; display: grid; place-items: center; }
.player { width: 100%; max-height: 66vh; }
.player.is-mobile { width: auto; height: 66vh; }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; margin: 0; font-size: 13.5px; }
.facts dt { color: var(--ink-3); }
.facts dd { margin: 0; }
.form-grid { display: grid; gap: 14px; }

/* ---------- Meldungen ---------- */
.toasts { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); display: grid; gap: 8px; z-index: 1000; pointer-events: none; }
.toast { display: flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 8px; background: var(--ink); color: #fff; font-weight: 550; box-shadow: var(--shadow-pop); animation: pop .18s ease-out; }
.toast-ok .icon { color: #6ee3a6; }
.toast-error { background: var(--danger); }
.toast.out { opacity: 0; transform: translateY(6px); transition: .25s; }

/* ---------- Baukasten ---------- */
.save-status { font-size: 12.5px; font-weight: 600; margin-right: 6px; }
.save-status.unsaved { color: #b0450b; }
.save-status.unsaved::before { content: "●  "; font-size: 9px; vertical-align: 2px; }
.save-status.saved { color: var(--ok); }

.composer { display: grid; grid-template-columns: minmax(300px, 1.05fr) minmax(320px, 1fr) 360px; gap: 20px; align-items: start; }
.col { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px; display: grid; gap: 12px; align-content: start; min-width: 0; }
.col-preview { position: sticky; top: 72px; max-height: calc(100vh - 88px); overflow-y: auto; scrollbar-width: thin; background: transparent; border: 0; padding: 0 2px 2px 0; }
.col-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.col-head h2 { font-size: 16px; }
.col-head .select { width: auto; min-width: 150px; height: 32px; }

.step { display: flex; align-items: center; gap: 9px; margin-top: 8px; }
.step:first-child { margin-top: 0; }
.step h2 { font-size: 15px; }
.step-no { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--ink); color: #fff; font-size: 12px; font-weight: 700; flex: none; }
.step-hint { margin-left: auto; font-size: 12px; color: var(--ink-3); }

.picked-video { display: flex; align-items: center; gap: 12px; padding: 10px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface-2); }
.pv-thumb { width: 96px; aspect-ratio: 16 / 10; flex: none; border-radius: 6px; overflow: hidden; background: var(--media); display: grid; place-items: center; color: #7d838b; }
.pv-thumb img { width: 100%; height: 100%; object-fit: cover; }
.pv-thumb.is-mobile img { object-fit: contain; }
.pv-info { display: grid; gap: 2px; min-width: 0; flex: 1; }
.pv-title { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pv-meta { display: flex; align-items: center; gap: 8px; color: var(--ink-3); font-size: 12px; }

.variants { display: grid; gap: 7px; }
.variant {
  position: relative; display: grid; grid-template-columns: 22px 1fr; gap: 10px; align-items: start;
  width: 100%; padding: 10px 12px; text-align: left;
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r-md);
  cursor: pointer; transition: border-color .12s, background .12s, box-shadow .12s;
}
.variant:hover { border-color: var(--ink-3); background: var(--surface-2); }
.variant.on { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.variant-mark { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; border: 1.5px solid var(--line-strong); color: var(--ink-3); background: var(--surface); margin-top: 1px; }
.variant.is-headline .variant-mark { border-radius: 50%; }
.variant.on .variant-mark { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.variant-text { white-space: pre-line; font-size: 13.5px; line-height: 1.45; color: var(--ink); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; }
.variant.is-headline .variant-text { font-weight: 650; font-size: 14.5px; letter-spacing: -.005em; }
.variant-tag { grid-column: 2; justify-self: start; display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 600; color: var(--ink-2); background: var(--surface-2); border: 1px solid var(--line); padding: 1px 6px; border-radius: 4px; }
.snippet-groups { display: grid; gap: 14px; }
.snippet-group { display: grid; gap: 7px; }
.group-label { font-size: 11px; font-weight: 650; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-3); font-family: var(--font); }

.field-block { display: grid; gap: 5px; }
.headline-input { font-weight: 650; font-size: 15px; }
.blocks { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.block { display: grid; grid-template-columns: 22px 1fr; gap: 4px; align-items: start; padding: 8px 8px 10px 4px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface-2); }
.drag { display: grid; place-items: center; height: 26px; color: var(--ink-3); cursor: grab; touch-action: none; }
.drag:active { cursor: grabbing; }
.block-main { display: grid; gap: 4px; min-width: 0; }
.block-tools { margin-left: auto; display: flex; gap: 0; }
.block-tools .icon-btn { width: 26px; height: 26px; }
.block-ghost { opacity: .35; border-style: dashed; }
.reset-btn { color: #b0450b; }
.note-field { margin-top: 6px; padding-top: 12px; border-top: 1px solid var(--line); }

/* Vorschau: neutrales Telefon, kein Markenlayout */
.phone { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 10px; box-shadow: var(--shadow-pop); }
.phone-top { display: flex; align-items: center; gap: 8px; padding: 2px 4px 10px; }
.avatar { width: 26px; height: 26px; border-radius: 50%; background: linear-gradient(135deg, var(--ink) 50%, var(--accent) 50%); }
.acct { font-weight: 650; font-size: 13px; }
.phone-dots { margin-left: auto; color: var(--ink-3); letter-spacing: 1px; }
.phone-media { background: var(--media); border-radius: 12px; overflow: hidden; display: grid; place-items: center; }
.phone-media video { width: 100%; height: 100%; object-fit: contain; }
.phone-media.is-vertical { aspect-ratio: 4 / 5; max-height: min(420px, 52vh); }
.phone-media.is-wide { aspect-ratio: 16 / 10; }
.cap { padding: 12px 6px 6px; display: grid; gap: 10px; font-size: 13.5px; line-height: 1.5; max-height: 340px; overflow: auto; }
.cap p { white-space: pre-line; overflow-wrap: anywhere; }
.cap-headline { font-weight: 700; }
.cap-empty { color: var(--ink-3); font-style: normal; }
.meter { display: flex; align-items: center; gap: 10px; margin-top: 10px; font-size: 12px; color: var(--ink-3); }
.meter-track { flex: 1; height: 4px; border-radius: 4px; background: var(--line); overflow: hidden; }
.meter-track span { display: block; height: 100%; width: 0; background: var(--ink-2); transition: width .2s; }
.meter.over { color: var(--danger); font-weight: 650; }
.meter.over .meter-track span { background: var(--danger); }

.finish { margin-top: 14px; padding: 16px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); display: grid; gap: 10px; }
.fin-title { font-size: 15px; }
.fin-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.fin-step { display: grid; grid-template-columns: 22px 1fr; gap: 10px; align-items: center; }
.fin-no { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--line-strong); font-size: 11.5px; font-weight: 700; color: var(--ink-2); }
.fin-step.done .fin-no { background: var(--ok); border-color: var(--ok); color: #fff; }
.fin-note { font-size: 12px; color: var(--ink-3); }
.usages { display: grid; gap: 6px; padding-top: 10px; border-top: 1px solid var(--line); }
.usages ul, .usage-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.usage-chip { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 4px 0 9px; border-radius: 6px; background: var(--ok-soft); color: #0b5c37; font-size: 12.5px; font-weight: 600; }
.usage-list .usage-chip { padding-right: 9px; padding-left: 7px; }
.usage-chip .icon-btn { width: 20px; height: 20px; color: #0b5c37; }

/* ---------- Entwürfe & Verlauf ---------- */
.post-list { display: grid; gap: 10px; }
.post-row { display: grid; grid-template-columns: 132px minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); }
.pr-thumb { width: 132px; aspect-ratio: 16 / 10; padding: 0; border: 0; border-radius: 7px; overflow: hidden; background: var(--media); display: grid; place-items: center; color: #7d838b; cursor: pointer; }
.pr-thumb img { width: 100%; height: 100%; object-fit: cover; }
.pr-thumb.is-mobile img { object-fit: contain; }
.pr-main { display: grid; gap: 3px; min-width: 0; }
.pr-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pr-headline { font-size: 15px; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pr-excerpt { color: var(--ink-2); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pr-note { color: var(--ink-3); }
.pr-main .usage-list { margin-top: 4px; }
.pr-actions { display: flex; gap: 6px; align-items: center; }

/* ---------- Verwaltung ---------- */
.subnav { display: flex; gap: 4px; margin-bottom: 20px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.subnav a { padding: 10px 14px; text-decoration: none; font-weight: 600; color: var(--ink-3); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.subnav a:hover { color: var(--ink); }
.subnav a.on { color: var(--ink); border-bottom-color: var(--ink); }

.dropzone { display: grid; justify-items: center; gap: 6px; padding: 34px 20px; border: 2px dashed var(--line-strong); border-radius: var(--r-lg); background: var(--surface); text-align: center; cursor: pointer; transition: border-color .12s, background .12s; }
.dropzone:hover, .dropzone.over { border-color: var(--accent); background: var(--accent-soft); }
.dropzone strong { font-size: 15px; }
.dropzone .icon { color: var(--ink-2); }

.upload-queue:not(:empty) { margin-top: 16px; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); display: grid; gap: 10px; }
.queue-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.queue-head h3 { font-size: 15px; margin-right: auto; }
.queue-item, .admin-row { display: grid; grid-template-columns: 112px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 10px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface-2); }
.queue-item.has-error { border-color: #f0b4b1; background: var(--danger-soft); }
.qi-thumb, .ar-thumb { position: relative; width: 112px; aspect-ratio: 16 / 10; border-radius: 6px; overflow: hidden; background: var(--media); display: grid; place-items: center; color: #7d838b; }
.qi-thumb img, .ar-thumb img { width: 100%; height: 100%; object-fit: cover; }
.qi-thumb.is-mobile img, .ar-thumb.is-mobile img { object-fit: contain; }
.ar-thumb { padding: 0; border: 0; cursor: pointer; }
.ar-thumb-edit { position: absolute; right: 5px; bottom: 5px; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 5px; background: rgb(0 0 0 / .65); color: #fff; opacity: 0; transition: opacity .12s; }
.ar-thumb:hover .ar-thumb-edit, .ar-thumb:focus-visible .ar-thumb-edit { opacity: 1; }
.qi-fields, .ar-fields { display: grid; gap: 7px; min-width: 0; }
.qi-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.qi-row .select { width: auto; min-width: 170px; }
.ar-title { font-weight: 650; }
.ar-notes { flex: 1 1 200px; width: auto; }
.ar-actions { display: flex; gap: 2px; }
.admin-videos { display: grid; gap: 8px; }
.admin-videos .section-title { margin-bottom: 4px; }
.progress { position: relative; height: 22px; border-radius: 5px; background: var(--line); overflow: hidden; }
.progress span { position: absolute; inset: 0 auto 0 0; background: var(--accent); transition: width .15s; }
.progress em { position: relative; display: block; padding: 0 8px; line-height: 22px; font-size: 12px; font-style: normal; font-weight: 650; }

.texts-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 20px; align-items: start; }
.feature-side { display: grid; gap: 2px; position: sticky; top: 72px; }
.feature-side a { padding: 9px 12px; border-radius: var(--r-sm); text-decoration: none; font-weight: 600; color: var(--ink-2); }
.feature-side a:hover { background: var(--surface); color: var(--ink); }
.feature-side a.on { background: var(--ink); color: #fff; }
.text-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: start; }
.text-col { display: grid; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px; }
.text-new { display: grid; gap: 8px; padding: 12px; border: 1px dashed var(--line-strong); border-radius: var(--r-md); }
.text-new .btn { justify-self: start; }
.text-item { display: grid; gap: 6px; padding: 12px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface-2); }
.text-item .field-row .label-input { width: 170px; height: 30px; font-size: 13px; }
.ti-count { margin-left: auto; }
.label-input { font-weight: 600; }
.vpick-details summary { cursor: pointer; font-size: 12.5px; font-weight: 600; color: var(--ink-2); padding: 2px 0; }
.vpick-details summary:hover { color: var(--ink); }
.vpick { display: grid; gap: 6px; padding-top: 6px; }
.vpick-label { color: var(--ink-3); }
.vpick-list { display: flex; flex-wrap: wrap; gap: 6px; }
.vpick-item { position: relative; width: 64px; aspect-ratio: 16 / 10; padding: 0; border: 2px solid transparent; border-radius: 6px; overflow: hidden; background: var(--media); cursor: pointer; color: #7d838b; display: grid; place-items: center; outline-offset: 1px; }
.vpick-item img { width: 100%; height: 100%; object-fit: cover; opacity: .55; transition: opacity .12s; }
.vpick-item:hover img { opacity: .85; }
.vpick-item.on { border-color: var(--accent); }
.vpick-item.on img { opacity: 1; }
.vpick-plat { position: absolute; left: 2px; bottom: 2px; display: grid; place-items: center; width: 15px; height: 15px; border-radius: 3px; background: rgb(0 0 0 / .65); color: #fff; }
.vpick-check { position: absolute; right: 2px; top: 2px; display: grid; place-items: center; width: 15px; height: 15px; border-radius: 3px; background: var(--accent); color: var(--accent-ink); }

.inline-form { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.inline-form .input { flex: 1 1 220px; width: auto; }
.simple-list { display: grid; gap: 6px; }
.simple-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); flex-wrap: wrap; }
.simple-row > .input { flex: 1 1 200px; width: auto; }
.simple-row .sr-name { flex: 0 1 240px; font-weight: 650; }

/* ---------- Schmalere Fenster ---------- */
@media (max-width: 1280px) {
  .composer { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .col-preview { grid-column: 1 / -1; position: static; max-height: none; overflow: visible; display: grid; grid-template-columns: minmax(0, 380px) minmax(0, 1fr); gap: 0 20px; }
  .col-preview > .col-head, .col-preview > .phone, .col-preview > .meter { grid-column: 1; }
  .col-preview > .finish { grid-column: 2; grid-row: 1 / span 3; margin-top: 0; align-self: start; }
}
@media (max-width: 900px) {
  .topbar { gap: 12px; padding: 0 16px; }
  .brand > span:last-child { display: none; }
  .topbar-upload { display: none; }
  .view { padding: 20px 16px 48px; }
  .composer, .col-preview { grid-template-columns: minmax(0, 1fr); }
  .col-preview > .finish { grid-column: 1; grid-row: auto; margin-top: 14px; }
  .preview-layout { grid-template-columns: minmax(0, 1fr); }
  .texts-layout, .text-cols { grid-template-columns: minmax(0, 1fr); }
  .feature-side { position: static; display: flex; overflow-x: auto; }
  .feature-side a { white-space: nowrap; }
  .post-row { grid-template-columns: 96px minmax(0, 1fr); }
  .pr-thumb { width: 96px; }
  .pr-actions { grid-column: 1 / -1; flex-wrap: wrap; }
  .queue-item, .admin-row { grid-template-columns: 84px minmax(0, 1fr); }
  .qi-thumb, .ar-thumb { width: 84px; }
  .queue-item > .icon-btn, .ar-actions { grid-column: 2; justify-self: end; }
  .toolbar .count { margin-left: 0; }
  .player.is-mobile { height: 56vh; }
}

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

/* ---------- Rollen ---------- */
body[data-role="editor"] [data-admin] { display: none !important; }

/* ---------- Konto-Menü ---------- */
.account { position: relative; }
.topbar-upload + .account { margin-left: 4px; }
body[data-role="editor"] .account { margin-left: auto; }
.acct-btn { display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 10px 0 4px; border: 1px solid transparent; border-radius: 999px; background: transparent; color: #fff; cursor: pointer; }
.acct-btn:hover, .acct-btn[aria-expanded="true"] { background: #24272c; border-color: #3a3f46; }
.acct-avatar { display: grid; place-items: center; width: 28px; height: 28px; flex: none; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-size: 11.5px; font-weight: 750; letter-spacing: .02em; }
.acct-name { font-weight: 600; font-size: 13px; max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-menu { position: absolute; right: 0; top: calc(100% + 8px); z-index: 50; min-width: 240px; padding: 6px; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow-pop); }
.acct-head { display: grid; gap: 2px; padding: 8px 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.acct-head .badge { justify-self: start; margin-top: 4px; }
.acct-item { display: flex; align-items: center; gap: 9px; width: 100%; padding: 8px 10px; border: 0; border-radius: var(--r-sm); background: none; font-weight: 550; text-align: left; cursor: pointer; }
.acct-item:hover, .acct-item:focus-visible { background: var(--surface-2); }
.badge-role { background: var(--ink); color: #fff; }
.badge-off { background: var(--danger-soft); color: var(--danger); }
.usage-by { font-weight: 500; opacity: .8; }

/* ---------- Benutzer ---------- */
.role-help { margin-bottom: 14px; max-width: 80ch; }
.user-form .input { flex: 1 1 170px; }
.user-form .select { flex: 0 0 140px; }
.pw-field { display: flex; align-items: center; gap: 4px; flex: 1 1 230px; }
.pw-field .input { flex: 1; }
.user-row { flex-wrap: nowrap; }
.user-row .acct-avatar { background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line); }
.user-main { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 8px; flex: 1 1 380px; min-width: 0; }
.user-main .input { width: 100%; }
.user-row > .user-role { width: 130px; flex: none; }
.user-meta { display: flex; align-items: center; gap: 8px; width: 220px; flex: none; }
.user-row.is-inactive .user-main, .user-row.is-inactive .acct-avatar { opacity: .5; }
.cred-box { margin: 0; padding: 14px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-md); white-space: pre-wrap; word-break: break-all; font-size: 13px; line-height: 1.6; }

/* ---------- Login ---------- */
.login-page { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background: var(--ink); }
.login-wrap { width: min(400px, 100%); display: grid; gap: 22px; }
.login-brand { display: flex; align-items: center; justify-content: center; gap: 10px; color: #fff; font-weight: 650; font-size: 16px; }
.login-card { display: grid; gap: 14px; padding: 28px; background: var(--surface); border-radius: var(--r-lg); box-shadow: 0 24px 64px rgb(0 0 0 / .35); }
.login-card h1 { font-size: 22px; letter-spacing: -.01em; }
.login-card > p.muted { margin-top: -8px; }
.login-submit { height: 42px; font-size: 14.5px; }
.login-error { padding: 9px 12px; border-radius: var(--r-sm); background: var(--danger-soft); color: var(--danger); font-weight: 600; font-size: 13px; }
.login-help { text-align: center; }

@media (max-width: 900px) {
  .acct-name { display: none; }
  .acct-btn { padding: 0 4px; }
  .account { margin-left: auto; }
  .user-row { flex-wrap: wrap; }
  .user-main { grid-template-columns: minmax(0, 1fr); }
  .user-meta { width: auto; }
}
