/* Morgenröter — dunkles, okkult-warmes Theme.
   Palette: tief-schwarzes Braun (#0c0805 .. #261810), Morgenrot-Glut
   (#e07a45, #d65a3a, #b8421f), warm-rosige Creme Text (#f0d8b8, #c8a890),
   rostige Trenner (#4a2a18, #5a3220), Lebensbaum-Grün (#7a8a5a).
   Display-Serif: Cormorant Garamond; UI-Sans: System.
   Alle bestehenden Klassennamen sind erhalten, damit die Views weiter funktionieren. */

/* ============================================================ Tokens (CSS Variables) */
:root {
  --bg-deep:        #0c0805;
  --bg-soft:        #15100a;
  --surface-1:      #1c140e;
  --surface-2:      #261810;
  --surface-3:      #2c2018;

  --amber:          #d65a3a;
  --amber-warm:     #e07a45;
  --amber-deep:     #b8421f;
  --amber-shadow:   rgba(214, 90, 58, 0.18);

  --rose:           #e89a7a;

  --tree-green:     #7a8a5a;
  --tree-green-d:   #5b6a40;

  --text:           #f0d8b8;
  --text-mute:      #c8a890;
  --text-dim:       #8a7a5e;
  --text-faint:     #6b5d48;

  --border:         #4a2a18;
  --border-soft:    #2b1c10;
  --border-strong:  #5a3220;

  --danger:         #b85a4a;
  --danger-bg:      #2a1410;
  --success:        #7a8a5a;
  --success-bg:     #1a1f12;
  --warn:           #d65a3a;
  --warn-bg:        #2a1c10;

  --serif:  'Cormorant Garamond', 'Spectral', Georgia, 'Times New Roman', serif;
  --sans:   -apple-system, system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono:   ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  /* Brand-Background. Default = Morgenröter; via body[data-brand="..."] überschrieben. */
  --bg-image-url: url('/assets/volk_und_golem.png');
}

body[data-brand="agartha"] {
  --bg-image-url: url('/assets/agartha.png');
}

/* ============================================================ Reset / Base */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; }
body {
  font-family: var(--sans);
  /* Volk-und-Golem als ruhiger Hintergrund auch nach Login — stark gedimmt
     damit Content lesbar bleibt. Vollbild-Login überschreibt das mit
     stärkerem Bild + schwächerem Overlay (siehe body.login-screen unten). */
  background:
    linear-gradient(rgba(12, 8, 5, 0.92), rgba(12, 8, 5, 0.92)),
    var(--bg-image-url) center / cover no-repeat fixed,
    var(--bg-deep);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection { background: rgba(214, 90, 58, 0.35); color: #fff; }

a { color: var(--amber); }
a:hover { color: #e9a955; }

hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 2rem 0;
}

/* ============================================================ Topbar */
.topbar {
  display: flex; align-items: center; gap: 1.5rem;
  padding: 0.5rem 1.25rem;
  background: var(--bg-soft);
  border-bottom: 1px solid var(--border);
  height: 44px;
  position: sticky;
  top: 0;
  z-index: 50;
}
.topbar::after {
  content: '';
  position: absolute; left: 0; right: 0; bottom: -1px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(214,90,58,0.25), transparent);
}
.topbar .brand {
  text-decoration: none;
  font-family: var(--serif);
  font-size: 22px;
  letter-spacing: 0.08em;
  color: var(--text-mute);
}
.topbar .brand strong {
  color: var(--amber);
  font-weight: 600;
  text-shadow: 0 0 18px rgba(214,90,58,0.35);
}

.topbar nav.primary-nav { display: flex; gap: 1.1rem; align-items: center; }
.topbar nav.primary-nav a {
  color: var(--text-mute);
  text-decoration: none;
  font-size: 13px;
  padding: 0.2rem 0.15rem;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}
.topbar nav.primary-nav a:hover { color: var(--amber); }
.topbar nav.primary-nav a.active {
  color: var(--amber);
  border-bottom-color: var(--amber);
}

.topbar .topbar-right {
  margin-left: auto;
  display: flex; align-items: center; gap: 0.9rem;
}
.topbar .login-link,
.topbar .logout-link {
  color: var(--text-mute);
  text-decoration: none;
  font-size: 13px;
}
.topbar .login-link:hover,
.topbar .logout-link:hover { color: var(--amber); }
.topbar .logout-link .fa,
.topbar .login-link .fa { margin-right: 0.3rem; }

/* User-Pill */
.user-pill {
  display: inline-flex; flex-direction: column;
  line-height: 1.15;
  font-size: 12px;
  align-items: flex-end;
}
.user-pill .user-name { color: var(--text); font-weight: 600; }
.user-pill .user-role {
  color: var(--text-dim);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.user-pill.readonly { justify-content: center; flex-direction: row; }
.user-pill .readonly-badge {
  background: rgba(214, 90, 58, 0.1);
  color: var(--amber);
  border: 1px solid var(--amber-deep);
}

/* News-Badge */
.news-link { position: relative; display: inline-flex; align-items: center; gap: 0.3rem; }
.notif-badge {
  display: inline-block;
  background: var(--amber-warm);
  color: var(--bg-deep);
  font-size: 10px; font-weight: 700;
  padding: 1px 6px;
  border-radius: 9px;
  line-height: 1.3;
  min-width: 16px; text-align: center;
  box-shadow: 0 0 10px rgba(214, 90, 58, 0.4);
}

/* ============================================================ Split (Baum-Layout) */
.split {
  display: grid;
  grid-template-columns: minmax(280px, 33vw) 1fr;
  height: calc(100vh - 44px);
}
.tree-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0 0.1rem 0.5rem;
  margin-bottom: 0.35rem;
  border-bottom: 1px dashed var(--border);
}
.tree-ctrl-wide { flex-basis: 100% !important; }
.tree-ctrl-btn {
  flex: 1 1 calc(50% - 0.2rem);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 3px;
  color: var(--text-mute);
  font-size: 11px;
  padding: 0.35rem 0.5rem;
  cursor: pointer;
  text-align: center;
  letter-spacing: 0.02em;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}
.tree-ctrl-btn:hover:not(:disabled) {
  color: var(--amber);
  border-color: var(--amber);
  background: var(--amber-shadow);
}
.tree-ctrl-btn:disabled { opacity: 0.5; cursor: wait; }
.tree-ctrl-btn .fa { margin-right: 0.3rem; opacity: 0.8; }

#tree-pane {
  background: var(--bg-soft);
  border-right: 1px solid var(--border);
  overflow: auto;
  padding: 0.6rem;
}
#detail-pane {
  background: var(--bg-deep);
  overflow: auto;
  padding: 1.75rem 2.25rem 3rem;
}
.empty-tree {
  color: var(--text-dim);
  font-style: italic;
  padding: 1rem;
  font-size: 13px;
}

/* ============================================================ Full-Page (kein Baum) */
.full-page {
  max-width: 820px;
  margin: 0 auto;
  padding: 2.25rem 1.5rem 4rem;
}

/* ============================================================ Manifest-Markdown-Render */
.manifest-content {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 2.25rem 2.75rem;
  line-height: 1.75;
  color: var(--text);
  font-family: var(--serif);
  font-size: 17.5px;
  max-width: 760px;
  margin: 0 auto;
  box-shadow: 0 0 60px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(214, 90, 58, 0.04);
}
.manifest-content > :first-child { margin-top: 0; }
.manifest-content > :last-child { margin-bottom: 0; }

/* ============================================================ Markdown-Bilder
   Im Markdown eingebettete Bilder (![alt](url)) sollen sich an die Spaltenbreite
   anpassen, statt die Originalgröße zu erzwingen. Gilt überall wo Markdown
   ausgegeben wird: Manifest-Pages, Node-Bodies, Conversation-Bodies und
   Comment-Bodies. Klick auf das Bild öffnet die Lightbox (siehe app.js — der
   Body-Delegate-Handler greift auch ohne data-action-Attribut, sobald wir hier
   cursor:zoom-in setzen, weil das Bild dadurch optisch klickbar wirkt). */
.manifest-content img,
.node-body img,
.conversation-body img,
.comment-body img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 1.25rem auto;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: var(--bg-soft);
  cursor: zoom-in;
}

