/* Charakter-Studio — dark, clean, Linear/Vercel-Richtung */

:root {
  --bg: #0b0d10;
  --surface: #14171c;
  --surface-2: #1a1e24;
  --border: #23272f;
  --text: #e6e8eb;
  --muted: #8b93a1;
  --accent: #7c8cff;
  --accent-hover: #8f9dff;
  --accent-text: #0b0d10;
  --success: #22c55e;
  --warn: #f59e0b;
  --err: #ef4444;
  --radius: 12px;
  --radius-sm: 8px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  margin: 0;
}

h1, h2, h3 { line-height: 1.25; margin: 0 0 .5rem; font-weight: 600; letter-spacing: -.01em; }
h1 { font-size: 1.5rem; }
h2 { font-size: 1.15rem; }
h3 { font-size: 1rem; }
p { margin: 0 0 .5rem; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.muted { color: var(--muted); }
.small { font-size: .82rem; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .85rem; word-break: break-all; }

/* ---------- Layout ---------- */
.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  position: sticky;
  top: 0;
  z-index: 10;
}
.header-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: .75rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.wordmark {
  color: var(--text);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -.01em;
}
.wordmark:hover { text-decoration: none; color: var(--accent); }
.wordmark-lg { font-size: 1.4rem; margin-bottom: .25rem; }
.site-nav { display: flex; gap: 1rem; flex: 1; flex-wrap: wrap; }
.site-nav a { color: var(--muted); font-weight: 500; }
.site-nav a:hover { color: var(--text); text-decoration: none; }
.header-user { display: flex; align-items: center; gap: .75rem; }

/* ---------- Sprachumschalter ---------- */
.lang-bar {
  display: flex;
  justify-content: flex-end;
  gap: .35rem;
  align-items: center;
  padding: .6rem 1.25rem 0;
  max-width: 1080px;
  margin: 0 auto;
  font-size: .8rem;
}
.lang-switch { display: flex; align-items: center; gap: .35rem; font-size: .8rem; }
.lang-link { color: var(--muted); font-weight: 600; }
.lang-link:hover { color: var(--text); text-decoration: none; }
.lang-link.is-active { color: var(--accent); }
.lang-sep { color: var(--border); }

.main { display: block; }
.main-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 3rem;
}

.page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}

/* ---------- Flash ---------- */
.flash-stack { display: flex; flex-direction: column; gap: .5rem; margin-bottom: 1.25rem; }
.flash {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: .65rem .9rem;
  background: var(--surface);
}
.flash-ok { border-color: rgba(34,197,94,.35); background: rgba(34,197,94,.08); }
.flash-warn { border-color: rgba(245,158,11,.35); background: rgba(245,158,11,.08); }
.flash-err { border-color: rgba(239,68,68,.35); background: rgba(239,68,68,.08); }
.flash-invite {
  border-color: rgba(124,140,255,.4);
  background: rgba(124,140,255,.08);
  display: flex;
  align-items: center;
  gap: .75rem;
  flex-wrap: wrap;
}
.flash-msg { flex: 1; min-width: 200px; }

/* ---------- Notices (inline, non-flash) ---------- */
.notice {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: .55rem .8rem;
  margin-bottom: .6rem;
  font-size: .88rem;
}
.notice-ok { border-color: rgba(34,197,94,.35); background: rgba(34,197,94,.08); color: #86efac; }
.notice-warn { border-color: rgba(245,158,11,.35); background: rgba(245,158,11,.08); color: #fcd34d; }
.notice-err { border-color: rgba(239,68,68,.35); background: rgba(239,68,68,.08); color: #fca5a5; }
.notice-info { border-color: var(--border); background: var(--surface-2); color: var(--muted); }

/* ---------- Cards ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1.25rem;
}
.center-wrap {
  min-height: calc(100vh - 2rem);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.auth-card { width: 100%; max-width: 380px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  padding: .55rem 1rem;
  font-size: .9rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  background: none;
  color: var(--text);
  transition: background-color .15s, border-color .15s, opacity .15s;
}
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--accent); color: var(--accent-text); }
.btn-primary:hover:not(:disabled) { background: var(--accent-hover); }
.btn-secondary { background: transparent; border-color: var(--border); color: var(--text); }
.btn-secondary:hover:not(:disabled) { border-color: var(--muted); }
.btn-danger { background: transparent; border-color: rgba(239,68,68,.5); color: #fca5a5; }
.btn-danger:hover:not(:disabled) { background: rgba(239,68,68,.1); }
.btn-sm { padding: .35rem .7rem; font-size: .82rem; }
.btn-block { width: 100%; }

/* ---------- Forms ---------- */
.form-stack { display: flex; flex-direction: column; gap: 1rem; }
.inline-form { display: inline-flex; align-items: center; gap: .5rem; margin: 0; }
.field { display: flex; flex-direction: column; gap: .35rem; }
.field > span { font-size: .82rem; color: var(--muted); font-weight: 500; }
.field-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  align-items: end;
}

input[type="text"], input[type="email"], input[type="password"], input[type="number"], textarea, select {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: .55rem .7rem;
  font-family: inherit;
  font-size: .9rem;
  width: 100%;
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--accent);
}
textarea { resize: vertical; min-height: 4.5rem; }
.input-sm { max-width: 7rem; }

fieldset.field { border: none; padding: 0; margin: 0; }
fieldset legend { font-size: .82rem; color: var(--muted); font-weight: 500; padding: 0; margin-bottom: .5rem; }

.hint { color: var(--muted); font-size: .82rem; margin: -.3rem 0 .6rem; }

.actions { display: flex; gap: .75rem; flex-wrap: wrap; }

details.details { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: .5rem .75rem; margin: .6rem 0; }
details.details summary { cursor: pointer; color: var(--muted); font-size: .85rem; font-weight: 500; }
details.details[open] summary { margin-bottom: .6rem; }

/* ---------- Chips ---------- */
.chip {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: .2rem .65rem;
  font-size: .8rem;
  font-weight: 500;
  background: var(--surface-2);
  white-space: nowrap;
}
.chip-sm { padding: .1rem .5rem; font-size: .74rem; }
.dot { width: .45rem; height: .45rem; border-radius: 50%; background: var(--muted); flex-shrink: 0; }
.chip-neutral .dot { background: var(--muted); }
.chip-ok { border-color: rgba(34,197,94,.35); color: #86efac; }
.chip-ok .dot { background: var(--success); }
.chip-err { border-color: rgba(239,68,68,.35); color: #fca5a5; }
.chip-err .dot { background: var(--err); }
.chip-busy { border-color: rgba(124,140,255,.4); color: #c3caff; }
.chip-busy .dot { background: var(--accent); animation: pulse 1.4s ease-in-out infinite; }

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .35; transform: scale(1.4); }
}
@media (prefers-reduced-motion: reduce) {
  .chip-busy .dot { animation: none; }
}

/* ---------- Progress bar ---------- */
.bar { width: 100%; max-width: 320px; height: 6px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); overflow: hidden; }
.bar-fill { height: 100%; background: var(--accent); border-radius: 999px; }
.w-0 { width: 0%; } .w-10 { width: 10%; } .w-20 { width: 20%; } .w-30 { width: 30%; }
.w-40 { width: 40%; } .w-50 { width: 50%; } .w-60 { width: 60%; } .w-70 { width: 70%; }
.w-80 { width: 80%; } .w-90 { width: 90%; } .w-100 { width: 100%; }

/* ---------- Table ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); }
.table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.table th, .table td { text-align: left; padding: .65rem .8rem; border-bottom: 1px solid var(--border); white-space: nowrap; }
.table th { color: var(--muted); font-weight: 500; background: var(--surface); }
.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr:hover { background: var(--surface-2); }
.table-compact th, .table-compact td { padding: .45rem .7rem; }

/* ---------- Empty state ---------- */
.empty-state {
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 3rem 1.5rem;
  text-align: center;
  color: var(--muted);
}
.empty-state .btn { margin-top: .75rem; }

/* ---------- Charakter-/Setting-Auswahl ---------- */
.char-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: .75rem;
}
.char-card {
  display: flex;
  flex-direction: column;
  gap: .3rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: .75rem;
  background: var(--surface-2);
  cursor: pointer;
  transition: border-color .15s;
}
.char-card:hover { border-color: var(--muted); }
.char-card:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.char-card input { align-self: flex-start; accent-color: var(--accent); }
.char-thumb {
  width: 100%;
  aspect-ratio: 9 / 16;
  object-fit: cover;
  border-radius: var(--radius-sm);
  background: var(--bg);
}
.char-name { font-weight: 600; font-size: .9rem; }
.char-setting { font-size: .82rem; color: var(--muted); }
.char-about { font-size: .78rem; }

