:root {
  color-scheme: light;
  --bg: #f5f6f8; --surface: #fff; --surface-2: #fafbfc; --surface-3: #f2f4f7; --hover: #f9fafb; --stage-bg: #e9ecf1;
  --border: #e3e6eb; --input-border: #cfd4dc; --text: #1c2330; --muted: #667085; --track: #eaecf0;
  --accent: #4f46e5; --accent-dark: #4338ca; --accent-hover: #4338ca; --accent-soft: #eef0ff;
  --danger: #d92d20; --danger-soft: #fef3f2; --ok: #067647; --ok-soft: #ecfdf3; --warn: #b54708; --warn-soft: #fffaeb;
  --purple: #6941c6; --purple-soft: #f4ebff;
  --radius: 10px; --shadow: 0 1px 2px rgba(16,24,40,.06), 0 1px 3px rgba(16,24,40,.08);
}
/* Dunkelmodus: automatisch nach Systemeinstellung, oder per Schalter oben rechts erzwungen (data-theme) */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0f1218; --surface: #181c25; --surface-2: #1d222d; --surface-3: #262c3a; --hover: #1f2430; --stage-bg: #11141b;
    --border: #2a3140; --input-border: #3a4356; --text: #e8eaf0; --muted: #9aa3b5; --track: #2a3140;
    --accent: #6366f1; --accent-dark: #a5b4fc; --accent-hover: #7c7ff5; --accent-soft: #24275c;
    --danger: #f97066; --danger-soft: #3b1d1d; --ok: #4ade80; --ok-soft: #12301f; --warn: #fdb022; --warn-soft: #33260f;
    --purple: #c4b5fd; --purple-soft: #2e2150;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 1px 3px rgba(0,0,0,.4);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0f1218; --surface: #181c25; --surface-2: #1d222d; --surface-3: #262c3a; --hover: #1f2430; --stage-bg: #11141b;
  --border: #2a3140; --input-border: #3a4356; --text: #e8eaf0; --muted: #9aa3b5; --track: #2a3140;
  --accent: #6366f1; --accent-dark: #a5b4fc; --accent-hover: #7c7ff5; --accent-soft: #24275c;
  --danger: #f97066; --danger-soft: #3b1d1d; --ok: #4ade80; --ok-soft: #12301f; --warn: #fdb022; --warn-soft: #33260f;
  --purple: #c4b5fd; --purple-soft: #2e2150;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 1px 3px rgba(0,0,0,.4);
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--text); background: var(--bg); }
.boot { padding: 2rem; color: var(--muted); }
h1, h2, h3 { margin: 0; line-height: 1.25; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent); }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: .4rem; border: 1px solid var(--border); background: var(--surface); padding: .45rem .85rem; border-radius: 8px; cursor: pointer; text-decoration: none; color: var(--text); white-space: nowrap; box-shadow: var(--shadow); }
.btn:hover { background: var(--hover); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-hover); }
.btn.danger { color: var(--danger); }
.btn.danger.solid { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn.small { padding: .25rem .55rem; font-size: 13px; }
.btn.ghost { background: transparent; border-color: transparent; box-shadow: none; }
.btn.ghost:hover { background: rgba(16,24,40,.06); }
.btn.active { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-dark); }

input[type=text], input[type=password], select, textarea { width: 100%; padding: .5rem .7rem; border: 1px solid var(--input-border); border-radius: 8px; background: var(--surface); }
input:focus, select:focus, .btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
label.field { display: block; margin-bottom: .9rem; font-weight: 600; font-size: 14px; }
label.field > span { display: block; margin-bottom: .3rem; }
label.field small { display: block; font-weight: 400; color: var(--muted); margin-top: .25rem; }

