/* Manera Schnitt – Oberfläche. Schwester des Arbeitsplatzes: Logo-Blau #1d4790 als einziger Akzent, weiße Flächen,
   kühles Hellgrau als Bühne um die Vorschau. Inter für alles, Plus Jakarta Sans für Titel. Alles lokal. */

@font-face { font-family: "Inter"; src: url("/assets/fonts/inter-var.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Plus Jakarta Sans"; src: url("/assets/fonts/jakarta-var.woff2") format("woff2"); font-weight: 200 800; font-display: swap; }

:root {
  --bg: #f7f9fd; --surface: #ffffff; --sage: #eef3fb; --sage-strong: #dfe7f3; --sage-soft: #f4f7fc;
  --ink: #0e1a30; --text: #283350; --muted: #4b5670; --faint: #6a7590;
  --line: rgba(14, 26, 48, 0.1); --line-strong: rgba(14, 26, 48, 0.18); --hover: rgba(14, 26, 48, 0.05);
  --accent: #1d4790; --accent-hover: #17376f; --accent-press: #132c58; --accent-tint: #e3ecf9; --accent-soft: rgba(29, 71, 144, 0.14); --on-accent: #ffffff;
  --brand-icon: #2a539d; --midnight: #1d4790; --on-dark: #ffffff; --on-dark-muted: #d7e3f4; --dark-line: rgba(255, 255, 255, 0.22); --dark-hover: rgba(255, 255, 255, 0.12);
  --error: #b42318; --error-tint: #fbe5e2; --success: #1f6b45; --success-tint: #dcebdf; --warn-ink: #5c4500; --warn-tint: #fff3c4;
  /* Schnittraum */
  --stage: #e6ecf5; --stage-line: rgba(14, 26, 48, 0.07); --lane: #f2f5fa; --lane-main: #e9eef7; --lane-line: rgba(14, 26, 48, 0.08);
  --clip-video: #1d4790; --clip-video-2: #17376f; --clip-image: #2f5ba6; --clip-text: #dfe8f7; --clip-text-ink: #17376f; --clip-cap: #eaf0fa; --clip-audio: #ffffff; --clip-audio-ink: #2a539d;
  --playhead: #0e1a30; --snap: #f0b400; --guide: #ffd23f; --clip-color: #3c4a66; --clip-bad-1: #8a2b22; --clip-bad-2: #9d3329; --sample-bg: #33405c; --sample-ph: #8796b5;
  --toast-err: #5b130d; --toast-ic: #9fc0ef; --toast-err-ic: #ffb4a8; --on-dark-ok: #a8e0bd; --on-dark-bad: #ffc2b8; --tl-ruler-ink: #4b5670; --tl-ruler-line: rgba(14, 26, 48, 0.22);
  --shadow-sm: 0 1px 2px rgba(14, 26, 48, 0.06), 0 4px 12px -4px rgba(14, 26, 48, 0.08);
  --shadow-lift: 0 2px 4px rgba(14, 26, 48, 0.05), 0 24px 40px -20px rgba(14, 26, 48, 0.24);
  --shadow-float: 0 10px 30px -12px rgba(14, 26, 48, 0.32);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif; --font-display: "Plus Jakarta Sans", var(--font);
  --fs-2xs: 0.7rem; --fs-xs: 0.76rem; --fs-sm: 0.82rem; --fs-base: 0.9rem; --fs-md: 1rem; --fs-lg: 1.2rem; --fs-xl: 1.5rem; --fs-2xl: 1.9rem;
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 24px; --s-6: 32px; --s-7: 48px; --s-8: 64px;
  --r-card: 18px; --r-plate: 12px; --r-input: 10px; --r-clip: 7px; --r-pill: 999px;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1); --t-press: 140ms; --t-ui: 200ms;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scrollbar-color: var(--line-strong) transparent; accent-color: var(--accent); }
body { margin: 0; min-height: 100dvh; background: var(--bg); color: var(--text); font-family: var(--font); font-size: var(--fs-base); line-height: 1.5; font-feature-settings: "ss01", "cv11"; -webkit-font-smoothing: antialiased; caret-color: var(--accent); -webkit-tap-highlight-color: transparent; }
body.is-editor { overflow: hidden; }
img, svg, video, canvas { display: block; max-width: 100%; }
h1, h2, h3 { color: var(--ink); margin: 0; font-family: var(--font-display); font-weight: 700; letter-spacing: -0.02em; text-wrap: balance; }
h1 { font-size: var(--fs-2xl); line-height: 1.12; letter-spacing: -0.03em; }
h2 { font-size: var(--fs-md); line-height: 1.3; }
h3 { font-size: var(--fs-sm); line-height: 1.3; font-family: var(--font); font-weight: 650; letter-spacing: 0; }
p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
p { text-wrap: pretty; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 0.22em; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: var(--accent-tint); color: var(--ink); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
kbd { font: 600 0.68rem/1 var(--font); padding: 3px 6px; border-radius: 6px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); white-space: nowrap; }
hr { border: 0; border-top: 1px solid var(--line); margin: var(--s-2) 0; }
.i { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.i.sm { width: 15px; height: 15px; }
.sp { flex: 1; }
.muted { color: var(--muted); }
.row { display: flex; flex-wrap: wrap; gap: var(--s-2); align-items: center; }
.row.tight { gap: 6px; }
.stack { display: grid; gap: var(--s-3); }
.hint { font-size: var(--fs-xs); color: var(--muted); line-height: 1.45; }
.empty { color: var(--muted); font-size: var(--fs-sm); padding: var(--s-4) 0; }
.bad-t { color: var(--error); font-weight: 600; display: inline-flex; align-items: center; gap: 4px; }
.skip { position: absolute; left: var(--s-4); top: -100px; z-index: 200; background: var(--accent); color: var(--on-accent); padding: var(--s-3) var(--s-4); border-radius: var(--r-pill); font-weight: 600; text-decoration: none; }
.skip:focus { top: var(--s-3); }
.link { border: 0; background: none; padding: 0; color: var(--accent); cursor: pointer; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.22em; font: inherit; font-size: inherit; }
.boot { min-height: 60vh; display: flex; align-items: center; justify-content: center; gap: var(--s-3); color: var(--muted); }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--accent-soft); border-top-color: var(--accent); animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Knöpfe ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2); height: 38px; padding: 0 var(--s-4); border-radius: var(--r-pill); border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); font-size: var(--fs-sm); font-weight: 600; white-space: nowrap; cursor: pointer; text-decoration: none; user-select: none;
  transition: background-color var(--t-press) var(--ease-out), border-color var(--t-press) var(--ease-out), transform var(--t-press) var(--ease-out), color var(--t-press) var(--ease-out); }
.btn:active:not(:disabled) { transform: scale(0.97); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn.primary:active:not(:disabled) { background: var(--accent-press); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.danger { color: var(--error); border-color: color-mix(in srgb, var(--error) 35%, transparent); }
.btn.danger.solid { background: var(--error); border-color: var(--error); color: #fff; }
.btn.sm { height: 32px; padding: 0 var(--s-3); }
.btn.xs { height: 28px; padding: 0 10px; font-size: var(--fs-xs); gap: 6px; }
.btn.icon { width: 38px; padding: 0; }
.btn.sm.icon { width: 32px; }
.btn.xs.icon { width: 28px; }
.btn.busy { pointer-events: none; position: relative; color: transparent !important; }
.btn.busy::after { content: ""; position: absolute; width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-color: var(--line-strong); border-top-color: var(--accent); animation: spin 0.8s linear infinite; }
.btn.primary.busy::after { border-color: rgba(255, 255, 255, 0.4); border-top-color: #fff; }
.btn.on-dark { color: var(--on-dark-muted); }
@media (hover: hover) and (pointer: fine) {
  .btn:hover:not(:disabled) { border-color: var(--accent); }
  .btn.primary:hover:not(:disabled) { background: var(--accent-hover); border-color: var(--accent-hover); }
  .btn.ghost:hover:not(:disabled) { background: var(--hover); border-color: transparent; }
  .btn.on-dark:hover { background: var(--dark-hover); color: var(--on-dark); }
  .btn.danger:hover:not(:disabled) { background: var(--error-tint); border-color: var(--error); }
}

/* ---------- Formularfelder ---------- */
input[type="text"], input[type="url"], input[type="search"], input[type="password"], input:not([type]), textarea, select {
  width: 100%; min-height: 38px; padding: 8px 12px; border-radius: var(--r-input); border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); transition: border-color var(--t-press) var(--ease-out), box-shadow var(--t-press) var(--ease-out); }
textarea { resize: vertical; line-height: 1.45; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
input[aria-invalid="true"] { border-color: var(--error); }
input::placeholder, textarea::placeholder { color: var(--faint); }
.sel { position: relative; }
.sel select { appearance: none; padding-right: 32px; cursor: pointer; }
.sel .i { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); pointer-events: none; color: var(--muted); }
.field { display: grid; gap: 6px; }
.field > label, .field > .lab { font-size: var(--fs-sm); font-weight: 600; color: var(--ink); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-3); }
.check { display: flex; gap: var(--s-2); align-items: flex-start; font-size: var(--fs-sm); cursor: pointer; }
.check input { margin-top: 3px; width: 16px; height: 16px; }

/* Segmentierte Auswahl */
.seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: var(--r-pill); background: var(--sage); border: 1px solid var(--line); }
.seg.wide { display: flex; width: 100%; }
.seg.wide > button { flex: 1; }
.seg > button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 30px; padding: 0 12px; border: 0; border-radius: var(--r-pill); background: transparent; color: var(--muted); font-size: var(--fs-xs); font-weight: 600; cursor: pointer; white-space: nowrap; transition: background-color var(--t-press) var(--ease-out), color var(--t-press) var(--ease-out); }
.seg.sm > button { min-height: 26px; padding: 0 10px; }
.seg > button[aria-checked="true"], .seg > button[aria-selected="true"] { background: var(--surface); color: var(--accent); box-shadow: 0 1px 2px rgba(14, 26, 48, 0.12); }
.seg .count { font-size: var(--fs-2xs); background: var(--sage-strong); color: var(--ink); border-radius: var(--r-pill); padding: 0 6px; min-width: 18px; text-align: center; font-variant-numeric: tabular-nums; }
@media (hover: hover) { .seg > button:hover:not([aria-checked="true"]):not([aria-selected="true"]) { color: var(--ink); } }