.manifest-content h1 {
  font-family: var(--serif);
  color: var(--amber);
  font-size: 36px;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.2;
  margin: 0 0 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
  text-shadow: 0 0 24px rgba(214, 90, 58, 0.2);
}
.manifest-content h2 {
  font-family: var(--serif);
  color: var(--amber);
  font-size: 26px;
  font-weight: 600;
  margin: 2.5rem 0 1rem;
  letter-spacing: 0.01em;
}
.manifest-content h3 {
  font-family: var(--serif);
  color: var(--text-mute);
  font-size: 21px;
  font-weight: 600;
  margin: 2rem 0 0.6rem;
}
.manifest-content h4, .manifest-content h5, .manifest-content h6 {
  font-family: var(--serif);
  color: var(--text-mute);
  font-size: 18px;
  font-weight: 600;
  margin: 1.5rem 0 0.5rem;
}
.manifest-content p { margin: 0 0 1.15rem; }
.manifest-content a {
  color: var(--amber);
  text-decoration: none;
  border-bottom: 1px solid rgba(214, 90, 58, 0.35);
}
.manifest-content a:hover { color: #e9a955; border-bottom-color: var(--amber); }
.manifest-content ul, .manifest-content ol { margin: 0 0 1.15rem; padding-left: 1.6rem; }
.manifest-content li { margin-bottom: 0.35rem; }
.manifest-content blockquote {
  margin: 1.25rem 0;
  padding: 0.6rem 1.25rem;
  border-left: 3px solid var(--amber);
  background: linear-gradient(90deg, rgba(214,90,58,0.06), transparent);
  color: var(--text-mute);
  font-style: italic;
}
.manifest-content code {
  background: var(--surface-2);
  border: 1px solid var(--border-soft);
  border-radius: 3px;
  padding: 0.05rem 0.4rem;
  font-family: var(--mono);
  font-size: 0.85em;
  color: var(--amber);
}
.manifest-content pre {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.85rem 1.1rem;
  overflow-x: auto;
}
.manifest-content pre code {
  background: transparent; border: 0; padding: 0;
  color: var(--text);
}
.manifest-content hr {
  border: 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  height: 3px;
  margin: 2.5rem 0;
  background: transparent;
}
.manifest-content table {
  border-collapse: collapse;
  margin: 1.25rem 0;
  width: 100%;
  font-family: var(--sans);
  font-size: 14px;
}
.manifest-content th, .manifest-content td {
  border: 1px solid var(--border);
  padding: 0.5rem 0.7rem;
  text-align: left;
}
.manifest-content th {
  background: var(--surface-2);
  color: var(--text-mute);
  font-weight: 600;
}

/* ============================================================ Form-Basics */
input, textarea, select, button {
  font: inherit;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  border-radius: 3px;
  padding: 0.45rem 0.65rem;
}
input::placeholder, textarea::placeholder { color: var(--text-faint); }
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--amber-deep);
  box-shadow: 0 0 0 2px rgba(214, 90, 58, 0.12);
}
button {
  background: var(--surface-3);
  cursor: pointer;
  color: var(--text);
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
button:hover { background: #3a2a1c; border-color: var(--amber-deep); }
button.primary,
button[type=submit].primary {
  background: var(--amber-warm);
  color: #1a0f06;
  border-color: var(--amber-deep);
  font-weight: 600;
}
button.primary:hover {
  background: var(--amber);
  box-shadow: 0 0 18px var(--amber-shadow);
}
button.danger {
  background: transparent;
  color: var(--danger);
  border-color: #5a2a1f;
}
button.danger:hover {
  background: var(--danger-bg);
  border-color: var(--danger);
}
label {
  display: block;
  margin-top: 0.75rem;
  font-size: 12px;
  color: var(--text-dim);
}
input[type=text], input[type=email], input[type=password], textarea { width: 100%; }
textarea { min-height: 8rem; font-family: var(--mono); }

/* ============================================================ Login-Screen
   Wirkt entweder auf body.login-screen oder auf .login-screen (View-Wrapper). */
body.login-screen,
.login-screen {
  background:
    linear-gradient(rgba(12, 8, 5, 0.45), rgba(12, 8, 5, 0.45)),
    var(--bg-image-url) center / cover no-repeat fixed,
    var(--bg-deep);
}
body.login-screen { min-height: 100vh; overflow: hidden; }

/* Vollflächiger Wrapper, der die Topbar/Layout-Reste verdeckt und das Bild zeigt */
.login-stage {
  position: fixed;
  inset: 0;
  z-index: 999;
  background:
    linear-gradient(rgba(12, 8, 5, 0.45), rgba(12, 8, 5, 0.45)),
    var(--bg-image-url) center / cover no-repeat fixed,
    var(--bg-deep);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  overflow: auto;
}
.login-stage::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse at center, transparent 0%, transparent 35%, rgba(0,0,0,0.55) 75%, rgba(0,0,0,0.85) 100%),
    rgba(0, 0, 0, 0.25);
  z-index: 0;
}
.login-stage > * { position: relative; z-index: 1; }

body.login-screen::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse at center, transparent 0%, transparent 35%, rgba(0,0,0,0.55) 75%, rgba(0,0,0,0.85) 100%),
    rgba(0, 0, 0, 0.25);
  z-index: 1;
}

.login-page {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  z-index: 2;
  max-width: none;
  margin: 0;
}

.login-brand {
  text-align: center;
  margin-bottom: 1.75rem;
}
.login-brand .login-wordmark {
  font-family: var(--serif);
  font-size: 38px;
  font-weight: 600;
  letter-spacing: 0.28em;
  /* Bei langen Brand-Labels (z.B. "AGARTHAMAXXING") darf der Wordmark auf
     kleinen Screens nicht über die Card hinausragen. */
  overflow-wrap: anywhere;
  color: var(--amber);
  margin: 0;
  text-shadow:
    0 0 20px rgba(214, 90, 58, 0.45),
    0 0 50px rgba(214, 90, 58, 0.18);
}
.login-brand .login-subtitle {
  font-family: var(--serif);
  font-size: 14px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin: 0.6rem 0 0;
}

.login-title {
  font-family: var(--serif);
  color: var(--amber);
  font-size: 22px;
  font-weight: 600;
  text-align: center;
  letter-spacing: 0.08em;
  margin: 0 0 1.25rem;
}

.login-card {
  width: 100%;
  max-width: 440px;
  background: rgba(15, 10, 6, 0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid #5a3a1f;
  border-radius: 6px;
  padding: 2rem 2.2rem 2.2rem;
  box-shadow:
    0 0 60px rgba(214, 90, 58, 0.28),
    0 10px 40px rgba(0, 0, 0, 0.6);
}

.login-error {
  background: var(--danger-bg);
  color: #e8a89a;
  border: 1px solid #5a2a1f;
  border-radius: 4px;
  padding: 0.6rem 0.85rem;
  margin-bottom: 1rem;
  font-size: 13px;
  text-align: center;
}

/* CSS-only Tabs: hidden radios + sibling labels */
.login-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.5rem;
}
.login-card > .tab-radio { position: absolute; opacity: 0; pointer-events: none; }
.login-tabs .tab-radio { display: none; }
.login-tabs .tab-label {
  flex: 1;
  text-align: center;
  padding: 0.65rem 0.5rem;
  color: var(--text-dim);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  user-select: none;
  transition: color 0.15s, border-color 0.15s;
}
.login-tabs .tab-label:hover { color: var(--text-mute); }

.login-tab-panel { display: none; }

/* Tab-Toggle Logik: aktiver Radio -> Label highlight + Panel sichtbar */
#tab-user:checked   ~ .login-tabs label[for="tab-user"],
#tab-readonly:checked ~ .login-tabs label[for="tab-readonly"] {
  color: var(--amber);
  border-bottom-color: var(--amber);
}
#tab-user:checked     ~ .login-panels #panel-user,
#tab-readonly:checked ~ .login-panels #panel-readonly {
  display: block;
}

