

:root {
  color-scheme: dark;

  --canvas: #0a0a0a;
  --panel: #131313;
  --panel-header: #0f0f0f;
  --well: #0e0e0e;
  --hairline: #262626;
  --rule-strong: #3d3d3d;
  --band: #1c1c1c;

  --field: #171717;
  --field-border: #4a4a4a;

  --text-primary: #f2f2f2;
  --text-secondary: #a8a8a8;
  --text-muted: #8a8a8a;

  --accent: #ffffff;
  --accent-ink: #0a0a0a;

  --marke: #6db3e2;

  --ged-person: #7dd3fc;
  --ged-vorgabe: #f5a524;
  --ged-projekt: #4ade80;
  --ged-fakt: #a78bfa;
  --ged-erlebnis: #fb7185;

  --gut: #2dd46a;
  --warn: #f5a524;
  --kritisch: #f0453d;

  --radius: 0px;
  --control-radius: 2px;

  --row-h: 34px;
  --pad: 16px;
  --side-w: 232px;
  --top-h: 52px;

  --font-sans: "Archivo", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
}

@media (prefers-color-scheme: light) {
  :root {
    color-scheme: light;

    --canvas: #f4f4f4;
    --panel: #ffffff;
    --panel-header: #fafafa;
    --well: #f7f7f7;
    --hairline: #e1e1e1;
    --rule-strong: #c4c4c4;
    --band: #ececec;
    --field: #f0f0f0;
    --field-border: #b8b8b8;

    --text-primary: #111111;
    --text-secondary: #575757;
    --text-muted: #6e6e6e;

    --accent: #111111;
    --accent-ink: #ffffff;
    --marke: #2b7fb8;

    --ged-person: #0369a1;
    --ged-vorgabe: #b45309;
    --ged-projekt: #15803d;
    --ged-fakt: #6d28d9;
    --ged-erlebnis: #be123c;
    --gut: #12a84f;
    --warn: #d4890a;
    --kritisch: #e0352c;
  }
}

[hidden] { display: none !important; }

dialog:not([open]) { display: none !important; }

* {
  box-sizing: border-box;
  border-color: var(--hairline);
  scrollbar-width: thin;
  scrollbar-color: var(--rule-strong) transparent;
}

::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track, ::-webkit-scrollbar-corner { background: transparent; }
::-webkit-scrollbar-thumb {
  background-color: var(--rule-strong);
  border: 3px solid transparent;
  background-clip: padding-box;
  border-radius: 0;
}
::-webkit-scrollbar-thumb:hover { background-color: var(--text-muted); }
::-webkit-scrollbar-button { display: none; width: 0; height: 0; }

html { -webkit-text-size-adjust: 100%; -webkit-font-smoothing: antialiased; }

body { user-select: none; -webkit-user-select: none; }
#f-text, #f-info, .pth, .mono, code, input, textarea, .titel, dialog pre {
  user-select: text;
  -webkit-user-select: text;
}

body {
  margin: 0;
  background: var(--canvas);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.55;
}

::selection { background: var(--band); }

a { color: inherit; text-decoration-color: var(--text-muted); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--text-primary); }
a.btn, a.navitem { text-decoration: none; }

:focus-visible { outline: 1px solid var(--accent); outline-offset: -1px; }
button:focus-visible, .btn:focus-visible, .navitem:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}
input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline-color: var(--text-secondary);
}

.mono, code, .num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

.titelzeile {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  letter-spacing: 0;
  text-transform: none;
}

.eyebrow {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.spacer { flex: 1; }
.hint { color: var(--text-muted); font-size: 12.5px; }

.leerzeile { padding: var(--pad); color: var(--text-muted); font-size: 12.5px; }

.app {
  display: grid;
  grid-template-columns: var(--side-w) minmax(0, 1fr);
  min-height: 100vh;
}

nav.side {
  border-right: 1px solid var(--hairline);
  background: var(--panel-header);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}

.side .brand {
  height: var(--top-h);
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 var(--pad);
  border-bottom: 1px solid var(--hairline);
  font-weight: 600;
  letter-spacing: -0.01em;
  flex: none;
}
.side .brand img { border-radius: 2px; flex: none; }

.wortmarke { display: inline-flex; align-items: baseline; gap: 7px; }
.wortmarke b {
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}
.wortmarke i {
  font-style: normal;
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--marke);

  position: relative;
  bottom: 1.5px;
}

.side .group { padding: 14px 0 6px; }

#grp-bereiche { display: flex; flex-direction: column; min-height: 0; }
#grp-bereiche > .gruppentitel { flex: none; }
#areagroup { overflow-y: auto; min-height: 0; }
.side .group > .eyebrow { padding: 0 var(--pad) 6px; display: block; }

.navitem {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  height: 32px;
  padding: 0 var(--pad);
  background: none;
  border: 0;
  color: var(--text-secondary);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.navitem:hover { background: var(--band); color: var(--text-primary); }
.navitem[aria-current="true"] {
  color: var(--text-primary);
  background: var(--band);
  box-shadow: inset 2px 0 0 var(--accent);
}

#areas .navitem[aria-current="true"] {
  background: none;
  color: var(--text-primary);
  box-shadow: inset 2px 0 0 var(--rule-strong);
}
#areas .navitem[aria-current="true"] svg { color: var(--text-primary); }
.navitem .mark {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  width: 1.4em;
}
.navitem[aria-current="true"] .mark { color: var(--text-primary); }
.navitem .ro { margin-left: auto; font-size: 10.5px; color: var(--text-muted); }
.navitem .label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.side .foot {
  margin-top: auto;
  border-top: 1px solid var(--hairline);
  padding: 10px var(--pad);
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
}
.side .foot .who { min-width: 0; }
.side .foot .who div:first-child {
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.content { min-width: 0; display: flex; flex-direction: column; }

.topbar {

  min-height: var(--top-h);
  border-bottom: 1px solid var(--hairline);
  background: var(--panel-header);
  display: flex;
  align-items: center;
  gap: 10px;

  padding: 8px var(--pad);
  position: sticky;
  top: 0;
  z-index: 10;
  flex-wrap: wrap;
}

.body { padding: var(--pad); }

.panel {
  background: var(--panel);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
}
.panel > header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px var(--pad);
  background: var(--panel-header);
  border-bottom: 1px solid var(--hairline);
}
.panel > .inner { padding: var(--pad); }

.crumbs { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; min-width: 0; }
.crumbs button {
  background: none;
  border: 0;
  padding: 2px 3px;
  color: var(--text-secondary);
  font: inherit;
  cursor: pointer;
}
.crumbs button:last-of-type { color: var(--text-primary); }
.crumbs button:hover { color: var(--text-primary); text-decoration: underline; }
.crumbs .sep { color: var(--text-muted); font-family: var(--font-mono); }

table { width: 100%; border-collapse: collapse; }

th {
  text-align: left;
  padding: 8px var(--pad);
  border-bottom: 1px solid var(--hairline);
  background: var(--panel-header);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  white-space: nowrap;
}
th.right, td.right { text-align: right; }
th.sortierbar {
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}
th.sortierbar:hover { color: var(--text-primary); }
th.sortierbar[aria-sort="ascending"]::after,
th.sortierbar[aria-sort="descending"]::after {
  content: "";
  display: inline-block;
  margin-left: 5px;
  width: 0;
  height: 0;
  border-left: 3.5px solid transparent;
  border-right: 3.5px solid transparent;
  vertical-align: middle;
  opacity: 0.85;
}
th.sortierbar[aria-sort="ascending"]::after {
  border-bottom: 5px solid currentColor;
}
th.sortierbar[aria-sort="descending"]::after {
  border-top: 5px solid currentColor;
}

td {
  height: var(--row-h);
  padding: 0 var(--pad);
  border-bottom: 1px solid var(--hairline);
  color: var(--text-secondary);
  white-space: nowrap;
}
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: var(--well); }
tbody tr.klickbar { cursor: pointer; }

tbody tr.hervor { background: var(--band); }
tbody tr.hervor td:first-child { box-shadow: inset 2px 0 0 var(--accent); }
tbody tr[aria-selected="true"] { background: var(--band); }
tbody tr[aria-selected="true"] td:first-child { box-shadow: inset 2px 0 0 var(--accent); }

td.name { color: var(--text-primary); width: 100%; }
td.name button {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
  max-width: 60ch;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: inline-block;
  vertical-align: bottom;
}
td.name button:hover { text-decoration: underline; }
.glyph {
  color: var(--text-muted);
  margin-right: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
}

.rowacts { display: flex; gap: 2px; justify-content: flex-end; opacity: 0; }
tr:hover .rowacts, tr:focus-within .rowacts { opacity: 1; }

.files .rowacts { pointer-events: none; }
.files tr:hover .rowacts, .files tr:focus-within .rowacts { pointer-events: auto; }
@media (hover: none) {
  .files .rowacts { opacity: 1; pointer-events: auto; }
}

button.btn, label.btn, a.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 10px;

  background-color: var(--panel);
  color: var(--text-primary);
  border: 1px solid var(--rule-strong);
  border-radius: var(--control-radius);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
}

button.btn.kw-knopf {
  background-color: var(--field);
  border-color: var(--field-border);
  font-size: 12.5px;
  line-height: 1.2;
}
button.btn:hover, label.btn:hover, a.btn:hover { background-color: var(--band); border-color: var(--text-muted); }

button.btn.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
  font-weight: 500;
}
button.btn.primary:hover { filter: brightness(0.92); background: var(--accent); }

button.btn.ghost {
  border-color: transparent;
  background: none;
  color: var(--text-muted);
  height: 24px;
  padding: 0 6px;
  font-size: 12.5px;
}
button.btn.ghost:hover { color: var(--text-primary); background: var(--band); }
button.btn.danger:hover { color: var(--text-primary); border-color: var(--text-primary); background: none; text-decoration: line-through; }
button.btn:disabled { opacity: 0.4; cursor: not-allowed; }

label.btn.deaktiviert { opacity: 0.4; cursor: not-allowed; }

.dateifeld { position: absolute; width: 1px; height: 1px; opacity: 0; }
label.btn:has(:focus-visible) { outline: 2px solid var(--accent); outline-offset: -2px; }

select { appearance: none; -webkit-appearance: none; }
input[type="number"] { appearance: textfield; -moz-appearance: textfield; }
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
input[type="search"]::-webkit-search-cancel-button { appearance: none; }

input[type="text"], input[type="password"], input[type="number"], input[type="search"], select,
textarea {
  height: 28px;
  padding: 0 8px;
  background: var(--field);
  color: var(--text-primary);
  border: 1px solid var(--field-border);
  border-radius: var(--control-radius);
  font: inherit;
  font-size: 13px;
  min-width: 0;
}
textarea { height: auto; padding: 8px; }

select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='7' viewBox='0 0 10 7'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23a8a8a8' stroke-width='1.6'/%3E%3C/svg%3E");
  background-position: right 9px center;
  background-repeat: no-repeat;
  color: var(--text-primary);
  cursor: pointer;

  padding-right: 26px;
}
select:hover {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='7' viewBox='0 0 10 7'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23f2f2f2' stroke-width='1.6'/%3E%3C/svg%3E");
}
input::placeholder { color: var(--text-muted); }
select { cursor: pointer; }

.tag {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 1px 6px;
  border: 1px solid var(--rule-strong);
  border-radius: var(--control-radius);
  color: var(--text-muted);
  white-space: nowrap;
}
.tag.strong { color: var(--text-primary); border-color: var(--text-primary); }

.admin-grid {
  margin-bottom: var(--pad);
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 1fr);
  gap: var(--pad);
  align-items: start;
}

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

.tabellenrolle { overflow-x: auto; }

.tabellenrolle > table { width: 100%; }

.tabellenrolle td { overflow-wrap: anywhere; }

.detail-empty { padding: 48px var(--pad); text-align: center; color: var(--text-muted); }

