:root {
  --bg: #0f1214;
  --panel: #171b1e;
  --panel-alt: #1e2327;
  --border: #2a3034;
  --text: #edeff1;
  --muted: #8c949b;
  --accent: #46e0b0;
  --accent-dim: #2a8f70;
  --warn: #f2a65a;
  --error: #f2685a;
  --radius: 12px;
  --font-display: "Space Grotesk", "Inter", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", monospace;
}

[data-theme="light"] {
  --bg: #f5f6f4;
  --panel: #ffffff;
  --panel-alt: #eef0ee;
  --border: #dcdfdc;
  --text: #14181a;
  --muted: #666e70;
  --accent: #1f9d78;
  --accent-dim: #17765b;
  --warn: #b5721f;
  --error: #c14a3f;
}

* { box-sizing: border-box; min-width: 0; }

[hidden] { display: none !important; }

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

html {
  overflow-x: hidden;
  width: 100%;
}

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

body {
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
}

img, svg { max-width: 100%; }

.app {
  min-height: 100vh;
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}

/* ---------- Topbar ---------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 16px clamp(14px, 4vw, 40px);
  border-bottom: 1px solid var(--border);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}
.brand[href] {
  cursor: pointer;
  border-radius: 6px;
  transition: opacity 0.15s ease;
}
.brand[href]:hover { opacity: 0.85; }
.brand[href]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.brand-mark #pulseline {
  stroke-dasharray: 220;
  stroke-dashoffset: 220;
  animation: draw 1.4s ease-out forwards;
}

@keyframes draw {
  to { stroke-dashoffset: 0; }
}

.brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.brand-name .brand-sub {
  font-weight: 500;
  color: var(--muted);
  font-size: 0.7em;
  margin-left: 2px;
}

.icon-btn {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.15s ease, transform 0.15s ease;
  text-decoration: none;
}
.icon-btn:hover { border-color: var(--accent); }
.icon-btn:active { transform: scale(0.94); }
.icon-btn:focus-visible, a:focus-visible, button:focus-visible, input:focus-visible, label:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.topbar-user {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.topbar-user .hint {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  max-width: 22vw;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
@media (max-width: 560px) {
  .topbar-user .hint { display: none; }
}

/* ---------- Hamburger + Drawer ---------- */
.hamburger-btn {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
}
.hamburger-btn span {
  display: block;
  width: 16px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 40;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.drawer-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(320px, 86vw);
  max-width: 100vw;
  background: var(--panel);
  border-left: 1px solid var(--border);
  z-index: 41;
  transform: translateX(100%);
  transition: transform 0.22s ease;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}
.drawer.open { transform: translateX(0); }

.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 18px 14px;
  border-bottom: 1px solid var(--border);
}
.drawer-head .who {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.drawer-nav {
  display: flex;
  flex-direction: column;
  padding: 10px;
  gap: 2px;
}

.drawer-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 12px;
  border-radius: 9px;
  color: var(--text);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  background: transparent;
  border: none;
  cursor: pointer;
  text-align: left;
  width: 100%;
  font-family: var(--font-body);
}
.drawer-link:hover { background: var(--panel-alt); }
.drawer-link .ico {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
}
.drawer-link.danger { color: var(--error); }
.drawer-link.danger .ico { color: var(--error); }

.drawer-sep {
  height: 1px;
  background: var(--border);
  margin: 8px 12px;
}

.drawer-foot {
  margin-top: auto;
  padding: 14px 18px 18px;
  font-size: 0.72rem;
  color: var(--muted);
}

/* ---------- Credentials banner ---------- */
.credentials-banner {
  margin: 0 clamp(14px, 4vw, 40px);
  margin-top: 16px;
  padding: 10px 16px;
  border-radius: 8px;
  background: rgba(242, 166, 90, 0.12);
  border: 1px solid var(--warn);
  color: var(--warn);
  font-size: 0.85rem;
}
.credentials-banner a {
  color: inherit;
  text-decoration: underline;
}

.banner-dismissible {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.banner-close {
  flex-shrink: 0;
  border: none;
  background: transparent;
  color: inherit;
  opacity: 0.7;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  padding: 2px 4px;
}
.banner-close:hover { opacity: 1; }

/* ---------- Layout ---------- */
.layout {
  flex: 1;
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 20px;
  padding: clamp(14px, 4vw, 40px);
  align-items: start;
}

@media (max-width: 860px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
}

.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(16px, 3vw, 28px);
  min-width: 0;
  width: 100%;
}