.login-form-inner {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.login-field {
  display: block;
  margin: 0;
}
.login-field > span {
  display: block;
  font-size: 11px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.35rem;
}
.login-field input {
  width: 100%;
  background: transparent;
  border: 1px solid transparent;
  border-bottom: 1px solid var(--border-strong);
  border-radius: 0;
  padding: 0.55rem 0.2rem;
  font-size: 15px;
  color: var(--text);
  font-family: var(--sans);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.login-field input:focus {
  outline: none;
  border-bottom-color: var(--amber);
  box-shadow: 0 1px 0 0 var(--amber);
}

.login-hint {
  color: var(--text-dim);
  font-size: 12px;
  margin: 0 0 1rem;
  font-style: italic;
  line-height: 1.5;
}

.login-submit {
  background: var(--amber-warm);
  color: #1a0f06;
  border: 1px solid var(--amber-deep);
  border-radius: 3px;
  padding: 0.7rem 1rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-size: 13px;
  cursor: pointer;
  margin-top: 0.5rem;
  transition: background 0.18s, box-shadow 0.18s, transform 0.05s;
}
.login-submit:hover {
  background: var(--amber);
  box-shadow: 0 0 22px rgba(214, 90, 58, 0.55);
}
.login-submit:active { transform: translateY(1px); }
.login-submit.secondary {
  background: transparent;
  color: var(--amber);
  border-color: var(--amber-deep);
}
.login-submit.secondary:hover {
  background: rgba(214, 90, 58, 0.12);
  box-shadow: 0 0 18px rgba(214, 90, 58, 0.3);
}

.login-back {
  text-align: center;
  margin: 1.5rem 0 0;
  font-size: 12px;
}
.login-back a {
  color: var(--text-dim);
  text-decoration: none;
  border-bottom: 1px dotted var(--text-faint);
}
.login-back a:hover { color: var(--amber); border-bottom-color: var(--amber); }

/* Konflikt-Auflösung: .full-page.login-page kommt durch login.php — login-page-Stil überschreibt */
.full-page.login-page {
  max-width: none;
  padding: 2rem 1rem;
}

/* Legacy-Klassen aus altem app.css beibehalten, damit nichts knallt */
.login-form {
  /* veraltete Wrapper-Klasse — neutralisiert, eigentliches Styling läuft über .login-card */
  background: transparent;
  border: 0;
  padding: 0;
  margin: 0;
}
.login-form h1, .login-form h2 {
  font-family: var(--serif);
  color: var(--amber);
  font-size: 18px;
  margin: 0 0 0.5rem;
  font-weight: 600;
}
.login-form .error {
  background: var(--danger-bg);
  color: #e8a89a;
  border: 1px solid #5a2a1f;
  border-radius: 3px;
  padding: 0.5rem 0.75rem;
  margin-bottom: 1rem;
  font-size: 13px;
}
.login-form .divider {
  text-align: center;
  margin: 1.25rem 0;
  font-size: 11px; color: var(--text-faint);
  text-transform: uppercase; letter-spacing: 0.1em;
  position: relative;
}
.login-form .divider::before,
.login-form .divider::after {
  content: ''; position: absolute; top: 50%;
  width: calc(50% - 2rem); height: 1px; background: var(--border);
}
.login-form .divider::before { left: 0; }
.login-form .divider::after { right: 0; }
.login-cards { width: 100%; max-width: 440px; }

/* ============================================================ Tabs (generisch) */
.tabs {
  display: flex; gap: 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.5rem;
}
.tabs .tab {
  padding: 0.5rem 1rem;
  color: var(--text-dim);
  text-decoration: none;
  font-size: 13px;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.tabs .tab:hover { color: var(--text); }
.tabs .tab.active {
  color: var(--amber);
  border-bottom-color: var(--amber);
  font-weight: 600;
}

/* ============================================================ Node-Cards */
.node-card {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 1.1rem 1.35rem;
  margin-bottom: 1rem;
  box-shadow: 0 1px 0 rgba(0,0,0,0.4);
}
.node-card.editing {
  border-color: var(--amber-deep);
  background: var(--surface-2);
  box-shadow: 0 0 0 1px rgba(214, 90, 58, 0.15);
}
.node-card + .node-card { margin-top: 0; }

.node-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.7rem;
  margin-bottom: 0.85rem;
}
.node-header .titles { min-width: 0; flex: 1; }
.node-header .breadcrumb {
  font-size: 11px; color: var(--text-dim);
  text-transform: uppercase; letter-spacing: 0.06em;
  margin-bottom: 0.35rem;
}
.node-header .breadcrumb a { color: var(--text-mute); text-decoration: none; }
.node-header .breadcrumb a:hover { color: var(--amber); }
.node-header .breadcrumb .sep { margin: 0 0.4rem; color: var(--text-faint); }
.node-header h1, .node-header h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 26px;
  color: var(--amber);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.005em;
  word-break: break-word;
}

.node-actions,
.node-header .actions {
  display: flex; gap: 0.4rem; flex-shrink: 0;
}
.node-actions button,
.node-actions a.button,
.node-header .actions button,
.node-header .actions a.button {
  font-size: 12px;
  padding: 0.3rem 0.7rem;
  color: var(--text-mute);
  text-decoration: none;
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  border-radius: 3px;
  cursor: pointer;
}
.node-actions button:hover,
.node-actions a.button:hover,
.node-header .actions button:hover,
.node-header .actions a.button:hover {
  background: var(--surface-3);
  color: var(--amber);
  border-color: var(--amber-deep);
}
.node-actions .btn-delete:hover,
.node-header .actions button.danger:hover {
  background: var(--danger-bg);
  border-color: var(--danger);
  color: var(--danger);
}
.node-actions .btn-edit:hover { color: var(--amber); }

.node-body {
  word-wrap: break-word;
  color: var(--text);
  line-height: 1.65;
  margin: 0.4rem 0 0.85rem;
  font-size: 14.5px;
}
.node-body.empty { color: var(--text-faint); font-style: italic; }
.node-body p { margin: 0 0 0.85rem; }
.node-body h1, .node-body h2, .node-body h3 {
  font-family: var(--serif);
  color: var(--amber);
  margin: 1.25rem 0 0.55rem;
  font-weight: 600;
}
.node-body h1 { font-size: 22px; }
.node-body h2 { font-size: 19px; }
.node-body h3 { font-size: 17px; }
.node-body a { color: var(--amber); border-bottom: 1px solid rgba(214,90,58,0.35); text-decoration: none; }
.node-body a:hover { color: #e9a955; border-bottom-color: var(--amber); }
.node-body blockquote {
  margin: 0.85rem 0;
  padding: 0.45rem 0.95rem;
  border-left: 3px solid var(--amber);
  background: linear-gradient(90deg, rgba(214,90,58,0.05), transparent);
  color: var(--text-mute);
  font-style: italic;
}
.node-body code {
  background: var(--surface-2);
  border: 1px solid var(--border-soft);
  border-radius: 3px;
  padding: 0.05rem 0.35rem;
  font-family: var(--mono);
  font-size: 0.88em;
  color: var(--amber);
}
.node-body pre {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 0.65rem 0.9rem;
  overflow-x: auto;
}
.node-body pre code { background: transparent; border: 0; padding: 0; color: var(--text); }
.node-body ul, .node-body ol { padding-left: 1.5rem; margin: 0 0 0.85rem; }

.node-meta {
  display: flex; flex-wrap: wrap; gap: 0.85rem;
  font-size: 12px; color: var(--text-dim);
  border-top: 1px solid var(--border);
  padding-top: 0.6rem;
  margin-top: 0.6rem;
}
.node-meta span strong, .node-meta .meta-updated strong {
  color: var(--text-mute); font-weight: 500;
}

/* Breadcrumb (top-level in node.php) */
.breadcrumb {
  font-size: 11px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 0.85rem;
}
.breadcrumb a { color: var(--text-mute); text-decoration: none; }
.breadcrumb a:hover { color: var(--amber); }
.breadcrumb .sep { margin: 0 0.4rem; color: var(--text-faint); }
.breadcrumb .current { color: var(--amber); }

/* ============================================================ Badges */
.badge {
  display: inline-block;
  font-size: 11px; line-height: 1.4;
  padding: 1px 8px;
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--text-mute);
  letter-spacing: 0.04em;
  border: 1px solid var(--border-strong);
}
.badge.role-admin    { background: rgba(184, 66, 31, 0.18); color: var(--amber); border-color: var(--amber-deep); }
.badge.role-editor   { background: rgba(214, 90, 58, 0.1);  color: var(--amber); border-color: #5a3a1f; }
.badge.role-member   { background: rgba(122, 138, 90, 0.12); color: var(--tree-green); border-color: var(--tree-green-d); }
.badge.role-readonly { background: var(--surface-2); color: var(--text-mute); border-color: var(--border-strong); }

/* ============================================================ Children-List */
.section-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  margin: 1.5rem 0 0.6rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.3rem;
}
.children-list {
  display: flex; flex-direction: column;
  gap: 0.3rem;
  margin: 0.6rem 0;
  padding: 0;
  list-style: none;
}
.children-list h3 {
  font-family: var(--serif);
  color: var(--text-mute);
  font-size: 16px;
  font-weight: 600;
  margin: 1rem 0 0.5rem;
  letter-spacing: 0.03em;
}
.children-list ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.children-list li { margin: 0; }
.children-list .child-link,
.children-list li a {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.45rem 0.7rem;
  background: var(--surface-1);
  border: 1px solid var(--border-soft);
  border-radius: 3px;
  color: var(--text-mute);
  text-decoration: none;
  font-size: 13.5px;
}
.children-list .child-link:hover,
.children-list li a:hover {
  background: var(--surface-2);
  border-color: var(--amber-deep);
  color: var(--amber);
}
.children-list .child-link .child-title {
  flex: 1; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.children-list .child-link .child-meta { color: var(--text-dim); font-size: 11px; }
.children-list .empty {
  color: var(--text-faint);
  font-style: italic;
  font-size: 12px;
  padding: 0.4rem 0.6rem;
}

/* ============================================================ Add-Child */
.add-child {
  margin-top: 1rem;
  border-top: 1px dashed var(--border-strong);
  padding-top: 0.85rem;
}
.add-child h3 {
  font-family: var(--serif);
  color: var(--text-mute);
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 0.5rem;
  letter-spacing: 0.03em;
}
.add-child > button.toggle {
  font-size: 12px;
  background: transparent;
  border: 1px dashed var(--border-strong);
  color: var(--text-dim);
  padding: 0.4rem 0.8rem;
}
.add-child > button.toggle:hover { color: var(--amber); border-color: var(--amber); }
.add-child-form {
  display: none;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 0.85rem;
  margin-top: 0.5rem;
}
.add-child-form.open { display: block; }
.add-child-form .row { display: flex; gap: 0.5rem; }
.add-child-form .row > * { flex: 1; }
.add-child-form label { margin-top: 0.4rem; }
.add-child-form .actions {
  display: flex; gap: 0.5rem; justify-content: flex-end;
  margin-top: 0.7rem;
}
.add-child-form .actions button { font-size: 12px; }
.add-child-form .actions button.primary {
  background: var(--tree-green-d);
  color: #f0e8d0;
  border-color: var(--tree-green);
}
.add-child-form .actions button.primary:hover { background: var(--tree-green); }

/* ============================================================ Auto-Form */
.auto-form { position: relative; }
.auto-form .field { display: block; margin: 0.85rem 0; }
.auto-form .field > label {
  display: block;
  font-size: 11px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.3rem;
}
.auto-form .field input[type=text],
.auto-form .field input[type=date],
.auto-form .field input[type=email],
.auto-form .field select {
  width: 100%;
  background: transparent;
  border: 1px solid transparent;
  border-bottom: 1px solid var(--border-strong);
  border-radius: 0;
  padding: 0.45rem 0.25rem;
  font-size: 14px;
  color: var(--text);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.auto-form .field input[type=text]:focus,
.auto-form .field input[type=date]:focus,
.auto-form .field input[type=email]:focus,
.auto-form .field select:focus {
  border-bottom-color: var(--amber);
  outline: none;
  box-shadow: 0 1px 0 0 var(--amber);
}
.auto-form .field.title input[type=text] {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 600;
  color: var(--amber);
  border-bottom-color: transparent;
  letter-spacing: 0.01em;
}
.auto-form .field.title input[type=text]:focus { border-bottom-color: var(--amber); }
.auto-form .row { display: flex; gap: 1rem; }
.auto-form .row > * { flex: 1; }

/* Save-Indicator */
.save-indicator {
  position: absolute;
  top: 0; right: 0;
  font-size: 11px; color: var(--text-faint);
  padding: 2px 8px; border-radius: 8px;
  opacity: 0;
  transition: opacity 0.2s;
}
.auto-form.saving .save-indicator { opacity: 1; color: var(--amber); }
.auto-form.saving .save-indicator::before { content: '… speichern'; }
.auto-form.saved  .save-indicator { opacity: 1; color: var(--tree-green); }
.auto-form.saved  .save-indicator::before { content: '✓ gespeichert'; }
.auto-form.failed .save-indicator { opacity: 1; color: var(--danger); }
.auto-form.failed .save-indicator::before { content: '✗ fehlgeschlagen'; }

/* ============================================================ EasyMDE — Dark Override */
.EasyMDEContainer { margin-top: 0.35rem; }
.EasyMDEContainer .CodeMirror {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: 3px;
  color: var(--text);
  font-family: var(--mono);
  font-size: 13px;
  min-height: 180px;
}
.EasyMDEContainer .CodeMirror-cursor { border-left-color: var(--amber); }
.EasyMDEContainer .CodeMirror-selected,
.EasyMDEContainer .CodeMirror-focused .CodeMirror-selected,
.EasyMDEContainer .CodeMirror-line::selection,
.EasyMDEContainer .CodeMirror-line > span::selection,
.EasyMDEContainer .CodeMirror-line > span > span::selection {
  background: rgba(214, 90, 58, 0.35) !important;
  color: inherit !important;
}
.EasyMDEContainer .CodeMirror ::selection {
  background: rgba(214, 90, 58, 0.35);
  color: inherit;
}
.EasyMDEContainer .CodeMirror-gutters {
  background: var(--surface-2);
  border-right-color: var(--border);
}
.EasyMDEContainer .editor-toolbar {
  border-color: var(--border);
  background: var(--bg-soft);
  border-top-left-radius: 3px;
  border-top-right-radius: 3px;
  opacity: 0.95;
}
.EasyMDEContainer .editor-toolbar button {
  color: var(--text-mute) !important;
}
.EasyMDEContainer .editor-toolbar button:hover,
.EasyMDEContainer .editor-toolbar button.active {
  background: var(--surface-2);
  border-color: var(--border-strong);
  color: var(--amber) !important;
}
.EasyMDEContainer .editor-toolbar i.separator { border-color: var(--border); }
.EasyMDEContainer .editor-preview,
.EasyMDEContainer .editor-preview-side {
  background: var(--surface-1);
  color: var(--text);
  border-color: var(--border);
}
.EasyMDEContainer .editor-statusbar { color: var(--text-dim); }

/* ============================================================ jsTree — Dark Override */
.jstree-default .jstree-icon.fa { background-image: none !important; }
.jstree-default .jstree-anchor {
  color: var(--text-mute);
  line-height: 22px;
  height: 22px;
}
.jstree-default .jstree-anchor .fa { color: var(--amber-warm); margin-right: 0.3rem; }
.jstree-default .jstree-hovered {
  background: rgba(214, 90, 58, 0.1) !important;
  background-image: none !important;
  border: 0 !important;
  box-shadow: none !important;
  color: var(--amber) !important;
}
.jstree-default .jstree-clicked,
.jstree-default .jstree-anchor.jstree-clicked {
  background: rgba(214, 90, 58, 0.18) !important;
  background-image: none !important;
  border: 0 !important;
  box-shadow: none !important;
  color: var(--text) !important;
}
.jstree-default .jstree-anchor:focus {
  background: transparent;
  outline: 0;
  color: var(--text);
  box-shadow: none;
}
.jstree-default .jstree-wholerow-hovered {
  background: rgba(214, 90, 58, 0.08) !important;
  background-image: none !important;
  border-top: 0 !important; border-bottom: 0 !important;
  box-shadow: none !important;
}
.jstree-default .jstree-wholerow-clicked {
  background: rgba(214, 90, 58, 0.18) !important;
  background-image: none !important;
  border-top: 0 !important; border-bottom: 0 !important;
  box-shadow: none !important;
}
.jstree-default-clicked { background-image: none !important; }
.jstree-default .jstree-ocl { color: var(--text-dim); }

/* ============================================================ jsTree Context-Menü — Dark Override
   jsTree erzeugt das Menü als .vakata-context (Wrapper + verschachtelte <ul>). Die default-Theme-CSS
   wird vor app.css geladen, daher reicht Spezifität via .vakata-context-Prefix in den meisten Fällen.
   border-image und background-image setzt das default-Theme inline / per !important — daher hier
   gezielt mit !important entwerten. */
.vakata-context,
.vakata-context ul {
  background: var(--surface-1) !important;
  border: 1px solid var(--border) !important;
  border-image: none !important;
  background-image: none !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6) !important;
  border-radius: 4px;
  min-width: 200px;
  padding: 4px 0;
  color: var(--text-mute);
  font-family: var(--sans);
  font-size: 13px;
}
.vakata-context li { background: transparent; border: 0; }
.vakata-context li > a {
  color: var(--text-mute);
  padding: 8px 16px;
  text-shadow: none !important;
  border: 0;
  background: transparent;
  display: flex;
  align-items: center;
  gap: 12px;
  line-height: 1.4;
}
.vakata-context li > a > i {
  color: var(--amber-warm);
  background: transparent !important;
  margin: 0;
  width: 22px;
  min-width: 22px;
  height: 1em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-style: normal;
}
.vakata-context li > a > i::before {
  color: var(--amber-warm);
  display: inline-block;
  width: 100%;
  text-align: center;
}
/* jsTree-Default rendert nach <i> manchmal ein <ins> mit border-right als
   Icon/Text-Separator. Auf dem Dark-Theme wirkt das wie ein Strich zwischen
   Icon-Spalte und Label — weg damit. */
.vakata-context li > a > ins,
.vakata-context li > a > i + ins {
  display: none !important;
  border: 0 !important;
  background: transparent !important;
}
.vakata-context li > a > span,
.vakata-context li > a .vakata-contextmenu-sep { color: inherit; }
.vakata-context li > a:hover,
.vakata-context li > a:focus,
.vakata-context li > a:active,
.vakata-context li > a.vakata-context-hover {
  background: rgba(214, 90, 58, 0.12) !important;
  background-image: none !important;
  color: var(--text) !important;
  box-shadow: none !important;
  border: 0 !important;
  outline: 0 !important;
}
.vakata-context li > a:hover > i,
.vakata-context li > a:focus > i,
.vakata-context li > a:active > i,
.vakata-context li > a.vakata-context-hover > i {
  color: var(--amber);
}
.vakata-context li > a:hover > i::before,
.vakata-context li > a:focus > i::before,
.vakata-context li > a:active > i::before,
.vakata-context li > a.vakata-context-hover > i::before {
  color: var(--amber);
}
.vakata-context li > a .vakata-context-separator,
.vakata-context li > a > span.vakata-context-separator {
  background: var(--border) !important;
  border: 0 !important;
}
.vakata-context .vakata-context-separator,
.vakata-context li.vakata-context-separator {
  background: var(--border) !important;
  border: 0 !important;
  height: 1px;
  margin: 4px 0;
  padding: 0;
}
.vakata-context li.vakata-context-separator > a { display: none; }
.vakata-context li > a.vakata-context-disabled,
.vakata-context li > a.vakata-context-disabled:hover {
  color: var(--text-faint) !important;
  background: transparent !important;
  cursor: not-allowed;
}
.vakata-context li > a > .vakata-context-icon { display: none; }
.vakata-context .vakata-context-shortcut { color: var(--text-dim); }

/* ============================================================ Focus-Bar (Breadcrumb-Pfad)
   Schmaler horizontaler Streifen unter der Topbar. Wenn sichtbar (nicht [hidden]), wird die
   Höhe der .split entsprechend reduziert via adjacent sibling selector. */
.focus-bar {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--bg-soft);
  border-bottom: 1px solid var(--border);
  padding: 0.45rem 1.25rem;
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--text-mute);
  min-height: 36px;
}
.focus-bar:not([hidden]) {
  position: sticky;
  top: 44px;
  z-index: 49;
}
.focus-bar[hidden] { display: none; }
.focus-bar a {
  color: var(--text-mute);
  text-decoration: none;
  transition: color 0.15s ease;
}
.focus-bar a:hover { color: var(--amber); }
.focus-bar a.root {
  color: var(--text-dim);
  display: inline-flex;
  align-items: center;
  padding: 0 0.15rem;
}
.focus-bar a.root .fa { font-size: 13px; }
.focus-bar a.root:hover { color: var(--amber); }
.focus-bar .sep {
  color: #5a3a1f;
  font-size: 13px;
  user-select: none;
  padding: 0 0.05rem;
}
.focus-bar strong {
  color: var(--amber);
  font-weight: 600;
  letter-spacing: 0.04em;
}
.focus-bar .clear {
  margin-left: auto;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-dim);
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.06em;
  padding: 3px 9px;
  border-radius: 3px;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.focus-bar .clear:hover {
  color: #e4a4a4;
  border-color: #c45a5a;
  background: rgba(196, 90, 90, 0.08);
}
/* Wenn die Focus-Bar sichtbar ist, .split-Höhe um 36px reduzieren */
.focus-bar:not([hidden]) ~ .split { height: calc(100vh - 44px - 36px); }