#freigaben-panel {
  margin-top: calc(var(--pad) * 2.5);
  border-top: 1px solid var(--rule-strong);
}

.kv {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 6px 12px;
  align-items: center;
  padding: var(--pad);
  border-bottom: 1px solid var(--hairline);
}
.kv > .k { color: var(--text-muted); font-size: 12.5px; }

.grantlist { border-bottom: 1px solid var(--hairline); }
.grantrow {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px var(--pad);
  border-bottom: 1px solid var(--hairline);
}
.grantrow:last-child { border-bottom: 0; }
.grantrow .lbl { color: var(--text-primary); }
.grantrow .pth {
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 11.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
}

.grantform { padding: var(--pad); display: grid; gap: 8px; }
.grantform .row { display: flex; gap: 8px; }
.grantform .row > * { min-width: 0; }
.grantform input { width: 100%; }

.files th[data-key] { cursor: pointer; user-select: none; }
.files th[data-key]:hover { color: var(--text-secondary); }
.files th .arrow { font-family: var(--font-mono); margin-left: 2px; }
.files th[aria-sort="none"] .arrow { opacity: 0; }

.files td.name button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}
.files .glyph { color: var(--text-muted); display: flex; flex: none; margin: 0; }
.files .glyph.dir { color: var(--text-secondary); }
.files tr:hover .glyph { color: var(--text-primary); }
.files .txt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.files td.size { color: var(--text-muted); }
.files tr.up td { color: var(--text-muted); }
.files tr.up .glyph { font-family: var(--font-mono); }

.dropzone { position: relative; }
.dropveil {
  position: absolute;
  inset: 0;
  display: none;
  place-items: center;
  background: color-mix(in srgb, var(--canvas) 82%, transparent);
  border: 1px dashed var(--text-muted);
  pointer-events: none;
}
.dropzone.dragging .dropveil { display: grid; }
.dropveil span { color: var(--text-primary); font-size: 13px; }

.platte { padding: var(--pad); margin-bottom: var(--pad); }
.platte .line { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 8px; }

.bar.gross { height: 6px; }
.bar > i.gut { background: var(--gut); }
.bar > i.warn { background: var(--warn); }
.bar > i.kritisch { background: var(--kritisch); }