/* Chips */
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 28px; padding: 0 10px; border-radius: var(--r-pill); border: 1px solid var(--line-strong); background: var(--surface); color: var(--text); font-size: var(--fs-xs); font-weight: 600; cursor: pointer; transition: background-color var(--t-press) var(--ease-out), border-color var(--t-press) var(--ease-out), color var(--t-press) var(--ease-out); }
button.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
@media (hover: hover) { button.chip:hover:not([aria-pressed="true"]) { border-color: var(--accent); color: var(--accent); } }
span.chip { cursor: default; }
.chip.st-idee { background: var(--sage); border-color: transparent; color: var(--muted); }
.chip.st-schnitt { background: var(--accent-tint); border-color: transparent; color: var(--accent-hover); }
.chip.st-freigabe { background: var(--warn-tint); border-color: transparent; color: var(--warn-ink); }
.chip.st-fertig { background: var(--success-tint); border-color: transparent; color: var(--success); }

/* Ablagefläche */
.drop { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-4); border: 1.5px dashed var(--line-strong); border-radius: var(--r-plate); background: var(--sage-soft); color: var(--accent); cursor: pointer; transition: background-color var(--t-press) var(--ease-out), border-color var(--t-press) var(--ease-out); }
.drop span { display: grid; gap: 2px; }
.drop b { color: var(--ink); font-size: var(--fs-sm); }
.drop small { color: var(--muted); font-size: var(--fs-xs); }
.drop.over, .drop:hover { border-color: var(--accent); background: var(--accent-tint); }
.drop.slim { padding: var(--s-3); }

/* ---------- Meldungen, Dialoge, Menüs ---------- */
.toasts { position: fixed; z-index: 300; left: 50%; bottom: 24px; transform: translateX(-50%); display: grid; gap: 8px; justify-items: center; pointer-events: none; }
.toast { position: relative; overflow: hidden; pointer-events: auto; display: flex; align-items: center; gap: 10px; max-width: min(560px, calc(100vw - 32px)); padding: 10px 14px 10px 12px; border-radius: var(--r-plate); background: var(--ink); color: #fff; font-size: var(--fs-sm); box-shadow: var(--shadow-float); animation: toast-in 220ms var(--ease-out); }
.toast .i { color: var(--toast-ic); }
.toast.err { background: var(--toast-err); }
.toast.err .i { color: var(--toast-err-ic); }
.toast-act { border: 0; background: rgba(255, 255, 255, 0.14); color: #fff; border-radius: var(--r-pill); padding: 4px 10px; font-weight: 600; font-size: var(--fs-xs); cursor: pointer; }
.toast-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--toast-ic); transform-origin: left; transform: scaleX(0); transition: transform 200ms linear; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }
@media (prefers-reduced-motion: reduce) { .toast { animation: none; } }

.dlg { border: 0; padding: 0; width: min(480px, calc(100vw - 32px)); max-height: calc(100dvh - 48px); border-radius: var(--r-card); background: var(--surface); color: var(--text); box-shadow: var(--shadow-lift); display: flex; flex-direction: column; }
.dlg:not([open]) { display: none; }
.dlg.wide { width: min(760px, calc(100vw - 32px)); }
.dlg::backdrop { background: rgba(14, 26, 48, 0.42); }
.dlg-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); padding: var(--s-4) var(--s-5); border-bottom: 1px solid var(--line); }
.dlg-head h2 { font-size: var(--fs-lg); }
.dlg-body { padding: var(--s-5); overflow: auto; display: grid; gap: var(--s-4); }
.dlg-foot { display: flex; justify-content: flex-end; gap: var(--s-2); padding: var(--s-3) var(--s-5) var(--s-4); border-top: 1px solid var(--line); }
.pop { position: fixed; z-index: 250; min-width: 220px; padding: 6px; border-radius: var(--r-plate); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-float); display: grid; gap: 1px; }
.pop button { display: flex; align-items: center; gap: 10px; min-height: 34px; padding: 0 10px; border: 0; border-radius: 8px; background: transparent; text-align: left; font-size: var(--fs-sm); color: var(--ink); cursor: pointer; }
.pop button span { flex: 1; }
.pop button kbd { color: var(--muted); }
.pop button:disabled { opacity: 0.4; cursor: default; }
.pop button.danger { color: var(--error); }
.pop button:hover:not(:disabled) { background: var(--sage); }
.pop button:focus-visible { background: var(--accent-tint); outline: none; box-shadow: inset 0 0 0 2px var(--accent); }
.pop hr { margin: 4px 6px; }