/* ============================================================ Reddit-Style Kommentare */
.comment-thread, .comments-container {
  margin-top: 1.75rem;
}
.comment-thread > .section-title { margin-top: 0; }

.comments-heading {
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 600;
  color: var(--text-mute);
  margin: 0 0 0.85rem;
  letter-spacing: 0.03em;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.45rem;
}

.comments-login-hint,
.comment-form-hint {
  color: var(--text-dim);
  font-size: 13px;
  font-style: italic;
  padding: 0.5rem 0.75rem;
  background: var(--surface-1);
  border: 1px dashed var(--border-strong);
  border-radius: 3px;
  margin: 0 0 1rem;
}
.comments-login-hint a, .comment-form-hint a { color: var(--amber); }

/* Top-Level Kommentar-Form deutlich hervorgehoben */
.comment-form {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.85rem 1rem;
  margin-bottom: 1.25rem;
}
.comment-form.top-level {
  border-color: var(--amber-deep);
  box-shadow: 0 0 0 1px rgba(214, 90, 58, 0.08), 0 0 24px rgba(0, 0, 0, 0.4);
}
.comment-form.top-level h3 {
  margin: 0 0 0.55rem;
  font-size: 13px;
  color: var(--amber);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
}
.comment-form textarea {
  width: 100%;
  min-height: 5rem;
  font-family: var(--sans);
  font-size: 13px;
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  color: var(--text);
}
.comment-form .form-actions,
.comment-form-actions {
  display: flex; gap: 0.5rem; justify-content: flex-end;
  margin-top: 0.6rem;
}
.comment-form .form-actions button,
.comment-form-actions button { font-size: 12px; }

/* Reply-Form */
.comment .reply-form {
  display: none;
  margin-top: 0.55rem;
  padding: 0.65rem 0.8rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 3px;
}
.comment .reply-form.open { display: block; }
.comment .reply-form textarea {
  min-height: 4rem;
  font-size: 13px;
}
.comment-reply-form-wrap {
  margin-top: 0.6rem;
}
.comment-reply-form-wrap.hidden { display: none; }
.comment-edit-form.hidden { display: none; }
.hidden { display: none !important; }

/* Einzelner Kommentar */
.comment {
  padding: 0.75rem 1rem;
  background: var(--surface-1);
  border: 1px solid var(--border-soft);
  border-radius: 4px;
  margin-bottom: 0.55rem;
}
.comment.collapsed > .comment-body,
.comment.collapsed > .comment-actions,
.comment.collapsed > .reply-form,
.comment.collapsed > .comment-children,
.comment.comment-collapsed > .comment-body,
.comment.comment-collapsed > .comment-actions,
.comment.comment-collapsed > .reply-form,
.comment.comment-collapsed > .comment-reply-form-wrap,
.comment.comment-collapsed > .comment-edit-form,
.comment.comment-collapsed > .comment-children { display: none; }
.comment.collapsed > .comment-meta,
.comment.comment-collapsed > .comment-meta { opacity: 0.6; }

.comment.comment-deleted .comment-body { color: var(--text-faint); font-style: italic; }

.comment-meta {
  display: flex; align-items: center; gap: 0.45rem;
  font-size: 11px; color: var(--text-dim);
  margin-bottom: 0.4rem;
}
.comment-meta .author,
.comment-meta .comment-author,
.comment-author {
  color: var(--amber);
  font-weight: 600;
}
.comment-meta .role-tag {
  font-size: 10px; color: var(--text-faint);
  padding: 0 4px;
  border-radius: 6px;
  background: var(--surface-2);
  text-transform: uppercase; letter-spacing: 0.05em;
}
.comment-meta .time,
.comment-meta .comment-time,
.comment-time { color: var(--text-faint); }
.comment-meta .time.edited::after { content: ' (bearb.)'; color: var(--text-faint); font-style: italic; }
.comment-edited { color: var(--text-faint); font-style: italic; font-size: 10px; }