.kind-choice { display: flex; gap: .75rem; flex-wrap: wrap; }
.radio-card {
  flex: 1;
  min-width: 180px;
  display: flex;
  flex-direction: column;
  gap: .25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: .75rem .9rem;
  background: var(--surface-2);
  cursor: pointer;
}
.radio-card:hover { border-color: var(--muted); }
.radio-card:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.radio-card input { accent-color: var(--accent); align-self: flex-start; }
.radio-title { font-weight: 600; }
.radio-desc { font-size: .82rem; }

/* ---------- Vorschau (new.html) ---------- */
.take-preview-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .6rem; }
.take-preview-list li {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: .6rem .8rem;
  background: var(--surface-2);
}
.take-preview-list p { margin: .3rem 0 0; color: var(--muted); font-size: .88rem; }

/* ---------- Auftrag / Takes ---------- */
.job-head { display: flex; gap: 1rem; align-items: flex-start; margin-bottom: 1.25rem; }
.job-thumb { width: 72px; aspect-ratio: 9 / 16; object-fit: cover; border-radius: var(--radius-sm); border: 1px solid var(--border); flex-shrink: 0; }

.take-stack { display: flex; flex-direction: column; gap: 1rem; }
.take-head { display: flex; justify-content: space-between; align-items: center; gap: .75rem; flex-wrap: wrap; margin-bottom: .5rem; }
.take-text { white-space: pre-wrap; color: var(--text); }

.audio-block { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; margin: .6rem 0; }
audio { max-width: 100%; height: 36px; }

.alt-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .5rem; }
.alt-item { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; padding: .4rem 0; border-top: 1px solid var(--border); }
.alt-item:first-child { border-top: none; }
.alt-item.is-muted { opacity: .5; }

.video-order { margin: .75rem 0; }

.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 1rem;
  margin-top: .75rem;
}
.video-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: .85rem;
  background: var(--surface-2);
  display: flex;
  flex-direction: column;
  gap: .4rem;
}
.video-9x16 {
  width: 100%;
  max-height: 460px;
  aspect-ratio: 9 / 16;
  object-fit: cover;
  border-radius: var(--radius-sm);
  background: var(--bg);
}
.eyes-img { width: 100%; border-radius: var(--radius-sm); border: 1px solid var(--border); }
.video-links { display: flex; gap: .9rem; font-size: .85rem; }

/* ---------- Kopier-Box ---------- */
.copybox {
  display: flex;
  align-items: center;
  gap: .6rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  padding: .5rem .7rem;
  margin: .5rem 0;
  flex-wrap: wrap;
}
.copybox code { flex: 1; min-width: 160px; }

/* ---------- Admin ---------- */
.dropbox-block { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--border); }

/* ---------- Responsive ---------- */
@media (max-width: 480px) {
  .header-inner { gap: .75rem; }
  .site-nav { gap: .75rem; order: 3; width: 100%; }
  .job-head { flex-direction: column; }
  .table th, .table td { white-space: normal; }
}

/* ---------------------------------------------------------------- Fortschritt (läuft gerade) */
.progress-banner {
  display: flex; gap: 16px; align-items: flex-start;
  background: var(--surface); border: 1px solid rgba(124,140,255,.35);
  border-radius: var(--radius); padding: 18px 20px; margin: 0 0 20px;
}
.progress-banner strong { display: block; font-size: 16px; margin-bottom: 2px; }
.progress-banner p { margin: 0 0 12px; }
.progress-spinner {
  flex: 0 0 26px; width: 26px; height: 26px; margin-top: 2px; border-radius: 50%;
  border: 3px solid rgba(124,140,255,.25); border-top-color: var(--accent);
  animation: spin .9s linear infinite;
}
.progress-bar { position: relative; height: 4px; width: 100%; max-width: 420px; overflow: hidden;
  background: var(--surface-2); border-radius: 4px; }