.besitzer {
  margin-top: 14px;
  border-top: 1px solid var(--hairline);
  padding-top: 12px;
  display: grid;
  gap: 8px;
}
.besitzer .reihe {
  display: grid;
  grid-template-columns: minmax(150px, max-content) minmax(80px, 1fr) auto;
  align-items: center;
  gap: 12px;
  font-size: 13px;
}
.besitzer .wer { color: var(--text-primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.besitzer .wer.system { color: var(--text-muted); }
.besitzer .zahl { color: var(--text-secondary); font-family: var(--font-mono); font-size: 12px; white-space: nowrap; }
.besitzer .bar { height: 4px; }

.quota { padding: 10px var(--pad); border-top: 1px solid var(--hairline); }
.quota .line {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 11.5px;
  color: var(--text-muted);
  margin-bottom: 5px;
}
.bar { height: 3px; background: var(--band); overflow: hidden; }

.bar.offen > i { opacity: .35; }

.ue-gruss { font-size: 20px; font-weight: 500; margin: 0 0 4px; }
.ue-satz { color: var(--text-secondary); margin: 0 0 var(--pad); max-width: 70ch; }
.ue-satz .stoerung { color: var(--kritisch); }
.ue-satz a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }

.ue-raster {
  display: grid; grid-template-columns: minmax(0, 1fr) 360px;
  gap: var(--pad); align-items: start;
}
@media (max-width: 1000px) { .ue-raster { grid-template-columns: minmax(0, 1fr); } }

.galerie { min-width: 0; }
.gkopf { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.gpfeil {
  width: 26px; height: 26px; flex: none; position: relative;
  background: none; border: 1px solid var(--hairline); color: var(--text-secondary);
  cursor: pointer;
}
.gpfeil:hover:not(:disabled) { border-color: var(--rule-strong); color: var(--text); }
.gpfeil:disabled { opacity: .3; cursor: default; }

.gpfeil::before {
  content: ""; position: absolute; inset: 0; margin: auto;
  width: 6px; height: 6px;
  border-left: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
  transform: translateX(1px) rotate(45deg);
}
.gpfeil.vor::before { transform: translateX(-1px) rotate(-135deg); }

.gspur {
  display: flex; gap: var(--pad);
  overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory; scroll-behavior: smooth;
  padding-bottom: 8px;
}

.gspur { scrollbar-width: none; }
.gspur::-webkit-scrollbar { display: none; }
.gspur > * { flex: 0 0 min(430px, 88%); scroll-snap-align: start; }

.gspur.eine > * { flex: 0 0 100%; }

.laeuftzeile {
  display: flex; align-items: center; gap: 10px;
  padding: 9px var(--pad); border-bottom: 1px solid var(--hairline);
}
.laeuftzeile:last-child { border-bottom: 0; }
.laeuftzeile .txt {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.laeuftzeile a { text-decoration: none; }
.laeuftzeile a:hover { text-decoration: underline; }
.laeuftzeile .ms {
  color: var(--text-muted);
  font-size: 12px;
  font-family: var(--font-mono);
  max-width: 38%;
  flex: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ordnerzeile {
  display: flex; align-items: center; gap: 10px;
  padding: 10px var(--pad); border-bottom: 1px solid var(--hairline);
  cursor: pointer;
}
.ordnerzeile:last-child { border-bottom: 0; }
.ordnerzeile:hover { background: var(--band); }
.ordnerzeile .sym { color: var(--text-muted); font-family: var(--font-mono); flex: none; }

.laeuftkopf {
  padding: 13px var(--pad) 5px; color: var(--text-muted);
  font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase;
}

.ue-inhalt { padding: var(--pad); }
.ue-inhalt p { margin: 0; }

.ue-zeile {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px var(--pad);
  border-bottom: 1px solid var(--hairline);
  cursor: pointer;
}
.ue-zeile:last-child { border-bottom: 0; }
.ue-zeile:hover { background: var(--band); }
.ue-zeile .wo { color: var(--text-muted); font-size: 12.5px; }
.ue-zeile .wann { color: var(--text-muted); font-size: 12.5px; white-space: nowrap; }

.ue-seite { margin-bottom: 0; }
.ue-seite .schau {
  aspect-ratio: 16 / 10;
  background: var(--well);
  border-bottom: 1px solid var(--hairline);
  overflow: hidden;
}
.ue-seite .schau img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.ue-seite .unten { padding: 10px var(--pad); }
.ue-seite .adresse { font-weight: 500; }
.ue-seite .adresse a { color: inherit; text-decoration: none; }
.ue-seite .adresse a:hover { text-decoration: underline; }

.ue-start { display: grid; gap: 10px; max-width: 520px; }
.ue-schritt {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px var(--pad);
  border: 1px solid var(--hairline);
  background: var(--panel);
  cursor: pointer;
}
.ue-schritt:hover { border-color: var(--rule-strong); }
.ue-schritt .nr { font-family: var(--font-mono); color: var(--text-muted); }

.meldungen {
  position: fixed;
  top: 12px;
  right: 12px;
  z-index: 60;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: min(380px, calc(100vw - 24px));
  pointer-events: none;
}
.meldung {
  pointer-events: auto;
  background: var(--panel);
  border: 1px solid var(--hairline);

  border-left: 2px solid var(--kritisch);
  padding: 11px 13px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  animation: meldungAn 160ms ease-out;
}
.meldung.gut { border-left-color: var(--gut); }
.meldung .txt { min-width: 0; }
.meldung .titel { font-weight: 500; }
.meldung .detail { color: var(--text-muted); font-size: 12.5px; margin-top: 2px; }
.meldung .zu {
  margin-left: auto;
  color: var(--text-muted);
  font-family: var(--font-mono);
  line-height: 1;
  padding: 2px 4px;
}
.meldung .zu:hover { color: var(--text-primary); }

.meldungen-im-fenster {
  position: fixed;
  top: 12px;
  right: 12px;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: min(360px, calc(100vw - 24px));
  pointer-events: none;
}
.meldung.imfenster {
  position: static;
  max-width: none;
  margin: 0;
  pointer-events: auto;
}

@keyframes meldungAn {
  from { opacity: 0; transform: translateX(10px); }
  to { opacity: 1; transform: none; }
}

.navitem .ampel { margin-left: auto; }

tr.aus .name a { text-decoration: line-through; text-decoration-color: var(--text-muted); }
tr.aus td { opacity: .6; }

.statusgruppe { border-bottom: 1px solid var(--hairline); }
.statusgruppe:last-child { border-bottom: 0; }
.gruppenkopf {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 11px var(--pad);
  background: var(--panel-header);
  border: 0;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.gruppenkopf:hover { background: var(--band); }

.gruppenkopf .pfeil {
  width: 0; height: 0; flex: none;
  border-left: 5px solid var(--text-muted);
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  transition: transform 120ms;
}
.gruppenkopf .pfeil.auf { transform: rotate(90deg); }
.gruppenkopf .gname { font-weight: 500; }
.gruppenkopf .gzahl { color: var(--text-muted); font-size: 12.5px; }
.gruppenkopf .ampel { font-size: 12.5px; }
.gruppeninhalt .unterkopf {
  padding: 9px var(--pad) 5px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.spur {
  display: grid;
  grid-template-columns: 10px 180px 1fr 1fr 62px 70px;
  gap: 14px;
  align-items: center;
  height: var(--row-h);
  padding: 0 var(--pad);
  border-bottom: 1px solid var(--hairline);
}
.spur:last-child { border-bottom: 0; }
.spur:hover { background: var(--band); }
.spur .punkt {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--rule-strong);
  justify-self: center;
  box-shadow: 0 0 0 0 transparent;
  transition: background 160ms ease, box-shadow 160ms ease;
}
.spur .punkt.gut { background: var(--gut); }
.spur .punkt.teil { background: var(--warn); }
.spur .punkt.tot { background: var(--kritisch); }

.spur .punkt.prueft {
  animation: status-heartbeat 1.6s ease-in-out 1;
}
@keyframes status-heartbeat {
  0%, 100% {
    box-shadow: 0 0 0 0 transparent;
    filter: brightness(1);
  }
  45% {
    box-shadow: 0 0 6px 1px color-mix(in srgb, currentColor 50%, transparent);
    filter: brightness(1.2);
  }
}
.spur .punkt.prueft.gut { color: var(--gut); }
.spur .punkt.prueft.teil { color: var(--warn); }
.spur .punkt.prueft.tot { color: var(--kritisch); }
.spur .punkt.prueft:not(.gut):not(.teil):not(.tot) { color: var(--text-muted); }
.spur .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.spur .quote, .spur .ms {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  text-align: right;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.spur .quote.gut, .spur .ms.gut { color: var(--gut); }
.spur .quote.teil, .spur .ms.teil { color: var(--warn); }
.spur .quote.tot, .spur .ms.tot { color: var(--kritisch); }
.spur .verlauf { min-width: 0; color: var(--text-secondary); }

.spur .respgraf { min-width: 0; height: 22px; display: flex; align-items: center;
                  color: var(--gut); position: relative; }
.respPunkt { position: absolute; width: 6px; height: 6px; border-radius: 50%;
            background: currentColor; transform: translate(-50%, -50%);
            pointer-events: none; display: none; }
.spur .respgraf svg { width: 100%; height: 100%; display: block; }

.spur .verlauf .tageslinie { height: 22px; justify-content: flex-end; }

#f-info.schlecht { color: var(--kritisch); }

.blase {
  position: fixed;
  z-index: 80;
  max-width: 300px;
  padding: 6px 9px;
  background: var(--panel);
  border: 1px solid var(--rule-strong);
  color: var(--text);
  font-size: 12px;
  line-height: 1.35;
  pointer-events: none;
}

.trenner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px var(--pad) 8px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.trenner::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--hairline);
  order: 1;
}
.trenner .zahl {
  order: 2;
  font-family: var(--font-mono);
  font-weight: 400;
  letter-spacing: 0;
}

.tageslinie {
  display: flex;
  gap: 2px;
  height: 24px;
  overflow-x: auto;
  scrollbar-width: none;
}
.tageslinie::-webkit-scrollbar { display: none; }
.tageslinie i:hover { outline: 1px solid var(--rule-strong); outline-offset: 1px; }

.zeitachse {
  display: flex;
  padding: 4px var(--pad) 12px;
  font-size: 11px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}
.zeitachse .rechts { margin-left: auto; }

.tageslinie i {
  flex: 1;
  min-width: 3px;
  height: 100%;
  align-self: stretch;
  border-radius: 0;
  background: var(--hairline);
}
.tageslinie i:first-child { border-radius: 3px 0 0 3px; }
.tageslinie i:last-child { border-radius: 0 3px 3px 0; }
.tageslinie i:first-child:last-child { border-radius: 3px; }
.tageslinie i.gut { background: var(--gut); }
.tageslinie i.teil { background: var(--warn); }
.tageslinie i.tot { background: var(--kritisch); }

.maschine { margin-bottom: var(--pad); }
.maschine header select { height: 24px; font-size: 12.5px; }
.kurven {
  display: grid;

  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));

  gap: 0;
}
.kurve {
  background: var(--panel);
  padding: 12px var(--pad) 10px;
  border-right: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
}
.kurve .kopf {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 8px;
  white-space: nowrap;
  min-width: 0;
}

.kurve .kopf .was { font-size: 12.5px; color: var(--text-secondary);
                    overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.kurve .kopf .jetzt {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text-primary);
  flex: none;
}
.kurve .fuss {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: 6px;
  font-size: 11px;
  color: var(--text-muted);
  font-family: var(--font-mono);

  flex-wrap: wrap;
  row-gap: 2px;
}

.kurve svg { display: block; width: 100%; height: 46px; }

.kurve svg path, .kurve svg line { vector-effect: non-scaling-stroke; }
.kurve svg path.linie {
  fill: none;
  stroke: var(--text-secondary);
  stroke-width: 1.25;

  stroke-linecap: butt;
  stroke-linejoin: bevel;
  stroke-miterlimit: 2;
}

.kurve svg path.flaeche {
  fill: color-mix(in srgb, var(--text-primary) 14%, transparent);
  stroke: none;
}
.kurve svg line.grund { stroke: var(--hairline); stroke-width: 1; }

.kurve-bild { display: flex; gap: 8px; align-items: stretch; }
.kurve-bild svg { flex: 1; min-width: 0; }
.kurve.gross .kurve-bild svg { height: 150px; }
.kurve-skala {
  display: flex; flex-direction: column; justify-content: space-between;
  flex: none; width: 46px; text-align: right; padding: 1px 0;
  font-family: var(--font-mono); font-size: 10px; color: var(--text-muted);
}

.kurve-zeit {
  display: flex; justify-content: space-between;
  margin-top: 5px; padding-right: 54px;
  font-family: var(--font-mono); font-size: 10px;
  color: var(--text-muted);
}
.kurve svg line.gitter {
  stroke: color-mix(in srgb, var(--text-muted) 55%, transparent);
  stroke-width: 1;
  stroke-dasharray: 3 3;
}

@keyframes graph-auf { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
.kurve.frisch svg { animation: graph-auf 760ms cubic-bezier(.22, .8, .28, 1); }

@keyframes ein-auf { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.reinladen > * { animation: ein-auf 420ms cubic-bezier(.22, .8, .28, 1) both; }

.reinladen > *:nth-child(1) { animation-delay: 0ms; }
.reinladen > *:nth-child(2) { animation-delay: 45ms; }
.reinladen > *:nth-child(3) { animation-delay: 90ms; }
.reinladen > *:nth-child(4) { animation-delay: 135ms; }
.reinladen > *:nth-child(5) { animation-delay: 180ms; }
.reinladen > *:nth-child(n+6) { animation-delay: 220ms; }

@media (prefers-reduced-motion: reduce) {
  .bar > i, .kurve.frisch svg, .reinladen > * { animation: none; transition: none; }
}

.kurve svg .marke { opacity: 0; transition: opacity 90ms; }
.kurve svg line.marke { stroke: var(--rule-strong); stroke-width: 1; }
.kurve svg.zeigt .marke { opacity: 1; }

.kurve-flaeche { position: relative; flex: 1; min-width: 0; display: flex; }
.kurvepunkt {
  position: absolute; width: 7px; height: 7px; border-radius: 50%;
  background: var(--text-primary); border: 1.5px solid var(--panel);
  transform: translate(-50%, -50%); pointer-events: none;
  opacity: 0; transition: opacity 90ms;
}
.kurvepunkt.zeigt { opacity: 1; }
.kurve { cursor: crosshair; touch-action: none; }

.kurve svg rect.zieht {
  fill: var(--band);
  stroke: var(--rule-strong);
  stroke-width: 1;
  opacity: 0;
}
.kurve svg.zieht rect.zieht { opacity: 1; }
.kurve svg.zieht .marke { opacity: 0; }
.kurve .wannpunkt { color: var(--text-secondary); }

.side .group.klapp { padding: 10px 0 4px; }

.gruppentitel {
  display: flex; align-items: center;
  padding: 2px var(--pad) 6px;
}

.progwahl { position: relative; display: inline-block; }
.progwahl > .kw-knopf { min-width: 220px; }
.progwahl > .kw-menu,
.prog-menu {
  left: 0;
  right: auto;
  min-width: 280px;
  width: max(280px, 100%);
  max-width: min(360px, 94vw);
  background: var(--field);
  border-color: var(--field-border);
}

.progsym {
  display: inline-flex; width: 16px; height: 16px; flex: none;
  color: var(--text-secondary);
}
.progsym svg { width: 16px; height: 16px; display: block; }
img.progsym { object-fit: contain; border-radius: 3px; }
.kw-menu .eintrag[aria-current="true"] .progsym,
.kw-menu .eintrag:hover .progsym,
.kw-knopf .progsym { color: var(--text); }
button.kw-knopf { display: inline-flex; align-items: center; gap: 8px; }

.kontowahl { position: relative; }

.kontowahl > .kw-knopf { min-width: 200px; }
.kontowahl > .kw-menu {
  min-width: 280px;
  width: max(280px, 100%);
  max-width: min(360px, 94vw);
}

button.kw-knopf {
  padding-right: 26px;
  background-color: var(--field);
  border-color: var(--field-border);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23888' stroke-width='1.4' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 9px center;
}
.kw-menu {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  z-index: 40;
  min-width: 100%;
  max-width: min(320px, 92vw);
  background: var(--field);
  border: 1px solid var(--field-border);
  padding: 6px;
}
.kw-menu input[type="search"] {
  width: 100%;
  margin-bottom: 4px;
  height: 26px;
  font-size: 12.5px;
  background: var(--field);
  border-color: var(--field-border);
  box-sizing: border-box;
}

.kw-menu > div {
  --wahl-zeile: 30px;
  max-height: calc(var(--wahl-zeile) * 6.5);
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.kw-menu > div::-webkit-scrollbar { width: 0; height: 0; display: none; }
.kw-menu .eintrag {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  height: var(--wahl-zeile, 30px);
  padding: 0 8px;
  background: none;
  border: 0;
  color: inherit;
  font: inherit;
  font-size: 12.5px;
  line-height: 1.2;
  text-align: left;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.kw-menu .eintrag > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.kw-menu .eintrag:hover { background: var(--band); }
.kw-menu .eintrag[aria-current="true"] { background: var(--band); font-weight: 500; }
.kw-menu .eintrag .nr {
  font-family: var(--font-mono); font-size: 11px; color: var(--text-muted);
  min-width: 22px; flex: none;
}
.kw-menu .leer { padding: 8px; color: var(--text-muted); font-size: 12px; }

.wahl {
  position: relative;
  display: inline-flex;
  vertical-align: middle;
  width: auto;
  max-width: 100%;
  min-width: 0;
  flex: 0 1 auto;
}
select.wahl-nativ {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: 0 !important;
  padding: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
  border: 0 !important;
  clip: rect(0, 0, 0, 0);
}
.wahl > .kw-knopf {
  height: 28px;
  font-size: 12.5px;
  line-height: 1.2;
  padding-left: 8px;
  justify-content: flex-start;
  text-align: left;
  width: auto;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.wahl > .kw-menu { left: 0; right: auto; }

.feld > .wahl,
.konfig-zeile .wahl,
.katfilter > .wahl,
.katfilter .sortzeile .wahl,
.kv .wahl,
.schritt .wahl {
  width: 100%;
  display: flex;
  flex: 1 1 auto;
}
.feld > .wahl > .kw-knopf,
.konfig-zeile .wahl > .kw-knopf,
.katfilter > .wahl > .kw-knopf,
.katfilter .sortzeile .wahl > .kw-knopf,
.kv .wahl > .kw-knopf,
.schritt .wahl > .kw-knopf {
  width: 100%;
}

.zeile > .wahl {
  flex: 0 1 auto;
  width: auto;
  max-width: 220px;
}
.maschine header .wahl { width: auto; max-width: 160px; }
.maschine header .wahl > .kw-knopf { height: 24px; font-size: 12px; width: auto; }
.freigeben .zeile > .wahl {
  flex: 0 1 200px;
  width: auto;
  max-width: 220px;
}
.freigeben .zeile > .wahl > .kw-knopf { width: 100%; }

.seitenband {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px var(--pad);
  margin-bottom: var(--pad);
  border: 1px solid var(--hairline);
  border-left: 2px solid var(--rule-strong);
  background: var(--panel);
}
.seitenband.tot { border-left-color: var(--kritisch); }
.seitenband a { font-weight: 500; text-decoration: none; }
.seitenband a:hover { text-decoration: underline; }

.ue-seite .schau .wartet {
  display: flex; align-items: center; justify-content: center;
  height: 100%; color: var(--text-muted); font-size: 12.5px;
}

.spiel-raster {
  display: grid; grid-template-columns: 280px minmax(0, 1fr);
  gap: var(--pad); align-items: start;
}
@media (max-width: 1100px) { .spiel-raster { grid-template-columns: minmax(0, 1fr); } }
.spiel-plaetze-spalte {
  position: sticky; top: calc(var(--top-h) + var(--pad));
  display: flex; flex-direction: column; gap: var(--pad);
}

#s-domainhinweis.frei { color: var(--gut); }
#s-domainhinweis.belegt { color: var(--warn); }

.kopierbar { cursor: pointer; }

.kopierbar:hover { color: var(--text); }
.kopierbar:hover .wert, .kopierbar:hover .name { text-decoration: underline;
  text-underline-offset: 3px; text-decoration-thickness: 1px; }

#konfig-dialog { width: min(640px, 92vw); max-height: 86vh; display: flex; flex-direction: column; }
.konfig-suche { padding: 12px var(--pad); border-bottom: 1px solid var(--hairline); }
.konfig-suche input { width: 100%; }
.konfig-liste { overflow-y: auto; flex: 1; }
.konfig-zeile {
  display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 12px;
  align-items: center; padding: 9px var(--pad); border-bottom: 1px solid var(--hairline);
}
.konfig-zeile:last-child { border-bottom: 0; }
.konfig-zeile .k { min-width: 0; }
.konfig-zeile .schluessel { font-family: var(--font-mono); font-size: 12.5px; }
.konfig-zeile .was { color: var(--text-muted); font-size: 11.5px; margin-top: 1px; }
.konfig-zeile input, .konfig-zeile select { width: 100%; }

.konfig-zeile input:disabled { opacity: 0.4; cursor: not-allowed; }

.konfig-zeile .anaus { justify-self: end; }
.konfig-fuss { display: flex; align-items: center; gap: 10px;
               padding: 12px var(--pad); border-top: 1px solid var(--hairline); }

.pluginbox { padding: var(--pad); }
.pluginzeile {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 0; border-bottom: 1px solid var(--hairline);
}
.pluginzeile:last-child { border-bottom: 0; }
.pluginzeile .name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.spielzeile {
  display: flex; align-items: center; gap: 10px;
  padding: 11px var(--pad); border-bottom: 1px solid var(--hairline);
  cursor: pointer; width: 100%; text-align: left;
  background: none; border-left: 0; border-right: 0; border-top: 0;
  color: inherit; font: inherit;
  position: relative;
}
.spielzeile:last-child { border-bottom: 0; }

@property --lauf-winkel {
  syntax: "<angle>"; inherits: false; initial-value: 0deg;
}
.spielzeile.rand-gewaehlt { --randfarbe: var(--text-secondary); }
.spielzeile.rand-startet { --randfarbe: var(--warn); }
.spielzeile.rand-laeuft { --randfarbe: var(--gut); }
.spielzeile.rand-gewaehlt::before,
.spielzeile.rand-startet::before,
.spielzeile.rand-laeuft::before {
  content: ""; position: absolute; inset: 3px; border-radius: 7px; padding: 1.5px;

  background:
    conic-gradient(from var(--lauf-winkel),
      transparent 0deg, var(--randfarbe) 60deg, transparent 130deg),
    linear-gradient(color-mix(in srgb, var(--randfarbe) 28%, transparent),
                    color-mix(in srgb, var(--randfarbe) 28%, transparent));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  animation: lauf-dreht 2.4s linear infinite;
  pointer-events: none;
}
@keyframes lauf-dreht { to { --lauf-winkel: 360deg; } }
@media (prefers-reduced-motion: reduce) {
  .spielzeile.rand-gewaehlt::before, .spielzeile.rand-startet::before,
  .spielzeile.rand-laeuft::before { animation: none; opacity: .8; }
}

.spielicon { width: 20px; height: 20px; flex: none; object-fit: contain; }
.spielzeile:hover { background: color-mix(in srgb, var(--band) 55%, transparent); }
.spielzeile[aria-current="true"] {
  background: var(--band);
}
.spielzeile[aria-current="true"] .name { font-weight: 500; }
.spieltext { flex: 1; min-width: 0; }
.spielzeile .name, .spielzeile .wo {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.spielzeile .wo { color: var(--text-muted); font-size: 12px; }
.spielzeile, .spielfrei { min-height: 56px; }
.spielfrei { display: flex; align-items: center; }

.spielfrei {
  padding: 11px var(--pad); border-bottom: 1px solid var(--hairline);
  color: var(--text-muted); font-size: 12.5px;
}
.spielfrei:last-child { border-bottom: 0; }

/* Kein gleichbreites Raster: die Kacheln tragen sehr verschieden lange Werte
   ("10 GB" gegen einen frei gewaehlten Modpack-Namen). Gleiche Spalten zwingen
   den langen Wert in eine Auslassung, waehrend daneben Platz brachliegt. Mit
   flex-wrap nimmt jede Kachel die Breite ihres Inhalts und teilt sich den Rest. */
.sd-kopf {
  display: flex; flex-wrap: wrap;
  gap: 1px; background: var(--hairline);
}

.sd-kopf > * {
  flex: 1 1 auto; min-width: 138px;
  background: var(--panel); padding: 12px var(--pad);
}

.sd-tabs { padding: 6px 0; }
.sd-tab {
  display: flex; align-items: center; width: 100%; height: 32px;
  padding: 0 var(--pad); background: none; border: 0;
  color: var(--text-secondary); font: inherit; font-size: 13px;
  text-align: left; cursor: pointer;
}
.sd-tab:hover { background: var(--band); color: var(--text-primary); }
.sd-tab[aria-selected="true"] {
  color: var(--text-primary); background: var(--band);
  box-shadow: inset 2px 0 0 var(--accent);
}
.sd-panel { margin-top: var(--pad); }

#spiel-detail { display: flex; flex-direction: column;
  height: calc(100vh - var(--top-h) - 2 * var(--pad)); }
.sd-panel { min-height: 0; }
.sd-panel-voll { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.sd-voll { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.sd-voll-liste { flex: 1; min-height: 120px; height: auto; overflow: auto; }

#sd-panel-dashboard {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

#sd-konsole.sd-voll-liste, #sd-log-inhalt.sd-voll-liste { height: auto; }

.sd-dash {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  overflow: hidden;
}
.sd-dash > header {
  flex: none;
  border-bottom: 1px solid var(--hairline);
}
.sd-dash-abschnitt {
  flex: none;
  padding: 12px var(--pad);
  border-bottom: 1px solid var(--hairline);
}
.sd-dash-abschnitt:last-child { border-bottom: 0; }
/* Erbt die inhaltsbreiten Kacheln der Kopfzeile: "seit 40 Stunden 45 Min." und
   "3 - zuletzt 13.08.26, 22:09" brauchen deutlich mehr Platz als "0", und in
   gleichbreiten Spalten wuerden genau diese beiden abgeschnitten. */
#sd-panel-dashboard #sd-kennzahlen {
  margin: 0;
  gap: 1px;
  background: var(--hairline);
  border: 1px solid var(--hairline);
}
#sd-panel-dashboard #sd-kennzahlen > * {
  padding: 10px 12px;
}

.sd-kurven-kopf {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.sd-kurven-kopf select { margin: 0; }

#sd-kurven {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  background: transparent;
}
#sd-panel-dashboard #sd-kurven .kurve {
  border: 1px solid var(--hairline);
  background: var(--field);
  padding: 10px 12px 8px;
}
@media (max-width: 1100px) {
  #sd-kurven { grid-template-columns: 1fr; }
}

.sd-feeds {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  background: transparent;
  margin: 0;
  border-top: 0;
  align-items: stretch;
}
@media (max-width: 900px) {
  .sd-feeds { grid-template-columns: 1fr; }
}
.sd-feed {
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: var(--field);
  border: 1px solid var(--hairline);
}
.sd-chat-kopf {
  flex: none;
  padding: 10px 12px 8px;
  border-bottom: 1px solid var(--hairline);
}

#sd-panel-dashboard .sd-chat.picklist {
  height: auto;
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
#sd-panel-dashboard .sd-chat.picklist::-webkit-scrollbar {
  width: 0; height: 0; display: none;
}
.sd-chat .zeit { font-family: var(--font-mono); font-size: 11px; color: var(--text-muted);
                 flex: none; }
.sd-chat .spieler { font-weight: 500; flex: none; }
.sd-chat .text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-secondary); }
.sd-kopf .was { color: var(--text-muted); font-size: 11px; letter-spacing: .06em;
                text-transform: uppercase; margin-bottom: 3px; }
.sd-kopf .wert { font-family: var(--font-mono); font-size: 13px; }

.modpackkachel {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  text-decoration: none; color: inherit;
}
.kacheltext { flex: 1 1 auto; min-width: 0; }
.modpackkachel img {
  width: 44px; height: 44px; border-radius: 8px; object-fit: cover; flex: none;
}
.sd-kopf .wert { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.softwarekachel img {
  object-fit: contain;
}

.konsole {
  margin: 0; padding: 12px var(--pad);
  height: 340px; overflow: auto;
  font-family: var(--font-mono); font-size: 12px; line-height: 1.5;
  white-space: pre-wrap; word-break: break-word;
  background: var(--well); color: var(--text-secondary);
  border-bottom: 1px solid var(--hairline);
}
.sd-eingabe { display: flex; gap: 8px; padding: 10px var(--pad); }
.sd-eingabe input { flex: 1; font-family: var(--font-mono); font-size: 12.5px; }

.sd-form {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px; padding: var(--pad);
}
.sd-fuss { display: flex; align-items: center; gap: 10px;
           padding: 0 var(--pad) var(--pad); }
.feld { display: block; }
.feld > span { display: block; color: var(--text-muted); font-size: 12px; margin-bottom: 5px; }
.feld > input, .feld > select { width: 100%; }

#spiel-dialog {
  width: max-content;
  max-width: 96vw;
  max-height: 92vh;
  margin: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  background: transparent;
  border: 0 !important;
  outline: none !important;
  box-shadow: none !important;

  padding: 0 0 var(--spiel-dock-reserve);
  --spiel-dock-reserve: 250px;
}
#spiel-dialog:focus,
#spiel-dialog:focus-visible {
  outline: none !important;
  border: 0 !important;
}
#spiel-dialog::backdrop { background: rgba(0, 0, 0, 0.66); }
.spiel-cascade {
  display: flex;
  gap: 20px;
  justify-content: center;
  align-items: stretch;
  height: min(720px, calc(92vh - var(--spiel-dock-reserve)));
  max-height: calc(92vh - var(--spiel-dock-reserve));
}
.spiel-pane {
  position: relative;
  width: 500px;
  flex: 0 0 500px;
  max-width: min(92vw, 500px);
  height: 100%;
  max-height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border: 1px solid var(--hairline);
  color: var(--text-primary);
  overflow: hidden;
}
.spiel-pane > header {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.spiel-pane > header .eyebrow {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.spiel-pane > header .btn.ghost {

  min-width: 5.5em;
  justify-content: center;
  flex: none;
}
.spiel-pane-body {
  padding: var(--pad);
  overflow: hidden;
  flex: 1;
  min-height: 0;
  overscroll-behavior: contain;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

#spiel-pane-wahl .spiel-pane-body.sn-wahl-body {
  overflow: hidden;
  padding: calc(var(--pad) + 2px) calc(var(--pad) + 2px);
  gap: 0;
}
#spiel-pane-wahl #sn-quellwahl {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  scrollbar-width: none;
  -ms-overflow-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;

  padding: 2px;
  margin: -2px;
}
#spiel-pane-wahl #sn-quellwahl::-webkit-scrollbar { width: 0; height: 0; display: none; }

#spiel-pane-wahl .quellkachel {
  height: 56px;
  min-height: 56px;
  max-height: 56px;
  box-sizing: border-box;
}
.spiel-pane, .spiel-pane * {
  user-select: none;
  -webkit-user-select: none;
}
.spiel-pane input, .spiel-pane textarea, .spiel-pane select,
.spiel-pane .kw-knopf, .spiel-pane .kw-menu .eintrag {
  user-select: text;
  -webkit-user-select: text;
}

.spiel-pane .wahl > .kw-knopf,
.spiel-pane .kw-menu .eintrag {
  font-size: 12.5px;
  line-height: 1.2;
  white-space: nowrap;
}
#spiel-neu-msg {

  position: absolute;
  left: var(--pad);
  right: var(--pad);
  top: 52px;
  z-index: 6;
  margin: 0;
}
.sn-hero {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 4px 0 2px;
  flex: none;

  min-height: 100px;
  gap: 14px;
  box-sizing: border-box;
}
.sn-hero.sn-hero-pack {
  justify-content: flex-start;
  align-items: stretch;
  min-height: 0;
  padding: 0;
  border: none;
  gap: 14px;
}
.sn-hero-icon {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: auto;
  height: auto;
  padding: 0;
  margin: 0;
  border: none;
  background: transparent;
  color: inherit;
  cursor: default;
  text-decoration: none;
  box-sizing: border-box;
}
.sn-hero.sn-hero-pack .sn-hero-icon {
  align-self: stretch;
  aspect-ratio: 1 / 1;
  height: auto;
  width: auto;
  max-width: 140px;
}
.sn-hero-icon.is-link {
  cursor: pointer;
}
.sn-hero-icon.is-link:hover img,
.sn-hero-icon.is-link:focus-visible img {
  opacity: .85;
}
.sn-hero-icon.is-link:focus-visible {
  outline: 1px solid var(--text-primary);
  outline-offset: 2px;
}
.sn-hero img,
.sn-hero-icon img {
  width: 88px;
  height: 88px;
  object-fit: contain;
  image-rendering: auto;
  border-radius: 0;
  transition: opacity 140ms ease;
  pointer-events: none;
}
.sn-hero.sn-hero-pack .sn-hero-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.sn-hero.sn-hero-klein { min-height: 72px; }
.sn-hero.sn-hero-klein img { width: 56px; height: 56px; }
.sn-hero-meta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: left;
  justify-content: center;
}
.sn-hero-name {
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}
.sn-hero-infos {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.sn-hero-infos .kwas-zeile {
  grid-template-columns: 70px minmax(0, 1fr);
  gap: 8px;
}
.sn-hero-infos .kwas-v {
  max-width: none;
}
.sn-raster-eyebrow {
  margin: 0 0 2px;
  flex: none;
}

#sn-version-feld,
#sn-modpack-feld,
#sn-ftb-feld,
#sn-cf-suchen,
#sn-build-feld,
#sn-mp-ausgabe-feld,
#sn-ftb-ausgabe-feld,
#sn-cf-ausgabe-feld {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  gap: 12px;
}
#sn-cf-feld {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}
.sn-kachelrolle {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  align-content: start;
  align-items: stretch;

  padding: 3px 3px 10px;
  margin: -3px -3px -3px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.sn-kachelrolle::-webkit-scrollbar { width: 0; height: 0; display: none; }
.katfilter {
  display: grid;
  gap: 8px;
  margin: 0;
  flex: none;
  align-items: stretch;
  position: relative;
  z-index: 6;
}

.katfilter .wahl { overflow: visible; }
#sn-mp-filter, #sn-cf-filter {
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) minmax(0, 0.9fr) 32px minmax(0, 1fr);
}
#sn-ftb-filter {
  grid-template-columns: minmax(0, 1fr) 32px minmax(0, 1fr);
}

