/* VecTra Beacon · gestaltet nach dem MineSyn IT Brand Book (Figtree, Petrol #11717B / #1DA0AD) */
@font-face { font-family: Figtree; src: url(fonts/Figtree-Regular.ttf) format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: Figtree; src: url(fonts/Figtree-Medium.ttf) format("truetype"); font-weight: 500; font-display: swap; }
@font-face { font-family: Figtree; src: url(fonts/Figtree-SemiBold.ttf) format("truetype"); font-weight: 600; font-display: swap; }
@font-face { font-family: Figtree; src: url(fonts/Figtree-Bold.ttf) format("truetype"); font-weight: 700; font-display: swap; }
@font-face { font-family: Figtree; src: url(fonts/Figtree-ExtraBold.ttf) format("truetype"); font-weight: 800; font-display: swap; }

:root {
  --petrol: #11717B; --petrol-hell: #1DA0AD; --petrol-dunkel: #0A4A52; --tiefe: #0E2326; --tinte: #060606; --papier: #DCEEF0;
  --spring: cubic-bezier(.16, 1, .3, 1); --ease: cubic-bezier(.65, 0, .35, 1);
  --r: 14px; --r-sm: 9px;
}
/* Dark Mode: schlichtes Grau, Petrol nur als Akzent */
:root, [data-theme="dark"] {
  --bg: #151719; --bg-2: #1b1e21; --surface: #1f2326; --surface-2: #262b2f; --surface-3: #2e3439;
  --line: #31383d; --line-2: #3d454b;
  --text: #DCEEF0; --text-2: #aab8bb; --muted: #7f8d91;
  --accent: var(--petrol-hell); --accent-fill: var(--petrol); --accent-soft: rgba(29, 160, 173, .14);
  --good: #3dbe74; --warn: #e7c14a; --bad: #e5534b; --status: #f08c3a;
  --good-soft: rgba(61, 190, 116, .13); --warn-soft: rgba(231, 193, 74, .13); --bad-soft: rgba(229, 83, 75, .13); --status-soft: rgba(240, 140, 58, .13);
  --shadow: 0 1px 2px rgba(0,0,0,.25), 0 8px 28px rgba(0,0,0,.22);
  --glass: rgba(31, 35, 38, .72);
  color-scheme: dark;
}
[data-theme="light"] {
  --bg: #ffffff; --bg-2: #f6f8f8; --surface: #ffffff; --surface-2: #f3f6f6; --surface-3: #e9eeee;
  --line: #D8E3E4; --line-2: #c5d3d4;
  --text: #060606; --text-2: #33484A; --muted: #5A6E70;
  --accent: var(--petrol); --accent-fill: var(--petrol); --accent-soft: rgba(17, 113, 123, .09);
  --good: #1f9254; --warn: #a77d00; --bad: #c8322a; --status: #c25f12;
  --good-soft: rgba(31, 146, 84, .1); --warn-soft: rgba(196, 150, 0, .12); --bad-soft: rgba(200, 50, 42, .09); --status-soft: rgba(194, 95, 18, .1);
  --shadow: 0 1px 2px rgba(10,40,45,.06), 0 10px 30px rgba(10,40,45,.08);
  --glass: rgba(255, 255, 255, .74);
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--text); font: 14.5px/1.55 Figtree, system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased; font-variant-numeric: tabular-nums; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent); }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.mono { font-family: ui-monospace, "Cascadia Mono", "SF Mono", Consolas, monospace; font-size: 13px; }
b, strong { font-weight: 700; }
::selection { background: var(--accent-soft); }

/* ---------- Splash (animierte Bildmarke) ---------- */
#splash { position: fixed; inset: 0; display: grid; place-items: center; background: var(--bg); z-index: 100; transition: opacity .5s var(--ease), visibility .5s; }
#splash img { width: 132px; }
#splash.gone { opacity: 0; visibility: hidden; }

/* ---------- Login ---------- */
#login { position: fixed; inset: 0; display: grid; place-items: center; overflow: hidden; background: var(--bg); }
#login .wm { position: absolute; right: -150px; top: -120px; width: 620px; opacity: .17; pointer-events: none; }
[data-theme="light"] #login .wm { opacity: .07; }
.login-card { position: relative; width: min(420px, 92vw); display: grid; gap: 16px; padding: 34px 32px 28px; border-radius: 22px;
  background: var(--glass); backdrop-filter: blur(22px) saturate(160%); -webkit-backdrop-filter: blur(22px) saturate(160%);
  border: 1px solid var(--line); box-shadow: var(--shadow); }
.login-mark { width: 92px; margin: 0 auto 2px; display: block; }
.login-title { text-align: center; }
.login-title h1 { margin: 0; font-size: 30px; font-weight: 800; letter-spacing: -.022em; line-height: 1.05; }
.login-title p { margin: 6px 0 0; color: var(--muted); font-weight: 500; }
.login-stage > * { opacity: 0; transform: translateY(10px); animation: rise .7s var(--spring) forwards; }
.login-stage > *:nth-child(1) { animation-delay: .9s; } .login-stage > *:nth-child(2) { animation-delay: 1s; }
.login-stage > *:nth-child(3) { animation-delay: 1.08s; } .login-stage > *:nth-child(4) { animation-delay: 1.16s; }
.login-stage > *:nth-child(5) { animation-delay: 1.24s; } .login-stage > *:nth-child(6) { animation-delay: 1.32s; }
.login-foot { text-align: center; font-size: 12.5px; color: var(--muted); }
/* Eingabefelder haben eine eigene Mindestbreite (size=20); mit großer Schrift (2FA-Code) ragten sie sonst aus der Karte (0.4.1) */
.login-stage > *, .login-stage form > * { min-width: 0; }
#login input { width: 100%; min-width: 0; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 12.5px; font-weight: 500; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.mc-code { font-size: 34px; font-weight: 800; letter-spacing: .14em; text-align: center; padding: 10px; border-radius: 12px;
  background: var(--accent-soft); color: var(--accent); }

/* ---------- Layout ---------- */
#app { display: grid; grid-template-columns: 252px 1fr; min-height: 100vh; }
aside { position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; background: var(--bg-2); border-right: 1px solid var(--line); padding: 22px 14px 14px; }
.brand { padding: 4px 10px 20px; }
.brand img { width: 150px; display: block; }
.brand .product { margin-top: 16px; display: grid; gap: 1px; }
.brand .product b { font-size: 22px; font-weight: 800; letter-spacing: -.022em; line-height: 1.1; }
.brand .product span { font-size: 12.5px; color: var(--muted); font-weight: 500; }
.trace { display: flex; align-items: center; margin-top: 10px; }
.trace i { width: 9px; height: 9px; border-radius: 50%; border: 3px solid var(--accent); flex: none; }
.trace span { height: 3px; background: var(--accent); flex: 1; transform-origin: left; animation: draw .9s var(--ease) .15s backwards; }
nav { position: relative; display: grid; gap: 2px; margin-top: 6px; }
nav .pill { position: absolute; left: 0; right: 0; height: 40px; border-radius: 10px; background: var(--surface-2); transition: transform .45s var(--spring), opacity .2s; z-index: 0; }
nav button { position: relative; z-index: 1; display: flex; align-items: center; gap: 12px; height: 40px; padding: 0 12px; border: 0; background: none;
  color: var(--text-2); border-radius: 10px; cursor: pointer; font-weight: 500; text-align: left; transition: color .2s; }