.progress-bar span { position: absolute; inset: 0 auto 0 0; width: 35%; background: var(--accent);
  border-radius: 4px; animation: slide 1.6s ease-in-out infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes slide { 0% { left: -35%; } 100% { left: 100%; } }
@media (prefers-reduced-motion: reduce) {
  .progress-spinner, .progress-bar span { animation: none; }
}
body.is-submitting, body.is-submitting button { cursor: progress; }

/* ---------------------------------------------------------------- Tab-Leiste (mehrere Aufträge gleichzeitig) */
.tabbar {
  display: flex;
  align-items: center;
  gap: .4rem;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: .4rem 1.25rem;
}
.tabbar-scroll {
  display: flex;
  gap: .35rem;
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  padding-bottom: .1rem;
}
.tab {
  display: flex;
  align-items: center;
  gap: .25rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: .2rem .3rem .2rem .65rem;
  white-space: nowrap;
  flex-shrink: 0;
}
.tab.is-active { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.tab-link { display: flex; align-items: center; gap: .4rem; color: var(--text); font-size: .82rem; font-weight: 500; }
.tab-link:hover { text-decoration: none; color: var(--accent); }
.tab-dot { width: .4rem; height: .4rem; border-radius: 50%; background: var(--muted); flex-shrink: 0; }
.tab-dot-busy { background: var(--accent); animation: pulse 1.4s ease-in-out infinite; }
.tab-dot-action { background: var(--warn); }
.tab-dot-done { background: var(--success); }
.tab-dot-error { background: var(--err); }
.tab-dot-idle { background: var(--muted); }
.tab-title { max-width: 150px; overflow: hidden; text-overflow: ellipsis; }
.tab-close {
  border: none; background: none; color: var(--muted); cursor: pointer; font-size: 1rem; line-height: 1;
  padding: .1rem .35rem; border-radius: 50%;
}
.tab-close:hover { color: var(--text); background: var(--surface); }
.tab-add {
  flex-shrink: 0; display: flex; align-items: center; justify-content: center;
  width: 1.9rem; height: 1.9rem; border-radius: 50%; border: 1px solid var(--border);
  color: var(--muted); font-size: 1.1rem; font-weight: 600; margin-left: .3rem;
}
.tab-add:hover { color: var(--text); border-color: var(--muted); text-decoration: none; }

/* ---------- Toast (Tab wurde fertig / braucht dich / Problem) ---------- */
.toast-stack {
  position: fixed; right: 1rem; bottom: 1rem; display: flex; flex-direction: column; gap: .5rem;
  z-index: 50; max-width: 320px;
}
.toast {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: .6rem .9rem; font-size: .85rem; box-shadow: 0 4px 16px rgba(0,0,0,.35); animation: toast-in .2s ease-out;
}
.toast-done { border-color: rgba(34,197,94,.4); }
.toast-action { border-color: rgba(245,158,11,.4); }
.toast-error { border-color: rgba(239,68,68,.4); }
@keyframes toast-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------------------------------------------------------------- Glocke (Benachrichtigungen) */
.notif-wrap { position: relative; }
.notif-bell {
  position: relative; display: flex; align-items: center; justify-content: center;
  width: 2rem; height: 2rem; border-radius: 50%; border: 1px solid transparent;
  background: none; color: var(--muted); cursor: pointer;
}
.notif-bell:hover { color: var(--text); border-color: var(--border); }
.notif-count {
  position: absolute; top: -.1rem; right: -.1rem; min-width: 1.1rem; height: 1.1rem; padding: 0 .25rem;
  border-radius: 999px; background: var(--err); color: #fff; font-size: .68rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.notif-panel {
  position: absolute; right: 0; top: calc(100% + .5rem); width: 320px; max-width: 88vw; max-height: 70vh;
  overflow-y: auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(0,0,0,.4); z-index: 20;
}
.notif-panel-head {
  display: flex; align-items: center; justify-content: space-between; gap: .5rem;
  padding: .6rem .75rem; border-bottom: 1px solid var(--border); font-weight: 600; font-size: .85rem;
}
.notif-list { display: flex; flex-direction: column; }
.notif-item {
  display: flex; align-items: flex-start; gap: .5rem; padding: .6rem .75rem;
  border-bottom: 1px solid var(--border); color: var(--text); font-size: .85rem;
}
.notif-item:last-child { border-bottom: none; }
.notif-item:hover { background: var(--surface-2); text-decoration: none; }
.notif-item.is-unread { background: rgba(124,140,255,.07); }
.notif-dot { width: .5rem; height: .5rem; border-radius: 50%; margin-top: .3rem; flex-shrink: 0; background: var(--muted); }
.notif-dot-ok { background: var(--success); }
.notif-dot-err { background: var(--err); }
.notif-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.notif-time { display: block; color: var(--muted); font-size: .75rem; margin-top: .15rem; }
.notif-empty { padding: 1.25rem .75rem; text-align: center; color: var(--muted); font-size: .85rem; }

/* ---------------------------------------------------------------- Bibliothek */
.lib-tabs { display: flex; gap: 1rem; border-bottom: 1px solid var(--border); margin-bottom: 1.25rem; flex-wrap: wrap; }
.lib-tab { padding: .5rem 0; color: var(--muted); font-weight: 600; border-bottom: 2px solid transparent; }
.lib-tab:hover { color: var(--text); text-decoration: none; }
.lib-tab.is-active { color: var(--text); border-color: var(--accent); }

.lib-layout { display: flex; gap: 1.5rem; align-items: flex-start; flex-wrap: wrap; }
.lib-sidebar { flex: 0 0 200px; display: flex; flex-direction: column; gap: .6rem; }
.lib-folders { display: flex; flex-direction: column; gap: .25rem; }
.lib-folder-chip { padding: .4rem .6rem; border-radius: var(--radius-sm); color: var(--muted); font-size: .85rem; }
.lib-folder-chip:hover { background: var(--surface-2); text-decoration: none; color: var(--text); }
.lib-folder-chip.is-active { background: var(--surface-2); color: var(--text); font-weight: 600; }
.lib-folder-new { flex-wrap: wrap; }
.lib-folder-manage { display: flex; flex-direction: column; gap: .4rem; }
.lib-main { flex: 1; min-width: 0; }
.lib-filter { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; margin-bottom: 1.25rem; }

.library-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1rem; }
.library-card { display: flex; flex-direction: column; gap: .4rem; margin-bottom: 0; }
.library-title { margin: 0; }

@media (max-width: 640px) {
  .lib-sidebar { flex: 1 1 100%; }
}

/* ---------------------------------------------------------------- Kommentare (sekundengenau, wie Frame.io) */
.comment-timeline {
  position: relative; height: 1.1rem; margin: .6rem 0; background: var(--surface-2);
  border: 1px solid var(--border); border-radius: 999px;
}
.comment-marker {
  position: absolute; top: 50%; width: .6rem; height: .6rem; border-radius: 50%;
  transform: translate(-50%, -50%); border: 2px solid var(--surface); background: var(--warn);
  cursor: pointer; padding: 0;
}
.comment-marker.is-resolved { background: var(--muted); }
.comment-form { margin: .6rem 0; }
.comment-time { font-variant-numeric: tabular-nums; }
.comment-list { list-style: none; margin: .6rem 0 0; padding: 0; display: flex; flex-direction: column; gap: .4rem; }
.comment-item {
  display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; padding: .4rem .5rem;
  border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-2); font-size: .85rem;
}
.comment-item.is-resolved { opacity: .55; }
.comment-time-link {
  background: none; border: none; color: var(--accent); font-weight: 600; cursor: pointer; padding: 0; font-size: .85rem;
}
.comment-time-link:hover { text-decoration: underline; }
.comment-text { flex: 1; min-width: 120px; }

/* ---------------------------------------------------------------- Gewählte Stimme klar markieren */
.voice-chosen { border: 1px solid rgba(34,197,94,.45); background: rgba(34,197,94,.06);
  border-radius: var(--radius-sm); padding: 12px 14px; margin: 10px 0; }
.voice-chosen-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.voice-chosen .audio-block { margin: 0; }
.badge-chosen { display: inline-flex; align-items: center; background: var(--success); color: #05210f;
  font-weight: 700; font-size: 12px; border-radius: 999px; padding: 2px 10px; white-space: nowrap; }
.alt-item.is-chosen { border: 1px solid rgba(34,197,94,.45); background: rgba(34,197,94,.06); border-radius: var(--radius-sm); }

/* ---------------------------------------------------------------- Vollbild: ganzes Bild, volle Höhe, nicht beschnitten */
video { object-fit: contain; }
video:fullscreen, video:-webkit-full-screen {
  max-height: none !important; max-width: none !important; width: 100% !important; height: 100% !important;
  aspect-ratio: auto !important; object-fit: contain !important; border-radius: 0 !important; background: #000 !important;
}

/* ---------------------------------------------------------------- Feinschliff 14.09. abends */
/* hidden muss IMMER gewinnen (sonst zeigt z. B. die Glocke eine rote „0“, weil .notif-count display setzt) */
[hidden] { display: none !important; }

/* Video links, Kommentare rechts daneben (wie Frame.io) — auf dem Handy untereinander */
.video-grid { grid-template-columns: 1fr !important; }
.video-card { display: grid !important; grid-template-columns: minmax(200px, 260px) 1fr; grid-template-rows: auto 1fr;
  column-gap: 24px; row-gap: 10px; align-items: start; }
.video-card > .vc-main { grid-column: 1; grid-row: 1; display: flex; flex-direction: column; gap: .5rem; min-width: 0; }
.video-card > .comments-panel { grid-column: 2; grid-row: 1 / span 2; margin: 0; min-width: 0; }
.video-card > .vc-dbx { grid-column: 1; grid-row: 2; display: flex; flex-direction: column; gap: .4rem; }
@media (max-width: 760px) {
  .video-card { grid-template-columns: 1fr; }
  .video-card > .comments-panel, .video-card > .vc-dbx { grid-column: 1; grid-row: auto; }
}

/* Bibliothek: Filter in einer kompakten Zeile */
.lib-filter { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-bottom: 1rem; }
.lib-filter input, .lib-filter select { width: auto !important; min-width: 170px; flex: 0 1 auto; }
.lib-filter input[name="q"] { min-width: 220px; }

/* ================================================================ Auftragsseite v2 — Review-Arbeitsplatz (14.09.)
   Schrittleiste · Stimme kompakt · Player + Feedback-Panel + „Was jetzt?“-Entscheidung (Frame.io/Linear-Richtung) */
