:root {
  color-scheme: dark;
  --bg: #0d0f13;
  --grid: #1c2029;
  --surface: #161a21;
  --surface-2: #1e232d;
  --glass: rgba(20, 24, 31, 0.78);
  --line: #2a303c;
  --line-2: #3a4252;
  --text: #eceef2;
  --muted: #98a1b0;
  --accent: #e39a5b;
  --accent-text: #1a1206;
  --accent-soft: rgba(227, 154, 91, 0.16);
  --danger: #ff8a80;
  --s-fertig: #4cc38a;
  --s-teilweise: #e5b94a;
  --s-offen: #7aa7f5;
  --s-unklar: #8a93a3;
  --k-idee: #7aa7f5;
  --k-fehler: #ff8a80;
  --k-lob: #4cc38a;
  --k-frage: #c9a0f0;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  --radius: 14px;
  --font: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    color-scheme: light;
    --bg: #f3f4f7;
    --grid: #dfe2e9;
    --surface: #ffffff;
    --surface-2: #f0f2f6;
    --glass: rgba(255, 255, 255, 0.82);
    --line: #d9dde5;
    --line-2: #bfc5d1;
    --text: #171a21;
    --muted: #5d6675;
    --accent: #b5622a;
    --accent-text: #ffffff;
    --accent-soft: rgba(181, 98, 42, 0.12);
    --danger: #b3261e;
    --s-fertig: #1f8f5c;
    --s-teilweise: #a87708;
    --s-offen: #2f67c9;
    --s-unklar: #6b7483;
    --k-idee: #2f67c9;
    --k-fehler: #b3261e;
    --k-lob: #1f8f5c;
    --k-frage: #7b46b8;
    --shadow: 0 10px 30px rgba(30, 40, 60, 0.14);
  }
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f3f4f7;
  --grid: #dfe2e9;
  --surface: #ffffff;
  --surface-2: #f0f2f6;
  --glass: rgba(255, 255, 255, 0.82);
  --line: #d9dde5;
  --line-2: #bfc5d1;
  --text: #171a21;
  --muted: #5d6675;
  --accent: #b5622a;
  --accent-text: #ffffff;
  --accent-soft: rgba(181, 98, 42, 0.12);
  --danger: #b3261e;
  --s-fertig: #1f8f5c;
  --s-teilweise: #a87708;
  --s-offen: #2f67c9;
  --s-unklar: #6b7483;
  --k-idee: #2f67c9;
  --k-fehler: #b3261e;
  --k-lob: #1f8f5c;
  --k-frage: #7b46b8;
  --shadow: 0 10px 30px rgba(30, 40, 60, 0.14);
}

/* Frontier Realms bekommt Gruen, Operation Forcebuy Kupfer. */
body[data-cat="1"] { --accent: #6fcf8e; --accent-text: #06170d; --accent-soft: rgba(111, 207, 142, 0.16); }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) body[data-cat="1"] { --accent: #23804a; --accent-text: #ffffff; --accent-soft: rgba(35, 128, 74, 0.12); }
}
:root[data-theme="light"] body[data-cat="1"] { --accent: #23804a; --accent-text: #ffffff; --accent-soft: rgba(35, 128, 74, 0.12); }

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 14px/1.45 var(--font);
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
h2 { font-size: 20px; line-height: 1.25; margin: 0; letter-spacing: -0.01em; }
h3 { font-size: 12px; margin: 0 0 8px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; }
p { margin: 0; }
.muted { color: var(--muted); }
.error { color: var(--danger); min-height: 1.2em; font-size: 13px; }
.grow { flex: 1 1 0; }
.row { display: flex; gap: 8px; align-items: center; }

.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--line-2); flex: none; }
.s-fertig .dot { background: var(--s-fertig); }
.s-teilweise .dot { background: var(--s-teilweise); }
.s-offen .dot { background: var(--s-offen); }
.s-unklar .dot { background: var(--s-unklar); }