nav button svg { width: 19px; height: 19px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
nav button:hover { color: var(--text); }
nav button.active { color: var(--text); font-weight: 600; }
nav button.active svg { stroke: var(--accent); }
nav .sep { height: 1px; background: var(--line); margin: 10px 10px; }
.side-foot { margin-top: auto; display: grid; gap: 10px; padding: 12px 6px 0; border-top: 1px solid var(--line); }
.me { display: flex; align-items: center; gap: 10px; padding: 4px; border-radius: 10px; cursor: pointer; border: 0; background: none; text-align: left; width: 100%; }
.me:hover { background: var(--surface-2); }
.avatar { width: 34px; height: 34px; border-radius: 9px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-weight: 800; flex: none; overflow: hidden; }
.avatar img { width: 100%; height: 100%; image-rendering: pixelated; }
.me .who { line-height: 1.25; min-width: 0; }
.me .who b { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me .who span { font-size: 12px; color: var(--muted); }
.side-actions { display: flex; gap: 6px; }
.side-actions .btn { flex: 1; }
.vendor { font-size: 11.5px; color: var(--muted); padding: 2px 6px; display: grid; gap: 0; line-height: 1.45; }
.vendor > span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

main { min-width: 0; padding: 28px 34px 60px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head h1 { margin: 0; font-size: 28px; font-weight: 800; letter-spacing: -.022em; line-height: 1.05; }
.page-head .trace { width: 120px; }
.page-head .lede { color: var(--text-2); margin-top: 8px; max-width: 70ch; }
.head-right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* ---------- Seiteneintritt (Apple-artig: Feder, gestaffelt) ---------- */
.page { animation: pageIn .55s var(--spring); }
.stagger > * { animation: rise .6s var(--spring) backwards; }
.stagger > *:nth-child(2) { animation-delay: .04s; } .stagger > *:nth-child(3) { animation-delay: .08s; }
.stagger > *:nth-child(4) { animation-delay: .12s; } .stagger > *:nth-child(5) { animation-delay: .16s; }
.stagger > *:nth-child(6) { animation-delay: .2s; } .stagger > *:nth-child(n+7) { animation-delay: .24s; }
@keyframes pageIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes draw { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { from { opacity: 0; transform: scale(.94); } to { opacity: 1; transform: none; } }
@keyframes breathe { 0% { transform: scale(1); opacity: .45; } 70%, 100% { transform: scale(2.1); opacity: 0; } }
@keyframes shimmer { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Bausteine ---------- */
.grid { display: grid; gap: 16px; }
.cols-4 { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.cols-2 { grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px 20px;
  transition: transform .35s var(--spring), box-shadow .35s var(--spring), border-color .2s; }
.card.lift:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.card h2 { margin: 0 0 4px; font-size: 16px; font-weight: 800; letter-spacing: -.01em; }
.card h3 { margin: 0 0 6px; font-size: 13px; font-weight: 500; color: var(--muted); }
.card .big { font-size: 32px; font-weight: 800; letter-spacing: -.025em; line-height: 1.15; }
.card .big small { font-size: 15px; font-weight: 600; color: var(--muted); margin-left: 3px; }
.card .sub { color: var(--muted); font-size: 13px; margin-top: 4px; }
.section { margin-top: 28px; }
.section-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.section-title h2 { margin: 0; font-size: 17px; font-weight: 800; letter-spacing: -.01em; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.spacer { flex: 1; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; font-size: 13.5px; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 36px; padding: 0 15px; border-radius: 10px;
  background: var(--surface-2); border: 1px solid var(--line); cursor: pointer; font-weight: 600; white-space: nowrap; text-decoration: none; color: var(--text);
  transition: background .2s, border-color .2s, transform .2s var(--spring), opacity .2s; }
.btn:hover:not(:disabled) { background: var(--surface-3); border-color: var(--line-2); }
.btn:active:not(:disabled) { transform: scale(.97); }
.btn:disabled { opacity: .4; cursor: default; }
.btn.primary { background: var(--accent-fill); border-color: transparent; color: #fff; }
.btn.primary:hover:not(:disabled) { filter: brightness(1.15); }
.btn.good { color: var(--good); } .btn.warn { color: var(--status); } .btn.danger { color: var(--bad); }
.btn.danger:hover:not(:disabled) { background: var(--bad-soft); border-color: var(--bad); }
.btn.sm { height: 29px; padding: 0 10px; font-size: 13px; border-radius: 8px; }
.btn.ghost { background: none; border-color: transparent; }
.btn.ghost:hover:not(:disabled) { background: var(--surface-2); }
.btn svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.btn .spinner { width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }

input[type=text], input[type=password], input[type=number], input[type=search], input[type=time], input[type=date], select, textarea {
  background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; outline: none; min-height: 38px;
  transition: border-color .2s, box-shadow .2s; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
label.field { display: grid; gap: 6px; font-size: 13px; color: var(--text-2); font-weight: 500; }
label.field input, label.field select, label.field textarea { color: var(--text); font-weight: 400; width: 100%; min-width: 0; }
.grid > * { min-width: 0; }
.field .help { font-size: 12px; color: var(--muted); font-weight: 400; }

/* Schalter (iOS-artig) */
.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch .track { width: 42px; height: 25px; border-radius: 99px; background: var(--surface-3); border: 1px solid var(--line-2); position: relative; transition: background .3s var(--ease), border-color .3s; flex: none; }
.switch .track::after { content: ""; position: absolute; top: 2px; left: 2px; width: 19px; height: 19px; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: transform .35s var(--spring); }
.switch input:checked + .track { background: var(--accent-fill); border-color: transparent; }
.switch input:checked + .track::after { transform: translateX(17px); }
.switch input:disabled + .track { opacity: .5; }
.switch input:focus-visible + .track { box-shadow: 0 0 0 3px var(--accent-soft); }

/* Status */
.state { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px 5px 10px; border-radius: 99px; font-weight: 600; font-size: 13px; background: var(--surface-2); border: 1px solid var(--line); }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--muted); flex: none; }
.dot.good { background: var(--good); color: var(--good); }
.dot.warn { background: var(--warn); } .dot.bad { background: var(--bad); } .dot.status { background: var(--status); color: var(--status); }
/* Atmen: ein Ring, der nur skaliert und verblasst – früher eine box-shadow-Animation, die jedes Bild neu malen ließ (0.4.1) */
.dot.good, .dot.status { position: relative; }
.dot.good::after, .dot.status::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: currentColor; opacity: .45; animation: breathe 2.4s ease-out infinite; pointer-events: none; }
.dot.status::after { animation-duration: 1.2s; }
.badge { display: inline-flex; align-items: center; font-size: 11.5px; padding: 1px 8px; border-radius: 99px; font-weight: 700; border: 1px solid; line-height: 1.6; }
.badge.accent { color: var(--accent); border-color: currentColor; } .badge.good { color: var(--good); border-color: currentColor; }
.badge.bad { color: var(--bad); border-color: currentColor; } .badge.warn { color: var(--status); border-color: currentColor; } .badge.muted { color: var(--muted); border-color: var(--line-2); }
.banner { padding: 12px 16px; border-radius: 12px; margin-bottom: 14px; border: 1px solid; display: flex; gap: 12px; align-items: center; animation: rise .5s var(--spring); }
.banner.status { background: var(--status-soft); border-color: color-mix(in srgb, var(--status) 40%, transparent); }
.banner.bad { background: var(--bad-soft); border-color: color-mix(in srgb, var(--bad) 40%, transparent); }
.banner.good { background: var(--good-soft); border-color: color-mix(in srgb, var(--good) 40%, transparent); }
.banner.info { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 35%, transparent); }
.banner .grow { flex: 1; }
.meter { height: 7px; border-radius: 99px; background: var(--surface-3); overflow: hidden; margin-top: 10px; }
.meter > div { height: 100%; border-radius: 99px; background: var(--accent); width: 0; transition: width .8s var(--spring), background .3s; }

/* Tabellen */
.table-wrap { overflow: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { font-size: 12.5px; color: var(--muted); font-weight: 600; background: var(--surface-2); position: sticky; top: 0; z-index: 1; cursor: default; }
th.sort { cursor: pointer; } th.sort:hover { color: var(--text); }
th.num, td.num { text-align: right; }
tbody tr { transition: background .15s; }
tbody tr:hover td { background: color-mix(in srgb, var(--surface-2) 55%, transparent); }
tr:last-child td { border-bottom: 0; }
tr.click { cursor: pointer; }
.pname { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.head { display: inline-block; width: 26px; height: 26px; border-radius: 6px; background: var(--surface-3); flex: none; overflow: hidden; vertical-align: middle; }
.head img { display: block; width: 100%; height: 100%; image-rendering: pixelated; }
.actions { display: flex; gap: 5px; justify-content: flex-end; }
.empty { padding: 34px; text-align: center; color: var(--muted); }
.skeleton { position: relative; overflow: hidden; height: 14px; border-radius: 6px; background: var(--surface-2); }
.skeleton::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, var(--surface-3), transparent); animation: shimmer 1.3s linear infinite; }

/* Segmented control */
.seg { position: relative; display: inline-flex; padding: 3px; border-radius: 11px; background: var(--surface-2); border: 1px solid var(--line); }
.seg button { position: relative; z-index: 1; border: 0; background: none; padding: 5px 14px; border-radius: 8px; cursor: pointer; font-weight: 600; font-size: 13px; color: var(--muted); transition: color .2s; }
.seg button.on { color: var(--text); }
.seg .knob { position: absolute; top: 3px; bottom: 3px; border-radius: 8px; background: var(--surface); box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: left .45s var(--spring), width .45s var(--spring); }

/* Chart */
.chart { width: 100%; height: 240px; display: block; }
.legend { display: flex; gap: 16px; font-size: 12.5px; color: var(--muted); font-weight: 500; }
.legend i { display: inline-block; width: 12px; height: 3px; border-radius: 2px; vertical-align: middle; margin-right: 7px; }

/* Konsole */
.console { background: #0d0f10; color: #d4dcdd; border: 1px solid var(--line); border-radius: var(--r); height: 470px; overflow-y: auto; padding: 12px 14px;
  font-size: 12.5px; line-height: 1.5; white-space: pre-wrap; word-break: break-word; }
[data-theme="light"] .console { background: #0f1415; }
.console .w { color: #f0b45a; } .console .e { color: #f07a72; } .console .c { color: #7fd3da; } .console .s { color: #8a979a; }
.console-input { display: flex; gap: 8px; margin-top: 10px; }
.console-input input { flex: 1; }

/* Modal & Sheet (Glas, Feder) */
/* Ohne backdrop-filter: eine Unschärfe über die ganze Seite musste bei jeder Bewegung darunter (Kacheln, Karte, Animationen)
   neu berechnet werden – Scrollen in Dialogen ruckelte dadurch stark (0.4.1). */
.backdrop { position: fixed; inset: 0; background: rgba(5, 10, 12, .58); z-index: 50; display: grid; place-items: center; animation: fade .25s ease; }
[data-theme="light"] .backdrop { background: rgba(14, 35, 38, .34); }
.backdrop.closing { animation: fade .2s ease reverse forwards; }
.modal { width: min(500px, 94vw); max-height: 88vh; overflow: auto; overscroll-behavior: contain; display: grid; gap: 14px; padding: 22px 24px; border-radius: 20px;
  background: var(--surface); border: 1px solid var(--line-2); box-shadow: 0 24px 80px rgba(0,0,0,.4); animation: pop .45s var(--spring); }
.modal.wide { width: min(880px, 95vw); }
.modal h2 { margin: 0; font-size: 19px; font-weight: 800; letter-spacing: -.015em; }
.modal .foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }
.sheet-wrap { place-items: stretch end; }
.sheet { width: min(560px, 96vw); height: 100vh; overflow: auto; overscroll-behavior: contain; padding: 26px 26px 40px; background: var(--surface);
  border-left: 1px solid var(--line-2); box-shadow: -20px 0 60px rgba(0,0,0,.3); animation: slideIn .5s var(--spring); }
@keyframes slideIn { from { transform: translateX(40px); opacity: 0; } to { transform: none; opacity: 1; } }

/* Toasts */
#toasts { position: fixed; right: 22px; bottom: 22px; display: grid; gap: 10px; z-index: 80; width: min(420px, 90vw); }
.toast { display: flex; gap: 12px; align-items: flex-start; padding: 12px 16px; border-radius: 14px; background: var(--surface);
  border: 1px solid var(--line-2);
  box-shadow: var(--shadow); white-space: pre-wrap; word-break: break-word; animation: toastIn .55s var(--spring); }
.toast.out { animation: toastOut .3s var(--ease) forwards; }
.toast .ic { width: 8px; height: 8px; border-radius: 50%; margin-top: 7px; background: var(--good); flex: none; }
.toast.bad .ic { background: var(--bad); } .toast.status .ic { background: var(--status); }
@keyframes toastIn { from { opacity: 0; transform: translateY(18px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateY(8px) scale(.97); } }

/* Spieler-Detail: Inventar */
.inv { display: grid; grid-template-columns: repeat(9, 1fr); gap: 5px; }
.slot { aspect-ratio: 1; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--line); position: relative; display: grid; place-items: center;
  font-size: 9.5px; line-height: 1.1; text-align: center; padding: 3px; color: var(--text-2); overflow: hidden; }
.slot.has { background: var(--surface-3); color: var(--text); }
.slot.ench { box-shadow: inset 0 0 0 1px color-mix(in srgb, #b18cff 60%, transparent); }
.slot .n { position: absolute; right: 4px; bottom: 2px; font-weight: 800; font-size: 11px; }
.slot.sel { outline: 2px solid var(--accent); }
.bar { height: 8px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.bar > div { height: 100%; border-radius: 99px; transition: width .8s var(--spring); }

/* Mods */
.mods { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 14px; }
.mod { display: grid; grid-template-columns: 48px 1fr auto; gap: 14px; align-items: start; }
.mod .icon { width: 48px; height: 48px; border-radius: 11px; background: var(--surface-3); object-fit: cover; image-rendering: pixelated; display: grid; place-items: center; color: var(--muted); font-weight: 800; }
.mod.off { opacity: .55; }
.mod .name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mod .desc { font-size: 12.5px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: 3px; }
.drop svg { width: 18px; height: 18px; vertical-align: -4px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.drop { border: 2px dashed var(--line-2); border-radius: var(--r); padding: 18px; text-align: center; color: var(--muted); transition: border-color .2s, background .2s; }
.drop.over { border-color: var(--accent); background: var(--accent-soft); color: var(--text); }

/* Konfiguration */
.cfg { display: grid; grid-template-columns: 300px 1fr; gap: 16px; align-items: start; }
.files { max-height: 72vh; overflow: auto; padding: 8px; }
.files .grp { font-size: 12px; color: var(--muted); font-weight: 600; padding: 10px 8px 4px; }
.files button { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 6px 9px; border-radius: 8px; cursor: pointer; color: var(--text-2);
  font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.files button:hover { background: var(--surface-2); color: var(--text); }
.files button.on { background: var(--accent-soft); color: var(--text); font-weight: 600; }
.editor { width: 100%; min-height: 62vh; resize: vertical; font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 13px; line-height: 1.55;
  tab-size: 4; white-space: pre; background: var(--bg); }
.props { display: grid; gap: 22px; }
.props .grp h3 { margin: 0 0 10px; font-size: 14px; font-weight: 800; color: var(--text); }
.prop { display: grid; grid-template-columns: 1fr 260px; gap: 14px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line); }
.prop:last-child { border-bottom: 0; }
.prop .k { font-size: 12px; color: var(--muted); }
.prop input[type=text], .prop input[type=number], .prop select { width: 100%; }
.prop.changed .lbl { color: var(--accent); }

/* Claims */
.claims { display: grid; grid-template-columns: 1fr 300px; gap: 16px; }
.mapbox { position: relative; height: 66vh; padding: 0; overflow: hidden; cursor: grab; }
.mapbox canvas { width: 100%; height: 100%; display: block; }
.mapbox .tip { position: absolute; pointer-events: none; padding: 8px 11px; border-radius: 10px; background: var(--surface);
  border: 1px solid var(--line); font-size: 12.5px; box-shadow: var(--shadow); white-space: nowrap; transition: opacity .15s; }
.owner { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 9px; cursor: pointer; }
.owner:hover, .owner.on { background: var(--surface-2); }
.owner i { width: 12px; height: 12px; border-radius: 4px; flex: none; }

@media (max-width: 980px) {
  #app { grid-template-columns: 1fr; }
  aside { position: static; height: auto; }
  nav { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
  nav .pill { display: none; }
  nav button.active { background: var(--surface-2); }
  main { padding: 20px 16px 50px; }
  .cfg, .claims { grid-template-columns: 1fr; }
  .prop { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; transition-duration: .01ms !important; }
}

/* Wird nur sichtbar, wenn app.css nicht geladen werden konnte (siehe index.html). */
#proxyHint { display: none !important; }
/* lange URLs/Pfade (z. B. Redirect-URI) dürfen umbrechen, statt Karten zu sprengen */
.banner, .banner .mono, .kv dd, .field .help { overflow-wrap: anywhere; }
.card > div[style*="display:grid"] > * { min-width: 0; }

/* ======================================================= 0.3.2 · Verbinden */
.badge.status { color: var(--status); border-color: currentColor; }
.badge svg { width: 11px; height: 11px; stroke: currentColor; fill: none; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; margin-right: 4px; }
.connect-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 440px); gap: 22px; align-items: center; }
@media (max-width: 980px) { .connect-grid { grid-template-columns: 1fr; } }
.connect .addr { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 4px; }
.connect .addr .mono { font-size: 24px; font-weight: 700; letter-spacing: -.01em; color: var(--text); overflow-wrap: anywhere; margin-right: 6px; }
.connect .lan { margin-top: 8px; color: var(--muted); font-size: 13px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.connect .lan .mono { color: var(--text-2); }
.btn.copied { color: var(--good); border-color: color-mix(in srgb, var(--good) 45%, transparent); }
.btn.copied svg { animation: pop .35s var(--spring); stroke-width: 2.6; }
.reach { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; font-size: 13px; }
.reach svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; }
.reach.good { color: var(--good); } .reach.bad { color: var(--bad); }
.reach.good svg { animation: spin 3s linear infinite; }
/* Vorschau wie in der Minecraft-Serverliste (Spielgrafik, deshalb eigene Farben) */
.mclist { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 10px; padding: 10px; border-radius: 6px; background: #0d0d0d;
  border: 2px solid #3a3a3a; box-shadow: inset 0 0 0 1px #000; color: #fff; font-size: 14px; line-height: 1.3; }
.mcicon { width: 64px; height: 64px; image-rendering: pixelated; border-radius: 2px; }
.mcicon.empty { display: grid; place-items: center; background: #1f1f1f; }
.mcbody { min-width: 0; }
.mctop { display: flex; gap: 8px; align-items: baseline; }
.mctop b { font-weight: 600; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mcplayers { color: #AAAAAA; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.mcplayers span { color: #555; margin: 0 1px; }
.bars { display: inline-flex; align-items: flex-end; gap: 1px; height: 12px; }
.bars i { width: 2px; background: #3a3a3a; }
.bars i.on { background: #55FF55; box-shadow: 1px 1px 0 #153f15; }
.motd { color: #AAAAAA; margin-top: 3px; min-height: 2.6em; overflow-wrap: anywhere; }
.mcver { color: #555; font-size: 12px; margin-top: 3px; }
.mc-obf { display: inline-block; }

/* Mods · vorgemerkt */
.card.mod.pending { border-style: dashed; border-color: color-mix(in srgb, var(--status) 55%, transparent); }

/* ======================================================= 0.3.2 · Welt */
.world.offline .dial, .world.offline .scene, .world.offline .tray, .world.offline .chips { opacity: .45; filter: grayscale(.6); pointer-events: none; }
.px { display: block; image-rendering: pixelated; }
.dial { position: relative; width: min(100%, 300px); aspect-ratio: 1; margin: 16px auto 6px; border-radius: 50%; overflow: hidden;
  border: 1px solid var(--line-2); box-shadow: inset 0 0 0 6px rgba(0,0,0,.18), var(--shadow); touch-action: none; user-select: none; }
.dial.editable { cursor: grab; } .dial.dragging { cursor: grabbing; }
.dial:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.d-sky, .s-sky { position: absolute; inset: 0; transition: background .8s linear; }
.dial.dragging .d-sky { transition: none; }
.stars { position: absolute; inset: 0; transition: opacity .8s; }
.stars i { position: absolute; width: 2px; height: 2px; background: #fff; animation: twinkle 4s ease-in-out infinite; }
.stars i:nth-child(3n) { width: 3px; height: 3px; }
@keyframes twinkle { 0%, 100% { opacity: .9; } 50% { opacity: .3; } }
.d-orbit { position: absolute; inset: 0; transform: rotate(var(--a, 0deg)); transition: transform .25s linear; }
.dial.dragging .d-orbit { transition: transform .12s var(--spring); }
.d-body { position: absolute; left: 50%; top: 50%; width: 0; height: 0; }
.d-body.sun { top: 18%; } .d-body.moon { top: 82%; }
.d-body .px { position: absolute; transform: translate(-50%, -50%) rotate(calc(-1 * var(--a, 0deg))); filter: drop-shadow(0 0 10px rgba(255, 220, 120, .55)); transition: filter .2s, scale .25s var(--spring); }
.d-body.moon .px { filter: drop-shadow(0 0 8px rgba(200, 220, 255, .45)); }
.dial.editable .d-body .px:hover, .dial.dragging[data-body="sun"] .sun .px, .dial.dragging[data-body="moon"] .moon .px { scale: 1.18; }
.d-ground { position: absolute; left: 0; right: 0; bottom: 0; height: 50%; pointer-events: none; }
.d-ground svg { width: 100%; height: 100%; display: block; }
.d-ground::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,.35) 100%); }
.d-ticks { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.d-ticks line { stroke: rgba(255,255,255,.45); stroke-width: 1.5; } .d-ticks line.major { stroke: #fff; stroke-width: 2.5; }
.d-ticks text { fill: #fff; font: 700 12px Figtree, sans-serif; text-anchor: middle; paint-order: stroke; stroke: rgba(0,0,0,.45); stroke-width: 3px; }
.w-read { text-align: center; }
.w-time { font-size: 38px; font-weight: 800; letter-spacing: -.03em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.w-read .sub { margin-top: 3px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 14px 0 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 11px 0 9px; border-radius: 99px; border: 1px solid var(--line);
  background: var(--surface-2); color: var(--text); font: 600 12.5px Figtree, sans-serif; cursor: pointer; transition: transform .2s var(--spring), background .2s, border-color .2s; }
.chip:hover { background: var(--surface-3); border-color: var(--line-2); } .chip:active { transform: scale(.95); }
.chip .muted { font-weight: 500; }
.w-rule { margin-top: 12px; }
/* Wetterszene */
.scene { position: relative; height: 230px; margin: 16px 0 12px; border-radius: 12px; overflow: hidden; border: 1px solid var(--line-2); touch-action: none; user-select: none;
  transition: box-shadow .25s, transform .25s var(--spring); }
.scene.drop-over { box-shadow: 0 0 0 3px var(--accent); transform: scale(1.01); }
.s-body { position: absolute; transform: translate(-50%, -50%); transition: left 1s linear, top 1s linear, opacity .6s; filter: drop-shadow(0 0 12px rgba(255, 220, 120, .5)); }
.s-clouds { position: absolute; inset: 0; }
.s-cloud { position: absolute; transform: scale(var(--s, 1)); transform-origin: left top; }
.s-cloud.big { animation: bob 6s ease-in-out infinite; }
/* Wetterebenen liegen dauerhaft übereinander und blenden nur ihre Deckkraft – nichts wird neu aufgebaut */
.s-layer { position: absolute; inset: 0; opacity: 0; pointer-events: none; translate: 0 -10px; transition: opacity 1.4s var(--ease), translate 1.6s var(--spring); }
.scene[data-w="clear"] .s-layer[data-l="clear"], .scene[data-w="rain"] .s-layer[data-l="rain"], .scene[data-w="thunder"] .s-layer[data-l="thunder"] { opacity: 1; pointer-events: auto; translate: 0 0; }
.s-overcast { position: absolute; inset: 0; pointer-events: none; opacity: 0; background: linear-gradient(180deg, #2c333c 0%, #6c7682 85%); transition: opacity 1.6s var(--ease); }
.scene[data-w="rain"] .s-overcast, .dial[data-w="rain"] .s-overcast { opacity: .5; }
.scene[data-w="thunder"] .s-overcast, .dial[data-w="thunder"] .s-overcast { opacity: .74; }
.scene:not([data-w="clear"]) .s-body { opacity: .22; }
.s-cloud.drift { animation: drift linear infinite; }
.s-cloud.grab { cursor: grab; } .s-cloud.lifted { opacity: .25; }
@keyframes cloudIn { from { opacity: 0; translate: 0 -14px; } to { opacity: 1; translate: 0 0; } }
@keyframes bob { 0%, 100% { translate: 0 0; } 50% { translate: 6px 2px; } }
@keyframes drift { from { translate: -140% 0; } to { translate: 260% 0; } }
.s-rain { position: absolute; inset: 40px 0 26px; pointer-events: none; overflow: hidden; }
.s-rain { opacity: 0; transition: opacity 1.6s var(--ease); }
.scene[data-w="rain"] .s-rain, .scene[data-w="thunder"] .s-rain { opacity: 1; }
.s-rain i { position: absolute; top: -12%; width: 2px; height: 12px; background: #6FB1F0; opacity: .8; animation: fall .6s linear infinite; transition: opacity 1.2s; }
.scene[data-w="rain"] .s-rain i:nth-child(3n) { opacity: 0; }
.scene[data-w="thunder"] .s-rain i { background: #8DB6E0; }
@keyframes fall { to { transform: translateY(210px); } }
.s-flash { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; }
.scene[data-w="thunder"] .s-flash { animation: flash 7s infinite; }
@keyframes flash { 0%, 81%, 85%, 89%, 100% { opacity: 0; } 82% { opacity: .55; } 84% { opacity: .1; } 86% { opacity: .4; } }
.s-ground { height: 26px; }
.s-drop { position: absolute; left: 50%; bottom: 36px; transform: translateX(-50%); padding: 5px 12px; border-radius: 99px; background: var(--surface); font-weight: 700; font-size: 13px; white-space: nowrap; pointer-events: none; opacity: 0; transition: opacity .2s; }
.s-drop:not(:empty) { opacity: 1; }
.tray { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.tile { display: grid; justify-items: center; align-content: center; gap: 6px; height: 96px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2);
  color: var(--text); font: 700 13px Figtree, sans-serif; cursor: grab; touch-action: none; transition: transform .25s var(--spring), border-color .2s, background .2s; }
.tile:hover:not(:disabled) { transform: translateY(-2px); background: var(--surface-3); }
.tile:active:not(:disabled) { cursor: grabbing; transform: scale(.97); }
.tile.on { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.tile:disabled { cursor: default; opacity: .7; }
.w-ghost { position: fixed; left: 0; top: 0; z-index: 200; pointer-events: none; opacity: 0; transition: opacity .15s;
  filter: drop-shadow(0 10px 18px rgba(0,0,0,.35)); }
.w-ghost.show { opacity: .95; }
@media (prefers-reduced-motion: reduce) {
  .stars i, .s-cloud, .s-rain i, .s-flash, .reach.good svg { animation: none !important; }
  .s-layer, .s-overcast, .s-rain { transition: none; }
  .d-orbit, .s-body, .d-sky, .s-sky { transition: none; }
}

/* ======================================================= 0.3.3 · Item-Icons */
.slot img.ico { width: 76%; height: 76%; object-fit: contain; image-rendering: pixelated; filter: drop-shadow(0 2px 2px rgba(0,0,0,.35)); }
.slot .lbl { display: none; }
.slot.noicon .lbl { display: block; }
.slot .n { text-shadow: 0 1px 0 rgba(0,0,0,.75), 0 0 3px rgba(0,0,0,.6); color: #fff; z-index: 1; }
.slot.ench::after { content: ""; position: absolute; top: 0; bottom: 0; left: -100%; width: 300%; pointer-events: none; opacity: .5;
  background: linear-gradient(115deg, transparent 38%, rgba(177,140,255,.6) 50%, transparent 62%); animation: glint 3.2s linear infinite; }
@keyframes glint { from { transform: translateX(-34%); } to { transform: translateX(34%); } }
@media (prefers-reduced-motion: reduce) { .slot.ench::after { animation: none; } }

/* ======================================================= 0.3.3 · Config-Formulare */
.hidden { display: none !important; }
.cform .prop { grid-template-columns: minmax(0, 1fr) minmax(0, 300px); align-items: start; }
.cform .prop.wide { grid-template-columns: 1fr; gap: 8px; }
.cform .prop textarea, .cform .jitem input, .cform .jitem textarea { width: 100%; }
.cform .hlp { font-size: 12.5px; color: var(--text-2); margin-top: 4px; max-width: 62ch; }
.cform .prop .k { overflow-wrap: anywhere; }
.cform .prop.changed { box-shadow: inset 3px 0 0 var(--accent); padding-left: 12px; }
.jgrp { border: 1px solid var(--line); border-radius: 12px; margin: 10px 0; background: var(--bg-2); }
.jgrp > .jhead { display: flex; align-items: center; gap: 10px; padding: 9px 14px; cursor: default; list-style: none; }
details.jgrp > .jhead { cursor: pointer; }
details.jgrp > .jhead::-webkit-details-marker { display: none; }
details.jgrp > .jhead::before { content: ""; width: 7px; height: 7px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(-45deg); transition: transform .25s var(--spring); flex: none; }
details.jgrp[open] > .jhead::before { transform: rotate(45deg); }
.jgrp .spacer { flex: 1; }
.jbody { padding: 2px 14px 12px; }
.jitem { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; margin: 6px 0; }

/* ======================================================= 0.3.3 · Karte */
.mapbar { margin-bottom: 12px; gap: 14px; }
.mapwrap { position: relative; height: clamp(380px, calc(100vh - 300px), 1400px); border-radius: var(--r); overflow: hidden; border: 1px solid var(--line); background: var(--bg-2); }
.mapwrap canvas { display: block; cursor: grab; touch-action: none; user-select: none; }
.mapwrap canvas.grabbing { cursor: grabbing; }
.map-xy { position: absolute; left: 12px; bottom: 12px; padding: 6px 12px; border-radius: 10px; background: color-mix(in srgb, var(--surface) 90%, transparent); border: 1px solid var(--line); font-size: 13px; pointer-events: none; font-variant-numeric: tabular-nums; }
.map-zoom { position: absolute; right: 12px; top: 12px; display: grid; gap: 6px; }
.map-zoom .btn { width: 34px; height: 34px; padding: 0; font-size: 18px; font-weight: 700; background: color-mix(in srgb, var(--surface) 92%, transparent); }
.map-empty { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 30px; color: var(--muted); }
.chip.on { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.chip .head { border-radius: 4px; }

/* ======================================================= 0.3.4 · Plugins */
.plug { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 14px; align-items: start; padding: 14px 0; border-bottom: 1px solid var(--line); }
.plug:last-child { border-bottom: 0; }
.plug-ic { width: 40px; height: 40px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; }
.plug-ic svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.plug-act { display: flex; align-items: center; gap: 10px; }
.plugs { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.plug-card { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; background: var(--bg-2); display: grid; gap: 4px; align-content: start; }
.repo { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.repo:last-child { border-bottom: 0; }
.dot.good { background: var(--good); } .dot.bad { background: var(--bad); }
.repo .dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.badge.good svg { width: 11px; height: 11px; stroke: currentColor; fill: none; stroke-width: 2.6; margin-right: 3px; }
@media (max-width: 700px) { .plug { grid-template-columns: 1fr; } .plug-ic { display: none; } .plug-act { flex-wrap: wrap; } }

/* ===================================================== 0.3.5: Rollen, Rechte, Einladungen */
.rolechip { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; padding: 2px 10px 2px 8px; border-radius: 99px;
  color: var(--text); background: color-mix(in srgb, var(--rc) 16%, transparent); border: 1px solid color-mix(in srgb, var(--rc) 45%, transparent); white-space: nowrap; }
.rolechip::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--rc); }
.role-card { border-top: 3px solid var(--rc); }
.swatch { width: 26px; height: 26px; border-radius: 8px; border: 2px solid transparent; background: var(--c); cursor: pointer; padding: 0; box-shadow: inset 0 0 0 1px rgba(0,0,0,.15); transition: transform .2s var(--spring); }
.swatch.on { border-color: var(--text); transform: scale(1.08); }
input[type=color] { width: 38px; height: 28px; padding: 0 2px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--surface-2); cursor: pointer; }
.permgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.permgroup { display: grid; gap: 4px; align-content: start; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg-2); }
.pg-head, .pg-title { margin-bottom: 4px; font-size: 13.5px; }
.perm { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; padding: 5px 4px; border-radius: 8px; cursor: pointer; }
.perm:hover { background: var(--surface-2); }
.perm input { margin-top: 2px; accent-color: var(--accent-fill); }
.perm span { display: grid; gap: 1px; } .perm small { color: var(--muted); font-size: 11.5px; }
.perm.locked { opacity: .5; cursor: not-allowed; }
.permgrid.tri { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); }
.tri-row { justify-content: space-between; align-items: center; cursor: default; }
.tri-row { border-left: 3px solid transparent; padding-left: 8px; } .tri-row.on { border-left-color: var(--good); } .tri-row:not(.on) > span { color: var(--muted); }
.tri3 { display: inline-flex; flex: none; border: 1px solid var(--line-2); border-radius: 8px; overflow: hidden; }
.tri3 button { border: 0; background: none; color: var(--muted); font-family: inherit; font-weight: 600; font-size: 11.5px; line-height: 1; padding: 6px 8px; cursor: pointer; }
.tri3 button + button { border-left: 1px solid var(--line-2); }
.tri3 button.on[data-s=role] { background: var(--surface-3); color: var(--text); }
.tri3 button.on[data-s=allow] { background: color-mix(in srgb, var(--good) 22%, transparent); color: var(--text); }
.tri3 button.on[data-s=deny] { background: color-mix(in srgb, var(--bad) 22%, transparent); color: var(--text); }
.tri3 button:disabled { opacity: .35; cursor: not-allowed; }
.mcchat { margin-top: 6px; padding: 7px 10px; border-radius: 4px; background: rgba(0,0,0,.62); font: 500 13px/1.45 ui-monospace, "Cascadia Mono", Consolas, monospace; color: #fff;
  text-shadow: 1px 1px 0 rgba(0,0,0,.6); overflow-wrap: anywhere; }
.mcchat + .mcchat { margin-top: 2px; }

/* Beacon Link */
.link-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 26px; align-items: start; }
@media (max-width: 980px) { .link-grid { grid-template-columns: 1fr; } }
.link-orb { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; flex: none; background: var(--surface-3); color: var(--muted); border: 1px solid var(--line-2); }
.link-orb svg { width: 24px; height: 24px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.link-orb { position: relative; }
.link-orb.on { background: var(--accent-fill); color: #fff; border-color: transparent; box-shadow: 0 0 0 6px var(--accent-soft); }
.link-orb.on::after { content: ""; position: absolute; inset: -6px; border-radius: 18px; border: 6px solid var(--accent-soft); animation: orb 2.6s var(--ease) infinite; pointer-events: none; }
.link-orb.half { color: var(--status); border-color: currentColor; }
@keyframes orb { 0% { transform: scale(1); opacity: 1; } 60%, 100% { transform: scale(1.22); opacity: 0; } }
.chks { display: grid; gap: 10px; }
.chk { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; } .chk .muted { font-size: 12.5px; }
.chk .ci { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; flex: none; font-weight: 800; font-size: 13px; background: var(--surface-3); color: var(--muted); }
.chk.ok .ci { background: color-mix(in srgb, var(--good) 20%, transparent); color: var(--good); }
.chk.warn .ci { background: color-mix(in srgb, var(--status) 20%, transparent); color: var(--status); }
.chk .ci svg { width: 13px; height: 13px; stroke: currentColor; fill: none; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }

/* ===================================================== 0.3.5: Dashboard */
.dash { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); grid-auto-rows: 64px; gap: 16px; grid-auto-flow: row dense; }
.dash[data-cols="6"] { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.dash[data-cols="1"] { grid-template-columns: minmax(0, 1fr); }
.dash-hint { margin-top: 14px; display: flex; align-items: center; gap: 4px; }
.dash-hint svg { width: 14px; height: 14px; fill: currentColor; stroke: none; }
.wdg { container-type: inline-size; position: relative; display: flex; flex-direction: column; min-width: 0; min-height: 0; padding: 0; overflow: hidden; animation: rise .55s var(--spring) backwards; }
.wdg-h { display: flex; align-items: center; gap: 8px; height: 46px; padding: 0 8px 0 6px; flex: none; }
.wdg-h h3 { margin: 0; font-size: 13.5px; font-weight: 700; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: grab; user-select: none; }
.wdg-h .wic { width: 16px; height: 16px; flex: none; color: var(--muted); stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.grip { width: 22px; height: 30px; display: grid; place-items: center; cursor: grab; color: var(--muted); opacity: .45; border-radius: 6px; touch-action: none; transition: opacity .2s, background .2s; }
.grip svg { width: 16px; height: 16px; fill: currentColor; stroke: none; }
.wdg:hover .grip { opacity: 1; } .grip:hover { background: var(--surface-2); }
.wbtn { width: 28px; height: 28px; border: 0; border-radius: 7px; background: none; color: var(--muted); display: grid; place-items: center; cursor: pointer; opacity: 0; transition: opacity .2s, background .2s, transform .35s var(--spring); }
.wbtn svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.wbtn[data-w=menu] svg { fill: currentColor; stroke: none; }
.wdg:hover .wbtn, .wbtn:focus-visible, .wdg.collapsed .wbtn[data-w=collapse] { opacity: 1; } .wbtn:hover { background: var(--surface-2); color: var(--text); }
@media (hover: none) { .wbtn { opacity: 1; } }
.wdg.collapsed .wbtn[data-w=collapse] { transform: rotate(-90deg); }
.wdg-b { flex: 1; min-height: 0; padding: 0 18px 16px; overflow: auto; display: flex; flex-direction: column; }
.wdg.collapsed .wdg-b { display: none; }
.wdg-rs { position: absolute; right: 2px; bottom: 2px; width: 18px; height: 18px; cursor: nwse-resize; opacity: 0; transition: opacity .2s; touch-action: none;
  background: linear-gradient(135deg, transparent 50%, var(--line-2) 50%, var(--line-2) 58%, transparent 58%, transparent 70%, var(--line-2) 70%, var(--line-2) 78%, transparent 78%); border-radius: 0 0 var(--r) 0; }
.wdg:hover .wdg-rs, .wdg.resizing .wdg-rs { opacity: 1; }
.wdg.collapsed .wdg-rs { display: none; }
.wdg-size { position: absolute; right: 24px; bottom: 6px; font-family: inherit; font-weight: 700; font-size: 11px; line-height: 1; color: var(--accent); pointer-events: none; }
.wdg.resizing { outline: 2px solid var(--accent); outline-offset: -1px; }
.wdg.dragging { pointer-events: none; box-shadow: 0 24px 60px rgba(0,0,0,.35); outline: 2px solid var(--accent); outline-offset: -1px; animation: none; }
.wdg-ph { border: 2px dashed color-mix(in srgb, var(--accent) 55%, transparent); border-radius: var(--r); background: var(--accent-soft); }
body.dragging-wdg, body.dragging-wdg * { cursor: grabbing !important; user-select: none; }
.wdg.pulse { animation: wpulse 1.3s var(--ease); }
@keyframes wpulse { 0% { box-shadow: 0 0 0 0 var(--accent); } 40% { box-shadow: 0 0 0 6px var(--accent-soft); } 100% { box-shadow: 0 0 0 0 transparent; } }
.wdg.leaving { transition: opacity .18s, transform .18s var(--ease); opacity: 0; transform: scale(.96); }
.wmenu { position: absolute; z-index: 80; min-width: 190px; padding: 6px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line-2); box-shadow: var(--shadow); display: grid; animation: pop .25s var(--spring); }
.wmenu button { display: flex; align-items: center; gap: 10px; border: 0; background: none; color: var(--text); font-family: inherit; font-weight: 500; font-size: 13.5px; padding: 8px 10px; border-radius: 8px; cursor: pointer; text-align: left; }
.wmenu button:hover { background: var(--surface-2); } .wmenu button.danger { color: var(--bad); }
.wmenu svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.wcat { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.wcat-i { display: grid; grid-template-columns: 38px 1fr; grid-template-rows: auto auto; column-gap: 12px; row-gap: 2px; text-align: left; padding: 12px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--bg-2); color: var(--text); cursor: pointer; font: inherit; transition: border-color .2s, transform .3s var(--spring); }
.wcat-i:hover { border-color: var(--accent); transform: translateY(-2px); }
.wcat-ic { grid-row: span 2; width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.wcat-ic svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.wcat-i .muted { font-size: 12.5px; line-height: 1.4; }
.wstat { display: flex; flex-direction: column; height: 100%; }
.wstat .big { font-size: 30px; font-weight: 800; letter-spacing: -.025em; line-height: 1.1; }
.wstat .big small { font-size: 14px; font-weight: 600; color: var(--muted); margin-left: 3px; }
.wstat .sub { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.wstat .meter { margin-top: 8px; }
.wstat .spark { flex: 1; min-height: 18px; width: 100%; margin-top: 8px; display: block; }
.chart-box { position: relative; flex: 1; min-height: 110px; }
.chart-box canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.modal.full .chart-box { min-height: 52vh; }
.ctip { position: absolute; pointer-events: none; padding: 5px 9px; border-radius: 8px; background: var(--surface-3); border: 1px solid var(--line-2); font-size: 12px; font-weight: 600; white-space: nowrap; box-shadow: var(--shadow); }
.wlist { display: grid; gap: 2px; }
.wli { display: flex; align-items: center; gap: 10px; padding: 6px 4px; border-radius: 8px; min-width: 0; }
.wli:hover { background: var(--surface-2); }
.wempty { color: var(--muted); font-size: 13.5px; margin: auto; text-align: center; padding: 8px; }
.wlog { height: auto; flex: 1; min-height: 80px; font-size: 12px; padding: 8px 10px; }
.wnote { flex: 1; outline: none; white-space: pre-wrap; font-size: 14px; line-height: 1.5; border-radius: 8px; padding: 4px; margin: -4px; }
.wnote:empty::before { content: attr(data-ph); color: var(--muted); }
.wnote:focus { background: var(--bg-2); }
.wmap { flex: 1; min-height: 120px; margin: 0 -18px -16px; }
.wmap.mapwrap { height: auto; border-radius: 0; border: 0; border-top: 1px solid var(--line); }
.wsrv { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 22px; align-items: start; }
.wsrv .kv { padding-left: 22px; border-left: 1px solid var(--line); margin: 0; }
@media (max-width: 700px) { .wsrv { grid-template-columns: 1fr; } .wsrv .kv { padding: 0; border: 0; } }
.modal.full { width: min(1240px, 96vw); max-height: 92vh; }
.full-head { gap: 10px; } .full-head > svg { width: 20px; height: 20px; stroke: var(--accent); fill: none; stroke-width: 2; }
.full-body { display: flex; flex-direction: column; min-height: 50vh; }
.full-body .wmap { min-height: 64vh; margin: 0; } .full-body .wlog { min-height: 60vh; }
.toast .btn { margin: -4px -6px -4px 6px; }
.wtable { margin-top: 12px; }

.wdg .connect-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 360px); gap: 16px; }
@container (max-width: 540px) { .wdg .connect-grid { grid-template-columns: 1fr; gap: 10px; } .wdg .mclist { max-width: 420px; } .wdg .connect-grid .sub { margin-top: 0; } }
@container (max-width: 520px) { .wsrv { grid-template-columns: 1fr; } .wsrv .kv { padding: 0; border: 0; } }
.modal .hint { color: var(--muted); font-size: 13px; margin: 0; }
/* Änderungen aller Versionen (ab 0.4.0a) */
.side-foot button.vendor { background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; text-align: left; }
.side-foot button.vendor:hover { color: var(--accent); text-decoration: underline; }
.changelog { display: grid; gap: 14px; max-height: 62vh; overflow-y: auto; padding-right: 6px; }
.changelog section { padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; }
.changelog section.cur { border-color: var(--accent); background: var(--accent-soft); }
.sub { color: var(--muted); font-size: 13px; }

/* ---- Mein Konto: Zwei-Faktor, Sitzungen, API-Schlüssel (ab 0.4.0) ---- */
.tfa-setup { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 20px; align-items: start; }
@media (max-width: 620px) { .tfa-setup { grid-template-columns: 1fr; } .tfa-setup .qr { max-width: 220px; } }
.qr { background: #fff; border-radius: 12px; padding: 6px; border: 1px solid var(--line); line-height: 0; }
.qr svg { width: 100%; height: auto; display: block; image-rendering: pixelated; }
.steps { margin: 0; padding-left: 20px; display: grid; gap: 8px; font-size: 13.5px; }
.secret { font-size: 13px; letter-spacing: .06em; padding: 4px 8px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--line); overflow-wrap: anywhere; }
.codes { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px 14px; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); font-size: 14px; }
.pname > svg { width: 18px; height: 18px; stroke: var(--muted); fill: none; stroke-width: 1.8; flex: none; }

/* ---- Live-Chat (ab 0.4.0) ---- */
.chatbox { display: flex; flex-direction: column; padding: 0; overflow: hidden; height: calc(100vh - 250px); min-height: 360px; }
.chatlist { flex: 1; overflow-y: auto; padding: 10px 14px; display: flex; flex-direction: column; gap: 2px; font-size: 14px; }
.chatlist.static { max-height: 70vh; padding: 10px 14px; }
.cl { display: grid; grid-template-columns: auto auto minmax(0, 1fr); gap: 10px; align-items: start; padding: 4px 6px; border-radius: 8px; border-left: 3px solid transparent; }
.cl:hover { background: var(--surface-2); }
.cl .ct { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; padding-top: 2px; white-space: nowrap; }
.cl .cm { overflow-wrap: anywhere; line-height: 1.45; } .cl .cm .badge { margin-right: 6px; vertical-align: 1px; }
.cl.sys { color: var(--muted); font-size: 13px; } .cl.sys .ci { width: 20px; text-align: center; }
.cl.flagged { border-left-color: var(--bad); background: var(--bad-soft); }
.cday { align-self: center; font-size: 12px; color: var(--muted); padding: 8px 0 4px; font-weight: 600; }
.chatinput { display: flex; gap: 10px; padding: 12px 14px; border-top: 1px solid var(--line); background: var(--surface); }
.chatinput input { flex: 1; }
.badge.discord { color: #5865F2; border-color: currentColor; }
@media (max-width: 760px) { #csForm { grid-template-columns: 1fr 1fr !important; } }

/* ---- Mods von Modrinth / CurseForge (ab 0.4.0) ---- */
.badge.mr { color: #1BD96A; border-color: currentColor; } .badge.cf { color: #F16436; border-color: currentColor; }
[data-theme=light] .badge.mr { color: #0f8f45; } [data-theme=light] .badge.cf { color: #c4461d; }
.modal.addons { width: min(980px, 96vw); }
.adlist { display: grid; gap: 8px; max-height: 56vh; overflow-y: auto; padding-right: 4px; }
.adhit { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.adhit.unfit { opacity: .72; }
.adhit .icon { width: 44px; height: 44px; border-radius: 10px; background: var(--surface-3); object-fit: cover; display: grid; place-items: center; color: var(--muted); font-weight: 800; }
.adhit .desc { font-size: 12.5px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: 2px; }
.vlist { display: grid; gap: 4px; max-height: 50vh; overflow-y: auto; }
.vrow { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border-radius: 10px; cursor: pointer; border: 1px solid transparent; }
.vrow:hover { background: var(--surface-2); } .vrow:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.vrow span { display: grid; gap: 2px; } .vrow small { color: var(--muted); font-size: 12px; }
.vrow input { margin-top: 3px; accent-color: var(--accent-fill); }

/* ---- Externe Backups (ab 0.4.0) ---- */
.cols-3 { grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); }
.rtarget > .row > svg { width: 22px; height: 22px; stroke: var(--accent); fill: none; stroke-width: 1.8; flex: none; }
.rtarget.off { opacity: .6; }
.badge svg { width: 12px; height: 12px; stroke: currentColor; fill: none; stroke-width: 2; margin-right: 3px; }
.card h2 > svg, .section-title h2 > svg { width: 18px; height: 18px; vertical-align: -3px; stroke: var(--accent); fill: none; stroke-width: 1.8; margin-right: 4px; }
.cl .pname > svg, .adhit svg, td .row > svg { width: 16px; height: 16px; stroke: var(--muted); fill: none; stroke-width: 1.8; }
.table-wrap td svg:not(.btn svg) { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.8; flex: none; vertical-align: -3px; }
.modal > .seg, .modal .seg#bbTabs { justify-self: start; }

/* ===================================================== 0.4.1 */
/* Formulare in zwei Spalten (Serverstart, Einstellungen) */
.form-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 20px; align-items: start; }
.form-2 > .wide { grid-column: 1 / -1; }
@media (max-width: 760px) { .form-2 { grid-template-columns: minmax(0, 1fr); } }
/* Zähler im Menü (verfügbare Updates) */
.nbadge { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: var(--accent-fill); color: #fff;
  font-size: 11.5px; font-weight: 700; line-height: 20px; text-align: center; animation: pop .35s var(--spring); }
/* Einstellungen in Bereichen */
.set-tabs { margin-bottom: 18px; max-width: 100%; overflow-x: auto; overflow-y: hidden; padding-bottom: 2px; }
.set-tabs .seg { white-space: nowrap; }
.set-body { max-width: 1080px; }
.set-stack { display: grid; gap: 16px; }
.set-card h2 { margin-bottom: 2px; }
.set-lede { margin: 0 0 16px !important; max-width: 80ch; }
.set-foot { margin-top: 2px; padding-top: 14px; border-top: 1px solid var(--line); }
.set-events { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px 18px; }
.set-link > .row > svg { width: 22px; height: 22px; stroke: var(--accent); fill: none; stroke-width: 1.8; flex: none; }
/* Rechte eines Kontos wie bei den Rollen; Abweichungen von der Rolle sind markiert */
.perm.ovr { box-shadow: inset 3px 0 0 var(--good); background: var(--good-soft); }
.perm.ovr.deny { box-shadow: inset 3px 0 0 var(--bad); background: var(--bad-soft); }
.perm .pline { display: block; }
.pstate { font-size: 11.5px; } .pstate.allow { color: var(--good); } .pstate.deny { color: var(--bad); }
.linkbtn { border: 0; background: none; padding: 0 2px; font: inherit; font-size: 12.5px; font-weight: 600; color: var(--accent); cursor: pointer; }
.linkbtn:hover { text-decoration: underline; }
.preset { border: 0; background: none; padding: 0; font: inherit; font-size: 11.5px; color: var(--accent); cursor: pointer; text-decoration: underline; }
/* Startbefehl kompakt, JVM-Argumente aufklappbar */
.cmd .mono { font-size: 12.5px; overflow-wrap: anywhere; }
.cmd-args { margin-top: 8px; padding: 8px 10px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); max-height: 260px; overflow: auto;
  display: grid; gap: 1px; font-size: 12px; }