#sd-mod-filterzeile {
  grid-template-columns: minmax(0, 1.4fr) minmax(100px, 0.7fr) minmax(0, 1fr) minmax(0, 0.85fr) 32px;
}
#sd-mod-filterzeile.ohne-richtung {
  grid-template-columns: minmax(0, 1.4fr) minmax(100px, 0.7fr) minmax(0, 1fr) minmax(0, 0.85fr);
}
#sd-plugin-filterzeile {
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 0.85fr) 32px;
}
#sd-plugin-filterzeile.ohne-richtung {
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 0.85fr);
}
#sd-mod-filterzeile.ohne-richtung .sort-dir,
#sd-plugin-filterzeile.ohne-richtung .sort-dir { display: none; }
.katfilter > select,
.katfilter > .wahl,
.katfilter > input[type="search"] {
  min-width: 0;
  width: 100%;
}
.katfilter .sortzeile { display: contents; }
.katfilter .sortzeile select,
.katfilter .sortzeile .wahl { min-width: 0; width: 100%; }
.katfilter .wahl > .kw-knopf {
  font-size: 12px;
  width: 100%;
  min-width: 0;
}
.katfilter .kw-menu .eintrag { font-size: 12px; }
.sort-dir {
  width: 32px;
  padding: 0;
  border: 1px solid var(--field-border);
  background: var(--field);
  color: var(--text-primary);
  font: inherit;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  border-radius: var(--control-radius);
}
.sort-dir:hover { border-color: var(--text-muted); }
.sn-toggle {
  display: none;
}
.sn-drop {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 140px;
  margin-top: 8px;
  padding: 22px 16px;
  border: 1px dashed var(--rule-strong);
  background: var(--canvas);
  cursor: pointer;
  text-align: center;
}
.sn-drop:hover, .sn-drop.drag { border-color: var(--text-primary); }
.sn-drop.hat-datei { border-style: solid; }
.sn-drop-titel { font-size: 13.5px; color: var(--text-primary); }