/* Collapse-Toggle */
.comment-meta .collapse-toggle,
.comment-collapse {
  background: transparent;
  border: 0;
  color: var(--text-faint);
  padding: 0 4px 0 0;
  font-size: 11px;
  cursor: pointer;
}
.comment-meta .collapse-toggle:hover,
.comment-collapse:hover { color: var(--amber); }
.comment.collapsed .collapse-toggle::before { content: '▸ '; }
.comment:not(.collapsed) .collapse-toggle::before { content: '▾ '; }

.comment-body {
  color: var(--text);
  line-height: 1.55;
  font-size: 13.5px;
  word-wrap: break-word;
}
.comment-body p { margin: 0 0 0.45rem; }
.comment-body p:last-child { margin-bottom: 0; }
.comment-body a { color: var(--amber); }
.comment-body code {
  background: var(--surface-2);
  border: 1px solid var(--border-soft);
  border-radius: 3px;
  padding: 0 0.3rem;
  font-family: var(--mono);
  font-size: 0.88em;
  color: var(--amber);
}
.comment-body pre {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 0.55rem 0.75rem;
  overflow-x: auto;
}
.comment-body pre code { background: transparent; border: 0; padding: 0; color: var(--text); }
.comment-body blockquote {
  margin: 0.5rem 0;
  padding: 0.3rem 0.75rem;
  border-left: 2px solid var(--amber);
  color: var(--text-mute);
  background: linear-gradient(90deg, rgba(214,90,58,0.05), transparent);
}

.comment-actions {
  display: flex; gap: 0.4rem;
  margin-top: 0.4rem;
}
.comment-actions button,
.comment-actions a {
  background: transparent;
  border: 0;
  color: var(--text-dim);
  font-size: 11px;
  padding: 0.2rem 0.45rem;
  border-radius: 3px;
  text-decoration: none;
  cursor: pointer;
}
.comment-actions button:hover,
.comment-actions a:hover {
  background: var(--surface-2);
  color: var(--amber);
}
.comment-actions .danger:hover,
.comment-action-delete:hover {
  color: var(--danger);
  background: var(--danger-bg);
}

/* Verschachtelung */
.comment-children {
  margin-top: 0.6rem;
  margin-left: 0.5rem;
  padding-left: 0.9rem;
  border-left: 2px solid var(--amber-deep);
}
.comment-children .comment-children { border-left-color: #6a4220; }
.comment-children .comment-children .comment-children { border-left-color: var(--border-strong); }
.comment-children .comment-children .comment-children .comment-children { border-left-color: var(--border); }

/* btn-classes (in comment_thread.php verwendet) */
.btn { cursor: pointer; }
.btn-primary {
  background: var(--amber-warm);
  color: #1a0f06;
  border: 1px solid var(--amber-deep);
  font-weight: 600;
}
.btn-primary:hover {
  background: var(--amber);
  box-shadow: 0 0 14px var(--amber-shadow);
}
.btn-secondary {
  background: var(--surface-2);
  color: var(--text-mute);
  border: 1px solid var(--border-strong);
}
.btn-secondary:hover {
  background: var(--surface-3);
  color: var(--amber);
  border-color: var(--amber-deep);
}

/* ============================================================ News */
.news-page { max-width: 760px; margin: 0 auto; }
.news-header {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.75rem;
  margin-bottom: 1rem;
}
.news-header h1 {
  font-family: var(--serif);
  font-size: 30px;
  font-weight: 600;
  color: var(--amber);
  margin: 0;
  letter-spacing: 0.02em;
}
.news-actions { margin: 0; }

.news-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
}
.news-item {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 0.85rem 1rem;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: 4px;
  margin-bottom: 0.55rem;
}
.news-item.unread,
.news-item-unread {
  border-left: 3px solid var(--amber);
  background: linear-gradient(90deg, rgba(214,90,58,0.05), var(--surface-1) 30%);
}