.panel-head {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 18px;
}

.step-badge {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--panel-alt);
  border: 1px solid var(--border);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

h2 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  margin: 0 0 4px;
}

.hint {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  overflow-wrap: anywhere;
}

/* ---------- Dropzone ---------- */
.dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 32px 16px;
  border: 1.5px dashed var(--border);
  border-radius: var(--radius);
  color: var(--muted);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
  width: 100%;
}
.dropzone:hover, .dropzone:focus-visible {
  border-color: var(--accent);
  color: var(--text);
}
.dropzone.dragover {
  border-color: var(--accent);
  background: rgba(70, 224, 176, 0.08);
  color: var(--text);
}
.dropzone-icon { color: var(--accent); }
.dropzone-text { font-size: 0.92rem; text-align: center; }

.file-count {
  margin: 12px 0 0;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--muted);
}

/* ---------- File / Result / History lists ---------- */
.file-list, .result-list, .history-list {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  max-height: 320px;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.file-row, .result-row, .history-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  background: var(--panel-alt);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.85rem;
  flex-wrap: wrap;
}

.file-row .name, .result-row .name, .history-row .name {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  min-width: 60px;
}

.file-row .size {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  flex-shrink: 0;
}

.remove-btn {
  border: none;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  padding: 2px 4px;
  flex-shrink: 0;
}
.remove-btn:hover { color: var(--error); }

.badge {
  flex-shrink: 0;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
}
.badge.ok { color: var(--accent); border-color: var(--accent-dim); }
.badge.error { color: var(--error); border-color: var(--error); }
.badge.pending { color: var(--warn); border-color: var(--warn); }

.result-row .download-link {
  color: var(--accent);
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  flex-shrink: 0;
  border-bottom: 1px solid transparent;
}
.result-row .download-link:hover { border-color: var(--accent); }

.result-row .error-text, .history-row .error-text {
  color: var(--error);
  font-size: 0.75rem;
  overflow-wrap: anywhere;
  flex-basis: 100%;
}

.history-row .when {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  flex-shrink: 0;
}

/* ---------- Buttons ---------- */
.actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.btn {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.88rem;
  padding: 10px 18px;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: opacity 0.15s ease, transform 0.1s ease, background 0.15s ease;
}
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }

.btn-primary {
  background: var(--accent);
  color: #06231a;
}
.btn-primary:hover:not(:disabled) { background: var(--accent-dim); color: #fff; }

.btn-secondary {
  background: var(--panel-alt);
  color: var(--text);
  border-color: var(--border);
}
.btn-secondary:hover:not(:disabled) { border-color: var(--accent); }

.btn-ghost {
  background: transparent;
  color: var(--muted);
  border-color: var(--border);
}
.btn-ghost:hover { color: var(--text); border-color: var(--text); }

.btn-danger {
  background: transparent;
  color: var(--error);
  border-color: var(--error);
}
.btn-danger:hover:not(:disabled) { background: rgba(242, 104, 90, 0.12); }

/* ---------- Progress ---------- */
.progress {
  margin-top: 14px;
  height: 6px;
  border-radius: 999px;
  background: var(--panel-alt);
  overflow: hidden;
}
.progress-bar {
  height: 100%;
  width: 0%;
  background: var(--accent);
  transition: width 0.15s ease;
}

.status-text {
  margin: 10px 0 0;
  font-size: 0.8rem;
  color: var(--muted);
  min-height: 1.1em;
  overflow-wrap: anywhere;
}

.log-empty {
  color: var(--muted);
  font-size: 0.86rem;
  padding: 18px 0;
}

/* ---------- Mode switch (Code / Datei) ---------- */
.mode-switch {
  display: flex;
  gap: 6px;
  padding: 4px;
  background: var(--panel-alt);
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 14px;
}
.mode-btn {
  flex: 1;
  padding: 8px 12px;
  border: none;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.mode-btn.active {
  background: var(--panel);
  color: var(--text);
  box-shadow: 0 1px 2px rgba(0,0,0,0.15);
}
.mode-btn:hover:not(.active) { color: var(--text); }

.mode-panel { min-width: 0; }

.body-label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.82rem;
  color: var(--muted);
}

.code-textarea {
  width: 100%;
  min-height: 220px;
  padding: 12px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--panel-alt);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.5;
  resize: vertical;
  max-width: 100%;
}
.code-textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}
.code-textarea::placeholder {
  color: var(--muted);
}