.quellkachel:not(.packkachel):not(.versionkachel) .kname {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  align-self: end;
}
.quellkachel:not(.packkachel):not(.versionkachel) .ktag {
  text-transform: none;
  letter-spacing: 0;
  font-size: 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sn-pane-msg {
  position: absolute;
  inset: 0;
  z-index: 12;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
  background: rgba(0, 0, 0, 0.72);
}
.sn-pane-msg[hidden] { display: none !important; }
.sn-pane-msg-karte {
  width: min(340px, 100%);
  background: var(--panel);
  border: 1px solid var(--hairline);
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  text-align: center;
}
.sn-pane-msg-karte p {
  margin: 0;
  color: var(--text-primary);
  font-size: 13.5px;
  line-height: 1.45;
}
.sn-pane-msg-karte .btn { align-self: center; min-width: 88px; }
.sn-pane-msg-acts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  align-items: center;
}
.sn-pane-msg-acts .btn { align-self: auto; }

.spiel-dock {
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  z-index: 80;
  width: min(440px, 92vw);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  padding: 14px 16px;
  background: var(--panel);
  border: 1px solid var(--hairline);
}
.spiel-dock .sn-los { width: 100%; height: 44px; margin: 0; }

.sn-name-dock {
  padding: 0 0 12px;
  margin: 0;
  background: none;
  border: 0;
  border-bottom: 1px solid var(--hairline);
  border-radius: 0;
}
.sn-name-dock .feld { margin: 0; }
.sn-name-dock .feld > span {
  margin-bottom: 6px;
  font-size: 10.5px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.sn-name-dock input[type="text"] {
  width: 100%;
  height: 34px;
  font-size: 14px;
  background: var(--field);
  border-color: var(--field-border);
}
.sn-dock-msg {
  margin: 0;
  padding: 8px 10px;
  border: 1px solid var(--rule-strong);
  background: var(--canvas);
  color: var(--text-primary);
  font-size: 12.5px;
  line-height: 1.4;
  text-align: center;
}
.sn-dock-msg.ok { border-color: var(--text-muted); color: var(--text-secondary); }
.sn-hold.fehler {
  animation: sn-hold-fehler 0.55s ease;
  box-shadow: 0 0 0 1px #c44, 0 0 22px rgba(200, 60, 60, .45);
  border-color: #c44 !important;
}
@keyframes sn-hold-fehler {
  0%, 100% { filter: brightness(1); }
  30% { filter: brightness(1.15) saturate(1.2); }
  50% { box-shadow: 0 0 0 1px #e55, 0 0 28px rgba(220, 70, 70, .55); }
}
.sn-ram-dock { display: flex; flex-direction: column; gap: 8px; }
.sn-ram-kopf {
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
}
.sn-ram-kopf .mono {
  font-size: 14px;
  color: var(--text-primary);
  display: inline-block;
  transition: transform 120ms ease, color 120ms ease;
}
.sn-ram-dock.is-drag .sn-ram-kopf .mono {
  animation: sn-ram-wackel 0.28s ease-in-out infinite;
  color: var(--text-primary);
}
@keyframes sn-ram-wackel {
  0%, 100% { transform: rotate(0deg) scale(1.05); }
  25% { transform: rotate(-6deg) scale(1.08); }
  75% { transform: rotate(6deg) scale(1.08); }
}

.sn-ram-track input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  box-sizing: border-box;
  width: 16px;
  height: 16px;
  margin-top: -6.5px;
  background: var(--canvas);
  border: 2px solid var(--text-primary);
  border-radius: 0;
  cursor: pointer;
  box-shadow:
    inset 0 0 0 3px var(--text-primary),
    0 0 0 1px var(--canvas);
  transition: transform 140ms ease, box-shadow 140ms ease;
}
.sn-ram-track input[type="range"]::-moz-range-thumb {
  appearance: none;
  -moz-appearance: none;
  box-sizing: border-box;
  width: 16px;
  height: 16px;
  background: var(--canvas);
  border: 2px solid var(--text-primary);
  border-radius: 0;
  cursor: pointer;
  box-shadow:
    inset 0 0 0 3px var(--text-primary),
    0 0 0 1px var(--canvas);
  transition: transform 140ms ease, box-shadow 140ms ease;
}
.sn-ram-track input[type="range"]:active::-webkit-slider-thumb,
.sn-ram-track input[type="range"]:focus-visible::-webkit-slider-thumb,
.sn-ram-dock.is-drag input[type="range"]::-webkit-slider-thumb,
.sn-ram-track input[type="range"]:active::-moz-range-thumb,
.sn-ram-track input[type="range"]:focus-visible::-moz-range-thumb,
.sn-ram-dock.is-drag input[type="range"]::-moz-range-thumb {
  transform: scale(1.25) rotate(45deg);
  box-shadow:
    inset 0 0 0 3px var(--text-primary),
    0 0 0 1px var(--canvas),
    0 0 14px rgba(255, 255, 255, 0.28);
}
.sn-ram-track input[type="range"]::-moz-focus-outer { border: 0; }
.sn-ram-zeile {
  display: flex;
  align-items: center;
  gap: 10px;
}
.sn-ram-track {
  position: relative;
  flex: 1;
  min-width: 0;
  height: 28px;
  display: flex;
  align-items: center;
}
.sn-ram-track::before {
  content: "";
  position: absolute;
  left: 0; right: 0;
  height: 3px;
  background: var(--rule);
  pointer-events: none;
}
.sn-ram-fuell {
  position: absolute;
  left: 0;
  height: 3px;
  width: var(--sn-ram-pct, 0%);
  background: var(--text-primary);
  pointer-events: none;
  transition: width 120ms ease;
}
.sn-ram-track input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  position: relative;
  z-index: 2;
  width: 100%;
  height: 28px;
  margin: 0;
  background: transparent;
  cursor: pointer;
}
.sn-ram-track input[type="range"]::-webkit-slider-runnable-track {
  height: 3px;
  background: transparent;
  border: 0;
}
.sn-ram-track input[type="range"]::-moz-range-track {
  height: 3px;
  background: transparent;
  border: 0;
}
.sn-ram-empfehlung {
  position: absolute;
  top: 50%;
  width: 2px;
  height: 12px;
  margin-top: -6px;
  background: var(--text-muted);
  pointer-events: none;
  transform: translateX(-50%);
  z-index: 1;
  transition: height 160ms ease, background 160ms ease;
}
.sn-ram-dock.is-drag .sn-ram-empfehlung {
  height: 16px;
  margin-top: -8px;
  background: var(--text-secondary);
}

.sn-hold {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  touch-action: none;
}
.sn-hold-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0%;

  background: rgba(0, 0, 0, 0.28);
  pointer-events: none;
  z-index: 0;
}
.sn-hold-text {
  position: relative;
  z-index: 1;
  text-align: center;
  width: 100%;
  line-height: 1;
  min-height: 1em;
}
.sn-hold.holding {
  animation: sn-hold-pulse 0.5s ease-in-out infinite;
  box-shadow:
    0 0 0 1px var(--text-primary),
    0 0 22px rgba(255,255,255,.35),
    0 0 40px rgba(255,255,255,.15);
  filter: brightness(1.12);
}
.sn-hold.ready {
  animation: sn-hold-flash 0.35s ease;
}
@keyframes sn-hold-pulse {
  0%, 100% { filter: brightness(1.05); transform: translateX(0); }
  50% { filter: brightness(1.22); transform: translateX(0); }
}
@keyframes sn-hold-flash {
  0% { filter: brightness(1.5); }
  100% { filter: brightness(1); }
}
@media (max-width: 1100px) {
  .spiel-cascade { flex-wrap: wrap; max-height: none; }
  #spiel-dialog {
    --spiel-dock-reserve: 270px;
    padding-bottom: var(--spiel-dock-reserve);
    overflow-y: auto;
    max-height: 96vh;
  }
}

.spiel-neu { padding: var(--pad); overflow-y: auto; }

