:root {
  color-scheme: light;
  --bg: #f4f3ef;
  --surface: #fcfcfb;
  --surface-2: #f0efeb;
  --border: rgba(11, 11, 11, 0.10);
  --border-strong: rgba(11, 11, 11, 0.18);
  --text: #0b0b0b;
  --text-2: #52514e;
  --muted: #7a7873;
  --grid: #e1e0d9;
  --axis: #c3c2b7;
  --accent: #3a7d24;
  --accent-hover: #316a1e;
  --accent-ink: #ffffff;
  --series-1: #3a7d24;
  --good: #0ca30c;
  --good-text: #006300;
  --warning: #fab219;
  --serious: #ec835a;
  --critical: #d03b3b;
  --critical-text: #b42e2e;
  --discord: #5865f2;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.05), 0 2px 8px rgba(0, 0, 0, 0.04);
  --radius: 12px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #0d0d0d;
    --surface: #1a1a19;
    --surface-2: #232321;
    --border: rgba(255, 255, 255, 0.10);
    --border-strong: rgba(255, 255, 255, 0.18);
    --text: #ffffff;
    --text-2: #c3c2b7;
    --muted: #96948d;
    --grid: #2c2c2a;
    --axis: #383835;
    --accent: #5aa83c;
    --accent-hover: #6cba4d;
    --accent-ink: #0d0d0d;
    --series-1: #5aa83c;
    --good-text: #2fbf2f;
    --critical-text: #ef7474;
    --shadow: none;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 14px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
code { font-family: var(--mono); font-size: 0.92em; background: var(--surface-2); padding: 1px 6px; border-radius: 6px; }
h1, h2, h3 { margin: 0; font-weight: 600; }
h2 { font-size: 15px; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.right { text-align: right; }

/* ---------------- Buttons ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 34px; padding: 0 14px;
  border: 1px solid var(--border-strong); border-radius: 8px;
  background: var(--surface); color: var(--text);
  font: inherit; font-weight: 500; cursor: pointer; white-space: nowrap;
  transition: background .12s, border-color .12s;
}
.btn:hover:not(:disabled) { background: var(--surface-2); text-decoration: none; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn:focus-visible, input:focus-visible, select:focus-visible, .tabs a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-primary:hover:not(:disabled) { background: var(--accent-hover); }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-danger { color: var(--critical-text); }
.btn-sm { height: 28px; padding: 0 10px; font-size: 12.5px; }
.btn-discord { background: var(--discord); border-color: var(--discord); color: #fff; height: 44px; width: 100%; font-size: 15px; }
.btn-discord:hover:not(:disabled) { background: #4752c4; }

/* ---------------- Login ---------------- */
.login { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.login-card {
  width: 100%; max-width: 380px; padding: 36px 28px; text-align: center;
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow);
}
.login-card h1 { font-size: 22px; margin-top: 12px; }
.login-card p { margin: 4px 0 24px; }
.login-logo { display: block; margin: 0 auto; }
.notice {
  text-align: left; padding: 10px 12px; margin-bottom: 16px; border-radius: 8px;
  background: var(--surface-2); border-left: 3px solid var(--warning); font-size: 13px;
}
.notice.error { border-left-color: var(--critical); }

/* ---------------- Layout ---------------- */
#app { max-width: 1240px; margin: 0 auto; padding: 0 20px 80px; }
.topbar { display: flex; align-items: center; gap: 16px; padding: 16px 0 12px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; margin-right: auto; min-width: 0; }
.brand-name { font-weight: 600; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-sub { font-size: 12px; color: var(--muted); }
.user { display: flex; align-items: center; gap: 8px; }
.user img { border-radius: 50%; background: var(--surface-2); }
#user-name { font-weight: 500; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 20px; overflow-x: auto; scrollbar-width: none; }
.tabs a {
  padding: 10px 14px; color: var(--text-2); font-weight: 500; white-space: nowrap;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.tabs a:hover { color: var(--text); text-decoration: none; }
.tabs a.active { color: var(--text); border-bottom-color: var(--accent); }
.count:not(:empty) { display: inline-block; min-width: 20px; padding: 0 6px; margin-left: 4px; border-radius: 10px; background: var(--surface-2); font-size: 12px; text-align: center; }

.grid { display: grid; gap: 16px; margin-bottom: 16px; }
.grid-main { grid-template-columns: 1.4fr 1fr; }
.grid-2 { grid-template-columns: 1fr 1fr; }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px 20px; box-shadow: var(--shadow); margin-bottom: 16px; min-width: 0;
}
.grid > .card { margin-bottom: 0; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }

/* ---------------- Status-Pill ---------------- */
.pill {
  display: inline-flex; align-items: center; gap: 7px; height: 26px; padding: 0 11px;
  border-radius: 13px; font-size: 12.5px; font-weight: 600; background: var(--surface-2); color: var(--text);
  border: 1px solid var(--border);
}
.pill-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); flex: none; }
.pill.good .pill-dot { background: var(--good); box-shadow: 0 0 0 3px color-mix(in srgb, var(--good) 22%, transparent); }
.pill.warn .pill-dot { background: var(--warning); animation: pulse 1.4s ease-in-out infinite; }
.pill.bad .pill-dot { background: var(--critical); }
@keyframes pulse { 50% { opacity: .35; } }

/* ---------------- Key/Value ---------------- */
.kv { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 0; }
.kv div { min-width: 0; }
.kv dt { font-size: 12px; color: var(--muted); }
.kv dd { margin: 2px 0 0; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.secret-row { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--border); }
.secret-row:last-of-type { border-bottom: 0; }
.secret-label { width: 74px; color: var(--muted); font-size: 12.5px; flex: none; }
.secret-row code { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; background: none; padding: 0; font-size: 13.5px; }

/* ---------------- Tiles ---------------- */
.tiles { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.tile { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); min-width: 0; }
.tile-label { font-size: 12px; color: var(--muted); }
.tile-value { font-size: 24px; font-weight: 600; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile-sub { font-size: 12px; color: var(--text-2); min-height: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------------- Charts ---------------- */
.charts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.chart { margin: 0; min-width: 0; }
.chart figcaption { font-size: 12.5px; color: var(--text-2); font-weight: 500; margin-bottom: 6px; }
.chart-box { position: relative; height: 150px; }
.chart-box svg { display: block; width: 100%; height: 100%; overflow: visible; }
.chart-box .grid-line { stroke: var(--grid); stroke-width: 1; }
.chart-box .base-line { stroke: var(--axis); stroke-width: 1; }
.chart-box .tick { fill: var(--muted); font-size: 10.5px; font-variant-numeric: tabular-nums; }
.chart-box .line { fill: none; stroke: var(--series-1); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart-box .area { fill: var(--series-1); opacity: .10; }
.chart-box .bar { fill: var(--series-1); }
.chart-box .cross { stroke: var(--axis); stroke-width: 1; }
.chart-box .dot { fill: var(--series-1); stroke: var(--surface); stroke-width: 2; }
.chart-box .empty { fill: var(--muted); font-size: 12px; }
.chart-tip {
  position: absolute; pointer-events: none; transform: translate(-50%, -110%);
  background: var(--text); color: var(--surface); padding: 4px 8px; border-radius: 6px;
  font-size: 12px; white-space: nowrap; z-index: 2;
}

/* ---------------- Forms ---------------- */
input[type=text], input[type=search], input[type=number], input[type=time], input[type=password], select {
  height: 34px; padding: 0 10px; border: 1px solid var(--border-strong); border-radius: 8px;
  background: var(--surface); color: var(--text); font: inherit; min-width: 0;
}
.inline-form { display: flex; gap: 8px; }
.inline-form input { flex: 1; }
.check { display: flex; align-items: center; gap: 8px; cursor: pointer; padding: 4px 0; }
.check input { width: 16px; height: 16px; accent-color: var(--accent); flex: none; }
.form fieldset { border: 0; border-top: 1px solid var(--border); margin: 0; padding: 14px 0; }
.form legend { font-weight: 600; padding: 0; margin-bottom: 6px; }
.field { display: flex; flex-direction: column; gap: 4px; margin: 8px 0; max-width: 420px; }
.field span { font-size: 12.5px; color: var(--text-2); }

/* ---------------- Tabellen ---------------- */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 12px; font-weight: 500; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.table td { padding: 10px; border-bottom: 1px solid var(--border); vertical-align: middle; font-variant-numeric: tabular-nums; }
.table tr:last-child td { border-bottom: 0; }
.table th.right, .table td.right { text-align: right; }
.table td.right { white-space: nowrap; }
.table .empty-row td { color: var(--muted); text-align: center; padding: 24px; }
.mono { font-family: var(--mono); font-size: 12.5px; }
.badge { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 12px; background: var(--surface-2); border: 1px solid var(--border); white-space: nowrap; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { padding: 3px 10px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--border); font-size: 13px; }
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.list li:last-child { border-bottom: 0; }

/* ---------------- Banner ---------------- */
.banner {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 12px 16px; margin-bottom: 16px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--warning); box-shadow: var(--shadow);
}
.banner.info { border-left-color: var(--accent); }
.banner.error { border-left-color: var(--critical); }
.banner-text { flex: 1; min-width: 200px; }
.banner-text b { display: block; }
.banner-text span { color: var(--text-2); font-size: 13px; }
.countdown { font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; }

/* ---------------- Einstellungen ---------------- */
.settings-toolbar { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; position: sticky; top: 0; z-index: 3; }
.settings-toolbar input[type=search] { flex: 1; min-width: 200px; }
details.group { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 12px; box-shadow: var(--shadow); }
details.group > summary { padding: 14px 20px; cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; }
details.group > summary::-webkit-details-marker { display: none; }
details.group > summary::after { content: "▾"; color: var(--muted); }
details.group:not([open]) > summary::after { content: "▸"; }
.set-row { display: grid; grid-template-columns: minmax(0, 1fr) 260px 32px; gap: 16px; align-items: center; padding: 12px 20px; border-top: 1px solid var(--border); }
.set-row.changed { background: color-mix(in srgb, var(--accent) 7%, transparent); }
.set-label { font-weight: 500; }
.set-key { font-family: var(--mono); font-size: 11.5px; color: var(--muted); }
.set-help { font-size: 13px; color: var(--text-2); margin-top: 3px; max-width: 70ch; line-height: 1.45; }
.set-default { font-size: 12px; color: var(--muted); margin-top: 3px; }
.set-pending { font-size: 12px; color: var(--accent); }
.set-input input:not([type=checkbox]), .set-input select { width: 100%; }
.set-input .toggle { display: flex; align-items: center; gap: 8px; }
.savebar {
  position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 10;
  display: flex; align-items: center; gap: 10px; padding: 10px 12px 10px 18px;
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: 12px; box-shadow: 0 8px 30px rgba(0,0,0,.18);
  max-width: calc(100% - 32px);
}

/* ---------------- Logs ---------------- */
.subtabs { display: flex; gap: 6px; margin-bottom: 12px; flex-wrap: wrap; }
.subtabs button { height: 30px; padding: 0 12px; border-radius: 15px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text-2); font: inherit; cursor: pointer; }
.subtabs button.active { background: var(--text); color: var(--surface); border-color: var(--text); }
.activity { list-style: none; margin: 0; padding: 0; }
.activity li { display: grid; grid-template-columns: 150px 170px 1fr; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.activity li:last-child { border-bottom: 0; }
.activity time { color: var(--muted); font-variant-numeric: tabular-nums; }
.activity .who { color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.activity .what b { font-weight: 600; }
.activity .what span { color: var(--text-2); word-break: break-word; }
.activity li.warn .what b::before { content: "⚠ "; color: var(--serious); }
.activity li.error .what b::before { content: "✖ "; color: var(--critical); }
.console {
  margin: 0; max-height: 65vh; overflow: auto; padding: 12px; border-radius: 8px;
  background: var(--surface-2); font: 12px/1.55 var(--mono); white-space: pre-wrap; word-break: break-all;
}

.mt-16 { margin-top: 16px; }
.danger-zone { border-color: color-mix(in srgb, var(--critical) 40%, var(--border)); }
.wipe-list { margin: 8px 0 0; padding-left: 18px; color: var(--text-2); }
.wipe-list li { margin: 4px 0; }
.btn-danger-solid { background: var(--critical); border-color: var(--critical); color: #fff; }
.btn-danger-solid:hover:not(:disabled) { background: color-mix(in srgb, var(--critical) 85%, #000); }
.dlg-input { width: 100%; margin-top: 10px; }

/* ---------------- Spieler-Statistik ---------------- */
.table-click tbody tr { cursor: pointer; }
.table-click td { white-space: nowrap; }
.table-click tbody tr:hover td { background: var(--surface-2); }
.table-click tbody tr.selected td { background: color-mix(in srgb, var(--accent) 9%, transparent); }
.table th[data-sort] { cursor: pointer; user-select: none; }
.table th[data-sort]:hover { color: var(--text); }
.table th.sorted { color: var(--text); }
.table th.sorted::after { content: " ▾"; }
.table th.sorted.asc::after { content: " ▴"; }
.online-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--good); margin-right: 6px; vertical-align: middle; }
.st-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 4px 0 18px; }
.st-tiles .tile { box-shadow: none; background: var(--surface-2); border-color: transparent; }
.st-charts { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 18px; }
.st-sub { display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.activity li.st-event { grid-template-columns: 150px 1fr; }
@media (max-width: 860px) { .st-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } .st-charts { grid-template-columns: 1fr; } }

/* ---------------- Mods ---------------- */
.mod-title { font-weight: 500; }
.mod-sub { font-size: 12px; color: var(--muted); }
.mod-sub a { color: var(--muted); }
.badge.good { border-color: color-mix(in srgb, var(--good) 45%, transparent); background: color-mix(in srgb, var(--good) 12%, transparent); }
.badge.warn { border-color: color-mix(in srgb, var(--warning) 55%, transparent); background: color-mix(in srgb, var(--warning) 14%, transparent); }
.badge.bad { border-color: color-mix(in srgb, var(--critical) 45%, transparent); background: color-mix(in srgb, var(--critical) 10%, transparent); }
.badges { display: flex; flex-wrap: wrap; gap: 4px; }
.notice.ok { border-left-color: var(--good); }

/* ---------------- Dialog & Toasts ---------------- */
dialog {
  border: 1px solid var(--border-strong); border-radius: 14px; padding: 0; width: min(460px, calc(100% - 32px));
  background: var(--surface); color: var(--text); box-shadow: 0 20px 60px rgba(0,0,0,.3);
}
dialog::backdrop { background: rgba(0, 0, 0, .45); }
.dialog-body { padding: 22px; display: flex; flex-direction: column; gap: 12px; }
.dialog-body h3 { font-size: 17px; }
#dlg-text { color: var(--text-2); }
#dlg-text ul { margin: 6px 0; padding-left: 18px; max-height: 200px; overflow: auto; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
#toasts { position: fixed; right: 16px; bottom: 16px; display: flex; flex-direction: column; gap: 8px; z-index: 100; max-width: calc(100% - 32px); }
.toast {
  padding: 10px 14px; border-radius: 10px; background: var(--text); color: var(--surface);
  box-shadow: 0 8px 24px rgba(0,0,0,.2); font-size: 13.5px; max-width: 380px; animation: slidein .18s ease-out;
}
.toast.error { background: var(--critical); color: #fff; }
@keyframes slidein { from { transform: translateY(8px); opacity: 0; } }

/* ---------------- Responsive ---------------- */
@media (max-width: 1080px) {
  .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .grid-main, .grid-2 { grid-template-columns: 1fr; }
  .charts { grid-template-columns: 1fr; }
  .kv { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .set-row { grid-template-columns: 1fr 32px; }
  .set-row .set-input { grid-column: 1; grid-row: 2; }
  .activity li { grid-template-columns: 1fr; gap: 0; }
}
@media (max-width: 560px) {
  #app { padding: 0 16px 90px; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .user #user-name { display: none; }
  .card { padding: 16px; }
  .secret-row { flex-wrap: wrap; }
  .secret-row code { flex-basis: calc(100% - 82px); }
}

/* ---------------- Minecraft-Ergaenzungen ---------------- */
.mt-12 { margin-top: 12px; }
.field-note { max-width: 70ch; margin: 2px 0 6px; }
.summary-note { font-weight: 400; font-size: 12.5px; color: var(--muted); margin-left: 8px; margin-right: auto; }
details.group > summary { gap: 8px; }
.head { width: 22px; height: 22px; border-radius: 4px; vertical-align: middle; margin-right: 8px; image-rendering: pixelated; background: var(--surface-2); flex: none; }
.name-cell { display: flex; align-items: center; }
.chip { display: inline-flex; align-items: center; gap: 6px; }
.chip .head { width: 18px; height: 18px; margin: 0; border-radius: 3px; }
.list li .who-cell { display: flex; align-items: center; min-width: 0; gap: 0; }
.list li .who-cell span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list li .row-actions { display: flex; gap: 6px; flex: none; }

.chat { list-style: none; margin: 0; padding: 0; max-height: 260px; overflow-y: auto; font-size: 13px; }
.chat-full { max-height: 70vh; }
.chat li { display: grid; grid-template-columns: 46px 1fr; gap: 10px; padding: 4px 0; }
.chat time { color: var(--muted); font-variant-numeric: tabular-nums; font-size: 12px; padding-top: 1px; }
.chat-full li { grid-template-columns: 96px 1fr; }
.chat .msg { word-break: break-word; }
.chat .msg b { font-weight: 600; }
.chat .sys { color: var(--text-2); }
.chat .sys b { font-weight: 500; }
.chat .say { color: var(--good-text); }
.chat .death { color: var(--critical-text); }
.chat .adv { color: var(--accent); }
.chat .empty { color: var(--muted); display: block; }

.notice.denied { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 12px 0 0; }
.notice.denied span { flex: 1; min-width: 160px; }

.pg-results { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; margin-top: 12px; }
.pg-results:empty { display: none; }
.pg-hit { display: grid; grid-template-columns: 40px 1fr auto; gap: 10px; align-items: center; padding: 10px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); min-width: 0; }
.pg-hit img, .pg-icon { width: 40px; height: 40px; border-radius: 8px; background: var(--surface); object-fit: cover; }
.pg-icon { width: 28px; height: 28px; border-radius: 6px; flex: none; }
.pg-hit .t { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pg-hit .d { font-size: 12px; color: var(--text-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pg-hit .n { font-size: 11.5px; color: var(--muted); }
.plugin-cell { display: flex; align-items: center; gap: 10px; min-width: 0; }

.console-out { margin-top: 10px; max-height: 30vh; }
.st-lists { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-bottom: 18px; }
.st-lists h3 { font-size: 12.5px; color: var(--muted); font-weight: 500; margin-bottom: 6px; }
.st-lists ol { margin: 0; padding: 0; list-style: none; font-size: 13px; }
.st-lists li { display: flex; justify-content: space-between; gap: 10px; padding: 3px 0; border-bottom: 1px solid var(--border); }
.st-lists li:last-child { border-bottom: 0; }
.st-lists li span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-lists li span:last-child { color: var(--text-2); font-variant-numeric: tabular-nums; }
@media (max-width: 860px) { .st-lists { grid-template-columns: 1fr; } .chat-full li { grid-template-columns: 70px 1fr; } }
.gr-sub { padding: 14px 20px 4px; border-top: 1px solid var(--border); font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.gr-note { padding: 0 20px 16px; margin: 0; }
.name-cell .badge { margin-left: 8px; }
.chat li:has(.empty) { grid-template-columns: 1fr; }

/* ---------------- Plugin-Browser (wie modrinth.com) ---------------- */
.mt-0 { margin-top: 0; }
.subtabs button .count:not(:empty) { background: color-mix(in srgb, currentColor 18%, transparent); }
.pg-toolbar { display: flex; flex-direction: column; gap: 12px; }
.pg-search { position: relative; }
.pg-search input { width: 100%; height: 42px; padding-left: 38px; font-size: 15px; border-radius: 10px; }
.pg-search-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.pg-filters { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; }
.pg-filter { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text-2); }
.pg-compat { margin-left: auto; font-size: 13px; }
.pg-summary-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 2px 10px; flex-wrap: wrap; min-height: 28px; }
.pager { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.pager-bottom { justify-content: center; margin: 14px 0 10px; }
.pager-gap { padding: 0 4px; color: var(--muted); }
.pager-info { padding: 0 8px; }
.pager .btn { min-width: 30px; padding: 0 9px; }
.pg-list { display: flex; flex-direction: column; gap: 10px; transition: opacity .15s; }
.pg-list.loading { opacity: .55; }
.pg-empty { padding: 32px; text-align: center; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.pg-item {
  display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 6px 16px; padding: 16px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow);
}
.pg-item.open { border-color: var(--border-strong); }
.pg-item-icon { width: 64px; height: 64px; border-radius: 14px; object-fit: cover; background: var(--surface-2); }
.pg-item-main { min-width: 0; }
.pg-item-head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.pg-title { all: unset; cursor: pointer; font-size: 17px; font-weight: 700; color: var(--text); }
.pg-title:hover { text-decoration: underline; }
.pg-title:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.pg-author { font-size: 13px; color: var(--muted); }
.pg-desc { margin: 4px 0 10px; color: var(--text-2); line-height: 1.45; }
.pg-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.pg-tag { font-size: 12px; padding: 1px 9px; border-radius: 10px; background: var(--surface-2); color: var(--text-2); border: 1px solid var(--border); white-space: nowrap; }
.pg-tag.warn { border-color: color-mix(in srgb, var(--warning) 55%, transparent); background: color-mix(in srgb, var(--warning) 14%, transparent); color: var(--text); }
.pg-tag.bad { border-color: color-mix(in srgb, var(--critical) 45%, transparent); background: color-mix(in srgb, var(--critical) 10%, transparent); color: var(--text); }
.pg-item-side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; min-width: 170px; }
.pg-stat { display: flex; align-items: center; gap: 5px; font-size: 13px; white-space: nowrap; color: var(--text-2); }
.pg-stat b { color: var(--text); font-weight: 600; }
.pg-stat svg { color: var(--muted); flex: none; }
.pg-item-actions { display: flex; gap: 6px; margin-top: auto; padding-top: 8px; }
.pg-detail { grid-column: 1 / -1; border-top: 1px solid var(--border); margin-top: 10px; padding-top: 14px; min-width: 0; }
.pg-facts { display: flex; flex-wrap: wrap; gap: 6px 22px; font-size: 13px; margin-bottom: 8px; }
.pg-links { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; margin-bottom: 14px; }
.pg-link { display: inline-flex; align-items: center; gap: 4px; }
.pg-gallery { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 14px; }
.pg-gallery img { height: 120px; width: auto; max-width: none; border-radius: 8px; border: 1px solid var(--border); display: block; }
.warn-text { color: var(--serious); }
.bad-text { color: var(--critical-text); }

/* Beschreibung (Markdown) */
.md { line-height: 1.6; max-width: 920px; overflow-wrap: anywhere; color: var(--text); }
.md p { margin: 0 0 12px; }
.md .md-h { margin: 20px 0 8px; line-height: 1.3; }
.md h3 { font-size: 20px; } .md h4 { font-size: 17px; } .md h5 { font-size: 15px; } .md h6 { font-size: 14px; }
.md > :first-child { margin-top: 0; }
.md img.md-img { max-width: 100%; height: auto; vertical-align: middle; border-radius: 4px; }
.md ul, .md ol { margin: 0 0 12px; padding-left: 24px; }
.md li { margin: 3px 0; }
.md li > p { margin: 0 0 4px; }
.md blockquote { margin: 0 0 12px; padding: 4px 14px; border-left: 3px solid var(--border-strong); color: var(--text-2); }
.md pre.md-code { background: var(--surface-2); padding: 12px; border-radius: 8px; overflow-x: auto; margin: 0 0 12px; font: 12.5px/1.5 var(--mono); }
.md pre code { background: none; padding: 0; }
.md hr { border: 0; border-top: 1px solid var(--border); margin: 18px 0; }
.md .md-table { overflow-x: auto; margin: 0 0 12px; }
.md table { border-collapse: collapse; font-size: 13px; }
.md th, .md td { border: 1px solid var(--border); padding: 6px 10px; text-align: left; vertical-align: top; }
.md th { background: var(--surface-2); }
@media (max-width: 760px) {
  .pg-item { grid-template-columns: 48px minmax(0, 1fr); padding: 14px; }
  .pg-item-icon { width: 48px; height: 48px; border-radius: 10px; }
  .pg-item-side { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; align-items: center; min-width: 0; gap: 4px 14px; }
  .pg-item-actions { margin-left: auto; padding-top: 0; }
  .pg-compat { margin-left: 0; }
  .pg-stat span { display: none; }
}

/* ---------------- Konfigurations-Editor ---------------- */
:root { --syn-key: #0b5cad; --syn-str: #1a7f37; --syn-num: #a35200; --syn-bool: #8250df; --syn-anchor: #b35900; }
@media (prefers-color-scheme: dark) { :root { --syn-key: #7cb7ff; --syn-str: #8fd18f; --syn-num: #f0b072; --syn-bool: #c9a6ff; --syn-anchor: #f0b072; } }
.cfg-layout { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 16px; align-items: start; }
.cfg-side { position: sticky; top: 12px; max-height: calc(100vh - 24px); overflow: auto; padding: 12px; margin-bottom: 0; }
.cfg-side input[type=search] { width: 100%; margin-bottom: 10px; }
.cfg-main { margin-bottom: 0; min-width: 0; }
.cfg-group { border-radius: 8px; }
.cfg-group > summary { display: flex; align-items: center; gap: 8px; padding: 6px 6px; border-radius: 8px; cursor: pointer; list-style: none; font-weight: 600; font-size: 13.5px; }
.cfg-group > summary::-webkit-details-marker { display: none; }
.cfg-group > summary:hover { background: var(--surface-2); }
.cfg-group > summary::after { content: "▸"; color: var(--muted); margin-left: 2px; font-weight: 400; }
.cfg-group[open] > summary::after { content: "▾"; }
.cfg-icon { width: 22px; height: 22px; border-radius: 5px; flex: none; object-fit: cover; }
.cfg-icon-ph { display: inline-grid; place-items: center; background: var(--surface-2); color: var(--text-2); font-size: 12px; border: 1px solid var(--border); }
.cfg-glabel { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cfg-count { font-size: 11.5px; color: var(--muted); font-weight: 500; }
.cfg-files { list-style: none; margin: 2px 0 8px; padding: 0 0 0 30px; }
.cfg-file { all: unset; box-sizing: border-box; display: flex; width: 100%; padding: 4px 8px; border-radius: 6px; cursor: pointer; font-size: 13px; color: var(--text-2); overflow: hidden; white-space: nowrap; }
.cfg-file:hover { background: var(--surface-2); color: var(--text); }
.cfg-file:focus-visible { outline: 2px solid var(--accent); }
.cfg-file.active { background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--text); font-weight: 600; }
.cfg-dir { color: var(--muted); font-weight: 400; }
.cfg-fname { overflow: hidden; text-overflow: ellipsis; }
.cfg-empty { padding: 40px 20px; text-align: center; }
.cfg-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.cfg-title { min-width: 0; }
.cfg-title b { font-size: 15px; }
.cfg-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.cfg-history { border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; margin-bottom: 12px; background: var(--surface-2); }
.cfg-history-head { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; margin-bottom: 6px; }
.cfg-version { display: flex; align-items: center; gap: 12px; padding: 5px 0; border-top: 1px solid var(--border); }
.cfg-version span:first-child { flex: 1; }
.cfg-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 8px; min-height: 28px; }
.valid { font-size: 13px; display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.valid.ok { color: var(--good-text); }
.valid.bad { color: var(--critical-text); font-weight: 500; }
.cfg-hint { margin: 4px 0 0; }
kbd { font: 11.5px var(--mono); padding: 0 5px; border: 1px solid var(--border-strong); border-bottom-width: 2px; border-radius: 4px; background: var(--surface); }

.editor {
  display: grid; grid-template-columns: auto minmax(0, 1fr); height: min(70vh, 780px); min-height: 320px;
  border: 1px solid var(--border-strong); border-radius: 8px; background: var(--surface-2); overflow: hidden;
  font: 13px/20px var(--mono);
}
.editor:focus-within { border-color: var(--accent); }
.ed-gutter { overflow: hidden; border-right: 1px solid var(--border); background: color-mix(in srgb, var(--surface-2) 60%, var(--bg)); }
.ed-gutter pre { margin: 0; padding: 10px 10px 10px 14px; text-align: right; color: var(--muted); font: inherit; min-width: 3ch; user-select: none; will-change: transform; }
.ed-body { position: relative; overflow: hidden; }
.ed-hl, .ed-body textarea {
  position: absolute; inset: 0; margin: 0; padding: 10px 14px; box-sizing: border-box; width: 100%; height: 100%;
  font: inherit; letter-spacing: 0; white-space: pre; tab-size: 4; border: 0; overflow-wrap: normal;
}
.ed-hl { overflow: hidden; pointer-events: none; color: var(--text); }
.ed-body textarea { resize: none; background: transparent; color: transparent; caret-color: var(--text); outline: none; overflow: auto; z-index: 1; }
.ed-body textarea::selection { background: color-mix(in srgb, var(--accent) 35%, transparent); color: transparent; }
.ed-body textarea[readonly] { cursor: default; }
.ed-errline { position: absolute; left: 0; right: 0; height: 20px; background: color-mix(in srgb, var(--critical) 16%, transparent); border-left: 3px solid var(--critical); pointer-events: none; }
.t-k { color: var(--syn-key); }
.t-s { color: var(--syn-str); }
.t-n { color: var(--syn-num); }
.t-b { color: var(--syn-bool); }
.t-a { color: var(--syn-anchor); }
.t-c { color: var(--muted); font-style: italic; }
.t-p { color: var(--text-2); }
@media (max-width: 860px) {
  .cfg-layout { grid-template-columns: 1fr; }
  .cfg-side { position: static; max-height: 280px; }
  .editor { height: 60vh; }
}

/* ---------------- Live-Karte ---------------- */
.map-card { padding-bottom: 12px; }
.map-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.map-wrap { height: calc(100vh - 250px); min-height: 460px; border-radius: 10px; overflow: hidden; border: 1px solid var(--border); background: #0b0b0b; }
.map-wrap iframe { display: block; width: 100%; height: 100%; border: 0; }
.map-wrap:fullscreen { height: 100vh; border-radius: 0; border: 0; }
.map-help { margin: 10px 2px 0; }
@media (max-width: 860px) { .map-wrap { height: 68vh; min-height: 360px; } }

/* ---------------- Welt vorgenerieren ---------------- */
.pre-extent { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.pre-extent:empty { display: none; }
.pre-ext { display: flex; flex-direction: column; padding: 10px 14px; border-radius: 10px; background: var(--surface-2); min-width: 160px; }
.pre-ext b { font-size: 17px; font-variant-numeric: tabular-nums; }
.pre-task { margin-bottom: 12px; }
.pre-task-head { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 4px; font-variant-numeric: tabular-nums; }
.progress { height: 8px; background: var(--surface-2); border-radius: 4px; overflow: hidden; border: 1px solid var(--border); margin-bottom: 4px; }
.progress span { display: block; height: 100%; background: var(--accent); transition: width .6s ease; }
.pre-actions { margin: 4px 0 14px; }
.pre-form { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; border-top: 1px solid var(--border); padding-top: 14px; }
.pre-form .field { margin: 0; min-width: 170px; }
#pre-hint { margin: 10px 0 0; }