/* ---------- Footer ---------- */
.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 16px clamp(14px, 4vw, 40px) 22px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.76rem;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.footer-brand .footer-mark { flex-shrink: 0; opacity: 0.85; }
.footer-brand .footer-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.theme-switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--panel);
  cursor: pointer;
  flex-shrink: 0;
}
.theme-switch .theme-opt {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  transition: background 0.15s ease, color 0.15s ease;
}
.theme-switch .theme-opt.active {
  background: var(--accent);
  color: #06231a;
}
.theme-switch .theme-opt svg { width: 15px; height: 15px; }

/* ---------- Auth pages (login / register / forgot / reset) ---------- */
.auth-page {
  min-height: 100vh;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}

.auth-card {
  width: 100%;
  max-width: 360px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(22px, 5vw, 32px);
}

.auth-card h1 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0 0 18px;
  text-align: center;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
}

.auth-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.82rem;
  color: var(--muted);
}

.auth-form input {
  font-family: var(--font-body);
  font-size: 0.92rem;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--panel-alt);
  color: var(--text);
  width: 100%;
}
.auth-form input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.auth-form .btn { margin-top: 4px; }

.form-error {
  color: var(--error);
  font-size: 0.82rem;
  margin: 0;
  overflow-wrap: anywhere;
}

.form-success {
  color: var(--accent);
  font-size: 0.82rem;
  margin: 0;
  overflow-wrap: anywhere;
}

.auth-switch {
  margin: 18px 0 0;
  text-align: center;
  font-size: 0.85rem;
  color: var(--muted);
}
.auth-switch a {
  color: var(--accent);
  text-decoration: none;
}
.auth-switch a:hover { text-decoration: underline; }

.auth-links-row {
  display: flex;
  justify-content: flex-end;
  margin-top: -6px;
}
.auth-links-row a {
  font-size: 0.78rem;
  color: var(--muted);
  text-decoration: none;
}
.auth-links-row a:hover { color: var(--accent); }

.auth-footer {
  margin-top: 18px;
}

/* ---------- Account page (Einstellungen) ---------- */
.account-main {
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: clamp(14px, 4vw, 40px);
}

.panel-danger {
  border-color: var(--error);
}
.panel-danger h2 { color: var(--error); }

/* ---------- Admin table ---------- */
.admin-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}
.stat-card {
  background: var(--panel-alt);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
}
.stat-card .stat-value {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
}
.stat-card .stat-label {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 2px;
}

.table-scroll {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 10px;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
.table-scroll::-webkit-scrollbar { height: 8px; }
.table-scroll::-webkit-scrollbar-track { background: transparent; }
.table-scroll::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 999px;
}
.table-scroll::-webkit-scrollbar-thumb:hover { background: var(--muted); }
table.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
  min-width: 860px;
}
table.admin-table th, table.admin-table td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
table.admin-table th {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
table.admin-table th.sortable {
  cursor: pointer;
  user-select: none;
}
table.admin-table th.sortable:hover { color: var(--text); }
table.admin-table th.sortable.sorted { color: var(--accent); }
table.admin-table th .sort-ind {
  display: inline-block;
  width: 10px;
  font-size: 0.65rem;
}
table.admin-table tr:last-child td { border-bottom: none; }
.row-actions {
  display: flex;
  gap: 6px;
}
.btn-xsmall {
  padding: 5px 10px;
  font-size: 0.72rem;
}
.dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border);
}
.dot.yes { background: var(--accent); }

.log-output {
  margin: 0;
  max-height: 420px;
  overflow-y: auto;
  overflow-x: auto;
  background: var(--panel-alt);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--text);
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
.log-output::-webkit-scrollbar { width: 8px; height: 8px; }
.log-output::-webkit-scrollbar-track { background: transparent; }
.log-output::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 999px;
}
.log-output::-webkit-scrollbar-thumb:hover { background: var(--muted); }

/* ---------- Anti-Flash: App-Shell erst nach dem Auth-Check zeigen ---------- */
html[data-auth="pending"] .app { opacity: 0; pointer-events: none; }
.app { opacity: 1; transition: opacity .12s ease; }

/* ---------- Info-Banner (Erste Schritte) ---------- */
.banner-info {
  background: rgba(70, 224, 176, 0.10);
  border-color: var(--accent);
  color: var(--text);
}
.banner-info a { color: var(--accent); }