.quellblock { border: 0; }
.quellgruppe {
  display: flex; align-items: center; gap: 7px; cursor: pointer; user-select: none;
  font-size: 10.5px; font-weight: 600; letter-spacing: .08em;
  text-transform: uppercase; color: var(--text-muted); margin: 14px 0 6px;
  list-style: none;
}
.quellgruppe:hover { color: var(--text-secondary); }
.quellgruppe::-webkit-details-marker { display: none; }

.quellgruppe::before {
  content: ""; width: 5px; height: 5px; flex: none;
  border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
  transform: rotate(-45deg); transition: transform 150ms ease;
}
details[open] > .quellgruppe::before { transform: rotate(45deg); }
.quellblock:first-child > .quellgruppe { margin-top: 2px; }
.quellwahl {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  align-items: start;
}
.quellkachel {
  display: grid; grid-template-columns: 28px minmax(0, 1fr);
  grid-template-areas: "icon name" "icon tag";
  column-gap: 10px; align-items: center;
  width: 100%;
  padding: 10px 11px; text-align: left; cursor: pointer;
  background: var(--canvas); color: var(--text-primary);
  border: 1px solid var(--rule-strong); border-radius: var(--control-radius);
  font: inherit; transition: border-color 120ms ease, background 120ms ease;
  min-width: 0;
  box-sizing: border-box;
}
.quellkachel:hover { border-color: var(--text-muted); }
button.quellkachel:focus-visible,
.quellkachel:focus-visible {
  outline: none !important;
  border-color: var(--text-primary);
  background: var(--panel-header);
}
.quellkachel[aria-pressed="true"] {
  border-color: var(--text-primary);
  background: var(--panel-header);
}
.quellkachel.gesperrt { opacity: .5; }

.quellkachel.packkachel {
  position: relative;
  height: 76px;
  min-height: 76px;
  max-height: 76px;
  box-sizing: border-box;
  align-items: center;
  overflow: visible;
  z-index: 0;
  transition: border-color 120ms ease, background 120ms ease, z-index 0s;
}
.quellkachel.packkachel:hover,
.quellkachel.packkachel:focus-visible {
  border-color: var(--text-primary);
  z-index: 6;
}
.quellkachel.packkachel .kname {
  align-self: center;
  width: 100%;
  min-width: 0;
  min-height: calc(1.25em * 2);
  max-height: calc(1.25em * 2);
  display: flex;
  align-items: center;
  line-height: 1.25;
}
.quellkachel.packkachel .kname-text {
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  white-space: normal;
  width: 100%;
  word-break: break-word;
  line-height: 1.25;
}
.quellkachel.packkachel .ktag {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  width: 100%;
  min-width: 0;
}

.sn-pack-tip {
  position: fixed;
  z-index: 40;
  width: max-content;
  min-width: 168px;
  max-width: min(300px, calc(100vw - 24px));
  padding: 9px 12px;
  background: var(--panel-header);
  border: 1px solid var(--rule-strong);
  color: var(--text-secondary);
  font-size: 11.5px;
  line-height: 1.35;
  text-align: left;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
  box-sizing: border-box;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .45);
}
.sn-pack-tip[hidden] { display: none !important; }
.kwas-zeile {
  display: grid;
  grid-template-columns: 76px minmax(0, max-content);
  gap: 10px;
  align-items: baseline;
}
.kwas-k {
  color: var(--text-muted);
  font-size: 10px;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.kwas-v {
  color: var(--text-primary);
  font-size: 11.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 180px;
}

.quellkachel.versionkachel {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  gap: 3px;
  height: 76px;
  min-height: 76px;
  max-height: 76px;
  box-sizing: border-box;
  padding: 8px 10px;
  overflow: hidden;
}
.quellkachel.versionkachel .kname {
  font-size: 12.5px;
  line-height: 1.25;
  width: 100%;
  min-height: calc(1.25em * 2);
  max-height: calc(1.25em * 2);
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  white-space: normal;
  word-break: break-word;
  align-self: center;
}
.quellkachel.versionkachel .ktag {
  width: 100%;
  font-size: 10px;
  text-transform: none;
  letter-spacing: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
  flex: none;
  min-height: 1.2em;
}
.kicon { grid-area: icon; width: 28px; height: 28px; object-fit: contain; }

.quellkachel.eintextig { display: flex; align-items: center; gap: 9px; }
.quellkachel.eintextig .kname { align-self: center; }
.kicon.leer { visibility: hidden; }
.rechte-zeile { display: flex; gap: 6px; flex-wrap: wrap; }
.quellkachel .kname { grid-area: name; font-size: 12.5px; align-self: end; }
.quellkachel .ktag { grid-area: tag; font-size: 9px; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: .02em; align-self: start;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.sn-los { width: 100%; height: 38px; margin-top: 8px; }
@media (max-width: 540px) { .quellwahl { grid-template-columns: repeat(2, 1fr); } }

.cf-schluessel .zeile { display: flex; gap: 8px; margin-top: 10px; }
.cf-schluessel .zeile input { flex: 1; font-family: var(--font-mono); font-size: 12.5px; }
.cf-schritte {
  margin: 8px 0 0; padding-left: 20px;
  color: var(--text-secondary); font-size: 13px; line-height: 1.7;
}
.cf-schritte a { text-decoration: underline; text-underline-offset: 3px; }

.mpzeile.gesperrt { opacity: .5; }

.mpliste {
  max-height: 260px;
  overflow-y: auto;
  margin-top: 8px;
  border: 1px solid var(--hairline);
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.mpliste::-webkit-scrollbar { width: 0; height: 0; display: none; }

.spiel-pane-body .feld,
#sn-modpack-feld > .feld,
#sn-ftb-feld > .feld,
#sn-cf-suchen > .feld {
  flex: none;
  width: 100%;
}

.installiert-kopf {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-top: 22px; padding-top: 14px; border-top: 1px solid var(--hairline);
  margin-bottom: 8px;
}
.installiert-kopf input[type="search"] { max-width: 220px; }
.pluginzeile .quelle {
  font-size: 10.5px; color: var(--text-muted); border: 1px solid var(--hairline);
  border-radius: 4px; padding: 1px 6px; flex: none;
}

.mpliste.weit { max-height: 340px; }
.mehr-sentinel { height: 1px; }

.mpliste.laedt { opacity: .4; pointer-events: none; }
.mpzeile {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 9px 11px; border-bottom: 1px solid var(--hairline);
  background: none; border-left: 0; border-right: 0; border-top: 0;
  color: inherit; font: inherit; text-align: left; cursor: pointer;
}
.mpzeile:last-child { border-bottom: 0; }
.mpzeile:hover { background: var(--band); }
.mpzeile[aria-current="true"] { background: var(--band); }
.mpzeile img { width: 28px; height: 28px; flex: none; object-fit: cover; background: var(--well); }
.mpzeile .name { font-size: 13px; }
.mpzeile .was { color: var(--text-muted); font-size: 11.5px;
                overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mpzeile .zahl { color: var(--text-muted); font-family: var(--font-mono);
                 font-size: 11px; flex: none; }

.freigeben { padding: var(--pad); }
.freigeben .hint { margin: 0 0 12px; }
.freigeben .zeile {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  max-width: 720px;
}
.freigeben .zeile input[type="text"] {
  flex: 1 1 220px;
  min-width: 160px;
  max-width: 320px;
}
.freigeben .zeile > .wahl {
  flex: 0 1 180px;
  max-width: 200px;
}
.fgliste { margin-top: var(--pad); }
.fgliste .eyebrow { display: block; margin: 14px 0 6px; }
.fgzeile {
  display: flex; align-items: center; gap: 12px;
  padding: 9px 0; border-bottom: 1px solid var(--hairline);
}
.fgzeile:last-child { border-bottom: 0; }

.umgeb { padding: var(--pad); min-width: min(620px, 88vw); }
.umgeb .zeile { display: flex; gap: 8px; align-items: center; }
.umgeb .hint { margin: 0 0 12px; }
.umgzeile {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 0; border-bottom: 1px solid var(--hairline);
}
.umgzeile:last-child { border-bottom: 0; }

.fassungen { padding: var(--pad); max-height: 60vh; overflow: auto; }
.fassungszeile {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--hairline);
}
.fassungszeile:last-child { border-bottom: 0; }

#fenster > header .titelzeile {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#fenster > header .btn, #fenster > header a.btn { flex: none; }

#f-wrap { border-left: 1px solid var(--hairline); margin-left: 6px; padding-left: 12px; }
#fenster { position: relative; }

.suchleiste {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px var(--pad);
  border-bottom: 1px solid var(--hairline);
  background: var(--panel-header);
  flex: none;
}
.suchleiste input[type="search"] { width: 260px; }

tr.laeuft { background: var(--band); }
tr.laeuft .bar { margin-top: 5px; height: 3px; }
tr.laeuft .bar > i { background: var(--text-primary); transition: width 150ms linear; }

.platzoben {
  white-space: nowrap;
  padding-left: 12px;
  border-left: 1px solid var(--hairline);
}
.suchfeld input[type="search"] { width: clamp(120px, 18vw, 220px); }
#stats { white-space: nowrap; }

.uploadstand .zeile { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.uploadstand .bar { height: 4px; }
.uploadstand .bar > i { background: var(--text-primary); transition: width 120ms linear; }
.bar > i { display: block; height: 100%; background: var(--text-secondary); }

.bar > i { transition: width 720ms cubic-bezier(.22, .8, .28, 1); }
.bar.voll > i { background: var(--text-primary); }

dialog header {
  display: flex;
  align-items: center;

  flex-wrap: wrap;
  gap: 10px;
  row-gap: 6px;
  padding: 10px var(--pad);
  background: var(--panel-header);
  border-bottom: 1px solid var(--hairline);
}
dialog footer {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px var(--pad);
  border-top: 1px solid var(--hairline);
  background: var(--panel-header);
}

#picker { width: min(92vw, 620px); }
.crumbs.pick { padding: 8px var(--pad); border-bottom: 1px solid var(--hairline); }

.picklist { height: 46vh; overflow: auto; }
.sd-voll-liste.picklist { height: auto; }

.mpliste, .picklist, .konsole, .konfig-liste, .tabellenrolle,
#sd-panel-dashboard, #areagroup, .fassungen {
  overscroll-behavior: contain;
}

.pickitem {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px var(--pad);
  background: none;
  border: 0;
  border-bottom: 1px solid var(--hairline);
  color: var(--text-secondary);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.pickitem:last-child { border-bottom: 0; }
.pickitem:hover { background: var(--band); color: var(--text-primary); }
.pickitem svg { color: var(--text-muted); flex: none; }
.pickitem[aria-current="true"] {
  color: var(--text-primary); background: var(--band);
  box-shadow: inset 2px 0 0 var(--accent);
}

.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.chip {
  height: 26px;
  padding: 0 10px;
  background: var(--panel);
  border: 1px solid var(--rule-strong);
  border-radius: var(--control-radius);
  color: var(--text-primary);
  font: inherit;
  font-size: 12.5px;
  cursor: pointer;
}
.chip:hover:not(:disabled) { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.chip:disabled { opacity: 0.35; cursor: default; text-decoration: line-through; }

.switch { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-secondary); cursor: pointer; }
.switch input { accent-color: var(--accent); width: 14px; height: 14px; }

.grantrow svg { color: var(--text-muted); flex: none; }
.grantrow.empty-hint { color: var(--text-muted); }

.quotaform { display: flex; align-items: center; gap: 8px; }
.quotaform input { width: 84px; text-align: right; }

.suchfeld { display: flex; align-items: center; gap: 8px; }
.suchfeld input[type="search"] {
  width: 220px;
  height: 28px;
  padding: 0 8px;
  background: var(--canvas);
  color: var(--text-primary);
  border: 1px solid var(--rule-strong);
  border-radius: var(--control-radius);
  font: inherit;
  font-size: 13px;
}
.suchfeld input[type="search"]::-webkit-search-cancel-button { filter: invert(0.6); }
.mitinhalt {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12.5px;
  color: var(--text-muted);
  cursor: pointer;
  white-space: nowrap;
}
.mitinhalt input { width: 13px; height: 13px; accent-color: var(--accent); }

tr.treffer td.name button > span:last-child {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
  text-align: left;
}
tr.treffer td.name .txt { display: block; }

tr.treffer td.name .pfad {
  display: block;
  font-size: 11.5px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}
tr.treffer td.name .stelle {
  display: block;
  font-size: 11.5px;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  margin-top: 2px;
}
tr.treffer td { height: auto; padding-top: 7px; padding-bottom: 7px; }

.nav-back {
  font-family: var(--font-mono);
  font-size: 15px;
  width: 28px;
  padding: 0;
  justify-content: center;
  flex: none;
}
.nav-back:disabled { opacity: 0.3; }

th.pick, td.pick { width: 34px; padding-right: 0; }
th.pick input, td.pick input {
  width: 13px;
  height: 13px;
  accent-color: var(--accent);
  cursor: pointer;
  vertical-align: middle;
}
tbody tr.gewaehlt { background: var(--band); }
tbody tr.gewaehlt td:first-child { box-shadow: inset 2px 0 0 var(--accent); }

.auswahlleiste {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px var(--pad);
  border-bottom: 1px solid var(--hairline);
  background: var(--band);
  font-size: 13px;
}

#fenster {
  width: 92vw;
  height: 88vh;
  max-width: none;
  max-height: none;
  display: flex;
  flex-direction: column;
  padding: 0;
}
#fenster[open] { display: flex; }
#fenster header { flex: none; }
#fenster footer { flex: none; }

.dirty {
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-primary);
  border: 1px solid var(--text-muted);
  border-radius: var(--control-radius);
  padding: 1px 6px;
}

.editor {
  flex: 1;
  min-height: 0;
  display: flex;
  background: var(--well);
  overflow: hidden;
}

.gutter {
  flex: none;
  padding: 12px 10px 12px 14px;
  text-align: right;
  color: var(--text-muted);
  background: var(--panel-header);
  border-right: 1px solid var(--hairline);
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.6;
  overflow: hidden;
  user-select: none;
  white-space: pre;
}

.feld { position: relative; flex: 1; min-width: 0; }

.feld > #f-text,
.feld > .hl {
  position: absolute;
  inset: 0;
  margin: 0;
  padding: 12px 14px;
  border: 0;
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.6;
  tab-size: 2;
  white-space: pre;
  overflow: auto;
}

.feld > .hl {
  color: var(--text-primary);
  background: none;
  pointer-events: none;
  overflow: hidden;
}

#f-text {
  background: none;
  outline: none;
  resize: none;
  color: transparent;
  caret-color: var(--text-primary);
}