/* Login */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 1rem; }
.login-card { width: 100%; max-width: 380px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 2rem; box-shadow: var(--shadow); }
.login-card h1 { font-size: 1.4rem; margin-bottom: .3rem; }
.login-card p.sub { color: var(--muted); margin: 0 0 1.4rem; }
.logo { width: 42px; height: 42px; border-radius: 11px; background: var(--accent); display: grid; place-items: center; margin-bottom: 1rem; }
.error { background: var(--danger-soft); color: var(--danger); padding: .6rem .8rem; border-radius: 8px; margin-bottom: 1rem; font-size: 14px; }
.notice { background: var(--warn-soft); color: var(--warn); padding: .6rem .8rem; border-radius: 8px; margin-bottom: 1rem; font-size: 14px; }
.notice code { background: rgba(0,0,0,.06); padding: 0 .3rem; border-radius: 4px; }

/* Shell */
.shell { display: flex; flex-direction: column; height: 100vh; }
.topbar { display: flex; align-items: center; gap: 1rem; padding: 0 1.2rem; height: 56px; background: var(--surface); border-bottom: 1px solid var(--border); flex: none; }
.brand { display: flex; align-items: center; gap: .6rem; font-weight: 700; font-size: 1.05rem; }
.brand .logo { width: 30px; height: 30px; border-radius: 8px; margin: 0; }
.brand .logo svg { width: 18px; height: 18px; }
.nav { display: flex; gap: .2rem; margin-left: 1rem; }
.nav a { padding: .4rem .8rem; border-radius: 8px; text-decoration: none; color: var(--muted); font-weight: 500; }
.nav a:hover { background: var(--bg); color: var(--text); }
.nav a.on { background: var(--accent-soft); color: var(--accent-dark); }
.spacer { flex: 1; }
.who { color: var(--muted); font-size: 14px; }
.who b { color: var(--text); font-weight: 600; }
.content { flex: 1; overflow: auto; }
.page { max-width: 1050px; margin: 0 auto; padding: 1.5rem 1.2rem 4rem; }
.page-head { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; margin-bottom: 1rem; }
.page-head h1 { font-size: 1.35rem; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.2rem; margin-bottom: 1.2rem; }
.card h2 { font-size: 1.05rem; margin-bottom: .3rem; }
.card p.hint { margin: 0 0 1rem; color: var(--muted); font-size: 14px; }
.muted { color: var(--muted); }

/* Breadcrumb / Toolbar */
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: .15rem; font-size: 15px; }
.crumbs a { color: var(--text); text-decoration: none; padding: .15rem .4rem; border-radius: 6px; }
.crumbs a:hover { background: rgba(16,24,40,.07); }
.crumbs .sep { color: var(--muted); }
.crumbs b { padding: .15rem .4rem; }
.toolbar { display: flex; gap: .5rem; flex-wrap: wrap; margin-left: auto; }