main[data-job-id] .main-inner { max-width: 1240px; }
main[data-job-id] .btn:focus-visible, .link-chip:focus-visible, .time-chip:focus-visible, .rv-tab:focus-visible,
.comment-marker:focus-visible, main[data-job-id] summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
main[data-job-id] .btn-primary { box-shadow: 0 1px 0 rgba(255,255,255,.18) inset, 0 8px 20px -10px rgba(124,140,255,.8); }
.btn-lg { padding: .7rem 1.3rem; font-size: .95rem; }
.btn-xs { padding: .18rem .5rem; font-size: .74rem; font-weight: 500; border-radius: 6px; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn-ghost:hover:not(:disabled) { color: var(--text); background: var(--surface-2); border-color: var(--border); }
.btn-soft { background: rgba(124,140,255,.12); border-color: rgba(124,140,255,.35); color: #c3caff; }
.btn-soft:hover:not(:disabled) { background: rgba(124,140,255,.2); border-color: var(--accent); color: var(--text); }

.spin-sm, .spin-xs, .step-spin { display: inline-block; flex-shrink: 0; border-radius: 50%;
  border: 2px solid rgba(124,140,255,.25); border-top-color: var(--accent); animation: spin .9s linear infinite; }
.spin-sm { width: 16px; height: 16px; }
.spin-xs { width: 10px; height: 10px; border-width: 1.5px; }
.step-spin { width: 12px; height: 12px; }
@media (prefers-reduced-motion: reduce) { .spin-sm, .spin-xs, .step-spin { animation: none; } }

/* ---------- Seitenkopf ---------- */
.jh { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 0 0 18px; }
.jh-thumb { width: 44px; aspect-ratio: 9 / 16; object-fit: cover; border-radius: 8px; border: 1px solid var(--border); flex-shrink: 0; }
.jh-main { flex: 1 1 320px; min-width: 0; }
.jh-title { font-size: 1.35rem; margin: 0 0 2px; }
.jh-meta { margin: 0; font-size: .9rem; font-weight: 500; }
.jh-sub { margin: 2px 0 0; color: var(--muted); font-size: .77rem; }
.jh-sep { color: #3a404b; margin: 0 .45rem; }
.jh-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-left: auto; }

/* ---------- Take-Karte + Schrittleiste ---------- */
.take-card { scroll-margin-top: 72px; padding: 18px 20px 20px; }
.take-card .take-head { margin: 0 0 16px; padding-bottom: 14px; border-bottom: 1px solid var(--border); flex-wrap: nowrap; }
.take-title { margin: 0; font-size: 1.05rem; white-space: nowrap; }
.steps { display: flex; align-items: center; list-style: none; margin: 0 auto; padding: 0; min-width: 0; }
.step { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: .8rem; font-weight: 500; white-space: nowrap; }
.step + .step::before { content: ""; width: 26px; height: 1px; background: var(--border); margin: 0 10px; }
.step.is-done + .step::before { background: rgba(34,197,94,.55); }
.step-dot { width: 22px; height: 22px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  font-size: .72rem; font-weight: 700; border: 1px solid var(--border); background: var(--surface-2); color: var(--muted); }
.step.is-done { color: var(--text); }
.step.is-done .step-dot { background: rgba(34,197,94,.14); border-color: rgba(34,197,94,.55); color: #86efac; }
.step.is-current { color: var(--text); font-weight: 600; }
.step.is-current .step-dot { background: var(--accent); border-color: var(--accent); color: var(--accent-text); box-shadow: 0 0 0 4px rgba(124,140,255,.16); }
.step.is-current.is-busy .step-dot { background: rgba(124,140,255,.12); }
.step.is-current.is-err .step-dot { background: var(--err); border-color: var(--err); color: #fff; box-shadow: 0 0 0 4px rgba(239,68,68,.16); }
.step.is-todo { opacity: .55; }

/* ---------- Vor dem ersten Video ---------- */
.take-body .take-text { font-size: .95rem; margin-bottom: .75rem; }
.take-cta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 14px; }
.take-cta .video-order { margin: 0; }
.wait-line, .render-skeleton { display: flex; align-items: center; gap: 10px; color: #c3caff; font-size: .88rem;
  padding: 10px 12px; border: 1px solid rgba(124,140,255,.3); background: rgba(124,140,255,.06); border-radius: var(--radius-sm); }
.render-skeleton { margin-top: 14px; }

/* ---------- Stimme kompakt ---------- */
.voice-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 7px 8px 7px 14px; margin-bottom: 14px;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; }
.voice-row-label { font-weight: 600; font-size: .85rem; white-space: nowrap; }
.audio-sm { height: 30px; width: 240px; max-width: 100%; }
.voice-row-text { flex: 1 1 200px; min-width: 0; margin: 0; color: var(--muted); font-size: .83rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.voice-edit { display: flex; flex-direction: column; gap: 12px; margin: -6px 0 16px; padding: 14px;
  border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.voice-edit-form { display: flex; flex-direction: column; gap: 8px; }
.voice-edit-form .hint { margin: 0; }
.voice-edit .notice { margin: 0; }
.row-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.voice-edit-title { margin: 4px 0 0; font-size: .8rem; color: var(--muted); font-weight: 600; }

/* ---------- Review-Arbeitsplatz ---------- */
.rv { scroll-margin-top: 72px; }
.rv-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 12px; }
.rv-compare { margin: -4px 0 12px; }

/* ---------- Produkt-Tour (Spotlight + Karte, tour.js) ---------- */
.tour-help { width: 30px; height: 30px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface);
  color: var(--muted); font: 700 .85rem/1 var(--font); cursor: pointer; display: inline-grid; place-items: center;
  transition: color .15s, border-color .15s, box-shadow .15s; }
.tour-help:hover { color: var(--text); border-color: #3a404b; }
.tour-help:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--accent); }
.tour { position: fixed; inset: 0; z-index: 1000; }
.tour.is-out { opacity: 0; transition: opacity .2s ease; }
.tour-veil { position: absolute; inset: 0; background: rgba(5,7,11,.74); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
  opacity: 0; transition: opacity .3s ease; }
.tour.is-center .tour-veil { opacity: 1; }
.tour-spot { position: absolute; border-radius: 12px; pointer-events: none;
  box-shadow: 0 0 0 2px var(--accent), 0 0 0 7px rgba(124,140,255,.16), 0 0 0 200vmax rgba(5,7,11,.74);
  transition: top .42s cubic-bezier(.2,.8,.2,1), left .42s cubic-bezier(.2,.8,.2,1), width .42s cubic-bezier(.2,.8,.2,1),
              height .42s cubic-bezier(.2,.8,.2,1), opacity .25s ease; }
.tour-spot::after { content: ""; position: absolute; inset: -2px; border-radius: inherit; box-shadow: 0 0 0 2px rgba(124,140,255,.55);
  animation: tour-pulse 2.2s ease-out infinite; }
.tour.is-center .tour-spot { opacity: 0; }
@keyframes tour-pulse { 0% { opacity: .9; transform: scale(1); } 70%, 100% { opacity: 0; transform: scale(1.06); } }
.tour-pop { position: absolute; width: min(380px, calc(100vw - 32px)); padding: 18px 20px 16px; border-radius: 16px;
  background: linear-gradient(180deg, #1c2029 0%, #15181e 100%); border: 1px solid #2d323d;
  box-shadow: 0 1px 0 rgba(255,255,255,.05) inset, 0 28px 70px -18px rgba(0,0,0,.8), 0 0 0 1px rgba(0,0,0,.4);
  transition: top .42s cubic-bezier(.2,.8,.2,1), left .42s cubic-bezier(.2,.8,.2,1); }
.tour-pop.is-in { animation: tour-in .32s cubic-bezier(.2,.8,.2,1); }
.tour-pop::before { content: ""; position: absolute; left: var(--caret-x, 50%); width: 12px; height: 12px; margin-left: -6px;
  background: #1c2029; border: 1px solid #2d323d; transform: rotate(45deg); display: none; }
.tour-pop[data-side="below"]::before { display: block; top: -7px; border-right: 0; border-bottom: 0; }
.tour-pop[data-side="above"]::before { display: block; bottom: -7px; background: #15181e; border-left: 0; border-top: 0; }
@keyframes tour-in { from { opacity: 0; transform: translateY(8px) scale(.985); } to { opacity: 1; transform: none; } }
.tour.is-welcome .tour-pop { width: min(460px, calc(100vw - 32px)); padding: 26px 26px 20px; }
.tour-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.tour-kicker { font-size: .68rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--accent); }
.tour-x { background: none; border: 0; color: var(--muted); font-size: 1.3rem; line-height: 1; padding: 2px 7px; margin-right: -7px;
  border-radius: 6px; cursor: pointer; }
.tour-x:hover { color: var(--text); background: rgba(255,255,255,.05); }
.tour-bar { display: flex; gap: 4px; margin-bottom: 16px; }
.tour-bar span { flex: 1; height: 3px; border-radius: 3px; background: #2a2f3a; transition: background .3s ease; }
.tour-bar span.is-done { background: var(--accent); }
.tour-body h2 { font-size: 1.08rem; font-weight: 650; letter-spacing: -.01em; margin: 0 0 6px; }
.tour.is-welcome .tour-body h2 { font-size: 1.3rem; }
.tour-body p { color: #b3bac6; font-size: .9rem; line-height: 1.58; margin: 0; }
.tour-body p + p { margin-top: 8px; }
.tour-body kbd { font: 600 .72rem/1 var(--font); padding: 2px 6px; border-radius: 5px; border: 1px solid #3a404b;
  background: var(--surface-2); color: var(--text); }
.tour-badge { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; margin-bottom: 14px;
  font-size: 1.35rem; color: #fff; background: linear-gradient(135deg, #8f9dff 0%, #5b6cf0 55%, #3d49b8 100%);
  box-shadow: 0 10px 28px -10px rgba(124,140,255,.9), 0 1px 0 rgba(255,255,255,.25) inset; }
.tour-flow { list-style: none; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 0; margin: 16px 0 2px;
  counter-reset: tf; }
.tour-flow li { counter-increment: tf; display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 5px;
  border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); font-size: .78rem; color: var(--text); }
.tour-flow li::before { content: counter(tf); width: 18px; height: 18px; border-radius: 999px; display: inline-grid; place-items: center;
  background: rgba(124,140,255,.16); color: var(--accent); font-size: .66rem; font-weight: 700; }
.tour-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 20px; }
.tour-skip { background: none; border: 0; padding: 0; color: var(--muted); font: .8rem var(--font); cursor: pointer; }
.tour-skip:hover { color: var(--text); text-decoration: underline; }
.tour-nav { display: flex; gap: 8px; }
.tour-next { min-width: 96px; box-shadow: 0 1px 0 rgba(255,255,255,.18) inset, 0 8px 20px -10px rgba(124,140,255,.8); }
.tour-pop .btn:focus { outline: none; }
.tour-pop .btn:focus-visible, .tour-x:focus-visible, .tour-skip:focus-visible { outline: none;
  box-shadow: 0 0 0 2px #15181e, 0 0 0 4px rgba(124,140,255,.7); }
@media (max-width: 560px) {
  .tour-pop, .tour.is-welcome .tour-pop { width: calc(100vw - 32px); padding: 16px 16px 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .tour-spot, .tour-pop, .tour-veil { transition: none; }
  .tour-spot::after, .tour-pop.is-in { animation: none; }
}

/* ---------- Marke „JK Studio Pro“ (Andreas 15.09.): JK-Monogramm aus dem Jordan-&-König-Logo + „Studio“ + PRO-Badge ---------- */
.brand { display: inline-flex; align-items: center; gap: .5em; color: #fff; text-decoration: none; white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand-jk { display: inline-block; height: 1.6em; aspect-ratio: 230 / 256; flex: none;
  background: linear-gradient(165deg, #ffffff 0%, #e4e7ff 42%, #9aa7ff 100%);
  -webkit-mask: url("/static/brand/jk-mark.png") center / contain no-repeat; mask: url("/static/brand/jk-mark.png") center / contain no-repeat;
  filter: drop-shadow(0 2px 10px rgba(124,140,255,.35)); }
.brand-name { font-weight: 650; letter-spacing: -.015em; }
.brand-pro { font-size: .6em; font-weight: 750; letter-spacing: .12em; text-transform: uppercase; line-height: 1;
  padding: .32em .55em .3em; margin-left: -.1em; border-radius: 6px; color: #d6dbff;
  background: linear-gradient(135deg, rgba(143,157,255,.24), rgba(61,73,184,.22)); border: 1px solid rgba(143,157,255,.45);
  box-shadow: 0 0 18px -6px rgba(124,140,255,.7); }
.site-header .brand { font-size: 1.02rem; }
.auth-brand.brand { font-size: 1.12rem; gap: .55em; }
.auth-brand .brand-jk { height: 1.9em; }

/* ---------- Hilfe-Menü „?“ + KI-Hilfe-Panel (help.js) ---------- */
.help-wrap { position: relative; display: inline-flex; }
.help-menu { position: absolute; left: -8px; top: calc(100% + 10px); z-index: 60; width: 292px; padding: 6px; border-radius: 14px;
  background: linear-gradient(180deg, #1c2029 0%, #15181e 100%); border: 1px solid #2d323d;
  box-shadow: 0 1px 0 rgba(255,255,255,.05) inset, 0 24px 60px -16px rgba(0,0,0,.8); animation: tour-in .18s ease-out; }
.help-item { display: flex; align-items: flex-start; gap: 12px; width: 100%; padding: 10px; border: 0; border-radius: 10px;
  background: none; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.help-item:hover, .help-item:focus-visible { background: rgba(255,255,255,.055); outline: none; }
.help-item strong { display: block; font-size: .88rem; font-weight: 600; }
.help-item small { display: block; margin-top: 2px; color: var(--muted); font-size: .76rem; line-height: 1.35; }
.help-ico { flex: none; width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; font-size: .78rem;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--muted); }
.help-ico.is-ai { border: 0; color: #fff; background: linear-gradient(135deg, #8f9dff 0%, #5b6cf0 55%, #3d49b8 100%);
  box-shadow: 0 6px 16px -8px rgba(124,140,255,.9), 0 1px 0 rgba(255,255,255,.25) inset; }
.help-panel { position: fixed; top: 12px; right: 12px; bottom: 12px; z-index: 900; width: min(420px, calc(100vw - 24px));
  display: flex; flex-direction: column; border-radius: 18px; background: linear-gradient(180deg, #171a21 0%, #111318 100%);
  border: 1px solid #2a2f39; box-shadow: 0 1px 0 rgba(255,255,255,.04) inset, 0 30px 90px -20px rgba(0,0,0,.85);
  opacity: 0; transform: translateX(18px); transition: opacity .2s ease, transform .26s cubic-bezier(.2,.8,.2,1); }
.help-panel.is-open { opacity: 1; transform: none; }
.help-head { display: flex; align-items: center; gap: 4px; padding: 14px 10px 12px 16px; border-bottom: 1px solid #23272f; }
.help-head-title { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.help-head h2 { margin: 0; font-size: .98rem; font-weight: 650; }
.help-head p { margin: 0; color: var(--muted); font-size: .74rem; }
.help-icon-btn { background: none; border: 0; color: var(--muted); font-size: 1.15rem; line-height: 1; padding: 6px 8px;
  border-radius: 8px; cursor: pointer; }
.help-icon-btn:hover { color: var(--text); background: rgba(255,255,255,.05); }
.help-icon-btn:focus-visible { outline: none; box-shadow: 0 0 0 2px rgba(124,140,255,.7); }
.help-log { flex: 1; min-height: 0; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.help-empty { margin-top: auto; }
.help-hello { margin: 0 0 4px; font-size: 1.2rem; font-weight: 650; letter-spacing: -.01em; }
.help-sub { margin: 0 0 14px; color: var(--muted); font-size: .84rem; }
.help-suggest { display: flex; flex-direction: column; gap: 8px; }
.help-chip { text-align: left; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border);
  color: var(--text); font: .84rem/1.4 var(--font); cursor: pointer; transition: border-color .15s, background .15s; }
.help-chip:hover, .help-chip:focus-visible { border-color: rgba(124,140,255,.55); background: #1e2330; outline: none; }
.help-msg { max-width: 92%; font-size: .88rem; line-height: 1.55; }
.help-msg.is-user { align-self: flex-end; padding: 9px 13px; border-radius: 14px 14px 4px 14px; white-space: pre-wrap;
  background: var(--accent); color: var(--accent-text); font-weight: 500; }
.help-msg.is-assistant { align-self: flex-start; padding: 11px 14px; border-radius: 14px 14px 14px 4px;
  background: var(--surface-2); border: 1px solid var(--border); color: #d5dae3; }
.help-rich p { margin: 0 0 8px; }
.help-rich > :last-child, .help-rich p:last-child { margin-bottom: 0; }
.help-rich ul, .help-rich ol { margin: 0 0 8px; padding-left: 1.2rem; }
.help-rich li { margin: 2px 0; }
.help-rich strong { color: #fff; font-weight: 620; }
.help-hint { color: var(--muted); font-size: .8rem; }
.help-src { margin-top: 10px; padding-top: 10px; border-top: 1px dashed #30353f; }
.help-src-title { margin: 0 0 4px !important; color: #fff; font-weight: 620; font-size: .84rem; }
.help-related { margin-top: 10px; padding-top: 10px; border-top: 1px dashed #30353f; }
.help-related p { margin: 0 0 6px; color: var(--muted); font-size: .76rem; }
.help-rel { display: block; width: 100%; margin-top: 6px; padding: 7px 10px; border-radius: 10px; text-align: left; cursor: pointer;
  background: rgba(124,140,255,.08); border: 1px solid rgba(124,140,255,.25); color: #d6dbff; font: .8rem/1.35 var(--font);
  transition: background .15s, border-color .15s; }
.help-rel:hover, .help-rel:focus-visible { background: rgba(124,140,255,.16); border-color: rgba(124,140,255,.5); outline: none; }
.help-dots { display: inline-flex; gap: 4px; padding: 5px 2px; }
.help-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); animation: help-dot 1.2s ease-in-out infinite; }
.help-dots i:nth-child(2) { animation-delay: .15s; }
.help-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes help-dot { 0%, 80%, 100% { opacity: .25; transform: none; } 40% { opacity: 1; transform: translateY(-3px); } }
.help-form { display: flex; align-items: flex-end; gap: 8px; margin: 0 12px; padding: 8px 8px 8px 12px; border-radius: 14px;
  background: #0c0e12; border: 1px solid #2a2f39; transition: border-color .15s, box-shadow .15s; }
.help-form:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(124,140,255,.2); }
.help-form textarea { flex: 1; min-height: 0; max-height: 140px; resize: none; border: 0; padding: 6px 0; background: none;
  color: var(--text); font: .9rem/1.45 var(--font); box-shadow: none; outline: none; }
.help-send { flex: none; width: 34px; height: 34px; border: 0; border-radius: 10px; background: var(--accent); color: var(--accent-text);
  font-weight: 800; font-size: 1rem; cursor: pointer; box-shadow: 0 8px 18px -10px rgba(124,140,255,.9); }
.help-send:disabled { opacity: .45; cursor: default; }
.help-note { margin: 8px 16px 12px; color: var(--muted); font-size: .7rem; text-align: center; }
@media (max-width: 560px) {
  .help-panel { top: 0; right: 0; bottom: 0; width: 100vw; border-radius: 0; border: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .help-panel { transition: none; }
  .help-menu, .help-dots i { animation: none; }
}

/* ---------- Startseite / Login (auth_base.html) — Kinobild vollflächig, Login als Glaskarte im Bild ---------- */
.page-auth { background: #05060a; }
.page-auth .main-inner { max-width: none; margin: 0; padding: 0; }
.page-auth .lang-bar { position: absolute; top: 22px; right: clamp(20px, 5vw, 72px); z-index: 6; margin: 0; padding: 0;
  background: none; border: 0; }
.page-auth .flash-stack { position: absolute; top: 70px; left: 50%; transform: translateX(-50%); z-index: 6;
  width: min(480px, calc(100vw - 32px)); }
.auth { position: relative; min-height: 100vh; min-height: 100svh; overflow: hidden; display: flex; align-items: center; }
.auth-hero { position: absolute; inset: 0; z-index: 0; }
.auth-hero img { width: 100%; height: 100%; max-width: none; object-fit: cover; object-position: 78% 30%; display: block;
  transform-origin: 70% 40%; animation: auth-zoom 26s cubic-bezier(.2,.7,.2,1) both; }
@keyframes auth-zoom { from { transform: scale(1.09); } to { transform: scale(1); } }
.auth-shade { position: absolute; inset: 0; z-index: 1;
  background:
    linear-gradient(90deg, rgba(5,6,10,.97) 0%, rgba(5,6,10,.86) 28%, rgba(5,6,10,.35) 52%, rgba(5,6,10,0) 70%),
    linear-gradient(0deg, rgba(5,6,10,.85) 0%, rgba(5,6,10,0) 32%),
    linear-gradient(180deg, rgba(5,6,10,.55) 0%, rgba(5,6,10,0) 18%),
    radial-gradient(55% 60% at 18% 55%, rgba(124,140,255,.12), transparent 70%); }
.auth-grain { position: absolute; inset: 0; z-index: 2; pointer-events: none; opacity: .07; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>"); }
.auth-top { position: absolute; top: 0; left: 0; right: 0; z-index: 4; padding: 20px clamp(20px, 5vw, 72px); }
.auth-brand { display: inline-flex; align-items: center; gap: 10px; color: #fff; font-weight: 650; letter-spacing: -.01em; font-size: 1rem; }
.auth-mark { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; font-size: .9rem; color: #fff;
  background: linear-gradient(135deg, #8f9dff 0%, #5b6cf0 55%, #3d49b8 100%);
  box-shadow: 0 8px 22px -8px rgba(124,140,255,.9), 0 1px 0 rgba(255,255,255,.25) inset; }
.auth-inner { position: relative; z-index: 3; width: 100%; padding: 96px clamp(20px, 5vw, 72px) 56px;
  display: grid; grid-template-columns: minmax(0, 500px); gap: 30px; animation: auth-rise .9s .15s cubic-bezier(.2,.8,.2,1) both; }
@keyframes auth-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.auth-title { margin: 0 0 14px; color: #fff; font-size: clamp(2.5rem, 5.4vw, 4.6rem); line-height: 1.02; letter-spacing: -.04em;
  font-weight: 760; }
.auth-title span { display: block; }
.auth-title-accent { background: linear-gradient(92deg, #dfe3ff 0%, #9aa7ff 45%, #7c8cff 100%); -webkit-background-clip: text;
  background-clip: text; color: transparent; }
.auth-sub { margin: 0; max-width: 30rem; color: #aeb5c2; font-size: 1.04rem; line-height: 1.6; }
.auth-card { width: 100%; max-width: 420px; padding: 26px 26px 22px; border-radius: 18px;
  background: rgba(15,17,23,.62); border: 1px solid rgba(255,255,255,.09);
  -webkit-backdrop-filter: blur(18px) saturate(140%); backdrop-filter: blur(18px) saturate(140%);
  box-shadow: 0 1px 0 rgba(255,255,255,.06) inset, 0 34px 90px -30px rgba(0,0,0,.85); }
.auth-card-title { font-size: 1.15rem; font-weight: 650; margin: 0 0 4px; color: #fff; }
.auth-card-sub { color: var(--muted); font-size: .88rem; margin: 0 0 18px; }
.page-auth .field input { height: 46px; background: rgba(6,7,11,.62); border-color: rgba(255,255,255,.10); }
.page-auth .field input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(124,140,255,.25); outline: none; }
.auth-card .btn-primary { height: 46px; font-weight: 650;
  box-shadow: 0 1px 0 rgba(255,255,255,.2) inset, 0 12px 30px -12px rgba(124,140,255,.9); }
.auth-foot { margin: 16px 0 0; color: var(--muted); font-size: .8rem; }
@media (max-width: 760px) {
  .auth { align-items: flex-end; }
  .auth-hero { bottom: auto; height: 74vh; height: 74svh; }   /* Gesichter über dem Titel, nicht dahinter */
  .auth-hero img { object-position: 50% 0%; }
  .auth-shade { background:
    linear-gradient(180deg, rgba(5,6,10,.6) 0%, rgba(5,6,10,0) 16%, rgba(5,6,10,0) 36%, rgba(5,6,10,.8) 52%, #05060a 66%); }
  .auth-inner { padding: 36vh 16px 24px; padding-top: 36svh; gap: 18px; }
  .auth-title { font-size: clamp(2rem, 9.5vw, 2.6rem); margin-bottom: 8px; }
  .page-auth .form-stack { gap: .8rem; }
  .auth-card-sub { margin-bottom: 14px; }
  .auth-sub { font-size: .95rem; }
  .auth-title, .auth-sub { text-shadow: 0 2px 18px rgba(5,6,10,.85), 0 1px 3px rgba(5,6,10,.6); }
  /* Verlaufsschrift ist transparent → text-shadow läge darüber und macht sie matschig; stattdessen drop-shadow */
  .auth-title-accent { text-shadow: none; filter: drop-shadow(0 2px 12px rgba(5,6,10,.9)); }
  .auth-card { max-width: none; padding: 20px 18px 18px; background: rgba(15,17,23,.72); }
  .auth-top, .page-auth .lang-bar { top: 0; padding-top: 16px; }
  .page-auth .lang-bar { top: 16px; padding: 0; }
}
@media (prefers-reduced-motion: reduce) { .auth-hero img, .auth-inner { animation: none; } }
.rv-tab { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 8px; border: 1px solid var(--border);
  background: transparent; color: var(--muted); font: inherit; font-size: .84rem; font-weight: 600; cursor: pointer;
  transition: color .15s, border-color .15s, background-color .15s; }
.rv-tab:hover { color: var(--text); border-color: #3a404b; }
.rv-tab.is-active { color: var(--text); background: var(--surface-2); border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.rv-tab.is-rendering { cursor: default; color: #c3caff; border-style: dashed; border-color: rgba(124,140,255,.45); }
.rv-tab-new { font-size: .66rem; text-transform: uppercase; letter-spacing: .05em; color: var(--accent);
  background: rgba(124,140,255,.14); padding: 1px 6px; border-radius: 999px; }
.rv-tab-ok { color: var(--success); font-weight: 800; }
.rv-tab-count { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--warn); color: #1a1204;
  font-size: .7rem; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }

.rv-pane { --ph: clamp(420px, 72vh, 780px); display: grid; grid-template-columns: auto minmax(0, 1fr);
  grid-template-rows: 1fr auto; grid-template-areas: "stage fb" "stage decide"; column-gap: 22px; }
.rv-stage { grid-area: stage; width: calc(var(--ph) * 9 / 16); max-width: 100%; min-width: 0; display: flex; flex-direction: column; }
.rv-player { width: 100%; height: var(--ph); background: #000; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; display: flex; }
.rv-video { display: block; width: 100%; height: 100%; object-fit: contain; background: #000; }

.rv .comment-timeline { height: 24px; margin: 10px 0 8px; background: transparent; border: 0; border-radius: 0; cursor: pointer; }
.rv .comment-timeline::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 4px; margin-top: -2px;
  background: var(--surface-2); border-radius: 999px; box-shadow: inset 0 0 0 1px var(--border); }
.tl-progress { position: absolute; left: 0; top: 50%; width: 0; height: 4px; margin-top: -2px; border-radius: 999px;
  background: rgba(124,140,255,.6); pointer-events: none; }
.rv .comment-marker { z-index: 1; width: 12px; height: 12px; border: 2px solid var(--surface); background: var(--cat, var(--warn));
  box-shadow: 0 0 0 1px rgba(0,0,0,.45); transition: transform .12s; }
.rv .comment-marker:hover { transform: translate(-50%, -50%) scale(1.35); }
.rv .comment-marker.is-resolved { background: var(--muted); opacity: .55; }

.rv-meta { display: flex; flex-direction: column; gap: 8px; }
.rv-links, .rv-meta-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.link-chip { display: inline-flex; align-items: center; gap: 4px; padding: 4px 9px; border-radius: 7px; border: 1px solid var(--border);
  background: transparent; color: var(--text); font: inherit; font-size: .78rem; font-weight: 500; cursor: pointer; }
.link-chip:hover { border-color: #3a404b; background: var(--surface-2); text-decoration: none; }
.link-chip.is-ok { color: #86efac; border-color: rgba(34,197,94,.35); }
.rv-cost { margin-left: auto; color: var(--muted); font-size: .76rem; }
.rv-considered { margin: 0; padding: 6px 9px; border-radius: 7px; background: var(--surface-2); color: var(--muted); font-size: .77rem; }

/* Kategorien (Chips, Marker, Kommentar-Karten) */
.cat-augen { --cat: #60a5fa; } .cat-mund { --cat: #f472b6; } .cat-bewegung { --cat: #a78bfa; } .cat-mimik { --cat: #fbbf24; }
.cat-bildfehler { --cat: #f87171; } .cat-stimme { --cat: #2dd4bf; } .cat-sonstiges { --cat: #94a3b8; }
.cat-blick { --cat: #38bdf8; } .cat-geste { --cat: #fb923c; }
.cat-gesicht { --cat: #e879f9; } .cat-hintergrund { --cat: #4ade80; } .cat-abstand { --cat: #facc15; }

/* Feedback-Panel */
.rv-fb { grid-area: fb; min-width: 0; display: flex; flex-direction: column; gap: 14px; padding: 16px 16px 14px;
  background: var(--surface-2); border: 1px solid var(--border); border-bottom: 0; border-radius: 12px 12px 0 0; }
.fb-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.fb-head h3 { margin: 0; font-size: 1rem; }
.fb-count { font-size: .75rem; color: var(--muted); padding: 2px 9px; border-radius: 999px; border: 1px solid var(--border); font-variant-numeric: tabular-nums; }
.fb-count.has-open { color: #fcd34d; border-color: rgba(245,158,11,.4); background: rgba(245,158,11,.08); }

.composer { display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.cat-group { border: 0; margin: 0; padding: 0; min-width: 0; }
.composer-label { padding: 0; margin: 0 0 8px; font-size: .78rem; color: var(--muted); font-weight: 600; }
.cat-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.cat-chip { position: relative; display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface-2); color: var(--text); font-size: .78rem; font-weight: 500; cursor: pointer;
  transition: border-color .15s, background-color .15s; }
.cat-chip input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; }
.cat-chip:hover { border-color: #3a404b; }
.cat-chip:has(input:checked) { border-color: var(--cat); background: color-mix(in srgb, var(--cat) 16%, var(--surface-2)); box-shadow: inset 0 0 0 1px var(--cat); }
.cat-chip:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.cat-ico { font-size: .9rem; line-height: 1; }
.composer-box { display: flex; align-items: flex-start; gap: 8px; padding: 6px; border: 1px solid var(--border); border-radius: 8px;
  background: var(--surface-2); transition: border-color .15s; }
.composer-box:focus-within { border-color: var(--accent); }
.composer.needs-text .composer-box { border-color: rgba(245,158,11,.55); }
.composer-box textarea { border: 0; background: transparent; padding: 3px 2px; min-height: 2.6rem; }
.composer-box textarea:focus { border: 0; }
.time-chip { display: inline-flex; align-items: center; gap: 2px; flex-shrink: 0; padding: 3px 8px; border-radius: 6px;
  border: 1px solid rgba(124,140,255,.35); background: rgba(124,140,255,.12); color: #c3caff; font: inherit; font-size: .77rem;
  font-weight: 600; font-variant-numeric: tabular-nums; cursor: pointer; transition: background-color .15s; }
.time-chip:hover { background: rgba(124,140,255,.24); color: var(--text); text-decoration: none; }
.composer-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.kbd-hint { font-size: .72rem; color: var(--muted); }
.kbd-hint kbd { font-family: inherit; font-size: .68rem; padding: 0 5px; border-radius: 4px; border: 1px solid var(--border);
  background: var(--surface-2); color: var(--text); }

.cmt-list { list-style: none; margin: 0; padding: 0 2px 0 0; display: flex; flex-direction: column; gap: 8px; max-height: 44vh; overflow-y: auto; }
.cmt { position: relative; padding: 10px 12px 10px 15px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface);
  transition: opacity .15s, border-color .15s; }
.cmt::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 0 3px 3px 0; background: var(--cat, var(--muted)); }
.cmt:hover { border-color: #3a404b; }
.cmt.is-resolved { opacity: .5; }
.cmt.is-resolved:hover { opacity: .8; }
.cmt.is-resolved .cmt-text { text-decoration: line-through; text-decoration-color: rgba(139,147,161,.6); }
.cmt-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cmt-resolve { margin-left: auto; }
.cat-tag { display: inline-flex; align-items: center; gap: 5px; color: var(--cat, var(--muted)); font-size: .76rem; font-weight: 600; }
.cmt-text { margin: 6px 0 0; font-size: .87rem; white-space: pre-wrap; word-break: break-word; }
.cmt-word { margin: 4px 0 0; font-size: .8rem; color: #5eead4; }
.cmt-author { margin: 4px 0 0; font-size: .72rem; color: var(--muted); }
.fb-empty { padding: 16px; border: 1px dashed var(--border); border-radius: 10px; color: var(--muted); font-size: .84rem; }
.fb-empty p { margin: 0; }
.fb-empty-title { color: var(--text); font-weight: 600; margin-bottom: 4px !important; }

/* Entscheidung „Was jetzt?“ */
.rv-decide { grid-area: decide; display: flex; flex-direction: column; gap: 10px; padding: 14px 16px 16px;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 0 0 12px 12px; }
.rv-decide.is-newest { background: linear-gradient(180deg, rgba(124,140,255,.08), rgba(124,140,255,.02)), var(--surface-2); }
.rv-decide .notice, .rv-decide form { margin: 0; }
.decide-kicker { margin: 0; font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.decide-title { margin: 0; font-size: 1rem; color: #fcd34d; }
.decide-note { margin: 0; font-size: .78rem; color: var(--muted); }
.decide-actions { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.decide-state { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 10px; }
.decide-state strong { display: block; font-size: .9rem; }
.decide-state p { margin: 2px 0 0; font-size: .78rem; color: var(--muted); }
.decide-state.is-ok { background: rgba(34,197,94,.08); border: 1px solid rgba(34,197,94,.35); color: #86efac; }
.decide-state.is-busy { background: rgba(124,140,255,.07); border: 1px solid rgba(124,140,255,.3); color: #c3caff; }
.decide-state.is-busy .spin-sm { margin-top: 2px; }
.decide-ico { width: 22px; height: 22px; flex-shrink: 0; border-radius: 50%; background: var(--success); color: #05210f; font-weight: 800;
  font-size: .8rem; display: inline-flex; align-items: center; justify-content: center; }
.decide-path { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; word-break: break-all; }
.decide-voice { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 10px 12px; border-radius: 10px;
  border: 1px solid rgba(245,158,11,.4); background: rgba(245,158,11,.08); color: #fcd34d; font-size: .84rem; }
.decide-voice p { margin: 0; }
.gone-line { margin: 12px 0 0; font-size: .76rem; color: var(--muted); }

.is-flash { animation: rv-flash 1.6s ease-out; }
@keyframes rv-flash { 0% { box-shadow: 0 0 0 0 rgba(124,140,255,0); } 20% { box-shadow: 0 0 0 3px rgba(124,140,255,.6); }
  100% { box-shadow: 0 0 0 0 rgba(124,140,255,0); } }
@media (prefers-reduced-motion: reduce) { .is-flash { animation: none; } }

/* ---------- Handy / schmal: Player oben, Entscheidung, dann Feedback ---------- */
@media (max-width: 900px) {
  .rv-pane { --ph: min(70vh, 620px); grid-template-columns: minmax(0, 1fr); grid-template-rows: auto;
    grid-template-areas: "stage" "decide" "fb"; row-gap: 14px; }
  .rv-stage { width: 100%; }
  .rv-player { width: calc(var(--ph) * 9 / 16); max-width: 100%; margin: 0 auto; }
  .rv-fb { border-bottom: 1px solid var(--border); border-radius: 12px; }
  .rv-decide { border-radius: 12px; }
  .cmt-list { max-height: none; }
  .take-card .take-head { flex-wrap: wrap; }
  .steps { order: 3; width: 100%; margin: 4px 0 0; }
}
@media (max-width: 640px) {
  .take-card { padding: 14px; }
  .step:not(.is-current) .step-label { display: none; }
  .step + .step::before { width: 14px; margin: 0 6px; }
  .jh-actions { margin-left: 0; }
  .rv-cost { margin-left: 0; }
}

/* Prüfbericht je Version (gates.py) */
.chip-warn { border-color: rgba(234,179,8,.4); color: #fde047; }
.gate-report { margin-top: .6rem; font-size: .85rem; }
.gate-report summary { cursor: pointer; display: flex; gap: .35rem; align-items: center; flex-wrap: wrap; }
.gate-list { list-style: none; margin: .4rem 0 0; padding: 0; display: grid; gap: .2rem; }
.gate-list li { padding-left: 1.2rem; position: relative; }
.gate-list li::before { position: absolute; left: 0; }
.gate-ok::before { content: "✓"; color: var(--success); }
.gate-warn::before { content: "!"; color: #eab308; font-weight: 700; }
.gate-fail::before { content: "✗"; color: var(--err); }
.gate-manuell::before { content: "👁"; }

/* Ad-Fabrik */
.stage-line { display: flex; gap: .4rem; list-style: none; padding: 0; margin: .8rem 0; flex-wrap: wrap; }
.stage-line li { padding: .25rem .6rem; border-radius: 999px; border: 1px solid var(--line, #333); font-size: .85rem; opacity: .6; }
.stage-line li.done { opacity: 1; border-color: rgba(34,197,94,.5); }
.stage-line li.current { opacity: 1; border-color: #eab308; font-weight: 600; }
.final-grid, .still-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.final-card video, .still-card img { width: 100%; border-radius: 10px; background: #000; }
.take-plan li { margin: .25rem 0; }