.news-item-meta {
  display: flex; align-items: center; gap: 0.8rem;
  font-size: 11px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.news-item-time { color: var(--text-faint); }
.news-item-context { color: var(--text-dim); }
.news-item-path { color: var(--text-dim); font-style: italic; }

.news-item-body {
  color: var(--text);
  font-size: 13.5px;
  line-height: 1.55;
}
.news-item-body strong { color: var(--text-mute); }
.news-item-link {
  color: var(--amber);
  text-decoration: none;
  font-weight: 500;
  border-bottom: 1px solid rgba(214,90,58,0.3);
}
.news-item-link:hover { color: #e9a955; border-bottom-color: var(--amber); }

.news-item-excerpt {
  display: block;
  margin-top: 0.3rem;
  color: var(--text-mute);
  font-style: italic;
}

/* Original Klassen (news-date / news-icon / news-text / news-sub aus altem CSS) */
.news-item .news-date {
  flex-shrink: 0;
  font-size: 11px;
  color: var(--text-dim);
  width: 90px;
  padding-top: 0.15rem;
}
.news-item .news-icon {
  flex-shrink: 0;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--amber);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px;
}
.news-item.kind-node_created .news-icon,
.news-item-kind.kind-node_created { background: var(--success-bg); color: var(--tree-green); }
.news-item.kind-node_edited .news-icon,
.news-item-kind.kind-node_edited { background: rgba(214, 90, 58, 0.1); color: var(--amber); }
.news-item.kind-comment .news-icon,
.news-item.kind-comment_posted .news-icon,
.news-item-kind.kind-comment_posted { background: rgba(184, 66, 31, 0.18); color: var(--amber); }
.news-item .news-body { flex: 1; min-width: 0; }
.news-item .news-text { color: var(--text); font-size: 13.5px; line-height: 1.5; margin: 0 0 0.2rem; }
.news-item .news-text a { color: var(--amber); text-decoration: none; font-weight: 500; }
.news-item .news-text a:hover { text-decoration: underline; }
.news-item .news-sub { color: var(--text-dim); font-size: 11px; }

.news-empty {
  text-align: center;
  color: var(--text-dim);
  font-style: italic;
  padding: 3rem 1rem;
}

/* ============================================================ Subscribe-Button */
.subscribe-btn,
.subscribe-button,
.btn-subscribe {
  display: inline-flex; align-items: center; gap: 0.45rem;
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  color: var(--text-mute);
  padding: 0.35rem 0.8rem;
  border-radius: 3px;
  font-size: 12px;
  cursor: pointer;
  text-decoration: none;
  font-family: var(--sans);
}
.subscribe-btn:hover,
.subscribe-button:hover,
.btn-subscribe:hover {
  background: var(--surface-3);
  color: var(--amber);
  border-color: var(--amber-deep);
}
.subscribe-btn.subscribed,
.subscribe-button-active {
  background: rgba(214, 90, 58, 0.1);
  border-color: var(--amber-deep);
  color: var(--amber);
}
.subscribe-btn.subscribed:hover,
.subscribe-button-active:hover {
  background: var(--danger-bg);
  border-color: var(--danger);
  color: var(--danger);
}
.subscribe-btn .fa { font-size: 12px; }

.node-subscribe { margin: 0.85rem 0 1.25rem; }

/* ============================================================ Admin */
.admin-page { max-width: 920px; margin: 0 auto; }
.admin-header {
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.85rem;
  margin-bottom: 1.25rem;
}
.admin-header h1 {
  font-family: var(--serif);
  font-size: 30px;
  font-weight: 600;
  color: var(--amber);
  margin: 0;
  letter-spacing: 0.02em;
}
.admin-subtitle {
  color: var(--text-dim);
  font-size: 13px;
  margin: 0.3rem 0 0;
  font-style: italic;
}

.admin-flash {
  border-radius: 4px;
  padding: 0.6rem 0.85rem;
  margin: 0 0 1rem;
  font-size: 13px;
}
.admin-flash-error {
  background: var(--danger-bg);
  color: #e8a89a;
  border: 1px solid #5a2a1f;
}
.admin-flash-ok {
  background: var(--success-bg);
  color: var(--tree-green);
  border: 1px solid var(--tree-green-d);
}

.admin-new-user {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 1.1rem 1.25rem;
  margin-bottom: 1.5rem;
}
.admin-new-user h2 {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 600;
  color: var(--text-mute);
  margin: 0 0 0.85rem;
  letter-spacing: 0.02em;
}
.admin-new-user-form {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: flex-end;
}
.admin-new-user-form label {
  flex: 1 1 160px;
  margin: 0;
  font-size: 11px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.admin-new-user-form label > span { display: block; margin-bottom: 0.3rem; }
.admin-new-user-form input,
.admin-new-user-form select { width: 100%; }

.admin-users-section h2 {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 600;
  color: var(--text-mute);
  margin: 0 0 0.85rem;
  letter-spacing: 0.02em;
}

.admin-users {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: 5px;
  overflow: hidden;
}
.admin-users table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.admin-users th, .admin-users td {
  padding: 0.55rem 0.9rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.admin-users th {
  background: var(--surface-2);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  font-weight: 600;
}
.admin-users tr:last-child td { border-bottom: 0; }
.admin-users tr:hover td { background: var(--surface-2); }
.admin-users-row.is-self td {
  background: rgba(214, 90, 58, 0.05);
}
.admin-users-row.is-self:hover td { background: rgba(214, 90, 58, 0.08); }

.admin-self-tag {
  font-size: 10px;
  color: var(--amber);
  margin-left: 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.admin-role-static { color: var(--text-mute); }

.admin-users .actions,
.admin-actions { display: flex; gap: 0.4rem; flex-wrap: wrap; }

.admin-btn,
.admin-users .actions button,
.admin-users .actions a.button {
  font-size: 11px;
  padding: 0.3rem 0.6rem;
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  border-radius: 3px;
  color: var(--text-mute);
  text-decoration: none;
  cursor: pointer;
}
.admin-btn:hover,
.admin-users .actions button:hover,
.admin-users .actions a.button:hover {
  background: var(--surface-3);
  color: var(--amber);
  border-color: var(--amber-deep);
}
.admin-btn-primary {
  background: var(--amber-warm);
  color: #1a0f06;
  border-color: var(--amber-deep);
  font-weight: 600;
}
.admin-btn-primary:hover {
  background: var(--amber);
  box-shadow: 0 0 14px var(--amber-shadow);
}
.admin-btn-small { font-size: 11px; padding: 0.25rem 0.55rem; }
.admin-btn-danger { color: var(--danger); border-color: #5a2a1f; }
.admin-btn-danger:hover {
  background: var(--danger-bg);
  border-color: var(--danger);
  color: var(--danger);
}

.admin-users select.role-select,
.admin-role-form select {
  padding: 0.25rem 0.35rem;
  font-size: 12px;
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border-strong);
}
.admin-pw-form { display: inline-flex; gap: 0.3rem; align-items: center; }
.admin-pw-form input { font-size: 12px; padding: 0.25rem 0.4rem; width: 130px; }

.admin-empty {
  text-align: center;
  color: var(--text-dim);
  font-style: italic;
  padding: 1.5rem;
}

/* ============================================================ Empty-State */
.empty-state {
  color: var(--text-mute);
  padding: 1.25rem;
}
.empty-state h1 {
  font-family: var(--serif);
  color: var(--amber);
  font-size: 30px;
  margin-top: 0;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.empty-state p {
  font-family: var(--serif);
  font-size: 16px;
  color: var(--text-mute);
  line-height: 1.6;
}

/* ============================================================ Footer */
.site-footer {
  text-align: center;
  padding: 1.25rem 1rem;
  color: var(--text-faint);
  font-size: 11px;
  border-top: 1px solid var(--border);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* ============================================================ Node-Sections (Topic-View)
   Trennt Fußnoten / Konversationen / Sub-Themen visuell vom Hauptkörper. */
.node-section {
  margin-top: 1.75rem;
  padding-top: 0.85rem;
  border-top: 1px dashed var(--border);
}
.node-section .section-title {
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 600;
  color: var(--amber);
  letter-spacing: 0.04em;
  margin: 0 0 0.7rem;
  padding: 0;
  border-bottom: 0;
  text-transform: none;
}
.node-section .section-empty {
  color: var(--text-faint);
  font-style: italic;
  font-size: 13px;
  margin: 0 0 0.5rem;
}
.node-section .section-link {
  margin: 0.6rem 0 0;
  font-size: 12px;
}
.node-section .section-link a {
  color: var(--text-mute);
  text-decoration: none;
  border-bottom: 1px dotted var(--text-faint);
}
.node-section .section-link a:hover {
  color: var(--amber);
  border-bottom-color: var(--amber);
}

/* ============================================================ Footnote-Liste */
.footnote-list,
.conversation-list {
  list-style: none;
  padding: 0;
  margin: 0 0 0.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.footnote-card,
.conversation-card {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.55rem 0.75rem;
  background: var(--surface-1);
  border: 1px solid var(--border-soft);
  border-radius: 3px;
}
.footnote-card:hover,
.conversation-card:hover {
  border-color: var(--amber-deep);
  background: var(--surface-2);
}
.footnote-title,
.conversation-title {
  color: var(--amber);
  text-decoration: none;
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.footnote-title:hover,
.conversation-title:hover { color: #e9a955; }

.footnote-url {
  color: var(--text-mute);
  text-decoration: none;
  font-size: 12px;
  font-family: var(--mono);
  word-break: break-all;
  border-bottom: 1px solid rgba(214, 90, 58, 0.2);
  align-self: flex-start;
  max-width: 100%;
}
.footnote-url:hover { color: var(--amber); border-bottom-color: var(--amber); }

.conversation-excerpt {
  color: var(--text-mute);
  font-size: 13px;
  line-height: 1.45;
  font-style: italic;
  word-break: break-word;
}

.item-meta {
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 0.2rem;
}
.item-meta .cmt-count {
  color: var(--text-dim);
}

/* Footnote-URL groß auf der Footnote-Detail-Card */
.footnote-url-display {
  margin: 0.8rem 0 0.4rem;
  font-size: 14.5px;
}
.footnote-url-display a {
  color: var(--amber);
  text-decoration: none;
  border-bottom: 1px solid rgba(214, 90, 58, 0.4);
  word-break: break-all;
  font-family: var(--mono);
  font-size: 13.5px;
}
.footnote-url-display a:hover { color: #e9a955; border-bottom-color: var(--amber); }
.footnote-url-display.empty { color: var(--text-faint); font-style: italic; }

/* ============================================================ Container-View */
.container-header {
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.6rem;
  margin-bottom: 1rem;
}
.container-header h1 {
  font-family: var(--serif);
  color: var(--amber);
  font-size: 28px;
  font-weight: 600;
  margin: 0;
  letter-spacing: 0.01em;
}
.container-subtitle {
  color: var(--text-dim);
  font-size: 13px;
  margin: 0.3rem 0 0;
  font-style: italic;
}

/* Inline-Add-Form im Container */
.add-inline-form-wrap {
  margin-top: 1.75rem;
  padding-top: 1rem;
  border-top: 1px dashed var(--border);
}
.add-inline-form-wrap .section-title {
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 600;
  color: var(--amber);
  letter-spacing: 0.04em;
  margin: 0 0 0.7rem;
  padding: 0;
  border-bottom: 0;
  text-transform: none;
}
.add-inline-form {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.85rem 1rem;
}
.add-inline-form .form-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 0.6rem;
}

/* ============================================================ Click-to-Edit Affordance */
.node-card.editable .node-display {
  cursor: pointer;
  position: relative;
  border-radius: 3px;
  transition: background 0.15s;
}
.node-card.editable .node-display:hover {
  background: rgba(214, 90, 58, 0.04);
}
.node-card.editable .node-display:focus {
  outline: none;
  background: rgba(214, 90, 58, 0.06);
  box-shadow: 0 0 0 1px var(--amber-deep);
}
.node-card.editable .node-display::after {
  content: '\f040';
  font-family: 'FontAwesome';
  position: absolute;
  top: 0.4rem;
  right: 0.4rem;
  font-size: 11px;
  color: var(--text-faint);
  opacity: 0;
  transition: opacity 0.15s;
  pointer-events: none;
}
.node-card.editable .node-display:hover::after {
  opacity: 0.55;
}

/* Form-Actions (Ansicht-Button etc.) */
.node-form .form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 0.8rem;
}

/* ============================================================ Copy-Toast (fix bottom-right) */
.copy-toast {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--amber-deep);
  border-radius: 4px;
  padding: 0.55rem 0.95rem;
  font-size: 13px;
  font-family: var(--sans);
  letter-spacing: 0.02em;
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.6), 0 0 18px rgba(214, 90, 58, 0.2);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 10000;
  pointer-events: none;
}
.copy-toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================ Mini-Modal (Footnote/Conversation Quick-Create) */
.mini-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(12, 8, 5, 0.7);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}
.mini-modal {
  width: 100%;
  max-width: 480px;
  background: var(--surface-1);
  border: 1px solid var(--amber-deep);
  border-radius: 5px;
  padding: 1.25rem 1.4rem 1.1rem;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.7), 0 0 30px rgba(214, 90, 58, 0.18);
}
.mini-modal-title {
  font-family: var(--serif);
  color: var(--amber);
  font-size: 20px;
  font-weight: 600;
  margin: 0 0 0.85rem;
  letter-spacing: 0.02em;
}
.mini-modal-form label {
  display: block;
  margin: 0.6rem 0 0;
  font-size: 11px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.mini-modal-form input,
.mini-modal-form textarea {
  display: block;
  margin-top: 0.3rem;
  width: 100%;
  font-family: var(--sans);
  font-size: 14px;
}
.mini-modal-form textarea {
  font-family: var(--mono);
  min-height: 6rem;
}
.mini-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 1rem;
}

/* ============================================================ Pointer-Cursor */
a[href], button, label,
[data-action],
.add-child > button.toggle,
.children-list .child-link,
.jstree-anchor,
.jstree-wholerow,
.topbar a,
.subscribe-btn,
.subscribe-button,
.btn-subscribe,
.tab-label { cursor: pointer; }
button:disabled, .disabled { cursor: not-allowed; opacity: 0.6; }

/* ============================================================ News-Page-Tabs */
.news-page .tabs {
  display: block;                /* override .tabs { display: flex } from generic rule */
  position: relative;
  margin-top: 0;
  border-bottom: none;           /* tab-list bringt seine eigene Bottom-Border */
  margin-bottom: 0;
}
.news-page .tabs > .tab-radio {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.news-page .tab-list {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.25rem;
}
.news-page .tab-list .tab-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.1rem;
  color: var(--text-dim);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  user-select: none;
  transition: color 0.15s, border-color 0.15s;
}
.news-page .tab-list .tab-label:hover { color: var(--text-mute); }
.news-page .tab-count {
  display: inline-block;
  min-width: 1.4em;
  padding: 0 0.45em;
  font-size: 11px;
  line-height: 1.5;
  text-align: center;
  background: var(--surface-2);
  color: var(--amber);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  letter-spacing: 0;
}

.news-page .tab-panel { display: none; }

#news-tab-news:checked ~ .tab-list label[for="news-tab-news"],
#news-tab-fav:checked  ~ .tab-list label[for="news-tab-fav"],
#news-tab-sub:checked  ~ .tab-list label[for="news-tab-sub"] {
  color: var(--amber);
  border-bottom-color: var(--amber);
}
#news-tab-news:checked ~ .tab-panels #news-panel-news,
#news-tab-fav:checked  ~ .tab-panels #news-panel-fav,
#news-tab-sub:checked  ~ .tab-panels #news-panel-sub {
  display: block;
}

/* ============================================================ Notif-Group (Tab "Neuigkeiten") */
.notif-group-list,
.fav-card-list,
.sub-card-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.notif-group {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-left: 3px solid var(--amber-deep);
  border-radius: 4px;
  padding: 0.85rem 1rem;
  transition: border-color 0.15s, background 0.15s;
}
.notif-group:hover {
  border-color: var(--amber-deep);
  border-left-color: var(--amber);
  background: var(--surface-2);
}
.notif-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  flex-wrap: wrap;
}
.notif-group-title {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
  flex: 1;
}
.notif-group-link {
  color: var(--amber);
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  border-bottom: 1px solid rgba(214, 90, 58, 0.3);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.notif-group-link:hover { color: #e9a955; border-bottom-color: var(--amber); }
.notif-group-meta {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 12px;
  color: var(--text-dim);
}
.notif-group-count {
  color: var(--amber);
  font-weight: 600;
}
.notif-group-time { color: var(--text-faint); }
.notif-group-accept { margin: 0; }

.notif-group-events {
  margin-top: 0.6rem;
  border-top: 1px dashed var(--border-soft);
  padding-top: 0.5rem;
}
.notif-group-events > summary {
  cursor: pointer;
  color: var(--text-dim);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.15rem 0;
}
.notif-group-events > summary::-webkit-details-marker { display: none; }
.notif-group-events > summary::before {
  content: '▸';
  display: inline-block;
  color: var(--amber);
  transition: transform 0.15s;
}
.notif-group-events[open] > summary::before { transform: rotate(90deg); }
.notif-group-events > summary:hover { color: var(--amber); }

.notif-event-list {
  list-style: none;
  margin: 0.5rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.notif-event {
  display: flex;
  align-items: baseline;
  gap: 0.55rem;
  padding: 0.35rem 0.5rem;
  background: var(--bg-soft);
  border: 1px solid var(--border-soft);
  border-radius: 3px;
  font-size: 13px;
}
.notif-event-icon {
  color: var(--amber-warm);
  font-size: 12px;
  width: 1em;
  text-align: center;
  flex-shrink: 0;
}
.notif-event.kind-node_created  .notif-event-icon { color: var(--tree-green); }
.notif-event.kind-node_edited   .notif-event-icon { color: var(--amber); }
.notif-event.kind-comment_posted .notif-event-icon { color: var(--amber-warm); }
.notif-event-link {
  flex: 1;
  min-width: 0;
  color: var(--text);
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.notif-event-link:hover { color: var(--amber); }
.notif-event-time {
  font-size: 11px;
  color: var(--text-faint);
  flex-shrink: 0;
}

/* ============================================================ Fav-Card / Sub-Card (Tabs 2 + 3) */
.fav-card,
.sub-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  padding: 0.7rem 0.9rem;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: 4px;
  transition: border-color 0.15s, background 0.15s;
}
.fav-card:hover,
.sub-card:hover {
  border-color: var(--amber-deep);
  background: var(--surface-2);
}
.fav-card-main,
.sub-card-main {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 0;
  flex: 1;
}
.fav-card-link,
.sub-card-link {
  color: var(--amber);
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
  border-bottom: 1px solid rgba(214, 90, 58, 0.3);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.fav-card-link:hover,
.sub-card-link:hover { color: #e9a955; border-bottom-color: var(--amber); }
.fav-card-badges,
.sub-card-badges {
  display: inline-flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}
.fav-card-meta,
.sub-card-meta {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-size: 11px;
  color: var(--text-dim);
  flex-shrink: 0;
}
.fav-card-time,
.sub-card-time { color: var(--text-faint); }
.fav-card-action,
.sub-card-action { margin: 0; }

.btn.danger,
.btn-secondary.danger {
  color: var(--danger);
  border-color: var(--border-strong);
}
.btn.danger:hover,
.btn-secondary.danger:hover {
  background: var(--danger-bg);
  border-color: var(--danger);
  color: var(--danger);
}

/* ============================================================ Tab "Allgemein" — globaler Activity-Feed */
#news-tab-general:checked ~ .tab-list label[for="news-tab-general"] {
  color: var(--amber);
  border-bottom-color: var(--amber);
}
#news-tab-general:checked ~ .tab-panels #news-panel-general {
  display: block;
}

.activity-section + .activity-section { margin-top: 1.4rem; }
.activity-section-title {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  margin: 0 0 0.5rem;
  padding-bottom: 0.3rem;
  border-bottom: 1px solid var(--border);
}
.activity-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.activity-item {
  display: flex;
  align-items: baseline;
  gap: 0.55rem;
  padding: 0.4rem 0.2rem;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  line-height: 1.45;
}
.activity-item:last-child { border-bottom: none; }
.activity-icon {
  flex: 0 0 auto;
  width: 1em;
  color: var(--text-faint);
}
.activity-item.kind-node_created   .activity-icon { color: var(--tree-green, #6ea96e); }
.activity-item.kind-node_updated   .activity-icon { color: var(--amber-deep, #b8762a); }
.activity-item.kind-comment_posted .activity-icon { color: var(--amber, #e9a955); }
.activity-text { flex: 1 1 auto; color: var(--text-mute); }
.activity-text .activity-user,
.activity-text .activity-node {
  color: var(--text);
  border-bottom: 1px dotted transparent;
}
.activity-text a.activity-user:hover,
.activity-text a.activity-node:hover {
  color: var(--amber);
  border-bottom-color: var(--amber);
}
.activity-excerpt { color: var(--text-faint); }
.activity-time {
  flex: 0 0 auto;
  color: var(--text-faint);
  font-size: 11px;
  white-space: nowrap;
}

/* ============================================================ Galerie-Page */
.gallery-page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.25rem 1rem 3rem;
}
.gallery-page .tabs {
  display: block;
  position: relative;
  margin-top: 0;
  border-bottom: none;
  margin-bottom: 0;
}
.gallery-page .tabs > .tab-radio {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.gallery-page .tab-list {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.25rem;
}
.gallery-page .tab-list .tab-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.1rem;
  color: var(--text-dim);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  user-select: none;
  transition: color 0.15s, border-color 0.15s;
}
.gallery-page .tab-list .tab-label:hover { color: var(--text-mute); }
.gallery-page .tab-count {
  display: inline-block;
  min-width: 1.4em;
  padding: 0 0.45em;
  font-size: 11px;
  line-height: 1.5;
  text-align: center;
  background: var(--surface-2);
  color: var(--amber);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  letter-spacing: 0;
}
.gallery-page .tab-panel { display: none; }

#gallery-tab-alle:checked  ~ .tab-list label[for="gallery-tab-alle"],
#gallery-tab-meine:checked ~ .tab-list label[for="gallery-tab-meine"] {
  color: var(--amber);
  border-bottom-color: var(--amber);
}
#gallery-tab-alle:checked  ~ .tab-panels #gallery-panel-alle,
#gallery-tab-meine:checked ~ .tab-panels #gallery-panel-meine {
  display: block;
}

.gallery-section-head {
  margin-bottom: 1rem;
}
.gallery-section-head .section-title {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 0.25rem 0;
}
.gallery-subtitle {
  margin: 0 0 0.75rem 0;
  color: var(--text-dim);
  font-size: 13px;
}

.gallery-upload-form {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  padding: 0.75rem 0.9rem;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: 4px;
  margin-bottom: 1.25rem;
}
.gallery-upload-form input[type="file"] {
  flex: 1 1 auto;
  color: var(--text-mute);
  font-size: 13px;
}
.gallery-upload-form input[type="file"]::file-selector-button {
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border);
  padding: 0.3rem 0.7rem;
  border-radius: 3px;
  font-family: var(--sans);
  cursor: pointer;
  margin-right: 0.6rem;
}
.gallery-upload-form input[type="file"]::file-selector-button:hover {
  border-color: var(--amber-deep);
  color: var(--amber);
}

.gallery-empty {
  color: var(--text-dim);
  font-style: italic;
  padding: 1.5rem 0;
}

.gallery-grid {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.85rem;
}
.gallery-card {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.15s, background 0.15s;
}
.gallery-card:hover {
  border-color: var(--amber-deep);
  background: var(--surface-2);
}
.gallery-thumb-btn {
  display: block;
  width: 100%;
  padding: 0;
  margin: 0;
  background: var(--bg-deep);
  border: 0;
  cursor: pointer;
  aspect-ratio: 1 / 1;
  overflow: hidden;
}
.gallery-thumb-btn:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: -2px;
}
.gallery-thumb {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.2s ease;
}
.gallery-thumb-btn:hover .gallery-thumb { transform: scale(1.03); }
.gallery-meta {
  padding: 0.45rem 0.6rem;
  font-size: 12px;
  color: var(--text-dim);
  border-top: 1px solid var(--border-soft);
}
.gallery-author {
  color: var(--text-mute);
  text-decoration: none;
}
.gallery-author:hover { color: var(--amber); }
.gallery-date { color: var(--text-faint); }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

/* ============================================================ Lightbox */
body.lightbox-open { overflow: hidden; }

.lightbox-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox-overlay[hidden] { display: none; }

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 4, 2, 0.88);
  backdrop-filter: blur(2px);
  cursor: zoom-out;
}
.lightbox-figure {
  position: relative;
  margin: 0;
  max-width: min(96vw, 1400px);
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  padding: 0.4rem 0.4rem 0.6rem;
  z-index: 1;
}
.lightbox-image {
  display: block;
  max-width: 100%;
  max-height: 82vh;
  width: auto;
  height: auto;
  border: 1px solid var(--border-strong);
  background: var(--bg-deep);
  box-shadow: 0 16px 60px rgba(0,0,0,0.75), 0 0 30px rgba(214,90,58,0.12);
}
.lightbox-caption {
  color: var(--text-mute);
  font-size: 13px;
  text-align: center;
  max-width: 80ch;
}
.lightbox-caption[hidden] { display: none; }

.lightbox-actions {
  display: flex;
  gap: 0.5rem;
}
.lightbox-btn {
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border);
  padding: 0.4rem 0.85rem;
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: 3px;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.lightbox-btn:hover {
  border-color: var(--amber);
  color: var(--amber);
  background: var(--surface-3);
}
.lightbox-btn:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 2px;
}

/* ============================================================ Footnote mit Media-Vorschau */
.footnote-with-media {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 360px);
  gap: 1rem;
  align-items: start;
  margin-bottom: 1rem;
}
.footnote-with-media .footnote-media-text { min-width: 0; }
.footnote-with-media .footnote-media-figure { min-width: 0; }
.footnote-media-img-btn {
  display: block;
  width: 100%;
  padding: 0;
  margin: 0;
  background: var(--bg-deep);
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
  cursor: zoom-in;
  aspect-ratio: 4 / 3;
}
.footnote-media-img-btn:hover { border-color: var(--amber-deep); }
.footnote-media-img-btn:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 2px;
}
.footnote-media-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