/* ---------- Anmeldung ---------- */
.login-wrap { min-height: 100dvh; display: grid; place-items: center; padding: var(--s-5) var(--s-4); background: var(--midnight); }
.login { width: min(400px, 100%); display: grid; gap: var(--s-4); padding: var(--s-6); border-radius: var(--r-card); background: var(--surface); box-shadow: var(--shadow-lift); }
.login .brand { margin-bottom: var(--s-2); }
.lg-err { color: var(--error); font-size: var(--fs-sm); font-weight: 600; min-height: 1.2em; }
.login .btn { height: 44px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.brand img { width: 38px; height: 38px; border-radius: 50%; }
.brand-t { display: grid; gap: 3px; }
.brand-t b { font-family: var(--font-display); font-weight: 800; font-size: 1.12rem; line-height: 1; letter-spacing: -0.01em; }
.brand-t small { font-size: 0.6rem; font-weight: 600; line-height: 1; letter-spacing: 0.35em; color: var(--brand-icon); }

/* ---------- Übersicht ---------- */
.lib-top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: var(--s-2); padding: 12px clamp(16px, 3vw, 40px); background: var(--midnight); color: var(--on-dark); }
.lib-top .brand { color: var(--on-dark); }
.lib-top .brand img { box-shadow: 0 0 0 2px var(--on-dark); }
.lib-top .brand-t small { color: var(--on-dark-muted); }
.lib-top :focus-visible { outline-color: var(--on-dark); }
.me { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-sm); font-weight: 600; margin-right: var(--s-2); }
.lib-main { max-width: 1180px; margin: 0 auto; padding: var(--s-6) clamp(16px, 3vw, 40px) var(--s-8); }
.lib-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); margin-bottom: var(--s-5); }
.lib-filters { display: flex; flex-wrap: wrap; gap: var(--s-2); align-items: center; margin-bottom: var(--s-4); }
.lib-filters .sel { width: 200px; }
.search { position: relative; width: 220px; }
.search .i { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search input { padding-left: 32px; }
.plist { display: grid; gap: 6px; }
.prow { position: relative; display: grid; grid-template-columns: 52px minmax(0, 1fr) 70px 104px 190px 38px; align-items: center; gap: var(--s-4); padding: 10px 12px; border-radius: var(--r-plate); background: var(--surface); border: 1px solid var(--line); color: inherit; text-decoration: none; transition: border-color var(--t-press) var(--ease-out), box-shadow var(--t-press) var(--ease-out); }
@media (hover: hover) { .prow:hover { border-color: var(--accent-soft); box-shadow: var(--shadow-sm); } }
.pr-thumb { width: 52px; max-height: 92px; justify-self: center; display: grid; place-items: center; border-radius: 6px; overflow: hidden; background: var(--sage-strong); color: var(--accent); }
.pr-thumb img { width: 100%; height: 100%; object-fit: cover; }
.pr-main { display: grid; gap: 3px; min-width: 0; }
.pr-title { color: var(--ink); font-size: var(--fs-md); font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-decoration: none; }
.pr-title::after { content: ""; position: absolute; inset: 0; border-radius: var(--r-plate); }
.pr-title:focus-visible { outline: none; }
.pr-title:focus-visible::after { outline: 3px solid var(--accent); outline-offset: -2px; }
.prow .btn { position: relative; z-index: 1; }
.pr-sub { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: var(--fs-xs); color: var(--muted); }
.pr-sub > span { display: inline-flex; align-items: center; gap: 5px; }
.pr-ref.none { color: var(--faint); }
.pr-fmt { display: grid; font-weight: 650; color: var(--ink); font-size: var(--fs-sm); font-variant-numeric: tabular-nums; }
.pr-fmt small { color: var(--muted); font-weight: 500; font-size: var(--fs-xs); }
.pr-when { font-size: var(--fs-xs); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pres { display: inline-flex; align-items: center; gap: 5px; color: var(--success); font-weight: 600; }
.plist-skel { display: grid; gap: 6px; }
.plist-skel i { display: block; height: 76px; border-radius: var(--r-plate); background: linear-gradient(90deg, var(--sage) 0%, var(--sage-soft) 50%, var(--sage) 100%); background-size: 200% 100%; animation: skel 1.4s ease-in-out infinite; }
@keyframes skel { to { background-position: -200% 0; } }
.lib-empty { max-width: 520px; margin: var(--s-7) auto; display: grid; gap: var(--s-3); justify-items: start; padding: var(--s-6); background: var(--surface); border-radius: var(--r-card); border: 1px solid var(--line); }
.lib-empty h2 { font-size: var(--fs-xl); }
@media (max-width: 860px) {
  .prow { grid-template-columns: 44px minmax(0, 1fr) auto 38px; gap: var(--s-3); }
  .pr-fmt, .pr-when { display: none; }
  .lib-filters .sel, .search { width: 100%; }
  .lib-filters > .seg { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
  .lib-top .btn .lbl, .me { display: none; }
  .lib-top .btn { width: 44px; height: 44px; padding: 0; }
  .prow .btn.icon.sm { width: 44px; height: 44px; }
  .lib-filters > .seg > button { min-height: 40px; }
  .lib-head .btn { height: 44px; }
  .lib-head h1 { font-size: var(--fs-xl); }
  .chip { white-space: nowrap; }
  .pr-title { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.3; }
}

/* Neues Projekt */
.np { display: grid; gap: var(--s-4); }
.fmt-pick { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s-2); }
.fmt { position: relative; display: grid; justify-items: center; gap: 4px; padding: var(--s-3) var(--s-2); border: 1px solid var(--line-strong); border-radius: var(--r-plate); cursor: pointer; text-align: center; transition: border-color var(--t-press) var(--ease-out), background-color var(--t-press) var(--ease-out); }
.fmt input { position: absolute; opacity: 0; }
.fmt-box { height: 44px; border: 2px solid var(--accent); border-radius: 4px; background: var(--accent-tint); }
.fmt b { font-size: var(--fs-sm); color: var(--ink); }
.fmt small { font-size: var(--fs-2xs); color: var(--muted); line-height: 1.3; }
.fmt:has(input:checked) { border-color: var(--accent); background: var(--accent-tint); box-shadow: inset 0 0 0 1px var(--accent); }
.fmt:has(input:focus-visible) { outline: 3px solid var(--accent); outline-offset: 2px; }
.np-ref { border: 1px solid var(--line); border-radius: var(--r-plate); padding: var(--s-4); display: grid; gap: var(--s-3); margin: 0; }
.np-ref legend { padding: 0 6px; font-weight: 650; color: var(--ink); font-size: var(--fs-sm); }
.np-pane { display: grid; gap: 6px; }
.url-hint { font-size: var(--fs-xs); color: var(--success); min-height: 1.2em; }
.url-hint.bad { color: var(--error); }
.np-thumbs { display: flex; flex-wrap: wrap; gap: 8px; }
.np-thumbs figure { position: relative; width: 64px; height: 84px; border-radius: 8px; overflow: hidden; background: var(--sage); }
.np-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.np-thumbs button { position: absolute; top: 3px; right: 3px; width: 22px; height: 22px; border-radius: 50%; border: 0; background: rgba(14, 26, 48, 0.72); color: #fff; display: grid; place-items: center; cursor: pointer; }
@media (max-width: 600px) { .fmt-pick { grid-template-columns: repeat(2, 1fr); } .grid2 { grid-template-columns: 1fr; } }

/* ---------- Schnittraum ---------- */
.editor { --lib-w: 316px; --insp-w: 300px; --tl-h: 344px; display: grid; grid-template-rows: 56px minmax(0, 1fr) var(--tl-h); height: 100dvh; background: var(--bg); }
.editor.dropping::after { content: "Dateien ablegen zum Importieren"; position: fixed; inset: 8px; z-index: 100; display: grid; place-items: center; border: 2px dashed var(--accent); border-radius: var(--r-card); background: rgba(227, 236, 249, 0.82); color: var(--accent); font-weight: 700; font-size: var(--fs-lg); pointer-events: none; }
.ed-top { display: flex; align-items: center; gap: var(--s-3); padding: 0 var(--s-3) 0 var(--s-2); background: var(--midnight); color: var(--on-dark); }
.ed-top :focus-visible { outline-color: var(--on-dark); }
.ed-top .btn.ghost { color: var(--on-dark-muted); }
.ed-top .btn.ghost:hover:not(:disabled) { background: var(--dark-hover); color: var(--on-dark); }
.ed-mark { width: 28px; height: 28px; border-radius: 50%; box-shadow: 0 0 0 2px var(--on-dark); }
.ed-ttl { display: grid; min-width: 0; flex: 0 1 420px; }
.ed-title { min-height: 26px !important; padding: 0 6px !important; margin-left: -6px; border: 1px solid transparent !important; background: transparent !important; color: var(--on-dark) !important; font-family: var(--font-display); font-weight: 700; font-size: var(--fs-md); border-radius: 6px !important; box-shadow: none !important; text-overflow: ellipsis; }
.ed-title:hover { border-color: var(--dark-line) !important; }
.ed-title:focus { border-color: var(--on-dark) !important; background: rgba(255, 255, 255, 0.08) !important; }
.ed-sub { display: flex; align-items: center; gap: 12px; font-size: var(--fs-2xs); color: var(--on-dark-muted); white-space: nowrap; overflow: hidden; }
.ed-sub > span { display: inline-flex; align-items: center; gap: 4px; }
.ed-sub .pres { color: var(--on-dark-ok); }
.ed-save[data-s="err"] { color: var(--on-dark-bad); }
.ed-mid { display: flex; gap: 2px; margin-left: auto; }
.ed-right { display: flex; align-items: center; gap: var(--s-2); margin-left: var(--s-3); }
.ed-status { width: auto; min-height: 32px; padding: 0 28px 0 12px; border-radius: var(--r-pill); background: rgba(255, 255, 255, 0.1); border-color: var(--dark-line); color: var(--on-dark); font-size: var(--fs-xs); font-weight: 600; appearance: none; cursor: pointer; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23d7e3f4' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-size: 14px; background-position: right 9px center; }
.ed-status option { color: var(--ink); }
.ed-right .btn.primary { background: var(--surface); color: var(--accent); border-color: var(--surface); }
.ed-right .btn.primary:hover { background: var(--accent-tint) !important; border-color: var(--accent-tint) !important; }

.ed-main { display: grid; grid-template-columns: var(--lib-w) minmax(0, 1fr) var(--insp-w); min-height: 0; border-bottom: 1px solid var(--line); }
.ed-lib { display: grid; grid-template-columns: 68px minmax(0, 1fr); min-height: 0; background: var(--surface); border-right: 1px solid var(--line); }
.lib-tabs { display: flex; flex-direction: column; gap: 2px; padding: 8px 6px; border-right: 1px solid var(--line); background: var(--sage-soft); overflow-y: auto; scrollbar-width: none; }
.lib-tabs button { display: grid; justify-items: center; gap: 3px; padding: 9px 2px 7px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); font-size: 0.64rem; font-weight: 600; cursor: pointer; transition: background-color var(--t-press) var(--ease-out), color var(--t-press) var(--ease-out); }
.lib-tabs button .i { width: 20px; height: 20px; }
.lib-tabs button[aria-selected="true"] { background: var(--accent-tint); color: var(--accent); }
@media (hover: hover) { .lib-tabs button:hover:not([aria-selected="true"]) { background: var(--hover); color: var(--ink); } }
.lib-body { min-height: 0; overflow-y: auto; }
.lib-pane, .ref { display: grid; gap: var(--s-3); padding: var(--s-3); align-content: start; }
.lib-h { margin-top: var(--s-2); color: var(--muted); font-size: var(--fs-xs); font-weight: 650; }

/* Medienkacheln */
.mgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.mtile { position: relative; display: grid; gap: 4px; padding: 4px; border-radius: 10px; border: 1px solid transparent; cursor: grab; user-select: none; transition: border-color var(--t-press) var(--ease-out), background-color var(--t-press) var(--ease-out); }
.mtile:focus-visible { outline-offset: 0; }
@media (hover: hover) { .mtile:hover { background: var(--sage-soft); border-color: var(--line); } .mtile:hover .mt-del { opacity: 1; } }
.mt-thumb { position: relative; aspect-ratio: 16 / 10; border-radius: 7px; overflow: hidden; background: var(--sage-strong); }
.mt-thumb img { width: 100%; height: 100%; object-fit: cover; }
.mt-ph { width: 100%; height: 100%; display: grid; place-items: center; color: var(--accent); }
.mtile.audio .mt-thumb { background: var(--accent-tint); }
.mt-dur, .mt-res { position: absolute; bottom: 4px; padding: 1px 5px; border-radius: 4px; background: rgba(14, 26, 48, 0.78); color: #fff; font-size: 0.62rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.mt-dur { right: 4px; }
.mt-res { left: 4px; }
.mt-used { position: absolute; top: 4px; right: 4px; width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: #fff; }
.mt-used .i { width: 11px; height: 11px; stroke-width: 2.6; }
.mt-prog { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(255, 255, 255, 0.6); }
.mt-prog i { display: block; height: 100%; background: var(--accent); transform-origin: left; transition: transform 200ms linear; }
.mt-meta { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: 4px; padding: 0 2px; }
.mt-name { font-size: var(--fs-xs); font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mt-sub { grid-column: 1; font-size: 0.66rem; color: var(--muted); }
.mt-del { grid-column: 2; grid-row: 1 / span 2; width: 26px; height: 26px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); display: grid; place-items: center; cursor: pointer; opacity: 0; transition: opacity var(--t-press) var(--ease-out); }
.mt-del:focus-visible { opacity: 1; }
.mt-del:hover { background: var(--error-tint); color: var(--error); }
.mtile.warn .mt-thumb::after, .mtile.err .mt-thumb::after { content: ""; position: absolute; inset: 0; background: rgba(180, 35, 24, 0.22); }
.exports { display: grid; gap: 6px; }
.exports li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; background: var(--sage-soft); }
.exports li > span { display: grid; flex: 1; min-width: 0; }
.exports b { font-size: var(--fs-xs); color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.exports small { font-size: 0.66rem; color: var(--muted); }

/* Text-Vorlagen */
.tgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.ttile { display: grid; gap: 6px; padding: 8px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; text-align: center; transition: border-color var(--t-press) var(--ease-out); }
.ttile:hover { border-color: var(--accent); }
.tt-sample { display: grid; place-items: center; height: 58px; padding: 0 6px; border-radius: 7px; font-size: 0.95rem; line-height: 1.05; background-color: var(--sample-bg) !important; overflow: hidden; }
.tt-sample[style*="background: rgb"] { background-clip: content-box; }
.tt-name { font-size: var(--fs-xs); font-weight: 600; color: var(--ink); }

/* Untertitel-Stile */
.cap-styles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.cap-style { display: grid; gap: 6px; padding: 8px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; }
.cap-style[aria-pressed="true"] { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.cap-style small { font-size: var(--fs-xs); font-weight: 600; color: var(--ink); }
.cs-demo { display: block; padding: 12px 4px; border-radius: 7px; background: var(--sample-bg); color: #fff; font: 850 0.86rem/1 Montserrat, var(--font); text-align: center; letter-spacing: 0.01em; }
.cs-demo i { font-style: normal; }
.cs-demo.karaoke .on { color: #ffd23f; }
.cs-demo.box .on { background: #ffd23f; color: #0b0f19; padding: 1px 4px; border-radius: 4px; }
.cs-demo.pop i:last-child { opacity: 0.25; }
.cs-demo.clean { font-weight: 600; font-family: var(--font); }
.cs-demo.single i:not(.on) { display: none; }
.cs-demo.single .on { font-size: 1.1rem; }
.caplist { display: grid; gap: 2px; max-height: 260px; overflow: auto; }
.caplist button { display: flex; gap: 10px; width: 100%; padding: 6px 8px; border: 0; border-radius: 7px; background: transparent; text-align: left; cursor: pointer; font-size: var(--fs-xs); }
.caplist button:hover { background: var(--sage); }
.caplist time { color: var(--muted); font-variant-numeric: tabular-nums; min-width: 42px; }

/* Übergänge, Looks */
.trlist { display: grid; gap: 4px; }
.trlist li { display: flex; align-items: center; gap: 10px; padding: 6px 6px 6px 8px; border-radius: 10px; border: 1px solid var(--line); }
.tr-ic { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 8px; background: var(--accent-tint); color: var(--accent); flex: none; }
.tr-l { display: grid; flex: 1; min-width: 0; }
.tr-l b { font-size: var(--fs-xs); color: var(--ink); }
.tr-l small { font-size: 0.66rem; color: var(--muted); }
.lgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.ltile { position: relative; }
.ltile > button:first-child { display: grid; gap: 5px; width: 100%; padding: 4px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); cursor: pointer; text-align: left; font-size: var(--fs-xs); font-weight: 600; color: var(--ink); }
.ltile > button:first-child:hover { border-color: var(--accent); }
.ltile img, .lt-ph { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 7px; }
.lt-ph { display: block; background: var(--sample-ph); }
.lt-all { position: absolute; top: 8px; right: 8px; border: 0; border-radius: var(--r-pill); padding: 2px 8px; background: rgba(14, 26, 48, 0.72); color: #fff; font-size: 0.64rem; font-weight: 600; cursor: pointer; }

/* Referenz */
.ref-part { display: grid; gap: var(--s-2); padding-top: var(--s-3); border-top: 1px solid var(--line); }
.ref > .ref-part:nth-child(2) { border-top: 0; padding-top: 0; }
.ref-url { display: flex; gap: 6px; }
.ref-card { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 10px; padding: 8px; border-radius: 10px; background: var(--sage-soft); border: 1px solid var(--line); }
.ref-card img, .ref-noimg { width: 76px; height: 104px; object-fit: cover; border-radius: 7px; background: var(--sage-strong); display: grid; place-items: center; color: var(--accent); }
.ref-meta { display: grid; gap: 4px; align-content: start; min-width: 0; }
.ref-meta b { font-size: var(--fs-sm); color: var(--ink); line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.ref-meta small { font-size: var(--fs-xs); color: var(--muted); }
.ref-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.ref-grid figure { position: relative; }
.ref-img { display: block; width: 100%; padding: 0; border: 0; border-radius: 7px; overflow: hidden; cursor: zoom-in; background: var(--sage); }
.ref-img img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; }
.ref-del { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border: 0; border-radius: 50%; display: grid; place-items: center; background: rgba(14, 26, 48, 0.72); color: #fff; cursor: pointer; opacity: 0; transition: opacity var(--t-press) var(--ease-out); }
.ref-grid figure:hover .ref-del, .ref-del:focus-visible { opacity: 1; }
.palette { display: flex; gap: 4px; }
.palette i { flex: 1; height: 22px; border-radius: 5px; box-shadow: inset 0 0 0 1px rgba(14, 26, 48, 0.1); }
.taps { display: grid; gap: 4px; }
.tapbar { position: relative; height: 26px; border-radius: 6px; background: var(--sage); overflow: hidden; }
.tapbar i { position: absolute; top: 4px; bottom: 4px; width: 2px; margin-left: -1px; border-radius: 1px; background: var(--accent); }
.taps small { font-size: var(--fs-xs); color: var(--muted); font-variant-numeric: tabular-nums; }
.recipe { display: grid; gap: 10px; padding: 12px; border-radius: 10px; background: var(--sage-soft); border: 1px solid var(--line); font-size: var(--fs-xs); }
.recipe > p { font-size: var(--fs-sm); color: var(--ink); line-height: 1.45; }
.recipe dl { display: grid; grid-template-columns: 74px minmax(0, 1fr); gap: 6px 10px; }
.recipe dt { color: var(--muted); font-weight: 600; }
.recipe dd { color: var(--ink); }
.recipe q { display: block; margin-top: 2px; font-weight: 650; }
.recipe .sw { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: -2px; margin-left: 3px; box-shadow: inset 0 0 0 1px rgba(14, 26, 48, 0.2); }
.recipe summary { cursor: pointer; font-weight: 650; color: var(--ink); }
.struct { display: grid; gap: 4px; margin-top: 6px; padding-left: 0; }
.dash { display: grid; gap: 3px; margin-top: 6px; }
.dash li { padding-left: 14px; position: relative; }
.dash li::before { content: ""; position: absolute; left: 2px; top: 0.62em; width: 6px; height: 1.5px; background: var(--accent); }

/* Mitte: Bühne und Transport */
.ed-center { display: grid; grid-template-rows: minmax(0, 1fr) 48px; min-width: 0; min-height: 0; background: var(--stage); }
.stage { position: relative; display: flex; align-items: center; justify-content: center; gap: 16px; padding: 16px; min-height: 0; overflow: hidden; }
.stage-main { display: grid; place-items: center; }
.screen { position: relative; border-radius: 4px; overflow: hidden; background: #0b1220; box-shadow: 0 1px 2px rgba(14, 26, 48, 0.12), 0 18px 40px -18px rgba(14, 26, 48, 0.4); touch-action: none; }
.viewer { width: 100%; height: 100%; }
.viewer-empty { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 8px; padding: 24px; text-align: center; background: var(--surface); color: var(--muted); font-size: var(--fs-xs); line-height: 1.45; border: 1.5px dashed var(--line-strong); border-radius: 4px; }
.viewer-empty .i { width: 28px; height: 28px; color: var(--accent); }
.viewer-empty b { color: var(--ink); font-size: var(--fs-sm); }
.selbox { position: absolute; left: 0; top: 0; transform-origin: center; outline: 1.5px solid #fff; box-shadow: 0 0 0 1px rgba(29, 71, 144, 0.9), inset 0 0 0 1px rgba(29, 71, 144, 0.9); pointer-events: none; }
.selbox .hd { position: absolute; width: 12px; height: 12px; border-radius: 3px; background: #fff; border: 1.5px solid var(--accent); pointer-events: auto; }
.hd.tl { left: -6px; top: -6px; cursor: nwse-resize; } .hd.tr { right: -6px; top: -6px; cursor: nesw-resize; }
.hd.bl { left: -6px; bottom: -6px; cursor: nesw-resize; } .hd.br { right: -6px; bottom: -6px; cursor: nwse-resize; }
.guides i { position: absolute; background: var(--guide); opacity: 0; pointer-events: none; }
.guides .gx { left: 50%; top: 0; bottom: 0; width: 1px; }
.guides .gy { top: 50%; left: 0; right: 0; height: 1px; }
.guides.x .gx, .guides.y .gy { opacity: 0.9; }
/* Sicherheitszonen (Anteile laut Plattform-Bedienelementen, gerundet) */
.safe { position: absolute; inset: 0; pointer-events: none; }
.safe.hide { display: none; }
.safe i { position: absolute; background: rgba(255, 255, 255, 0.1); outline: 1px dashed rgba(255, 255, 255, 0.55); outline-offset: -1px; }
.safe .z-top { left: 0; right: 0; top: 0; height: 9%; }
.safe .z-bottom { left: 0; right: 0; bottom: 0; height: 22%; }
.safe .z-right { right: 0; top: 40%; bottom: 22%; width: 15%; }
.safe.tiktok .z-bottom { height: 25%; } .safe.tiktok .z-right { width: 16%; top: 36%; bottom: 25%; }
.safe.shorts .z-bottom { height: 20%; } .safe.shorts .z-top { height: 7%; } .safe.shorts .z-right { width: 14%; top: 45%; bottom: 20%; }
.z-lab { position: absolute; left: 8px; top: 8px; padding: 1px 6px; border-radius: 4px; background: rgba(14, 26, 48, 0.6); color: #fff; font-size: 0.62rem; font-weight: 600; }
.refcol { position: relative; border-radius: 4px; overflow: hidden; background: var(--surface); box-shadow: 0 1px 2px rgba(14, 26, 48, 0.12), 0 18px 40px -18px rgba(14, 26, 48, 0.4); display: grid; place-items: center; }
.refcol iframe { width: 100%; height: 100%; border: 0; }
.refcol > img { width: 100%; height: 100%; object-fit: contain; background: #0b1220; }
.refcol-x { position: absolute; top: 8px; right: 8px; z-index: 2; background: var(--surface) !important; }
.refcol-nav { position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 8px; padding: 4px; border-radius: var(--r-pill); background: var(--surface); box-shadow: var(--shadow-sm); }
.refcol-n { font-size: var(--fs-xs); font-weight: 600; font-variant-numeric: tabular-nums; }
.consent { display: grid; justify-items: center; gap: 8px; padding: 24px; text-align: center; font-size: var(--fs-xs); color: var(--muted); }
.consent .i { width: 26px; height: 26px; color: var(--accent); }
.consent b { color: var(--ink); font-size: var(--fs-sm); }
.transport { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 0 12px; background: var(--surface); border-top: 1px solid var(--line); }
.tp-l { display: flex; align-items: baseline; gap: 6px; }
.tc { font: 600 var(--fs-sm)/1 var(--font); font-variant-numeric: tabular-nums; color: var(--ink); letter-spacing: 0.01em; }
.tc.all, .tc-sep { color: var(--muted); font-weight: 500; }
.tp-c { display: flex; align-items: center; gap: 4px; }
.btn.play { width: 40px; height: 40px; background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.play:hover { background: var(--accent-hover) !important; }
.tp-r { display: flex; justify-content: flex-end; gap: 4px; }
.tp-r .btn[aria-pressed="true"] { background: var(--accent-tint); color: var(--accent); }

/* Inspektor */
.ed-insp { min-height: 0; overflow-y: auto; background: var(--surface); border-left: 1px solid var(--line); }
.insp-body { display: grid; align-content: start; }
.insp-title { display: grid; gap: 2px; padding: 14px 16px 12px; border-bottom: 1px solid var(--line); }
.insp-title b { color: var(--ink); font-size: var(--fs-sm); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.insp-title small { color: var(--muted); font-size: var(--fs-xs); font-variant-numeric: tabular-nums; }
.insp-warn { display: flex; gap: 8px; margin: 12px 16px 0; padding: 10px 12px; border-radius: 10px; background: var(--error-tint); color: var(--error); font-size: var(--fs-xs); line-height: 1.45; }
.insp-warn .i { flex: none; margin-top: 1px; }
.insp-actions { display: flex; gap: 6px; padding: 14px 16px 20px; }
.sec { border-bottom: 1px solid var(--line); }
.sec > summary { display: flex; align-items: center; gap: 8px; padding: 12px 16px; cursor: pointer; list-style: none; font-size: var(--fs-xs); font-weight: 700; color: var(--ink); letter-spacing: 0.01em; user-select: none; }
.sec > summary::-webkit-details-marker { display: none; }
.sec > summary > span:first-child { flex: 1; }
.sec-chev { color: var(--muted); transition: transform var(--t-ui) var(--ease-out); }
.sec:not([open]) .sec-chev { transform: rotate(-90deg); }
.sec-body { display: grid; gap: 12px; padding: 0 16px 16px; }
.ctl { display: grid; gap: 6px; }
.ctl > label, .ctl-l { font-size: var(--fs-xs); font-weight: 600; color: var(--muted); }
.sl-row { display: grid; grid-template-columns: minmax(0, 1fr) 62px auto; gap: 8px; align-items: center; }
.sl-num { min-height: 28px !important; padding: 2px 6px !important; font-size: var(--fs-xs) !important; text-align: right; font-variant-numeric: tabular-nums; border-radius: 7px !important; }
input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 22px; background: transparent; cursor: pointer; }
input[type="range"]::-webkit-slider-runnable-track { height: 4px; border-radius: 2px; background: var(--sage-strong); }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; margin-top: -6px; border-radius: 50%; background: var(--surface); border: 2px solid var(--accent); box-shadow: 0 1px 3px rgba(14, 26, 48, 0.25); transition: transform var(--t-press) var(--ease-out); }
input[type="range"]:active::-webkit-slider-thumb { transform: scale(1.15); }
input[type="range"]::-moz-range-track { height: 4px; border-radius: 2px; background: var(--sage-strong); }
input[type="range"]::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: var(--surface); border: 2px solid var(--accent); }
input[type="range"]:focus-visible { outline: none; }
input[type="range"]:focus-visible::-webkit-slider-thumb { outline: 2px solid var(--accent); outline-offset: 2px; }
.kf { width: 26px; height: 26px; display: grid; place-items: center; border: 0; border-radius: 6px; background: transparent; color: var(--faint); cursor: pointer; }
.kf:hover { background: var(--sage); color: var(--ink); }
.kf.has { color: var(--accent); }
.kf.on .i { fill: var(--accent); }
.ctl.tg label { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: var(--fs-xs); font-weight: 600; color: var(--text); cursor: pointer; }
.ctl.tg label > span { display: grid; gap: 1px; }
.ctl.tg small { font-weight: 500; color: var(--muted); }
input[role="switch"] { -webkit-appearance: none; appearance: none; flex: none; width: 34px; height: 20px; border-radius: 10px; background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--faint); position: relative; cursor: pointer; transition: background-color var(--t-ui) var(--ease-out); }
input[role="switch"]::after { content: ""; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: var(--faint); transition: transform var(--t-ui) var(--ease-out); }
input[role="switch"]:checked { background: var(--accent); box-shadow: none; }
input[role="switch"]:checked::after { transform: translateX(14px); background: #fff; }
input[role="switch"]:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.col-row { display: flex; align-items: center; gap: 8px; }
input[type="color"] { width: 34px; height: 28px; padding: 2px; border: 1px solid var(--line-strong); border-radius: 7px; background: var(--surface); cursor: pointer; }
.col-row code { font: 600 var(--fs-xs)/1 var(--font); color: var(--muted); font-variant-numeric: tabular-nums; }
.match { display: grid; gap: 10px; padding: 10px; border-radius: 10px; background: var(--sage-soft); }
.keys { display: grid; grid-template-columns: auto 1fr; gap: 6px 10px; align-items: center; font-size: var(--fs-xs); }
.keys dd { color: var(--text); }

/* Zeitleiste */
.ed-tl { display: grid; grid-template-rows: 42px minmax(0, 1fr); min-height: 0; background: var(--surface); position: relative; }
.ed-tl::before { content: ""; position: absolute; left: 0; right: 0; top: -4px; height: 8px; cursor: ns-resize; z-index: 5; }
.tl-tools { display: flex; align-items: center; gap: 4px; padding: 0 8px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tgroup { display: flex; align-items: center; gap: 2px; padding-right: 6px; margin-right: 4px; border-right: 1px solid var(--line); }
.tgroup.end { margin-left: auto; border-right: 0; margin-right: 0; padding-right: 0; }
.tgroup.auto { border-right: 0; }
.tbtn { display: inline-flex; align-items: center; gap: 6px; height: 30px; min-width: 30px; justify-content: center; padding: 0 8px; border: 0; border-radius: 8px; background: transparent; color: var(--text); font-size: var(--fs-xs); font-weight: 600; cursor: pointer; white-space: nowrap; transition: background-color var(--t-press) var(--ease-out), color var(--t-press) var(--ease-out); }
.tbtn:hover { background: var(--sage); color: var(--ink); }
.tbtn[aria-pressed="true"] { background: var(--accent-tint); color: var(--accent); }
.tgroup.auto .tbtn { color: var(--accent); }
.tl { display: grid; grid-template-rows: 0 minmax(0, 1fr); min-height: 0; }
.tl-corner { position: relative; height: 0; }
.tl-tc { position: absolute; z-index: 4; left: 0; top: 0; width: 186px; height: 30px; display: flex; align-items: center; padding-left: 12px; font-size: 0.72rem; font: 650 var(--fs-xs)/1 var(--font); color: var(--accent); font-variant-numeric: tabular-nums; background: var(--surface); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.tl-body { display: grid; grid-template-columns: 186px minmax(0, 1fr); min-height: 0; overflow-y: auto; overflow-x: hidden; }
.tl-heads { background: var(--surface); border-right: 1px solid var(--line); }
.tl-head-ruler { border-bottom: 1px solid var(--line); }
.tl-head { display: flex; align-items: center; justify-content: space-between; gap: 2px; padding: 0 4px 0 10px; border-bottom: 1px solid var(--lane-line); font-size: var(--fs-xs); font-weight: 600; color: var(--text); }
.tl-head.main { background: var(--sage-soft); color: var(--ink); }
.tl-hname { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.tl-hname .i { color: var(--brand-icon); }
.tl-hbtns { display: flex; }
.tl-tbtn { width: 22px; height: 24px; display: grid; place-items: center; border: 0; border-radius: 6px; background: transparent; color: var(--faint); cursor: pointer; }
.tl-tbtn:hover { background: var(--sage); color: var(--ink); }
.tl-tbtn[aria-pressed="true"] { color: var(--accent); }
.tl-scroll { position: relative; overflow-x: auto; overflow-y: hidden; background: var(--lane); }
.tl-ruler { position: sticky; top: 0; left: 0; z-index: 3; display: block; height: 30px; background: var(--surface); border-bottom: 1px solid var(--line); cursor: text; }
.tl-lanes { position: relative; }
.tl-lane { position: relative; border-bottom: 1px solid var(--lane-line); }
.tl-lane.main { background: var(--lane-main); }
.tl-lane.locked { background-image: repeating-linear-gradient(-45deg, transparent 0 6px, rgba(14, 26, 48, 0.035) 6px 12px); }
.tl-lane.drop { box-shadow: inset 0 0 0 2px var(--accent); background: var(--accent-tint); }
.tl-empty { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: var(--fs-xs); pointer-events: none; }
.tl-markers { position: absolute; inset: 0; pointer-events: none; }
.tl-marker { position: absolute; top: 0; bottom: 0; width: 0; border-left: 1px solid rgba(29, 71, 144, 0.16); }
.tl-marker.user { border-left: 1.5px solid var(--ink); }
.tl-marker.ref { border-left: 1.5px dashed var(--ink); }
.tl-playhead { position: absolute; z-index: 6; top: 0; bottom: 0; left: 0; width: 2px; margin-left: -1px; background: var(--playhead); border-left: 1px solid rgba(255, 255, 255, 0.85); border-right: 1px solid rgba(255, 255, 255, 0.85); background-clip: padding-box; width: 4px; margin-left: -2px; cursor: ew-resize; }
.tl-playhead i { position: absolute; top: 0; left: -6px; width: 14px; height: 18px; background: var(--playhead); clip-path: polygon(0 0, 100% 0, 100% 60%, 50% 100%, 0 60%); }
.tl-snap { position: absolute; z-index: 5; top: 0; bottom: 0; left: 0; width: 1px; background: var(--snap); pointer-events: none; }
.tl-blade { position: absolute; z-index: 5; top: 30px; bottom: 0; left: 0; width: 1px; background: var(--error); pointer-events: none; }
.tl-tip { position: absolute; z-index: 7; left: 0; top: 0; padding: 3px 8px; border-radius: 6px; background: var(--ink); color: #fff; font-size: var(--fs-2xs); font-weight: 600; white-space: nowrap; pointer-events: none; font-variant-numeric: tabular-nums; }
.clip { position: absolute; top: 4px; bottom: 4px; border-radius: var(--r-clip); overflow: hidden; color: #fff; background: var(--clip-video); box-shadow: inset 0 0 0 1px rgba(14, 26, 48, 0.25); cursor: grab; user-select: none; }
.clip.has-strip::before { content: ""; position: absolute; inset: 0; background-image: var(--strip); background-size: var(--strip-w) 100%; background-position: var(--strip-x) 0; background-repeat: no-repeat; opacity: 0.55; }
.clip.has-poster::before { content: ""; position: absolute; inset: 0; background-image: var(--strip); background-size: auto 100%; background-repeat: repeat-x; opacity: 0.55; }
.clip.image { background: var(--clip-image); }
.clip.color { background: var(--clip-color); }
.clip.text { background: var(--clip-text); color: var(--clip-text-ink); box-shadow: inset 0 0 0 1px rgba(29, 71, 144, 0.35); }
.clip.caption { background: var(--clip-cap); color: var(--clip-text-ink); box-shadow: inset 0 0 0 1px rgba(29, 71, 144, 0.25); }
.clip.audio { background: var(--clip-audio); color: var(--clip-audio-ink); box-shadow: inset 0 0 0 1px rgba(29, 71, 144, 0.35); }
.clip.sel { box-shadow: inset 0 0 0 2px #fff; outline: 2px solid var(--ink); outline-offset: 0; z-index: 2; }
.clip.text.sel, .clip.caption.sel, .clip.audio.sel { box-shadow: inset 0 0 0 2px var(--accent); }
.clip.off { opacity: 0.45; }
.clip.warn { background: repeating-linear-gradient(-45deg, var(--clip-bad-1) 0 8px, var(--clip-bad-2) 8px 16px); }
.clip-label { position: relative; z-index: 1; display: flex; align-items: center; gap: 4px; padding: 4px 8px; font-size: 0.7rem; font-weight: 650; white-space: nowrap; overflow: hidden; text-shadow: 0 1px 2px rgba(14, 26, 48, 0.5); }
.clip.text .clip-label, .clip.caption .clip-label, .clip.audio .clip-label { text-shadow: none; }
.clip-name { overflow: hidden; text-overflow: ellipsis; }
.cb { display: inline-flex; align-items: center; gap: 2px; padding: 1px 4px; border-radius: 4px; background: rgba(255, 255, 255, 0.22); font-weight: 650; font-size: 0.64rem; flex: none; }
.clip.text .cb, .clip.audio .cb { background: var(--accent-soft); }
.clip .wave { position: absolute; left: 0; right: 0; bottom: 0; height: 52%; width: 100%; color: rgba(255, 255, 255, 0.75); pointer-events: none; }
.clip.audio .wave { height: 64%; color: var(--clip-audio-ink); opacity: 0.75; }
.clip.muted .wave { opacity: 0.25; }
.trans-badge { position: absolute; z-index: 2; left: 0; top: 0; bottom: 0; display: grid; place-items: center; background: rgba(255, 255, 255, 0.28); border-right: 1px dashed rgba(255, 255, 255, 0.8); color: #fff; }
.fade { position: absolute; z-index: 1; top: 0; bottom: 0; pointer-events: none; background: rgba(14, 26, 48, 0.18); }
.fade.l { left: 0; clip-path: polygon(0 0, 0 100%, 100% 0); }
.fade.r { right: 0; clip-path: polygon(0 0, 100% 100%, 100% 0); }
.edge { position: absolute; z-index: 3; top: 0; bottom: 0; width: 7px; cursor: ew-resize; }
.edge.l { left: 0; } .edge.r { right: 0; }
.clip.sel .edge { background: rgba(255, 255, 255, 0.35); }
.clip.sel .edge.l { border-radius: var(--r-clip) 0 0 var(--r-clip); } .clip.sel .edge.r { border-radius: 0 var(--r-clip) var(--r-clip) 0; }
.blade .clip { cursor: crosshair; }

/* Export */
.exp { display: grid; gap: var(--s-4); }
.exp fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 8px; }
.exp legend { font-size: var(--fs-xs); font-weight: 700; color: var(--ink); margin-bottom: 6px; }
.opts { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; }
.opts.row3 { grid-template-columns: repeat(3, 1fr); } .opts.row4 { grid-template-columns: repeat(5, 1fr); }
.opt { position: relative; display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line-strong); cursor: pointer; transition: border-color var(--t-press) var(--ease-out), background-color var(--t-press) var(--ease-out); }
.opt input { margin-top: 2px; }
.opt > span { display: grid; gap: 1px; }
.opt b { font-size: var(--fs-xs); color: var(--ink); }
.opt small { font-size: 0.68rem; color: var(--muted); }
.opt:has(input:checked) { border-color: var(--accent); background: var(--accent-tint); }
.opt.off { opacity: 0.5; cursor: not-allowed; }
.exp-sum { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 10px; background: var(--sage); color: var(--ink); font-size: var(--fs-xs); font-weight: 600; font-variant-numeric: tabular-nums; }
.exp-run { display: grid; gap: 12px; }
.pbar { height: 8px; border-radius: 4px; background: var(--sage-strong); overflow: hidden; }
.pbar i { display: block; height: 100%; background: var(--accent); transform-origin: left; transform: scaleX(0); transition: transform 240ms linear; }
.exp-info { font-size: var(--fs-sm); color: var(--ink); font-variant-numeric: tabular-nums; }
.exp-results { display: grid; gap: 16px; }
.exp-res { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 16px; align-items: start; }
.exp-res video { width: 180px; max-height: 320px; border-radius: 8px; background: #0b1220; }
.exp-res-meta { display: grid; gap: 6px; }
.exp-res-meta b { color: var(--ink); }
.exp-res-meta small { color: var(--muted); font-size: var(--fs-xs); }
.exp-saved { display: grid; place-items: center; gap: 6px; height: 120px; border-radius: 8px; background: var(--success-tint); color: var(--success); font-size: var(--fs-xs); text-align: center; padding: 8px; }

/* Kleine Bildschirme: Schnitt nur am Mac */
.ed-narrow { display: none; }
@media (max-width: 1100px) { .editor { --lib-w: 280px; --insp-w: 260px; } }
@media (max-width: 899px) {
  .editor { display: none; }
  .ed-narrow { display: grid; place-content: center; justify-items: center; gap: 12px; min-height: 100dvh; padding: 24px 16px; text-align: center; background: var(--bg); }
  .ed-narrow .i { width: 36px; height: 36px; color: var(--accent); }
  .ed-narrow b { color: var(--ink); font-size: var(--fs-lg); font-family: var(--font-display); }
  .ed-narrow p { max-width: 34ch; color: var(--muted); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 1ms !important; animation-duration: 1ms !important; }
  /* Ladeanzeigen bleiben sichtbar, nur ruhiger */
  .spinner, .btn.busy::after { animation-duration: 2.4s !important; }
  .plist-skel i { animation: none !important; }
}

/* Nachbesserungen nach Finish-Review */
.ed-fmt { padding: 0 6px; border-radius: 4px; background: rgba(255, 255, 255, 0.12); font-variant-numeric: tabular-nums; }
.clip.tiny .clip-label, .clip.tiny .edge { display: none; }
.clip.tiny { border-radius: 4px; }
.mt-name { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.25; }
.mt-cloud { display: inline-flex; align-items: center; gap: 3px; }
.mt-cloud .i { width: 12px; height: 12px; }
.mt-act { width: 22px; height: 22px; margin-left: 2px; display: inline-grid; place-items: center; border: 0; border-radius: 5px; background: var(--sage); color: var(--accent); cursor: pointer; }
.mt-act:hover { background: var(--accent-tint); }
.ref-url { flex-direction: column; }
.ref-url .btn { align-self: flex-start; }
.ref-meta .row { margin-top: 4px; }
@media (max-width: 860px) { .lib-filters > .seg { -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent); } }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.mt-add { position: absolute; inset: 0; z-index: 0; border: 0; padding: 0; background: transparent; border-radius: 10px; cursor: grab; }
.mt-add:focus-visible { outline: 3px solid var(--accent); outline-offset: 0; }
.mtile > .mt-thumb, .mtile > .mt-meta { pointer-events: none; }
.mt-meta .mt-del, .mt-meta .mt-act { pointer-events: auto; position: relative; z-index: 1; }

.cap-phrase { position: absolute; top: 4px; bottom: 4px; z-index: 1; display: flex; align-items: center; padding: 0 8px; border-radius: var(--r-clip); background: var(--clip-cap); color: var(--clip-text-ink); box-shadow: inset 0 0 0 1px rgba(29, 71, 144, 0.25); font-size: 0.7rem; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: none; opacity: 0.94; }
@media (max-width: 860px) { .lib-filters > .seg { flex-wrap: wrap; overflow: visible; -webkit-mask-image: none; mask-image: none; border-radius: 18px; } }

/* ---------- Referenz-Bibliothek ---------- */
.top-navs { display: flex; gap: 2px; margin-left: var(--s-5); }
.top-nav { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px; border-radius: var(--r-pill); color: var(--on-dark-muted); font-size: var(--fs-sm); font-weight: 600; text-decoration: none; transition: background-color var(--t-press) var(--ease-out), color var(--t-press) var(--ease-out); }
.top-nav:hover { background: var(--dark-hover); color: var(--on-dark); }
.top-nav.on { background: rgba(255, 255, 255, 0.16); color: var(--on-dark); }
.lib-page { min-height: 100dvh; }
.lib-page.dropping::after { content: "Dateien ablegen: kommen in die Referenz-Bibliothek"; position: fixed; inset: 8px; z-index: 100; display: grid; place-items: center; border: 2px dashed var(--accent); border-radius: var(--r-card); background: rgba(227, 236, 249, 0.86); color: var(--accent); font-weight: 700; font-size: var(--fs-lg); pointer-events: none; }
.rl-up { margin: -6px 0 var(--s-3); font-size: var(--fs-xs); color: var(--muted); }
.rl-up summary { cursor: pointer; width: max-content; }
.rl-up input { margin-top: 8px; max-width: 420px; }
.rl-tags { margin-bottom: var(--s-4); }
.rl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 14px; }
.rl-grid.pick { grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); max-height: 56vh; overflow: auto; padding: 2px; }
.rl-skel { display: contents; }
.rl-skel i { height: 300px; }
.rl-card { position: relative; display: grid; gap: 6px; padding: 6px 6px 10px; border: 1px solid var(--line); border-radius: var(--r-plate); background: var(--surface); text-align: left; cursor: pointer; transition: border-color var(--t-press) var(--ease-out), box-shadow var(--t-press) var(--ease-out); }
.rl-card:hover { border-color: var(--accent-soft); box-shadow: var(--shadow-sm); }
.rl-card.on { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.rl-thumb { position: relative; display: grid; place-items: center; aspect-ratio: 9 / 14; border-radius: 8px; overflow: hidden; background: var(--sage-strong); color: var(--accent); }
.rl-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.rl-badge { position: absolute; top: 12px; left: 12px; display: inline-flex; align-items: center; gap: 4px; padding: 2px 7px; border-radius: var(--r-pill); background: rgba(14, 26, 48, 0.78); color: #fff; font-size: 0.66rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.rl-cuts { position: absolute; top: 12px; right: 12px; display: inline-flex; align-items: center; gap: 3px; padding: 2px 7px; border-radius: var(--r-pill); background: var(--surface); color: var(--accent); font-size: 0.66rem; font-weight: 700; }
.rl-check { position: absolute; top: 12px; right: 12px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: #fff; }
.rl-title { padding: 0 4px; font-size: var(--fs-sm); font-weight: 650; color: var(--ink); line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rl-sub { padding: 0 4px; font-size: var(--fs-xs); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rl-empty { grid-column: 1 / -1; }
.rl-detail { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: var(--s-5); align-items: start; }
.rl-prev { display: grid; place-items: center; border-radius: var(--r-plate); overflow: hidden; background: var(--ink); }
.rl-prev video, .rl-prev > img { width: 100%; max-height: 62vh; object-fit: contain; }
.rl-linkprev { display: grid; justify-items: center; gap: 10px; width: 100%; padding: 12px; background: var(--sage); color: var(--muted); text-align: center; font-size: var(--fs-xs); }
.rl-linkprev img { width: 100%; border-radius: 8px; }
.rl-linkprev iframe { width: 100%; aspect-ratio: 9 / 16; border: 0; }
.rl-side { gap: 14px; }
.rl-side h3 { margin-top: 2px; }
.grow { flex: 1; }
.search.grow { width: auto; }
.lib-tag { display: inline-flex; align-items: center; gap: 4px; font-size: var(--fs-xs); font-weight: 600; color: var(--success); }
.ref-save, .ref-lib { position: absolute; bottom: 4px; right: 4px; width: 22px; height: 22px; border: 0; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, 0.92); color: var(--accent); }
.ref-save { cursor: pointer; opacity: 0; transition: opacity var(--t-press) var(--ease-out); }
.ref-grid figure:hover .ref-save, .ref-save:focus-visible { opacity: 1; }
.ref-lib { pointer-events: none; }
.refcol > video { width: 100%; height: 100%; object-fit: contain; background: #0b1220; }
.refcol-mute { background: var(--surface) !important; }
.np-thumbs figure > .i { margin: auto; position: absolute; inset: 0; color: var(--accent); }
@media (max-width: 860px) { .top-navs { margin-left: 8px; } .top-nav { padding: 0 10px; height: 44px; } .rl-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } .rl-detail { grid-template-columns: 1fr; } .lib-head .row .btn span { display: inline; } }
@media (max-width: 480px) { .top-nav .i { display: none; } .lib-top .brand-t { display: none; } }
.ref, .lib-pane { grid-template-columns: minmax(0, 1fr); min-width: 0; }
.ref .seg.wide > button { padding: 0 6px; gap: 4px; min-width: 0; }
.ref-card .row .btn { min-width: 0; }
.refcol-top { position: absolute; top: 8px; left: 8px; z-index: 2; }
@media (max-width: 860px) { .lib-head { flex-wrap: wrap; } .lib-head > .row { width: 100%; flex-wrap: nowrap; } .lib-head > .row > .btn { flex: 1; } }

/* ---------- Farbkorrektur ---------- */
.scope { display: grid; gap: 8px; }
.scope-modes { display: flex; }
.scope-modes > button { flex: 1; padding: 0 4px; }
.scope-cv { width: 100%; aspect-ratio: 536 / 260; border-radius: 8px; background: var(--ink); }
.sec-body h4.sub { margin: 6px 0 -4px; font-size: var(--fs-2xs); font-weight: 700; color: var(--faint); letter-spacing: 0.04em; text-transform: uppercase; }
.look-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.look { display: grid; gap: 4px; padding: 3px 3px 5px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); cursor: pointer; font-size: 0.66rem; font-weight: 600; color: var(--ink); text-align: center; }
.look canvas { width: 100%; aspect-ratio: 9 / 16; border-radius: 6px; background: var(--sage-strong); object-fit: cover; }
.look[aria-pressed="true"] { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); color: var(--accent); }
.look:hover { border-color: var(--accent-soft); }
.row.nowrap { flex-wrap: nowrap; }
.wheels { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.wheel { display: grid; justify-items: center; gap: 4px; }
.wheel-l { font-size: var(--fs-2xs); font-weight: 700; color: var(--muted); }
.wheel-cv { cursor: crosshair; border-radius: 50%; touch-action: none; }
.wheel .ctl { width: 100%; }
.wheel .ctl > label { display: none; }
.wheel .sl-row { grid-template-columns: minmax(0, 1fr); }
.wheel .sl-num { text-align: center; }
.curves { display: grid; gap: 8px; }
.curve-cv { border-radius: 8px; border: 1px solid var(--line); cursor: crosshair; touch-action: none; }
.hsl-bands { display: flex; gap: 6px; flex-wrap: wrap; }
.hsl-band { position: relative; width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--surface); background: var(--c); box-shadow: 0 0 0 1px var(--line-strong); cursor: pointer; }
.hsl-band[aria-checked="true"] { box-shadow: 0 0 0 2px var(--ink); }
.hsl-band i { position: absolute; right: -3px; top: -3px; width: 9px; height: 9px; border-radius: 50%; background: var(--surface); border: 2px solid var(--ink); }
.btn.xs.on { background: var(--accent-tint); color: var(--accent); border-color: var(--accent); }
.splitbar { position: absolute; top: 0; bottom: 0; z-index: 3; width: 2px; margin-left: -1px; background: #fff; box-shadow: 0 0 0 1px rgba(14, 26, 48, 0.4); cursor: ew-resize; touch-action: none; }
.splitbar::after { content: ""; position: absolute; top: 50%; left: 50%; width: 22px; height: 22px; margin: -11px 0 0 -11px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-sm); }
.splitbar:focus-visible::after { outline: 3px solid var(--accent); }
.sb-l, .sb-r { position: absolute; top: 8px; padding: 1px 6px; border-radius: 4px; background: rgba(14, 26, 48, 0.7); color: #fff; font-size: 0.62rem; font-weight: 600; white-space: nowrap; }
.sb-l { right: 8px; } .sb-r { left: 8px; }

/* ---------- Auto-Schnitt ---------- */
.ac-btn { font-weight: 700; }
.tl-tools .ac-btn { height: 30px; }
.viewer-empty .btn { margin-top: 6px; }
.ac { gap: 14px; }
.ac-steps { display: grid; gap: 8px; font-size: var(--fs-sm); color: var(--ink); }
.ac-steps li { display: flex; align-items: center; gap: 10px; }
.ac-dot { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--accent-soft); border-top-color: var(--accent); animation: spin 0.8s linear infinite; flex: none; }
.ac-steps li.done .ac-dot { animation: none; border: 0; background: var(--success); box-shadow: inset 0 0 0 4px var(--success-tint); }
.ac-steps small { color: var(--muted); }
.ref-tip { display: grid; gap: 6px; padding: 10px 12px; border-radius: 10px; background: var(--accent-tint); color: var(--on-tint, var(--accent-hover)); font-size: var(--fs-xs); }
.ref-tip b { color: var(--ink); font-size: var(--fs-sm); }
.ref-tip .btn { justify-self: start; }
.insp-body { grid-template-columns: minmax(0, 1fr); }
.sec-body, .sec-body > * { min-width: 0; }
.scope, .curves, .wheel { grid-template-columns: minmax(0, 1fr); min-width: 0; }
.scope-cv, .curve-cv { max-width: 100%; }
.sb-l, .sb-r { top: auto; bottom: 10px; }
.scope-modes { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.scope-modes > button { padding: 0 2px; font-size: 0.66rem; overflow: hidden; text-overflow: ellipsis; }