#f-text::selection {
  background: color-mix(in srgb, var(--rule-strong) 45%, transparent);
  color: transparent;
}
#f-text.roh { color: var(--text-primary); caret-color: var(--text-primary); }

#f-text.wrap, .hl.wrap { white-space: pre-wrap; word-break: break-word; }

.t-kommentar   { color: #6f7378; font-style: italic; }
.t-text        { color: #8fb98a; }
.t-zahl        { color: #c9a06a; }
.t-wort        { color: #7fa8d0; }
.t-eigenschaft { color: #b294bb; }
.t-name        { color: #d3c07a; }
.t-zeichen     { color: var(--text-muted); }
.t-stark       { color: var(--text-primary); font-weight: 600; }

@media (prefers-color-scheme: light) {
  .t-kommentar   { color: #7a7f85; }
  .t-text        { color: #3f7a3a; }
  .t-zahl        { color: #9a6a1f; }
  .t-wort        { color: #2c6ea8; }
  .t-eigenschaft { color: #7d4f9e; }
  .t-name        { color: #7a6410; }

  select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='7' viewBox='0 0 10 7'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23575757' stroke-width='1.6'/%3E%3C/svg%3E");
  }
  select:hover {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='7' viewBox='0 0 10 7'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23111111' stroke-width='1.6'/%3E%3C/svg%3E");
  }
}

.medienansicht {
  flex: 1;
  min-height: 0;
  display: grid;
  place-items: center;
  padding: var(--pad);
  background: var(--well);
}

.bildansicht {
  flex: 1;
  min-height: 0;
  display: grid;
  place-items: center;
  padding: var(--pad);
  background: var(--well);
  background-image:
    linear-gradient(45deg, var(--band) 25%, transparent 25%),
    linear-gradient(-45deg, var(--band) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, var(--band) 75%),
    linear-gradient(-45deg, transparent 75%, var(--band) 75%);
  background-size: 16px 16px;
  background-position: 0 0, 0 8px, 8px -8px, -8px 0;
  overflow: auto;
}
.bildansicht img { max-width: 100%; max-height: 100%; object-fit: contain; }

.seitenform { padding: var(--pad); display: grid; gap: 14px; max-width: 640px; }
.seitenform > label { display: grid; gap: 6px; font-size: 12.5px; color: var(--text-secondary); }
.seitenform .zeile { display: flex; align-items: center; gap: 8px; }

.seitenform .zeile > input[type="text"],
.seitenform .zeile > input[type="number"] { flex: 1; min-width: 0; }
.seitenform input[readonly] { color: var(--text-muted); }

.ampel { display: inline-flex; align-items: center; gap: 6px; }
.ampel::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-muted);
}
.ampel.ja::before { background: var(--text-primary); }

#status-punkt.ja::before { background: var(--gut); }

.ampel.tot::before { background: var(--kritisch); }
.ampel.tot { color: var(--kritisch); }

.neuerschluessel { padding: var(--pad); margin-bottom: var(--pad); border-color: var(--rule-strong); }
.neuerschluessel .line { margin-bottom: 10px; }
.schluesselzeile { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.schluesselzeile code {
  flex: 1;
  min-width: 0;
  padding: 8px 10px;
  background: var(--well);
  border: 1px solid var(--hairline);
  font-family: var(--font-mono);
  font-size: 12.5px;
  overflow-x: auto;
  white-space: nowrap;
  user-select: all;
}

.mcpbox { display: grid; gap: 18px; }
.schritt { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 12px; }
.schritt .nummer {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border: 1px solid var(--rule-strong);
  border-radius: var(--control-radius);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
}
.schritt .titel { font-size: 13px; color: var(--text-primary); margin-bottom: 6px; }
.schritt select { min-width: 200px; }

#mcp-url.leer { color: var(--text-muted); font-style: italic; }
#mcp-befehl.wartet { opacity: 0.45; }

.anleitung > summary {
  padding: 10px var(--pad);
  background: var(--panel-header);
  border-bottom: 1px solid var(--hairline);
  cursor: pointer;
  user-select: none;
}
.anleitung > summary::marker { color: var(--text-muted); }
.anleitung[open] > summary { border-bottom: 1px solid var(--hairline); }

.mcpbox label { display: grid; gap: 6px; font-size: 12.5px; color: var(--text-secondary); }
.mcpbox .zeile { display: flex; align-items: flex-start; gap: 8px; }
.mcpbox code, .mcpbox pre {
  flex: 1;
  min-width: 0;
  margin: 0;
  padding: 9px 11px;
  background: var(--field);
  border: 1px solid var(--field-border);
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.6;
  overflow-x: auto;
  white-space: pre;
  user-select: text;
}
.mcpbox code { white-space: nowrap; }
.mcpbox .zeile > .btn { flex: none; }

.anleitung { margin-top: var(--pad); }
.anleitung .inner { padding: var(--pad); display: grid; gap: 10px; }
.anleitung pre {
  margin: 0;
  padding: 12px 14px;
  background: var(--well);
  border: 1px solid var(--hairline);
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.65;
  user-select: text;
}
.anleitung code { font-family: var(--font-mono); font-size: 12px; color: var(--text-primary); }

#frage { width: min(92vw, 420px); }
#sd-ram-dialog { width: min(92vw, 420px); }
.frage-inhalt { padding: var(--pad); display: grid; gap: 10px; }
.frage-inhalt p { margin: 0; line-height: 1.5; }
.frage-inhalt input { width: 100%; height: 32px; }
#frage .betont { color: var(--text-primary); font-weight: 500; }

#teilen-form label { display: grid; gap: 6px; font-size: 12.5px; color: var(--text-secondary); }

.ctx {
  position: fixed;
  z-index: 100;
  min-width: 190px;
  padding: 4px 0;
  background: var(--panel);
  border: 1px solid var(--hairline);
  border-radius: var(--control-radius);
}
.ctx button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 6px 12px;
  background: none;
  border: 0;
  color: var(--text-secondary);
  font: inherit;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
}
.ctx button:hover { background: var(--band); color: var(--text-primary); }
.ctx button:disabled { opacity: 0.35; cursor: default; }
.ctx button:disabled:hover { background: none; color: var(--text-secondary); }
.ctx .kbd { margin-left: auto; color: var(--text-muted); font-family: var(--font-mono); font-size: 11px; }
.ctx hr { margin: 4px 0; border: 0; border-top: 1px solid var(--hairline); }
.ctx .titel {
  padding: 4px 12px 6px;
  color: var(--text-muted);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.auth { max-width: 360px; margin: 12vh auto; padding: var(--pad); }
.auth .marke {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  padding-left: 2px;
}
.auth .marke img { border-radius: var(--control-radius); }
.auth .marke .wort { font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }
.auth .marke .wortmarke b { font-size: 19px; }
.auth .marke .wortmarke i { font-size: 12px; }
.auth .fuss { margin: 14px 2px 0; line-height: 1.5; }
.auth .tabs { display: flex; border-bottom: 1px solid var(--hairline); }
.auth .tabs button {
  flex: 1;
  padding: 11px;
  background: var(--panel-header);
  border: 0;
  border-bottom: 1px solid transparent;
  color: var(--text-muted);
  font: inherit;
  cursor: pointer;
}
.auth .tabs button[aria-selected="true"] {
  background: var(--panel);
  color: var(--text-primary);
  border-bottom-color: var(--accent);
}

.auth .tabs button:not([aria-selected="true"]):hover {
  background: var(--panel);
  color: var(--text-secondary);
}
.auth .inner { display: grid; gap: 12px; }
.auth label { display: grid; gap: 5px; font-size: 12.5px; color: var(--text-secondary); }
.auth input { width: 100%; height: 32px; }
.auth .btn.primary { height: 32px; justify-content: center; }

.startlade {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--canvas);
}

.empty { padding: 48px var(--pad); text-align: center; color: var(--text-muted); }

.msg {
  padding: 9px var(--pad);
  border-left: 2px solid var(--text-muted);
  background: var(--well);
  color: var(--text-primary);
  font-size: 13px;
}
.msg.ok { border-left-color: var(--accent); }

dialog {
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--text-primary);
  padding: 0;
  max-width: min(92vw, 900px);
}
dialog::backdrop { background: rgba(0, 0, 0, 0.66); }
dialog pre {
  margin: 0;
  padding: var(--pad);
  overflow: auto;
  max-height: 58vh;
  background: var(--well);
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.55;
}

@media (max-width: 760px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  nav.side { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--hairline); }
  .side .foot { margin-top: 0; }
}

.ohne-observe #sd-observe-tops,
.ohne-observe #sd-observe-breakdown,
.ohne-observe #sd-observe-share,
.ohne-observe #sd-observe-sys{display:none}

.monitorkarte { display: flex; flex-direction: column; }
.monitorkarte .hinweis {
  font-size: 12px; color: var(--text-secondary); line-height: 1.5;
  margin-bottom: 10px;
}
.monitorkarte .btn { align-self: flex-start; }
.monitorkarte a {
  font-family: var(--font-mono); font-size: 12px;
  margin-top: 8px; word-break: break-all;
}

.spielerzeile {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px var(--pad);
  border-bottom: 1px solid var(--hairline);
}
.spielerzeile:last-child { border-bottom: 0; }
.spielerzeile .name { flex: 1; min-width: 0; color: var(--text-primary); }
.spielerzeile .spieleraktionen {
  display: flex;
  gap: 4px;
  opacity: .45;
  transition: opacity .12s;
}
.spielerzeile:hover .spieleraktionen,
.spielerzeile:focus-within .spieleraktionen { opacity: 1; }
.spielerzeile .btn.scharf { opacity: 1; }
.skinkopf {
  width: 26px;
  height: 26px;
  flex: none;
  border-radius: 3px;
  image-rendering: pixelated;
  background: var(--band);
}
.skinkopf.leer {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}

#sd-verschiebe-menu {
  z-index: 60;
  min-width: 190px;
  max-height: 320px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 4px;
  background: var(--panel);
  border: 1px solid var(--border-strong, var(--hairline));
  border-radius: var(--radius, 3px);
  box-shadow: 0 14px 40px rgba(0, 0, 0, .45);
}
#sd-verschiebe-menu .menukopf {
  padding: 6px 9px 7px;
  color: var(--text-muted);
  font-size: 11.5px;
  border-bottom: 1px solid var(--hairline);
  margin-bottom: 4px;
}
#sd-verschiebe-menu .menuzeile {
  display: block;
  width: 100%;
  padding: 7px 9px;
  text-align: left;
  background: none;
  border: 0;
  border-radius: var(--radius, 3px);
  color: var(--text-primary);
  font: inherit;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#sd-verschiebe-menu .menuzeile:hover,
#sd-verschiebe-menu .menuzeile:focus-visible { background: var(--band); }

.betriebsblock {
  padding: 10px var(--pad) 12px;
  border-bottom: 1px solid var(--hairline);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.betriebsblock .betriebszeile {
  display: flex;
  gap: 12px;
  align-items: baseline;
  font-size: 13px;
}
.betriebsblock .betriebszeile .was {
  flex: 0 0 150px;
  color: var(--text-muted);
}
.betriebsblock .betriebszeile .wert { color: var(--text-primary); }
.betriebsblock .betriebsdetails { font-size: 13px; margin-top: 2px; }
.betriebsblock .betriebsdetails summary {
  cursor: pointer;
  color: var(--text-muted);
  width: fit-content;
}
.betriebsblock .betriebsdetails summary:hover { color: var(--text-primary); }
.betriebsblock .flags {
  display: block;
  margin-top: 7px;
  padding: 8px 10px;
  background: var(--band);
  border-radius: var(--radius, 3px);
  font-size: 12px;
  line-height: 1.6;
  word-break: break-all;
  color: var(--text-secondary, var(--text-primary));
}

.spielerbereiche { display: flex; flex-direction: column; min-height: 0; }
.spielerteil { display: flex; flex-direction: column; min-height: 0; }
.teilkopf {
  display: flex; align-items: baseline; justify-content: space-between; gap: 8px;
  padding: 9px var(--pad) 8px;
  font-size: 11px; letter-spacing: .09em; text-transform: uppercase;
  color: var(--text-muted); border-bottom: 1px solid var(--hairline);
}
.teilkopf .hint { text-transform: none; letter-spacing: 0; }
.spielerteil.jetzt { flex: 0 1 auto; max-height: 46%; }
.spielerteil.jetzt .picklist { flex: 1; min-height: 0; overflow-y: auto; }
.spielerlisten {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  border-top: 1px solid var(--hairline); flex: 1; min-height: 0;
}
.spielerlisten .spielerteil { border-right: 1px solid var(--hairline); min-width: 0; }
.spielerlisten .spielerteil:last-child { border-right: 0; }
.listenzeilen { flex: 1; min-height: 88px; overflow-y: auto; overscroll-behavior: contain; }
.listenzeilen .spielerzeile { padding-top: 5px; padding-bottom: 5px; }
.listenzeilen .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.listenfeld { display: flex; gap: 6px; padding: 9px var(--pad);
  border-top: 1px solid var(--hairline); }
.listenfeld input { flex: 1; min-width: 0; }
.skinkopf.ipkopf { font-size: 9px; letter-spacing: .06em; font-weight: 600;
  display: flex; align-items: center; justify-content: center; }

.sicherungsplan {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 10px var(--pad); border-bottom: 1px solid var(--hairline);
}
.sicherungsplan .planwort { font-size: 12.5px; color: var(--text-secondary); }
.sicherungsplan select { padding: 4px 8px; }
.sicherungsplan .hint { margin-left: 6px; }


.ged-leiste {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 10px var(--pad); border-bottom: 1px solid var(--hairline);
}
.ged-leiste input[type=search] { width: 220px; }
.ged-arten { display: flex; flex-direction: column; padding: 0 6px 6px; }
.ged-art {
  font: inherit; font-size: 12.5px; background: none; border: 0; width: 100%;
  color: var(--text-muted); cursor: pointer; padding: 5px 6px; text-align: left;
  display: grid; grid-template-columns: 9px 1fr auto; align-items: center; gap: 8px;
}
.ged-punkt { width: 7px; height: 7px; border-radius: 50%; justify-self: center; }
.ged-art:hover { background: color-mix(in srgb, var(--band) 55%, transparent); }
.ged-art .zahl { font-family: var(--font-mono); font-size: 10.5px; }
.ged-art[aria-pressed="true"] { color: var(--text-primary); background: var(--band); }

#view-gedaechtnis:not([hidden]) {
  display: flex; flex-direction: column;
}
/* Die App-Spalte hat nur min-height, keine feste Hoehe - ein flex:1 haette hier
   nichts zum Schrumpfen. Drive rechnet deshalb ueberall mit vh (siehe .picklist). */
/* Die Hoehe setzt gedRaumHoehe() aus der eigenen Lage - eine feste Rechnung
   nimmt an, die Leiste sei einzeilig, und die bricht auf schmalen Fenstern um. */
.ged-raum { display: flex; position: relative; height: 60vh; }

.ged-detail { flex: none; width: 340px; border-left: 1px solid var(--hairline);
  padding: 14px var(--pad); overflow-y: auto; display: flex; flex-direction: column; gap: 10px; }
.ged-detail .was { font-size: 11px; letter-spacing: .09em; text-transform: uppercase;
  color: var(--text-muted); }
.ged-titel { font: inherit; font-weight: 500; }
.ged-verweise { display: flex; flex-direction: column; gap: 4px; }
.ged-verweise .reihe { display: flex; flex-wrap: wrap; gap: 4px; }
.ged-verweis { font: inherit; font-size: 12.5px; background: var(--well);
  border: 1px solid var(--hairline); color: var(--text-secondary);
  padding: 3px 8px; cursor: pointer; max-width: 100%; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; }
.ged-verweis:hover { color: var(--text-primary); border-color: var(--rule-strong); }
.ged-verweis.fehlt { font-family: var(--font-mono); font-size: 10.5px;
  color: var(--warn); border-color: var(--warn); background: none; cursor: default; }
.ged-eingabe { font: inherit; font-size: 14px; line-height: 1.5; resize: vertical; }
.ged-daten { font-family: var(--font-mono); font-size: 11px; color: var(--text-muted);
  display: flex; flex-direction: column; gap: 3px; }
.ged-daten .warnung { color: var(--warn); }
.ged-daten .quelle { opacity: .7; }
.ged-tasten { display: flex; gap: 6px; flex-wrap: wrap; }
.ged-form { display: flex; flex-direction: column; gap: 8px; }
.ged-form textarea, .ged-form input, .ged-form select { font: inherit; }
@media (max-width: 1100px) {
  .ged-detail { position: absolute; right: 0; top: 0; bottom: 0; background: var(--panel); }
}

.ged-buehne { flex: 1; min-width: 0; position: relative; display: flex; }
.ged-graph { flex: 1; min-width: 0; cursor: grab; touch-action: none; }
.ged-graph:active { cursor: grabbing; }
.ged-zahnrad { position: absolute; top: 10px; right: 10px; z-index: 3;
  width: 28px; height: 28px; display: flex; align-items: center;
  justify-content: center; background: var(--panel); cursor: pointer;
  border: 1px solid var(--hairline); color: var(--text-muted); }
.ged-zahnrad:hover, .ged-zahnrad[aria-expanded="true"] { color: var(--text-primary); }
.ged-stell { position: absolute; top: 44px; right: 10px; z-index: 3; width: 258px;
  background: var(--panel); border: 1px solid var(--hairline);
  padding: 0 0 10px; display: flex; flex-direction: column; font-size: 12.5px;
  max-height: calc(100% - 60px); overflow-y: auto; }
.ged-stell details { border-bottom: 1px solid var(--hairline); }
.ged-stell summary { cursor: pointer; padding: 9px 12px; list-style: none;
  font-size: 11px; letter-spacing: .09em; text-transform: uppercase;
  color: var(--text-muted); }
.ged-stell summary::-webkit-details-marker { display: none; }
.ged-stell summary::before { content: "+"; margin-right: 7px;
  font-family: var(--font-mono); }
.ged-stell details[open] summary::before { content: "\2212"; }
.ged-stell label { display: grid; grid-template-columns: 1fr auto;
  align-items: center; gap: 3px 8px; padding: 2px 12px 9px;
  color: var(--text-secondary); }
.ged-stell label .wert { grid-column: 2; grid-row: 1; font-family: var(--font-mono);
  font-size: 10.5px; color: var(--text-muted); }
.ged-stell label.ged-haken .wert { grid-column: 3; grid-row: 1; }
.mcpbox label.mcp-sparsam { display: flex; align-items: center;
  justify-content: flex-start; gap: 8px; margin: 0 0 4px; width: fit-content;
  color: var(--text-secondary); cursor: pointer; font-size: 13px; }
.mcpbox label.mcp-sparsam input { accent-color: var(--text-primary);
  margin: 0; flex: none; }
.mcp-sparsam-text { margin: 0 0 12px; }
.ged-stell input[type="range"] { grid-column: 1 / -1; grid-row: 2; width: 100%;
  accent-color: var(--text-primary); }
.ged-stell .btn { margin: 10px 12px 0; }
.ged-haken { display: grid; grid-template-columns: auto 1fr auto; align-items: center;
  gap: 8px; padding: 4px 12px 8px; color: var(--text-secondary); cursor: pointer; }
.ged-haken input { accent-color: var(--text-primary); margin: 0; }
.ged-hinweis { margin: 0; padding: 0 12px 10px; font-size: 11.5px; line-height: 1.45;
  color: var(--text-muted); }
.ged-hinweis code { font-family: var(--font-mono); font-size: 10.5px;
  color: var(--text-secondary); }
.ged-tote { padding: 0 12px 10px; font-size: 11.5px; line-height: 1.5;
  color: var(--warn); display: flex; flex-direction: column; gap: 3px; }
.ged-tote code { font-family: var(--font-mono); font-size: 10.5px; }
.ged-schild { position: fixed; z-index: 40; width: max-content; max-width: 320px;
  pointer-events: none; background: var(--panel); border: 1px solid var(--hairline);
  padding: 8px 10px; font-size: 12.5px; line-height: 1.45;
  display: flex; flex-direction: column; gap: 2px;
  overflow-wrap: anywhere; hyphens: auto; }
.ged-schild b { overflow-wrap: anywhere; }
.ged-schild span:last-child { display: -webkit-box; -webkit-line-clamp: 4;
  -webkit-box-orient: vertical; overflow: hidden; }
.ged-schild .was { font-family: var(--font-mono); font-size: 10px;
  letter-spacing: .05em; color: var(--text-muted); }
.ged-schild span:last-child { color: var(--text-secondary); }

.ged-marken { font: inherit; font-size: 12.5px; }