.btn {
  display: inline-flex; align-items: center; gap: 6px;
  height: 34px; padding: 0 12px;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px;
  white-space: nowrap; text-decoration: none; color: var(--text);
}
.btn:hover { border-color: var(--line-2); }
.btn b { font-weight: 600; color: var(--accent); }
.btn.on, .btn.primary, button.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-text); font-weight: 600; }
.btn.on b { color: inherit; }
.btn.danger { color: var(--danger); }
.btn:disabled { opacity: 0.6; cursor: default; }

input, select, textarea {
  width: 100%; padding: 8px 10px;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px;
}
textarea { resize: vertical; min-height: 64px; }
input::placeholder, textarea::placeholder { color: var(--muted); }

/* ------------------------------------------------------------ Kopfzeile */
body.app { display: flex; flex-direction: column; overflow: hidden; }
.top {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 10px 16px; padding-top: max(10px, env(safe-area-inset-top));
  background: var(--surface); border-bottom: 1px solid var(--line);
  position: relative; z-index: 5;
}
.brand { display: flex; align-items: center; gap: 8px; font-size: 15px; letter-spacing: -0.01em; }
.mark { width: 14px; height: 14px; border-radius: 4px; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.seg { display: flex; padding: 3px; gap: 2px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; }
.seg button {
  display: flex; align-items: center; gap: 8px; height: 30px; padding: 0 12px 0 6px;
  background: none; border: 0; border-radius: 9px; color: var(--muted); white-space: nowrap;
}
.seg button.on { background: var(--surface); color: var(--text); font-weight: 600; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25); }
.seg .logo { width: 22px; height: 22px; border-radius: 6px; object-fit: cover; }
.search { width: 180px; height: 34px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chipf {
  display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px;
  background: none; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: 13px;
}
.chipf.on { background: var(--surface-2); border-color: var(--line-2); color: var(--text); }
.menu { position: relative; }
.menu summary { list-style: none; }
.menu summary::-webkit-details-marker { display: none; }
.menu-list {
  position: absolute; right: 0; top: 40px; min-width: 190px; padding: 6px;
  display: grid; gap: 2px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow);
}
.menu-list button, .menu-list a {
  display: block; width: 100%; padding: 8px 10px; text-align: left;
  background: none; border: 0; border-radius: 8px; color: var(--text); text-decoration: none;
}
.menu-list button:hover, .menu-list a:hover { background: var(--surface-2); }

/* ------------------------------------------------------------ Karte */
.stage { position: relative; flex: 1 1 0; min-height: 0; }
.canvas {
  position: absolute; inset: 0; overflow: hidden;
  touch-action: none; user-select: none; -webkit-user-select: none; cursor: grab;
  background-image: radial-gradient(circle, var(--grid) 1.2px, transparent 1.4px);
  background-size: 26px 26px;
}
.canvas.grab { cursor: grabbing; }
.world { position: absolute; left: 0; top: 0; transform-origin: 0 0; will-change: transform; }
.world.anim { transition: transform 0.28s cubic-bezier(0.2, 0.7, 0.2, 1); }
.edges { position: absolute; left: 0; top: 0; overflow: visible; pointer-events: none; }
.edge { fill: none; stroke: var(--line-2); stroke-width: 1.5; }
.edge.on { stroke: var(--accent); stroke-width: 2.25; }
.cluster {
  position: absolute; border-radius: 18px;
  background: color-mix(in srgb, var(--surface) 55%, transparent);
  border: 1px dashed var(--line);
}