/* Dateiliste */
.table-wrap { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; position: relative; }
table.list { width: 100%; border-collapse: collapse; }
.list th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; padding: .6rem 1rem; background: var(--surface-2); border-bottom: 1px solid var(--border); }
.list td { padding: .55rem 1rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
.list tr:last-child td { border-bottom: 0; }
.list tbody tr:hover { background: var(--hover); }
.list td.num, .list th.num { text-align: right; white-space: nowrap; }
.list td.acts { text-align: right; white-space: nowrap; }
.fname { display: flex; align-items: center; gap: .7rem; min-width: 0; }
.fname .ico { width: 34px; height: 34px; flex: none; display: grid; place-items: center; font-size: 20px; background: var(--bg); border-radius: 8px; overflow: hidden; }
.fname .ico img { width: 100%; height: 100%; object-fit: cover; }
.fname a, .fname button.link { color: var(--text); font-weight: 500; text-decoration: none; background: none; border: 0; padding: 0; cursor: pointer; text-align: left; overflow-wrap: anywhere; }
.fname a:hover, .fname button.link:hover { color: var(--accent-dark); text-decoration: underline; }
.badge { display: inline-block; font-size: 12px; font-weight: 600; padding: .1rem .5rem; border-radius: 999px; background: var(--ok-soft); color: var(--ok); margin-left: .4rem; white-space: nowrap; }
.badge.role-admin { background: var(--purple-soft); color: var(--purple); }
.badge.role-editor { background: var(--accent-soft); color: var(--accent-dark); }
.badge.role-viewer { background: var(--surface-3); color: var(--muted); }
.badge.off { background: var(--danger-soft); color: var(--danger); }
.star { background: none; border: 0; cursor: pointer; font-size: 18px; line-height: 1; padding: .2rem .35rem; border-radius: 6px; color: #b0b7c3; }
.star:hover { background: var(--surface-3); color: #f79009; }
.star.on { color: #f79009; cursor: default; }
.empty { padding: 3rem 1rem; text-align: center; color: var(--muted); }
.drop-overlay { position: absolute; inset: 0; background: rgba(79,70,229,.1); border: 2px dashed var(--accent); border-radius: var(--radius); display: grid; place-items: center; font-weight: 600; color: var(--accent-dark); font-size: 1.1rem; z-index: 5; pointer-events: none; }
.dropzone { margin-top: .8rem; text-align: center; color: var(--muted); font-size: 14px; }
@media (max-width: 720px) { .list .hide-sm { display: none; } .nav { margin-left: 0; } .who span { display: none; } }

/* Dialog */
dialog { border: 0; background: var(--surface); border-radius: 14px; padding: 0; box-shadow: 0 20px 50px rgba(16,24,40,.3); max-width: min(520px, 94vw); width: 100%; color: var(--text); }
dialog.wide { max-width: min(720px, 94vw); }
dialog::backdrop { background: rgba(16,24,40,.45); }
dialog form, dialog .dlg { padding: 1.3rem 1.4rem 1.1rem; }
dialog h2 { font-size: 1.15rem; margin-bottom: .8rem; }
dialog p { margin: 0 0 1rem; }
.dlg-actions { display: flex; justify-content: flex-end; gap: .5rem; margin-top: 1.2rem; }
.vlist { max-height: 50vh; overflow: auto; border: 1px solid var(--border); border-radius: 8px; }
.vlist .row { display: flex; align-items: center; gap: .8rem; padding: .55rem .8rem; border-bottom: 1px solid var(--border); }
.vlist .row:last-child { border-bottom: 0; }

/* Toasts */
#toasts { position: fixed; top: 14px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: .5rem; z-index: 100; align-items: center; }
.toast { background: #1c2330; color: #fff; padding: .6rem 1rem; border-radius: 9px; box-shadow: 0 6px 20px rgba(0,0,0,.25); max-width: 90vw; }
.toast.err { background: var(--danger); }
.toast.ok { background: var(--ok); }

/* Uploads */
#uploads { position: fixed; right: 16px; bottom: 16px; width: 340px; max-width: calc(100vw - 32px); background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 10px 30px rgba(16,24,40,.2); z-index: 50; overflow: hidden; }
#uploads .up-head { display: flex; align-items: center; padding: .6rem .8rem; background: var(--surface-2); border-bottom: 1px solid var(--border); font-weight: 600; font-size: 14px; }
#uploads .up-body { max-height: 260px; overflow: auto; }
.up-item { padding: .5rem .8rem; border-bottom: 1px solid var(--border); font-size: 13px; }
.up-item:last-child { border-bottom: 0; }
.up-item .n { display: flex; justify-content: space-between; gap: .5rem; }
.up-item .n span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar { height: 6px; background: var(--track); border-radius: 999px; margin-top: .3rem; overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--accent); width: 0; transition: width .15s; }
.up-item.done .bar > i { background: var(--ok); }
.up-item.fail .bar > i { background: var(--danger); }
.up-item.fail .st { color: var(--danger); }

/* Editor */
.editor-shell { display: flex; flex-direction: column; height: 100%; }
.ed-bar { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; padding: .5rem 1rem; background: var(--surface); border-bottom: 1px solid var(--border); flex: none; }
.ed-title { font-weight: 600; display: flex; align-items: center; gap: .5rem; min-width: 0; overflow-wrap: anywhere; }
.dirty { width: 9px; height: 9px; border-radius: 50%; background: #f79009; display: none; flex: none; }
.dirty.on { display: inline-block; }
.seg { display: inline-flex; }
.seg .btn { border-radius: 0; box-shadow: none; margin-left: -1px; padding: .35rem .65rem; }
.seg .btn:first-child { border-radius: 8px 0 0 8px; margin-left: 0; }
.seg .btn:last-child { border-radius: 0 8px 8px 0; }
.ed-main { flex: 1; display: grid; min-height: 0; }
.ed-main.split { grid-template-columns: 1fr 1fr; }
.ed-main.code { grid-template-columns: 1fr 0; }
.ed-main.prev { grid-template-columns: 0 1fr; }
.ed-code { min-width: 0; min-height: 0; position: relative; border-right: 1px solid var(--border); background: var(--surface); overflow: hidden; }
.ed-code .loading { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); }
.ed-prev { min-width: 0; min-height: 0; background: var(--stage-bg); display: flex; flex-direction: column; overflow: hidden; }
.ed-prev .pv-bar { display: flex; gap: .5rem; align-items: center; padding: .35rem .6rem; font-size: 13px; color: var(--muted); background: var(--surface-3); border-bottom: 1px solid var(--border); }
.ed-prev .pv-bar select { width: auto; max-width: 260px; padding: .15rem .4rem; font-size: 13px; }
.pv-stage { flex: 1; min-height: 0; overflow: auto; display: flex; justify-content: center; padding: 0; }
.pv-stage iframe { border: 0; background: #fff; height: 100%; width: 100%; box-shadow: 0 0 0 1px var(--border); }
.pv-stage.tablet, .pv-stage.phone { padding: 14px; }
.pv-stage.tablet iframe { width: 768px; max-width: 100%; }
.pv-stage.phone iframe { width: 390px; max-width: 100%; }
@media (max-width: 800px) { .ed-main.split { grid-template-columns: 1fr; grid-template-rows: 1fr 1fr; } }

/* Zusätze */
textarea { resize: vertical; min-height: 5.5rem; }
.chip { background: var(--warn-soft); color: var(--warn); border: 1px solid color-mix(in srgb, var(--warn) 35%, transparent); padding: .2rem .65rem; border-radius: 999px; font-size: 13px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.chip:hover { filter: brightness(.97); }
.switch { display: flex; align-items: flex-start; gap: .7rem; cursor: pointer; margin-bottom: 1rem; }
.switch input { width: 1.15rem; height: 1.15rem; margin-top: .2rem; accent-color: var(--accent); flex: none; }
.switch b { display: block; }
.switch span { color: var(--muted); font-size: 14px; }
.theme-btn { min-width: 2.1rem; justify-content: center; }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.row-actions { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.brand, .who { white-space: nowrap; }

/* Erweiterungen: Filter, Mehrfachauswahl, Menü, Speicher, Auswahlkarten, 2FA */
[hidden] { display: none !important; }
.filters { display: flex; gap: .8rem; align-items: center; flex-wrap: wrap; margin-bottom: .8rem; }
.search { max-width: 320px; }
.bulk { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; background: var(--accent-soft); border: 1px solid var(--accent); border-radius: 8px; padding: .3rem .6rem; }
th.sortable { cursor: pointer; user-select: none; white-space: nowrap; }
th.sortable:hover { color: var(--text); }
th.chk, td.chk { width: 1%; padding-right: 0; }
.list input[type=checkbox] { width: 1.05rem; height: 1.05rem; accent-color: var(--accent); cursor: pointer; }
.list tbody tr.sel { background: var(--accent-soft); }
.nowrap { white-space: nowrap; }
.break { overflow-wrap: anywhere; }
tr.warnrow td { background: var(--warn-soft); }
.menu-wrap { display: inline-block; }
.menu { position: fixed; z-index: 60; min-width: 230px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.25); padding: .3rem; text-align: left; }
.menu-item { display: block; width: 100%; text-align: left; background: none; border: 0; padding: .45rem .7rem; border-radius: 7px; cursor: pointer; text-decoration: none; color: var(--text); font-size: 14px; }
.menu-item:hover { background: var(--hover); }
.menu-item.danger { color: var(--danger); }
.usage { margin-top: .8rem; color: var(--muted); font-size: 13px; display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; }
.usage .bar { width: 160px; margin: 0; }
.choice { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; margin-bottom: 1rem; }
@media (max-width: 640px) { .choice { grid-template-columns: 1fr; } }
.choice label { display: flex; gap: .7rem; align-items: flex-start; border: 1px solid var(--border); border-radius: 10px; padding: .7rem .9rem; cursor: pointer; }
.choice label:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.choice input { margin-top: .25rem; accent-color: var(--accent); }
.choice b { display: block; }
.choice small { color: var(--muted); font-size: 13px; }
.qr { background: #fff; display: inline-block; padding: 8px; border-radius: 10px; margin: .3rem 0 1rem; line-height: 0; }
code.secret { background: var(--surface-3); padding: .15rem .45rem; border-radius: 6px; font-size: 14px; letter-spacing: .06em; user-select: all; }
pre.codes { background: var(--surface-3); border-radius: 10px; padding: 1rem; font-size: 15px; letter-spacing: .05em; user-select: all; margin: 0 0 1rem; }

/* Obere Leiste: Burger-Menü für schmale Bildschirme */
.topbar-menu { display: flex; align-items: center; gap: 1rem; flex: 1; min-width: 0; }
.burger { display: none; font-size: 20px; line-height: 1; padding: .4rem .75rem; }
@media (max-width: 1000px) {
  .topbar { position: relative; }
  .brand { flex: 1; }
  .burger { display: inline-flex; }
  .topbar-menu { display: none; position: absolute; top: 100%; left: 0; right: 0; z-index: 70; flex-direction: column; align-items: stretch; gap: .35rem; padding: .6rem .8rem 1rem; background: var(--surface); border-bottom: 1px solid var(--border); box-shadow: 0 14px 30px rgba(0,0,0,.28); max-height: calc(100vh - 56px); overflow: auto; }
  .topbar.menu-open .topbar-menu { display: flex; }
  .topbar-menu .nav { flex-direction: column; margin: 0; gap: .15rem; }
  .topbar-menu .nav a { padding: .8rem 1rem; font-size: 16px; }
  .topbar-menu .spacer { display: none; }
  .topbar-menu .btn, .topbar-menu .chip { justify-content: center; text-align: center; padding: .7rem 1rem; font-size: 15px; }
  .topbar-menu .who { padding: .5rem 1rem; text-align: center; border-top: 1px solid var(--border); margin-top: .3rem; }
}
@media (max-width: 720px) {
  .page { padding: 1rem .8rem 4rem; }
  .toolbar { margin-left: 0; width: 100%; }
  .toolbar .btn { flex: 1 1 auto; justify-content: center; }
  .list th, .list td { padding: .5rem .6rem; }
  .search { max-width: none; width: 100%; }
  .card { padding: 1rem; }
  .ed-bar { padding: .5rem .6rem; }
}

/* Platzhalter-Gestaltung */
.page.wide { max-width: 1280px; }
.design { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: 1.2rem; align-items: start; margin: 1rem 0; }
.design-preview { grid-column: 2; grid-row: 1; position: sticky; top: 12px; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: var(--surface-2); }
.design-form { grid-column: 1; grid-row: 1; min-width: 0; }
.design-bar { padding: .45rem .8rem; font-size: 13px; font-weight: 600; border-bottom: 1px solid var(--border); }
.design-frame { width: 100%; height: min(70vh, 620px); border: 0; display: block; background: #fff; }
.dsec { border: 1px solid var(--border); border-radius: 10px; margin-bottom: .7rem; background: var(--surface); }
.dsec > summary { cursor: pointer; padding: .7rem 1rem; font-weight: 600; list-style: none; user-select: none; }
.dsec > summary::-webkit-details-marker { display: none; }
.dsec > summary::after { content: '▾'; float: right; color: var(--muted); transition: transform .15s; }
.dsec:not([open]) > summary::after { transform: rotate(-90deg); }
.dsec[open] > summary { border-bottom: 1px solid var(--border); }
.dbody { padding: 1rem 1rem .2rem; }
.tplgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .6rem; }
.tplcard { text-align: left; background: var(--surface); border: 2px solid var(--border); border-radius: 10px; padding: .6rem; cursor: pointer; display: flex; flex-direction: column; gap: .25rem; }
.tplcard:hover:not(:disabled) { border-color: var(--accent); }
.tplcard.on { border-color: var(--accent); background: var(--accent-soft); }
.tplcard small { color: var(--muted); font-size: 12px; line-height: 1.3; }
.swatch { display: flex; height: 34px; border: 3px solid; border-radius: 6px; overflow: hidden; margin-bottom: .2rem; }
.swatch i { flex: 1; }
.colorgrid { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; margin-bottom: 1rem; }
.colorpick { display: flex; align-items: center; gap: .5rem; border: 1px solid var(--border); border-radius: 8px; padding: .35rem .5rem; font-size: 14px; }
.colorpick input[type=color] { width: 2.2rem; height: 2rem; padding: 0; border: 0; background: none; cursor: pointer; flex: none; }
.colorpick span { flex: 1; }
input[type=range] { width: 100%; accent-color: var(--accent); }
@media (max-width: 900px) { .design { grid-template-columns: 1fr; } .design-preview { grid-column: 1; grid-row: 1; position: static; } .design-form { grid-column: 1; grid-row: 2; } .design-frame { height: 340px; } .colorgrid { grid-template-columns: 1fr; } }

/* Mobil: Listen als Karten statt breiter Tabellen */
@media (max-width: 720px) {
  .list, .list tbody { display: block; width: 100%; }
  .list thead { display: none; }
  .list .lbl { display: none; }
  .list.files tr { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; column-gap: .5rem; border-bottom: 1px solid var(--border); padding: .35rem .5rem; }
  .list.files tr:last-child { border-bottom: 0; }
  .list.files td { border: 0; padding: .2rem; min-width: 0; }
  .list.files td.acts { white-space: nowrap; display: flex; align-items: center; gap: .3rem; justify-content: flex-end; }
  .list.files td.empty { grid-column: 1 / -1; }
  .list.files .fname { gap: .5rem; flex-wrap: wrap; }
  .list.files .fname a, .list.files .fname button.link { min-width: 0; overflow-wrap: anywhere; word-break: normal; }
  .list:not(.files) tr { display: block; padding: .6rem .3rem; border-bottom: 1px solid var(--border); }
  .list:not(.files) tr:last-child { border-bottom: 0; }
  .list:not(.files) td { display: block; border: 0; padding: .25rem .6rem; }
  .list:not(.files) td.acts { display: flex; flex-wrap: wrap; gap: .4rem; text-align: left; white-space: normal; }
  .list:not(.files) td.empty { text-align: center; }
  .filters { flex-direction: column; align-items: stretch; }
  .usage { flex-direction: column; align-items: flex-start; gap: .3rem; }
}
.tl { display: none; }
@media (max-width: 1000px) { .topbar-menu .tl { display: inline; } .topbar-menu .who span { display: inline; } .topbar-menu .theme-btn { min-width: 0; } }

/* Einladungen / Freischaltung */
.nbadge { margin-left: .4rem; background: var(--danger); color: #fff; border-radius: 999px; font-size: 12px; font-weight: 700; padding: .05rem .5rem; }
.copyrow { display: flex; gap: .5rem; }
.copyrow input { flex: 1; min-width: 0; font-size: 13px; }
tr.pendingrow td { background: var(--warn-soft); }