/* ---------- Hilfe-Overlay ---------- */
.help-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(8px, 3vw, 32px);
}
.help-modal {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  width: min(760px, 100%);
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4);
}
.help-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}
.help-head h2 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  margin: 0;
}
.help-tabs {
  display: flex;
  gap: 4px;
  padding: 10px 14px 0;
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  flex-wrap: nowrap;
  -webkit-overflow-scrolling: touch;
}
.help-tab {
  flex-shrink: 0;
  border: none;
  background: transparent;
  color: var(--muted);
  font-family: var(--font-body);
  font-size: 0.86rem;
  font-weight: 600;
  padding: 8px 12px;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  white-space: nowrap;
}
.help-tab:hover { color: var(--text); }
.help-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}
.help-body {
  padding: 20px 22px 26px;
  overflow-y: auto;
  font-size: 0.92rem;
  line-height: 1.55;
}
.help-body h3 {
  font-family: var(--font-display);
  font-size: 1.02rem;
  margin: 0 0 10px;
}
.help-body h4 {
  font-size: 0.92rem;
  margin: 22px 0 6px;
  color: var(--accent);
}
.help-body p { margin: 0 0 12px; color: var(--text); }
.help-body ol,
.help-body ul { margin: 0 0 14px; padding-left: 20px; }
.help-body li { margin-bottom: 7px; }
.help-body code {
  font-family: var(--font-mono);
  font-size: 0.82em;
  background: var(--panel-alt);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 5px;
}
.help-body .help-note {
  background: rgba(70, 224, 176, 0.08);
  border-left: 3px solid var(--accent);
  border-radius: 6px;
  padding: 10px 14px;
  margin: 0 0 14px;
  font-size: 0.88rem;
}
.help-body .help-warn {
  background: rgba(242, 166, 90, 0.10);
  border-left: 3px solid var(--warn);
  border-radius: 6px;
  padding: 10px 14px;
  margin: 0 0 14px;
  font-size: 0.88rem;
}
.help-body pre {
  background: var(--panel-alt);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  line-height: 1.5;
  margin: 0 0 14px;
  white-space: pre;
}
.help-figure {
  margin: 0 0 18px;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  background: var(--bg);
}
.help-figure svg { display: block; width: 100%; height: auto; }
.help-figure figcaption {
  padding: 8px 12px;
  font-size: 0.8rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
  background: var(--panel-alt);
}
.help-body a { color: var(--accent); }
@media (max-width: 560px) {
  .help-body { padding: 16px 16px 22px; }
}

/* ---------- Kompakter Button + Kopier-Feedback ---------- */
.btn-small {
  padding: 7px 12px;
  font-size: 0.78rem;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}
.btn.copied {
  border-color: var(--accent);
  color: var(--accent);
}

/* ---------- Step-1 Kopfzeile mit Aktion rechts ---------- */
.panel-head-split {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.panel-head-main {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  min-width: 0;
}
.panel-head-split .btn-small { flex-shrink: 0; margin-top: 2px; }
@media (max-width: 520px) {
  .panel-head-split .btn-small { width: 100%; justify-content: center; }
}

/* ---------- Hilfe: Scrollbalken passend zum Theme ---------- */
.help-body {
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
.help-body::-webkit-scrollbar { width: 10px; }
.help-body::-webkit-scrollbar-track { background: transparent; }
.help-body::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 6px;
  border: 2px solid var(--panel);
}
.help-body::-webkit-scrollbar-thumb:hover { background: var(--muted); }
.help-tabs {
  scrollbar-width: none;
}
.help-tabs::-webkit-scrollbar { height: 0; }

/* ---------- Hilfe: ausklappbarer KI-Prompt ---------- */
.help-details {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel-alt);
  margin: 0 0 14px;
  overflow: hidden;
}
.help-details summary {
  cursor: pointer;
  padding: 11px 14px;
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--accent);
  list-style: none;
  user-select: none;
  display: flex;
  align-items: center;
  gap: 8px;
}
.help-details summary::-webkit-details-marker { display: none; }
.help-details summary::before {
  content: "▸";
  transition: transform 0.15s ease;
  display: inline-block;
  color: var(--muted);
}
.help-details[open] summary::before { transform: rotate(90deg); }
.help-details-body { padding: 0 14px 14px; }
.help-copy-inline { margin: 4px 0 12px; }
.help-details-body pre { margin: 0; max-height: 320px; overflow-y: auto; }
.help-details-body pre::-webkit-scrollbar { width: 10px; }
.help-details-body pre::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 6px;
  border: 2px solid var(--panel-alt);
}