.node {
  position: absolute; padding: 0; text-align: left; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  color: var(--text); cursor: pointer;
  transition: border-color 0.12s, box-shadow 0.12s, opacity 0.12s;
}
.node:hover { border-color: var(--line-2); box-shadow: 0 4px 14px rgba(0, 0, 0, 0.22); }
.node.sel { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.node.dim { opacity: 0.38; }
.node.hit { border-color: var(--accent); }
.fbb {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 18px; padding: 0 5px; flex: none;
  background: var(--accent); color: var(--accent-text); border-radius: 999px;
  font-size: 11px; font-weight: 700; line-height: 1;
}

.node.root { width: 300px; height: 220px; border-radius: 22px; border-color: var(--line-2); background: #14171d; color: #fff; }
.node.root .cover { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.node.root .shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(8, 10, 14, 0.05) 20%, rgba(8, 10, 14, 0.9) 82%); }
.node.root .rt { position: absolute; left: 16px; right: 16px; bottom: 14px; display: grid; gap: 4px; }
.rtitle { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; }
.rsum { font-size: 12px; color: rgba(255, 255, 255, 0.78); }
.bar { display: flex; gap: 2px; height: 5px; margin-top: 4px; border-radius: 3px; overflow: hidden; }
.bar i { flex: 1 1 0; min-width: 3px; }
.b-fertig { background: #4cc38a; }
.b-teilweise { background: #e5b94a; }
.b-offen { background: #7aa7f5; }
.b-unklar { background: #8a93a3; }

.node.card { width: 248px; height: 60px; display: flex; align-items: center; gap: 10px; padding: 0 34px 0 8px; }
.node.card::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 0 3px 3px 0; background: transparent; }
.node.card.s-fertig::before { background: var(--s-fertig); }
.node.card.s-teilweise::before { background: var(--s-teilweise); }
.node.card.s-offen::before { background: var(--s-offen); }
.node.card.s-unklar::before { background: var(--s-unklar); }
.node.card .thumb { width: 44px; height: 44px; border-radius: 9px; object-fit: cover; flex: none; background: var(--surface-2); }
.node.card .tx { display: grid; min-width: 0; padding-left: 4px; }
.node.card .title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.node.card .sub { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.node.card .fbb { position: absolute; right: 34px; top: 8px; }
.knob {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  width: 22px; height: 22px; display: grid; place-items: center;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 50%;
  font-size: 11px; font-weight: 600; color: var(--muted);
}
.knob:hover { border-color: var(--accent); color: var(--text); }

.node.pic { width: 148px; height: 130px; border-radius: 12px; }
.node.pic .pimg { display: block; width: 100%; height: 92px; object-fit: cover; background: var(--surface-2); }
.node.pic .pimg.ph { display: grid; place-items: center; font-size: 30px; font-weight: 700; color: var(--line-2); }
.node.pic .ptitle {
  display: block; padding: 0 8px 0 22px; height: 38px; line-height: 38px;
  font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.node.pic .dot { position: absolute; left: 9px; bottom: 15px; }
.node.pic:not([class*="s-"]) .ptitle { padding-left: 9px; }
.node.pic .fbb { position: absolute; right: 6px; top: 6px; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4); }

.node.chip { width: 172px; height: 40px; display: flex; align-items: center; gap: 8px; padding: 0 10px; border-radius: 10px; }
.node.chip .ctitle { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1 1 0; min-width: 0; }

.zoom {
  position: absolute; left: 14px; bottom: max(14px, env(safe-area-inset-bottom)); z-index: 3;
  display: flex; padding: 3px; gap: 2px;
  background: var(--glass); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow);
}
.zoom button { height: 30px; min-width: 32px; padding: 0 9px; background: none; border: 0; border-radius: 9px; font-size: 13px; }
.zoom button:hover { background: var(--surface-2); }
.hint, .toast {
  position: absolute; left: 50%; transform: translateX(-50%); z-index: 3;
  padding: 8px 14px; max-width: calc(100% - 28px); text-align: center; font-size: 13px;
  background: var(--glass); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--line); border-radius: 999px; box-shadow: var(--shadow);
}
.hint { top: 14px; color: var(--muted); pointer-events: none; }
.toast { bottom: 64px; border-color: var(--accent); z-index: 8; }

/* ------------------------------------------------------------ Detailfeld */
.panel {
  position: absolute; top: 12px; right: 12px; bottom: 12px; width: min(400px, calc(100% - 24px)); z-index: 4;
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--glass); backdrop-filter: blur(22px) saturate(1.3); -webkit-backdrop-filter: blur(22px) saturate(1.3);
  border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow);
}
.p-head { display: flex; align-items: flex-start; gap: 8px; padding: 10px 10px 8px 14px; }
.crumbs { flex: 1 1 0; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 2px 4px; font-size: 12px; color: var(--muted); padding-top: 5px; }
.crumbs button { background: none; border: 0; padding: 0; color: var(--muted); }
.crumbs button:hover { color: var(--text); text-decoration: underline; }
.x {
  width: 28px; height: 28px; flex: none; display: grid; place-items: center;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 50%; font-size: 17px; line-height: 1;
}
.gallery { padding: 0 12px; }
.g-main { display: block; width: 100%; padding: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #0b0d11; cursor: zoom-in; }
.g-main img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: contain; }
.g-strip { display: flex; gap: 6px; padding-top: 6px; overflow-x: auto; }
.g-strip button { flex: none; width: 58px; height: 44px; padding: 0; border: 2px solid transparent; border-radius: 8px; overflow: hidden; background: var(--surface-2); }
.g-strip button.on { border-color: var(--accent); }
.g-strip img { width: 100%; height: 100%; object-fit: cover; display: block; }
.p-body { flex: 1 1 0; min-height: 0; overflow-y: auto; padding: 14px; display: grid; gap: 12px; align-content: start; overscroll-behavior: contain; }
.status {
  display: inline-flex; align-items: center; gap: 6px; justify-self: start;
  padding: 3px 10px; border: 1px solid var(--line); border-radius: 999px; font-size: 12px; background: var(--surface-2);
}
.note { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.55; }
.field { display: grid; gap: 4px; }
.flabel { font-size: 12px; color: var(--muted); }
.tools { display: flex; flex-wrap: wrap; gap: 6px; }
.p-sec { padding-top: 12px; border-top: 1px solid var(--line); display: grid; gap: 8px; }
.p-sec h3 { margin: 0; }
.kidlist { display: flex; flex-wrap: wrap; gap: 6px; }
.kidlist button {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; max-width: 100%;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; font-size: 13px;
}
.kidlist button:hover { border-color: var(--line-2); }

.fb { display: grid; gap: 4px; padding: 10px 12px; background: var(--surface-2); border: 1px solid var(--line); border-left: 3px solid var(--line-2); border-radius: 10px; text-align: left; width: 100%; color: var(--text); }
.fb p { white-space: pre-wrap; overflow-wrap: anywhere; }
.fb-top { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.fb-top time { color: var(--muted); margin-left: auto; }
.fb-top .x { width: 22px; height: 22px; font-size: 14px; }
.kind { font-weight: 700; }
.fb.k-idee { border-left-color: var(--k-idee); } .fb.k-idee .kind { color: var(--k-idee); }
.fb.k-fehler { border-left-color: var(--k-fehler); } .fb.k-fehler .kind { color: var(--k-fehler); }
.fb.k-lob { border-left-color: var(--k-lob); } .fb.k-lob .kind { color: var(--k-lob); }
.fb.k-frage { border-left-color: var(--k-frage); } .fb.k-frage .kind { color: var(--k-frage); }
.where { font-size: 12px; color: var(--muted); }
.fbform { display: grid; gap: 8px; padding-top: 4px; }
.kinds { display: flex; flex-wrap: wrap; gap: 6px; }
.kinds button { padding: 4px 11px; background: none; border: 1px solid var(--line); border-radius: 999px; font-size: 13px; color: var(--muted); }
.kinds button.on { color: var(--text); background: var(--surface-2); font-weight: 600; }
.kinds .k-idee.on { border-color: var(--k-idee); }
.kinds .k-fehler.on { border-color: var(--k-fehler); }
.kinds .k-lob.on { border-color: var(--k-lob); }
.kinds .k-frage.on { border-color: var(--k-frage); }
.fbform .row input { flex: 1 1 0; min-width: 0; }

/* ------------------------------------------------------------ Dialoge */
dialog { color: var(--text); }
dialog::backdrop { background: rgba(5, 7, 10, 0.72); backdrop-filter: blur(4px); }
.sheet {
  width: min(640px, calc(100vw - 24px)); max-height: min(80vh, 760px); padding: 0;
  background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow);
}
.sheet[open] { display: flex; flex-direction: column; }
.sheet.small { width: min(380px, calc(100vw - 24px)); }
.sheet.small form { display: grid; gap: 8px; padding: 18px; }
.sheet.small .row { justify-content: flex-end; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.fb-all { overflow-y: auto; padding: 14px 16px; display: grid; gap: 8px; }
.fb-all .fb { cursor: pointer; }
.fb-all .fb:hover { border-color: var(--line-2); }

.lightbox { width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: transparent; }
.lightbox[open] { display: grid; place-items: center; }
.lightbox img { max-width: calc(100vw - 32px); max-height: calc(100vh - 96px); border-radius: 10px; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6); }
.lb-btn {
  position: fixed; width: 44px; height: 44px; display: grid; place-items: center;
  background: rgba(20, 24, 31, 0.8); color: #fff; border: 1px solid rgba(255, 255, 255, 0.18); border-radius: 50%; font-size: 24px; line-height: 1;
}
.lb-close { top: 14px; right: 14px; }
.lb-prev { left: 14px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 14px; top: 50%; transform: translateY(-50%); }
.lb-cap { position: fixed; left: 0; right: 0; bottom: 14px; text-align: center; color: #fff; font-size: 13px; text-shadow: 0 1px 3px #000; }

/* ------------------------------------------------------------ Anmeldung */
body.login { display: grid; place-items: center; padding: 16px; }
.login-card {
  width: min(340px, 100%); display: grid; gap: 8px; padding: 24px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow);
}
.login-card h1 { margin: 0; font-size: 22px; letter-spacing: -0.02em; }
.login-card p { margin: 0 0 8px; }
.login-card label { font-size: 12px; font-weight: 600; color: var(--muted); }
.login-card button { height: 38px; border: 1px solid var(--accent); border-radius: 10px; }

/* ------------------------------------------------------------ Schmal */
@media (max-width: 900px) {
  .top { padding: 8px 12px; gap: 8px; }
  .brand, #editToggle { display: none; }
  .seg { flex: 1 1 100%; }
  .seg button { flex: 1 1 0; justify-content: center; min-width: 0; padding: 0 8px; }
  .seg button span { overflow: hidden; text-overflow: ellipsis; }
  .search { flex: 1 1 120px; width: auto; }
  .chips { order: 5; width: 100%; flex-wrap: nowrap; overflow-x: auto; }
  .grow { display: none; }
  .panel { top: auto; left: 0; right: 0; bottom: 0; width: auto; height: 62%; border-radius: 18px 18px 0 0; border-bottom: 0; }
  .g-main img { aspect-ratio: 16 / 8; }
  body.with-panel .zoom { display: none; }
  #zAll { display: none; }
  .hint { font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .world.anim, .node { transition: none; }
}


/* ---------------------------------------------------------------- Galaxie */
.canvas {
  --star: color-mix(in srgb, var(--text) 46%, transparent);
  background-color: var(--bg);
  background-image:
    radial-gradient(1.3px 1.3px at 24px 38px, var(--star), transparent 100%),
    radial-gradient(1px 1px at 112px 210px, var(--star), transparent 100%),
    radial-gradient(1.6px 1.6px at 196px 92px, var(--star), transparent 100%),
    radial-gradient(1px 1px at 268px 300px, var(--star), transparent 100%),
    radial-gradient(1.2px 1.2px at 322px 148px, var(--star), transparent 100%),
    radial-gradient(0.9px 0.9px at 70px 286px, var(--star), transparent 100%),
    radial-gradient(1px 1px at 236px 22px, var(--star), transparent 100%);
  background-size: 360px 360px;
}
.canvas::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(55% 48% at 28% 30%, var(--accent-soft), transparent 72%),
    radial-gradient(48% 44% at 78% 74%, color-mix(in srgb, var(--s-offen) 13%, transparent), transparent 72%);
}
.world { width: 0; height: 0; }
.world.anim { transition: transform 0.65s cubic-bezier(0.22, 0.8, 0.2, 1); }
.edge { stroke: color-mix(in srgb, var(--line-2) 70%, transparent); stroke-width: 1.2; vector-effect: non-scaling-stroke; }
.edge.on { stroke: var(--accent); stroke-width: 2; }
.orbit { fill: none; stroke: color-mix(in srgb, var(--line-2) 55%, transparent); stroke-width: 1; stroke-dasharray: 2 8; vector-effect: non-scaling-stroke; }
.orbit.on { stroke: var(--accent); stroke-dasharray: none; opacity: 0.55; }
.node { box-shadow: 0 6px 22px rgba(0, 0, 0, 0.28); }
.node.sel { box-shadow: 0 0 0 3px var(--accent-soft), 0 0 34px 4px var(--accent-soft); }
.node.root {
  width: 240px; height: 240px; border-radius: 50%;
  border-color: color-mix(in srgb, var(--accent) 60%, transparent);
  box-shadow: 0 0 0 6px var(--accent-soft), 0 0 90px 18px var(--accent-soft);
}
.node.root .shade { background: radial-gradient(circle at 50% 62%, rgba(8, 10, 14, 0.86) 0 46%, rgba(8, 10, 14, 0.25) 78%); }
.node.root .rt { left: 34px; right: 34px; bottom: 62px; text-align: center; justify-items: center; }
.node.root .rtitle { font-size: 19px; }
.node.root .bar { width: 120px; }
.node.card { border-radius: 999px; padding-left: 10px; }
.node.card::before { display: none; }
.node.card .thumb { border-radius: 50%; }
.node.card.s-fertig { border-left: 3px solid var(--s-fertig); }
.node.card.s-teilweise { border-left: 3px solid var(--s-teilweise); }
.node.card.s-offen { border-left: 3px solid var(--s-offen); }
.node.card.s-unklar { border-left: 3px solid var(--s-unklar); }
.node.chip { border-radius: 999px; }
@media (prefers-reduced-motion: reduce) { .world.anim { transition: none; } }


/* ---------------------------------------------------------------- Groesser */
body { font-size: 16px; }
h2 { font-size: 24px; }
h3 { font-size: 13px; }
.btn { height: 38px; }
.search { width: 200px; height: 38px; }
.chipf, .zoom button, .kidlist button, .kinds button { font-size: 15px; }
.crumbs, .status, .flabel, .where, .hint, .toast, .error { font-size: 14px; }
.panel { width: min(460px, calc(100% - 24px)); }
.fbb { min-width: 22px; height: 22px; font-size: 13px; }

.node.root { width: 280px; height: 280px; }
.node.root .rt { bottom: 74px; }
.node.root .rtitle { font-size: 24px; }
.node.root .rsum { font-size: 14px; }
.node.root .bar { width: 140px; height: 6px; }

.node.card {
  width: 176px; height: 176px; border-radius: 50%;
  flex-direction: column; justify-content: center; gap: 8px; padding: 12px 10px;
}
.node.card[class*="s-"] { border-left-width: 1px; }
.node.card .thumb { width: 72px; height: 72px; border-radius: 50%; }
.node.card .tx { padding: 0 8px; width: 100%; text-align: center; justify-items: center; gap: 2px; }
.node.card .title {
  font-size: 17px; line-height: 1.15; white-space: normal;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.node.card .sub { font-size: 13px; max-width: 100%; }
.node.card .fbb { left: 22px; right: auto; top: 22px; }
.knob { top: 18px; right: 18px; transform: none; width: 28px; height: 28px; font-size: 13px; }

.node.pic { width: 180px; height: 168px; border-radius: 16px; }
.node.pic .pimg { height: 120px; }
.node.pic .ptitle { height: 48px; line-height: 48px; font-size: 16px; padding-left: 24px; }
.node.pic .dot { left: 10px; bottom: 20px; }
.node.pic:not([class*="s-"]) .ptitle { padding-left: 10px; }
.node.chip { width: 220px; height: 52px; padding: 0 14px; }
.node.chip .ctitle { font-size: 16px; }

/* ---------------------------------------------------------------- Kommentare */
details.fb { display: block; padding: 0; }
details.fb > summary {
  list-style: none; cursor: pointer; padding: 11px 12px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: 15px;
}
details.fb > summary::-webkit-details-marker { display: none; }
details.fb > summary::after { content: "\25B8"; margin-left: auto; color: var(--muted); }
details.fb[open] > summary::after { content: "\25BE"; }
details.fb > summary:hover { background: color-mix(in srgb, var(--line) 45%, transparent); border-radius: 8px; }
.fb .num { color: var(--muted); font-variant-numeric: tabular-nums; }
.fb-body { display: grid; gap: 8px; padding: 2px 12px 12px; }
.fb-body p { font-size: 16px; line-height: 1.5; }
.fb-foot { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.fb-foot .x { margin-left: auto; width: 24px; height: 24px; font-size: 15px; }
.fb-all .fb .fb-top { font-size: 14px; }


/* ---------------------------------------------------------------- Zwei Spiele */
#cats { display: none; }
.node.root:hover { box-shadow: 0 0 0 8px var(--accent-soft), 0 0 110px 26px var(--accent-soft); }

/* ---------------------------------------------------------- Pergament: behobene Fehler */
.fixscroll {
  position: absolute; width: 400px; z-index: 2; cursor: auto;
  color: #3b2a17; font-family: "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  filter: drop-shadow(0 10px 22px rgba(0, 0, 0, 0.35));
}
.fixscroll[hidden] { display: none; }
.fx-roll {
  height: 26px; margin: 0 -14px; border-radius: 13px; position: relative; z-index: 1;
  background: linear-gradient(180deg, #b98d55 0%, #e9cf9c 35%, #f6e6c2 50%, #d4ad72 70%, #8e6331 100%);
  box-shadow: inset 0 0 0 1px rgba(80, 50, 20, 0.35);
}
.fx-roll::before, .fx-roll::after {
  content: ""; position: absolute; top: 3px; width: 20px; height: 20px; border-radius: 50%;
  background: radial-gradient(circle at 40% 40%, #8a5a2b, #4e3015 70%);
}
.fx-roll::before { left: -8px; } .fx-roll::after { right: -8px; }
.fx-body {
  margin: -6px 0; padding: 22px 26px 20px;
  background:
    radial-gradient(ellipse at 20% 10%, rgba(255, 255, 255, 0.35), transparent 55%),
    radial-gradient(ellipse at 85% 90%, rgba(150, 100, 40, 0.18), transparent 60%),
    linear-gradient(90deg, #dcc08a 0%, #f3e3bd 8%, #f7ead0 50%, #f1dfb6 92%, #d6b77d 100%);
  box-shadow: inset 0 0 40px rgba(120, 80, 30, 0.25);
  max-height: 860px; overflow-y: auto; overscroll-behavior: contain;
  scrollbar-width: thin; scrollbar-color: #a87436 transparent;
}
.fx-body h2 { margin: 0; font-size: 26px; text-align: center; letter-spacing: 0.04em; font-variant: small-caps; color: #4a2c0f; }
.fx-sub { margin: 4px 0 10px; text-align: center; font-size: 13px; font-style: italic; color: #6b5133; }
.fx-body h3 {
  margin: 16px 0 6px; padding-bottom: 3px; font-size: 16px; color: #5a3610;
  border-bottom: 1px solid rgba(90, 54, 16, 0.4);
}
.fx-list { margin: 0; padding-left: 22px; }
.fx-item { margin: 0 0 10px; font-size: 14px; line-height: 1.35; }
.fx-item::marker { color: #7a4a1a; font-weight: bold; }
.fx-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; }
.fx-title { font-weight: bold; }
.fx-meta { font-size: 12px; color: #7d6446; font-style: italic; }
.fx-sp { margin: 3px 0 0; }
.fx-sp > summary {
  display: inline-block; cursor: pointer; user-select: none; list-style: none;
  font-size: 12px; padding: 1px 9px; border-radius: 10px;
  color: #5a3610; background: rgba(120, 80, 30, 0.12); border: 1px solid rgba(120, 80, 30, 0.35);
}
.fx-sp > summary::-webkit-details-marker { display: none; }
.fx-sp > summary::before { content: "\25B8\00A0"; }
.fx-sp[open] > summary::before { content: "\25BE\00A0"; }
.fx-sp > summary:hover { background: rgba(120, 80, 30, 0.22); }
.fx-sp > p {
  margin: 4px 0 2px; padding: 6px 10px; font-size: 13px;
  background: rgba(255, 250, 235, 0.55); border-left: 3px solid #a87436; border-radius: 0 6px 6px 0;
}

/* ---------- Pergament Operation Forcebuy: Neon-Matrix (pink/tuerkis) ---------- */
.fixscroll.ofbscroll {
  --ofb-pink: #ff2bd6; --ofb-cyan: #19f5ff;
  color: #c9fbff;
  font-family: "Cascadia Mono", Consolas, "Courier New", monospace;
  filter: drop-shadow(0 0 18px rgba(255, 43, 214, 0.35)) drop-shadow(0 0 30px rgba(25, 245, 255, 0.18));
}
.ofbscroll .fx-roll {
  height: 14px; margin: 0; border-radius: 2px;
  background: linear-gradient(90deg, var(--ofb-pink), var(--ofb-cyan) 50%, var(--ofb-pink));
  box-shadow: 0 0 10px var(--ofb-pink), 0 0 22px rgba(25, 245, 255, 0.6);
}
.ofbscroll .fx-roll::before, .ofbscroll .fx-roll::after { display: none; }
.ofbscroll .fx-body {
  position: relative;
  background-color: rgba(6, 4, 18, 0.94);
  background-image:
    repeating-linear-gradient(0deg, rgba(25, 245, 255, 0.10) 0 1px, transparent 1px 22px),
    repeating-linear-gradient(90deg, rgba(255, 43, 214, 0.10) 0 1px, transparent 1px 22px),
    repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.25) 0 2px, transparent 2px 4px);
  border-left: 2px solid var(--ofb-cyan); border-right: 2px solid var(--ofb-pink);
  box-shadow: inset 0 0 40px rgba(255, 43, 214, 0.18), inset 0 0 70px rgba(25, 245, 255, 0.10);
}
.ofbscroll .fx-body h2, .ofbscroll .fx-body h3 {
  color: var(--ofb-pink); font-family: inherit; text-transform: uppercase; letter-spacing: 0.18em;
  text-shadow: 0 0 6px var(--ofb-pink), 0 0 16px rgba(255, 43, 214, 0.6);
}
.ofbscroll .fx-sub { color: var(--ofb-cyan); font-style: normal; text-shadow: 0 0 6px rgba(25, 245, 255, 0.7); }
.ofbscroll .fx-item { border-color: rgba(25, 245, 255, 0.25); }
.ofbscroll .fx-title { color: #f2fbff; }
.ofbscroll .fx-meta { color: rgba(25, 245, 255, 0.75); font-style: normal; }
.ofbscroll .fx-sp summary { color: var(--ofb-pink); }
.ofbscroll .fx-sp summary:hover { background: rgba(255, 43, 214, 0.12); }
.ofbscroll .fx-sp p {
  background: rgba(25, 245, 255, 0.07); border-left-color: var(--ofb-cyan); color: #d8fdff;
}
.ofbscroll .fx-empty {
  margin: 18px 0 6px; color: var(--ofb-cyan); font-size: 15px; line-height: 1.5;
  text-shadow: 0 0 6px rgba(25, 245, 255, 0.7);
}
.ofbscroll .fx-empty::after { content: "_"; color: var(--ofb-pink); animation: ofb-blink 1s steps(1) infinite; }
@keyframes ofb-blink { 50% { opacity: 0; } }