/* YouTube-Player (lazy) */
.footnote-media-youtube {
  position: relative;
  margin: 1rem 0 1.25rem;
  max-width: 720px;
  aspect-ratio: 16 / 9;
  background: var(--bg-deep);
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
}
.footnote-yt-play {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  margin: 0;
  background: transparent;
  border: 0;
  cursor: pointer;
  display: block;
}
.footnote-yt-play:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: -2px;
}
.footnote-yt-thumb {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.footnote-yt-play:hover .footnote-yt-thumb {
  transform: scale(1.02);
  opacity: 0.85;
}
.footnote-yt-play-icon {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 64px; height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  color: #fff;
  background: rgba(184, 66, 31, 0.85);
  border: 2px solid rgba(240, 216, 184, 0.85);
  border-radius: 50%;
  text-shadow: 0 0 12px rgba(0,0,0,0.5);
  box-shadow: 0 0 28px rgba(214,90,58,0.45);
  pointer-events: none;
  transition: background 0.15s, transform 0.15s;
}
.footnote-yt-play:hover .footnote-yt-play-icon {
  background: var(--amber);
  transform: translate(-50%, -50%) scale(1.06);
}
.footnote-yt-caption {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: linear-gradient(to top, rgba(8,4,2,0.85), rgba(8,4,2,0));
  color: var(--text-mute);
  font-size: 11px;
  padding: 0.5rem 0.7rem 0.4rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  pointer-events: none;
}
.footnote-yt-iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

/* ============================================================ Read-Only Mobile
   Read-Only-Gäste bekommen ein device-width Viewport (siehe layout_full.php).
   Auf Schmalscreens reduzieren wir die UI auf die drei Markdown-Seiten und
   blenden Bäume/Galerie/Suche/Nutzer/Neuheiten/Admin aus. Eingeloggte
   Vollnutzer sind davon nicht betroffen — sie kriegen weiter das 1280er-
   Viewport und das Desktop-Layout. */

.mobile-ro-hint { display: none; }

@media (max-width: 768px) {
  body.is-readonly-guest .mobile-ro-hint {
    display: block;
    padding: 0.7rem 1rem;
    background: rgba(214, 90, 58, 0.10);
    border-bottom: 1px solid var(--border);
    color: var(--text-mute);
    font-size: 12px;
    line-height: 1.45;
    text-align: center;
  }
  body.is-readonly-guest .mobile-ro-hint strong {
    color: var(--amber);
    font-weight: 600;
  }

  /* Topbar kompakter + Nav scrollbar */
  body.is-readonly-guest .topbar {
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    padding: 0.4rem 0.8rem;
    height: auto;
    min-height: 44px;
  }
  body.is-readonly-guest .brand { font-size: 18px; }
  body.is-readonly-guest .primary-nav {
    flex: 1 1 100%;
    order: 3;
    overflow-x: auto;
    gap: 0.8rem;
    padding-bottom: 0.25rem;
  }
  body.is-readonly-guest .topbar-right { order: 2; margin-left: auto; }

  /* Nur die drei statischen Pages dürfen in der Nav stehen. Alles andere
     verstecken. Selektor matcht über exakte href-Werte. */
  body.is-readonly-guest .primary-nav > a {
    display: none !important;
  }
  body.is-readonly-guest .primary-nav > a[href="/"],
  body.is-readonly-guest .primary-nav > a[href="/was-ist-zu-tun"],
  body.is-readonly-guest .primary-nav > a[href="/handbuch"] {
    display: inline-flex !important;
    white-space: nowrap;
    font-size: 13px;
  }

  /* Content responsive */
  body.is-readonly-guest .full-page {
    padding: 1rem 0.75rem 2rem;
  }
  body.is-readonly-guest .manifest-content {
    padding: 1.25rem 1rem;
    font-size: 16px;
    line-height: 1.65;
    max-width: 100%;
    border-radius: 4px;
    box-shadow: none;
  }
  body.is-readonly-guest .manifest-content h1 { font-size: 1.9rem; }
  body.is-readonly-guest .manifest-content h2 { font-size: 1.35rem; }
  body.is-readonly-guest .manifest-content h3 { font-size: 1.1rem; }
  body.is-readonly-guest .manifest-content pre,
  body.is-readonly-guest .manifest-content code { font-size: 13px; }

  /* Logout-Link kompakter */
  body.is-readonly-guest .logout-link { font-size: 12px; padding: 0.25rem 0.5rem; }
}

/* ============================================================ Login Mobile
   Auf <600px:
   - position:fixed → static, damit der Browser-Body normal scrollt (sonst
     ragte die Card mit Wortmarke + Tabs + Form aus dem Viewport raus und
     war nicht scrollbar).
   - background-attachment:fixed → scroll (iOS Safari Bug umgangen).
   - Vignette-::before deaktiviert (war auf position:fixed gebunden).
   - Wortmarke, Card, Tabs alle kompakter. */
@media (max-width: 600px) {
  html, body { height: auto; }
  body.login-screen { min-height: 100vh; overflow-y: auto; overflow-x: hidden; }
  body.login-screen,
  .login-screen,
  .login-stage {
    background-attachment: scroll !important;
  }

  .login-stage {
    position: static !important;
    inset: auto !important;
    min-height: 100vh;
    padding: 1rem 0.75rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
  }
  .login-stage::before { display: none; }

  .login-brand { margin: 0.75rem 0 1rem; }
  .login-brand .login-wordmark {
    font-size: 26px;
    letter-spacing: 0.14em;
  }
  .login-brand .login-subtitle { font-size: 11px; letter-spacing: 0.12em; }

  .login-card {
    width: 100%;
    max-width: 100%;
    padding: 1rem 0.9rem 1.1rem;
    border-radius: 8px;
    backdrop-filter: none;     /* GPU-Schonung, vermeidet Glitches */
  }
  .login-cards { max-width: 100%; width: 100%; }
  .login-title { font-size: 17px; margin: 0 0 0.75rem; }
  .login-tabs label, .login-tab-label, .tab-label {
    font-size: 12px;
    padding: 0.5rem 0.55rem;
  }
  .login-field input,
  .login-card input[type="text"],
  .login-card input[type="password"] {
    font-size: 16px;          /* >= 16px verhindert iOS-Auto-Zoom beim Focus */
    padding: 0.65rem 0.75rem;
  }
  .login-submit,
  .login-card button[type="submit"] {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 15px;
  }
}

/* ===========================================================================
 * Tasks (Aufgaben-Tree)
 * Tasks reusen .node-detail / .node-card; hier nur task-spezifische Layer:
 * Status-Bar (offen/erledigt), Meta-Zeile (Assignee + Deadline), Subtask-Liste.
 * =========================================================================== */

.task-status-bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin: 0 0 0.75rem 0;
  padding: 0.5rem 0.75rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
}
.task-status {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 600;
  font-size: 0.95rem;
}
.task-status.open    { color: #d6d6c8; }
.task-status.done    { color: #6fbf73; }
.task-status.done.auto { color: #9ad0a3; font-style: italic; }
.task-status .task-status-meta {
  font-weight: 400;
  font-size: 0.85em;
  opacity: 0.8;
  margin-left: 0.3rem;
}
.task-progress {
  font-size: 0.88rem;
  color: #b8b8a8;
  margin-left: auto;
}
.task-complete-btn,
.task-uncomplete-btn {
  margin-left: auto;
}
.task-complete-btn {
  background: #c84d2b;
  border-color: #c84d2b;
  color: #fff;
}
.task-complete-btn:hover { background: #de5b35; border-color: #de5b35; }

.task-meta-row {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin: 0 0 1rem 0;
  padding: 0.5rem 0.75rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 6px;
}
.task-meta-field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 180px;
}
.task-meta-field > label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #9a9a8a;
  font-weight: 600;
}
.task-assignee-select,
.task-deadline-input {
  background: #1a1816;
  color: #e6e6dc;
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 0.35rem 0.5rem;
  border-radius: 4px;
  font-size: 0.95rem;
  font-family: inherit;
}
.task-deadline-input.overdue,
.task-deadline-display.overdue {
  color: #ff7a5a;
  border-color: #ff7a5a;
  font-weight: 600;
}
.task-assignee-empty,
.task-deadline-empty {
  color: #8a8a7a;
  font-style: italic;
}
.task-assignee-name a {
  color: #e6c899;
}

/* Completed-Markup: Titel + Body durchstreichen */
.node-detail-task.task-completed .node-card .node-display h1,
.node-detail-task.task-completed .node-card .node-body {
  text-decoration: line-through;
  opacity: 0.75;
}

/* Subtask-Liste */
.node-subtasks { margin-top: 1rem; }
.subtask-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.subtask-card {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 0.75rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 5px;
  transition: background 0.15s;
}
.subtask-card:hover { background: rgba(255, 255, 255, 0.06); }
.subtask-card.done .subtask-title {
  text-decoration: line-through;
  opacity: 0.7;
}
.subtask-state { color: #b8b8a8; font-size: 1.05rem; }
.subtask-card.done .subtask-state { color: #6fbf73; }
.subtask-title {
  flex: 1;
  color: #e6e6dc;
  text-decoration: none;
  font-size: 0.97rem;
}
.subtask-title:hover { color: #e6c899; }
.subtask-assignee {
  font-size: 0.82rem;
  color: #b8b8a8;
  padding: 0.1rem 0.5rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
}
.subtask-deadline {
  font-size: 0.82rem;
  color: #9ad0a3;
  font-variant-numeric: tabular-nums;
}
.subtask-deadline.overdue { color: #ff7a5a; font-weight: 600; }

/* jsTree-Icon: Tasks heller, completed strikethrough wäre via Text-decoration
   in jsTree nicht praktisch (anchor-Wrapper hat Hover-Effekte) — wir lassen
   sich die Strikethrough auf den Detail-View beschränken. */

/* Deadline-Steuerung: Anzeige (Pill) + Preset-Select nebeneinander. */
.task-deadline-control {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.task-deadline-display {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.55rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  font-size: 0.92rem;
  color: #e6c899;
  font-variant-numeric: tabular-nums;
}
.task-deadline-display.overdue {
  background: rgba(255, 122, 90, 0.15);
  color: #ff7a5a;
  font-weight: 600;
}
.task-deadline-select {
  background: #1a1816;
  color: #d6d6c8;
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 0.3rem 0.45rem;
  border-radius: 4px;
  font-size: 0.88rem;
  font-family: inherit;
}

/* Hinweis-Zeile in Sections (z.B. "neue Sub-Aufgabe im Baum anlegen"). */
.section-hint {
  margin: 0.75rem 0 0 0;
  padding: 0.5rem 0.75rem;
  font-size: 0.88rem;
  color: #b8b8a8;
  background: rgba(255, 255, 255, 0.02);
  border: 1px dashed rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}
.section-hint .fa { margin-right: 0.4rem; color: #9a9a8a; }
.section-hint a { color: #e6c899; }
