/* Flimmerkiste – Gestaltung
   Aufbau und Bausteine von Rohrpost übernommen (Stand 28.10.2026), Farben: Lila mit gedämpfter Koralle.
   Motiv: Kofferfernseher. Die Variablennamen (--tube …) stammen aus Rohrpost und bleiben gleich. */

:root {
  --bg: #efecf6;
  --surface: #ffffff;
  --surface-2: #f6f4fa;
  --ink: #1d1730;
  --muted: #5e5875;
  --line: #dcd5ea;
  --tube: #5b4b8a;
  --tube-ink: #ffffff;
  --tube-soft: #e6e1f2;
  --accent: #d98e7c;
  --glass: #f1eef8;
  --ok: #2d7d4f;
  --bad: #b8372e;
  --warn: #8a5a00;
  --warn-bg: #f6e9c8;
  --paper: #f6efe2; --paper-2: #e8dcc6; --paper-3: #cdbd9f; --paper-line: #dccdb0;
  --r-lg: 16px; --r-md: 10px; --r-pill: 999px;
  --font: system-ui, -apple-system, "Segoe UI Variable Text", "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --font-display: ui-rounded, "SF Pro Rounded", "Segoe UI Variable Display", system-ui, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #15111d; --surface: #1f192a; --surface-2: #261f33; --ink: #ece8f4; --muted: #a79fbb; --line: #352c45;
    --tube: #a693e0; --tube-ink: #160f24; --tube-soft: #3a2f57; --accent: #e3a091; --glass: #2a2238;
    --ok: #5fc48a; --bad: #f0786f; --warn: #e6bb55; --warn-bg: #3d3018; --paper-line: #b9a98c;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.55 var(--font); font-variant-numeric: tabular-nums; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
main.wrap { padding-top: 24px; padding-bottom: 80px; }
h1, h2, h3 { font-family: var(--font-display); letter-spacing: -.015em; line-height: 1.2; }
h1 { font-size: 1.55rem; font-weight: 750; margin: 0 0 6px; }
h2 { font-size: 1.12rem; font-weight: 700; margin: 0 0 10px; }
h3 { font-size: 1rem; font-weight: 650; margin: 0; }
p { margin: 0 0 12px; max-width: 72ch; }
a { color: var(--tube); text-underline-offset: 2px; }
code { font-family: var(--font-mono); font-size: .88em; overflow-wrap: anywhere; }
.muted { color: var(--muted); } .small { font-size: .85rem; } .hidden { display: none !important; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

/* ---------- Kopfzeile ---------- */
.top { background: var(--surface); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 20px; min-height: 60px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-family: var(--font-display); font-weight: 800; font-size: 1.2rem; letter-spacing: -.02em; }
.brand img { width: 28px; height: 28px; display: block; }
nav { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; }
nav a { color: var(--muted); text-decoration: none; padding: 5px 11px; border-radius: 8px; font-weight: 550; }
nav a:hover { color: var(--ink); background: var(--surface-2); }
nav a.on { color: var(--tube); background: var(--tube-soft); }
nav .who { color: var(--muted); font-size: .86rem; padding-left: 6px; }

/* ---------- Flächen & Meldungen ---------- */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px; margin-bottom: 18px; }
.panel.narrow { max-width: 440px; margin-left: auto; margin-right: auto; }
.panel.danger-zone { border-color: color-mix(in srgb, var(--bad) 45%, var(--line)); }
.page-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 14px; margin-bottom: 14px; }
.flash { padding: 10px 14px; border-radius: var(--r-md); margin-bottom: 14px; border-left: 4px solid; background: var(--surface); }
.flash.ok { border-color: var(--ok); } .flash.err { border-color: var(--bad); } .flash.info { border-color: var(--accent); }
.news { border: 1px solid var(--accent); background: var(--surface); border-radius: var(--r-lg); padding: 12px 16px; margin-bottom: 14px; display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; }
.news ul { list-style: none; margin: 0; padding: 0; flex: 1 1 320px; font-size: .92rem; }
.news li { padding: 2px 0; }

/* ---------- Formulare & Buttons ---------- */
.stack { display: flex; flex-direction: column; gap: 12px; }
.stack.tight { gap: 8px; }
label { display: flex; flex-direction: column; gap: 5px; font-size: .9rem; font-weight: 550; }
label.check { flex-direction: row; align-items: center; gap: 8px; font-weight: 500; }
label.check input { width: 17px; height: 17px; accent-color: var(--tube); }
input[type=text], input[type=password], input[type=number], input[type=email], input:not([type]), select {
  font: inherit; font-weight: 400; padding: 8px 11px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--surface-2); color: var(--ink); width: 100%;
}
input:focus, select:focus { border-color: var(--tube); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--tube) 15%, transparent); }
input.bad { border-color: var(--bad); box-shadow: 0 0 0 3px color-mix(in srgb, var(--bad) 15%, transparent); }
.err { color: var(--bad); font-size: .88rem; margin-top: -4px; }
button { font: inherit; font-size: 14px; font-weight: 550; line-height: 1.3; padding: 6px 12px; border-radius: 8px; border: 1px solid var(--line);
         background: var(--surface); color: var(--ink); cursor: pointer; }
button:hover { border-color: var(--muted); }
button:disabled { opacity: .45; cursor: not-allowed; }
button.primary { background: var(--tube); border-color: var(--tube); color: var(--tube-ink); }
button.primary:hover { filter: brightness(1.08); }
button.danger { color: var(--bad); }
button.danger.solid { background: var(--bad); border-color: var(--bad); color: #fff; }
button.quiet { border-color: transparent; background: none; color: var(--muted); padding-left: 6px; padding-right: 6px; }
button.quiet:hover { color: var(--ink); }
button.big { padding: 10px 18px; font-size: 15px; width: 100%; }
form.inline { display: inline; }
.buttons { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.pwfield { position: relative; display: block; }
.pwfield input { padding-right: 44px; }
.pwfield .eye { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); border: 0; background: none; padding: 6px; color: var(--muted); }

/* ---------- Speicheranzeige ---------- */
.gauge { min-width: 240px; text-align: right; }
.gtube { position: relative; height: 12px; border-radius: var(--r-pill); background: var(--glass); border: 1px solid var(--line); overflow: hidden; }
.gbar { position: absolute; left: 2px; top: 2px; bottom: 2px; width: 0; border-radius: var(--r-pill); background: var(--tube); }
.gbar.high { background: var(--accent); } .gbar.full { background: var(--bad); }
.gauge-text { font-size: .85rem; color: var(--muted); margin-top: 5px; }
.gauge-text strong { color: var(--ink); }

/* ---------- Rohr & Rolle (SVG) ---------- */
.t-outer { fill: none; stroke: var(--line); stroke-linecap: round; stroke-linejoin: round; }
.t-inner { fill: none; stroke: var(--glass); stroke-linecap: round; stroke-linejoin: round; }
.t-trail { fill: none; stroke: var(--tube-soft); stroke-linecap: round; stroke-linejoin: round; }
.t-trail.done { stroke: color-mix(in srgb, var(--ok) 28%, var(--glass)); }
.t-trail.failed { stroke: color-mix(in srgb, var(--bad) 22%, var(--glass)); }
.r-body { fill: var(--paper); stroke: var(--paper-line); stroke-width: 1; }
.r-end { fill: var(--paper-2); stroke: var(--paper-line); stroke-width: 1; }
.r-core { fill: var(--paper-3); }
.r-band { fill: var(--accent); }
.st-tray { fill: var(--tube); }
.dust { fill: var(--paper-3); }

/* ---------- Datei-Browser ---------- */
.finder { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; position: relative; }
.finder.drag-over { box-shadow: 0 0 0 3px var(--accent); }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; font-weight: 600; min-width: 0; }
.crumbs a { color: var(--muted); text-decoration: none; padding: 3px 6px; border-radius: 7px; }
.crumbs a:hover { background: var(--surface-2); color: var(--ink); }
.crumbs a.drop-target { box-shadow: inset 0 0 0 2px var(--accent); }
.crumbs .sep { color: var(--line); }
.crumbs .here { padding: 3px 6px; }
.tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.search { position: relative; }
.search input { padding: 6px 10px 6px 32px; width: 210px; font-size: 14px; }
.search svg { position: absolute; left: 11px; top: 50%; width: 15px; height: 15px; transform: translateY(-50%); stroke: var(--muted); fill: none; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 9px; padding: 2px; background: var(--surface-2); }
.seg button { border: 0; background: none; padding: 4px 8px; border-radius: 7px; display: grid; place-items: center; }
.seg button svg { width: 17px; height: 17px; stroke: var(--muted); fill: none; }
.seg button.on { background: var(--surface); box-shadow: 0 1px 2px rgba(0,0,0,.12); }
.seg button.on svg { stroke: var(--ink); }
.menu-wrap { position: relative; display: inline-block; }

.fbody { min-height: 220px; user-select: none; -webkit-user-select: none; outline: none; }
.empty { padding: 48px 20px; text-align: center; color: var(--muted); }
.empty strong { display: block; color: var(--ink); font-size: 1.05rem; margin-bottom: 4px; }

.flist { width: 100%; border-collapse: collapse; font-size: 13.5px; line-height: 1.3; table-layout: fixed; }
.flist th { text-align: left; font-weight: 600; font-size: 12px; color: var(--muted); padding: 0; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--surface); }
.flist th button { width: 100%; text-align: left; border: 0; border-radius: 0; background: none; font-size: 12px; font-weight: 600; color: inherit; padding: 6px 10px; }
.flist th + th button { border-left: 1px solid var(--line); }
.flist th.sorted button { color: var(--ink); }
.flist td { padding: 0 10px; height: 30px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.flist tbody tr:nth-child(even) { background: var(--surface-2); }
.flist tbody tr.sel { background: var(--tube); color: var(--tube-ink); }
.flist tbody tr.sel .dim { color: var(--tube-ink); opacity: .85; }
.flist tbody tr.sel .pill { background: rgba(255,255,255,.22); color: var(--tube-ink); }
.flist tbody tr.drop-target { box-shadow: inset 0 0 0 2px var(--accent); }
.flist .c-name { width: auto; } .flist .c-date { width: 150px; } .flist .c-size { width: 90px; text-align: right; } .flist .c-link { width: 190px; } .flist .c-more { width: 38px; }
.flist td.c-size, .flist th.c-size button { text-align: right; }
.flist .dim { color: var(--muted); }
.flist .sub { color: var(--muted); font-size: 12px; margin-left: 6px; }
.nm { display: flex; align-items: center; gap: 6px; min-width: 0; }
.nm .tw { flex: none; width: 16px; height: 16px; border: 0; background: none; padding: 0; display: grid; place-items: center; color: var(--muted); font-size: 9px; border-radius: 4px; transition: transform .12s; }
.nm .tw.open { transform: rotate(90deg); }
.nm .tw.none { visibility: hidden; }
.sel .nm .tw { color: var(--tube-ink); }
.nm .ic { flex: none; width: 18px; height: 18px; }
.nm .ic.dir { fill: var(--accent); }
.nm .ic.doc { fill: none; stroke: currentColor; opacity: .6; }
.nm .ic.user { fill: none; stroke: currentColor; opacity: .7; }
.nm img.mini { flex: none; width: 18px; height: 18px; object-fit: cover; border-radius: 3px; }
.nm .tx { overflow: hidden; text-overflow: ellipsis; }
.nm .ind { flex: none; display: inline-block; }
.flist input.rename, .tile input.rename { font: inherit; padding: 1px 6px; border-radius: 5px; border: 2px solid var(--accent); background: var(--surface); color: var(--ink); width: auto; min-width: 180px; }
.flist .pill { font-size: 11.5px; padding: 1px 8px; }
.flist .pill::before { width: 6px; height: 6px; }
.rowmore { border: 0; background: none; padding: 2px 6px; color: inherit; opacity: .55; font-weight: 700; }
.rowmore:hover { opacity: 1; }

.grid-view { display: grid; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 6px; padding: 14px; }
.tile { display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 10px 6px 8px; border-radius: 12px; text-align: center; cursor: default; }
.tile.drop-target { box-shadow: inset 0 0 0 2px var(--accent); }
.tile .thumb { width: 100px; height: 80px; display: grid; place-items: center; }
.tile .thumb img { max-width: 100px; max-height: 80px; border-radius: 5px; box-shadow: 0 1px 3px rgba(0,0,0,.25); border: 3px solid #fff; display: block; }
@media (prefers-color-scheme: dark) { .tile .thumb img { border-color: #2a3e4e; } }
.tile .thumb svg.big { width: 64px; height: 64px; }
.tile .thumb svg.big.dir { fill: var(--accent); }
.tile .thumb svg.big.user { fill: none; stroke: var(--muted); }
.tile .thumb .doc-ic { width: 54px; height: 68px; border-radius: 6px; background: var(--surface); border: 1px solid var(--line); position: relative; display: grid; place-items: end center; padding-bottom: 8px; }
.tile .thumb .doc-ic::before { content: ""; position: absolute; right: -1px; top: -1px; width: 15px; height: 15px; background: linear-gradient(225deg, var(--bg) 50%, var(--line) 50%); border-top-right-radius: 6px; }
.tile .thumb .doc-ic b { font-size: 10px; font-weight: 800; color: var(--tube); max-width: 48px; overflow: hidden; }
.tile .thumb .vid { position: relative; display: block; }
.tile .thumb .vid::after { content: "▶"; position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-size: 16px; text-shadow: 0 1px 4px rgba(0,0,0,.6); }
.tile .tname { font-size: 12.5px; font-weight: 550; line-height: 1.25; max-width: 118px; padding: 2px 6px; border-radius: 5px;
               display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.tile .tsub { font-size: 11px; color: var(--muted); }
.tile .tsub.ok { color: var(--ok); } .tile .tsub.bad { color: var(--bad); }
.tile.sel .thumb { background: color-mix(in srgb, var(--ink) 9%, transparent); border-radius: 8px; }
.tile.sel .tname { background: var(--tube); color: var(--tube-ink); }

.statusbar { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding: 7px 14px; font-size: 12px; color: var(--muted); border-top: 1px solid var(--line); }

.pill { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; font-weight: 650; padding: 2px 10px; border-radius: var(--r-pill); white-space: nowrap; }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill.ok { color: var(--ok); background: color-mix(in srgb, var(--ok) 14%, transparent); }
.pill.bad { color: var(--bad); background: color-mix(in srgb, var(--bad) 12%, transparent); }
.pill.neutral { color: var(--muted); background: color-mix(in srgb, var(--muted) 14%, transparent); }

/* ---------- Kontextmenü ---------- */
.ctx { position: fixed; z-index: 60; min-width: 230px; max-width: 300px; padding: 5px; border-radius: 10px; font-size: 13.5px;
       background: color-mix(in srgb, var(--surface) 90%, transparent); backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4);
       border: 1px solid var(--line); box-shadow: 0 12px 34px rgba(0,0,0,.22); }
.ctx button { display: flex; justify-content: space-between; gap: 18px; width: 100%; text-align: left; padding: 5px 10px; border: 0; border-radius: 6px; background: none; font-weight: 500; font-size: 13.5px; }
.ctx button:hover, .ctx button:focus-visible { background: var(--tube); color: var(--tube-ink); outline: none; }
.ctx button .kbd { color: var(--muted); font-size: 12px; }
.ctx button:hover .kbd, .ctx button:focus-visible .kbd { color: inherit; opacity: .8; }
.ctx button.danger { color: var(--bad); }
.ctx button.danger:hover, .ctx button.danger:focus-visible { background: var(--bad); color: #fff; }
.ctx hr { border: 0; border-top: 1px solid var(--line); margin: 4px 6px; }
.ctx .ctx-head { padding: 4px 10px 6px; font-size: 12px; color: var(--muted); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Dialoge ---------- */
.dialog-backdrop { position: fixed; inset: 0; z-index: 70; background: rgba(8, 20, 32, .45); display: grid; place-items: center; padding: 16px; overflow: auto; }
.dialog { width: 100%; max-width: 440px; background: var(--surface); border-radius: var(--r-lg); padding: 22px; box-shadow: 0 24px 60px rgba(0,0,0,.25); max-height: calc(100vh - 32px); overflow: auto; }
.dialog.wide { max-width: 580px; }
.dialog h2 { margin-bottom: 8px; overflow-wrap: anywhere; }
.dialog .actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; align-items: center; margin-top: 18px; }
.dialog .actions > .muted:first-child { margin-right: auto; }
.dialog .note { font-size: .88rem; color: var(--muted); background: var(--surface-2); border-radius: var(--r-md); padding: 10px 12px; margin: 12px 0 0; }
.dialog label.check { margin-top: 12px; }
.dialog ul.plain { list-style: none; padding: 0; margin: 8px 0; max-height: 180px; overflow: auto; font-size: .9rem; }
.dialog ul.plain li { padding: 2px 0; overflow-wrap: anywhere; }

.share-link { border: 1px solid var(--line); border-radius: var(--r-md); padding: 12px; margin-top: 10px; }
.share-link.inactive { opacity: .65; }
.link-head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; font-size: .9rem; }
.meta { display: flex; flex-wrap: wrap; gap: 2px 14px; color: var(--muted); font-size: .86rem; }
.copy-preview { border: 1px dashed var(--line); border-radius: var(--r-md); padding: 10px 12px; font-size: .9rem; background: var(--surface-2); margin: 10px 0 0; overflow-wrap: anywhere; }
.copy-preview a { font-weight: 700; }
.copy-preview small { color: var(--muted); font-size: .85rem; }
.share-link .buttons { margin-top: 10px; }
.share-new { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.share-new .grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }

.tree { list-style: none; margin: 10px 0 0; padding: 0; max-height: 320px; overflow: auto; border: 1px solid var(--line); border-radius: var(--r-md); }
.tree li button { width: 100%; text-align: left; border: 0; border-radius: 0; background: none; padding: 6px 10px; display: flex; gap: 8px; align-items: center; font-weight: 500; }
.tree li button svg { width: 16px; height: 16px; fill: var(--accent); flex: none; }
.tree li button.on { background: var(--tube); color: var(--tube-ink); }
.tree li button:disabled { opacity: .4; }

/* ---------- Upload-Fenster ---------- */
.transit { position: fixed; right: 16px; bottom: 16px; width: 380px; max-width: calc(100vw - 32px); z-index: 50;
           background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: 0 16px 40px rgba(0,0,0,.2); }
.transit-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); font-weight: 700; }
.transit-body { padding: 4px 14px 10px; max-height: 340px; overflow: auto; }
.transit.min .transit-body { display: none; }
.sending { padding: 10px 0; border-top: 1px solid var(--line); }
.sending:first-child { border-top: 0; }
.sending-head { display: flex; justify-content: space-between; gap: 10px; font-weight: 600; font-size: .92rem; }
.sending-head span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sending-head span:last-child { color: var(--muted); font-weight: 500; white-space: nowrap; }
.sending svg { display: block; width: 100%; height: auto; margin: 6px 0 4px; overflow: visible; }
.sending-info { color: var(--muted); font-size: .82rem; display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; }
.sending.done .sending-info { color: var(--ok); }
.sending.failed .sending-info { color: var(--bad); }

/* ---------- Tabellen (Benutzer, System) ---------- */
table.list { width: 100%; border-collapse: collapse; font-size: .92rem; }
table.list th, table.list td { text-align: left; padding: 9px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.list th { color: var(--muted); font-weight: 600; font-size: .84rem; }
table.list tr:last-child td { border-bottom: 0; }
.table-scroll { overflow-x: auto; }
details.inline { display: inline-block; vertical-align: top; margin: 0 6px 6px 0; }
details.inline summary { cursor: pointer; color: var(--tube); font-weight: 600; font-size: .9rem; }
details.inline summary.danger { color: var(--bad); }
details.inline form { margin-top: 8px; min-width: 240px; }

/* ---------- Konto ---------- */
.form-row { display: grid; grid-template-columns: 210px 1fr; gap: 6px 20px; align-items: start; padding: 16px 0; border-top: 1px solid var(--line); }
.form-row:first-child { border-top: 0; padding-top: 0; }
.form-row:last-child { padding-bottom: 0; }
.form-row .hint { font-size: .85rem; color: var(--muted); margin-top: 4px; }

/* ---------- Empfänger-Seiten ---------- */
.center-page { min-height: calc(100vh - 61px); display: grid; place-items: center; padding: 24px 16px; }
.solo { width: 100%; max-width: 440px; }
.solo.wide { max-width: 580px; }
.solo .panel { padding: 26px; }
.solo h1 { text-align: center; }
.solo .lead { text-align: center; color: var(--muted); margin: 0 auto 6px; }
.station { display: flex; justify-content: center; margin: 0 0 10px; }
.station svg { width: 220px; height: auto; overflow: visible; }
.fname { font-family: var(--font-display); font-size: 1.3rem; font-weight: 750; letter-spacing: -.015em; margin: 0 0 6px; overflow-wrap: anywhere; text-align: center; }
.solo .meta { justify-content: center; margin-bottom: 18px; }
.okmsg { text-align: center; color: var(--ok); font-weight: 600; margin: 4px 0 10px; }
.footer-note { text-align: center; color: var(--muted); font-size: .84rem; margin: 14px auto 0; }
.replay { display: block; margin: 14px auto 0; border: 0; background: none; color: var(--muted); font-size: 13px; text-decoration: underline; text-underline-offset: 3px; }
.replay:hover { color: var(--ink); }
.dlist { list-style: none; margin: 0 0 16px; padding: 0; border: 1px solid var(--line); border-radius: var(--r-md); max-height: 380px; overflow: auto; }
.dlist li { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-top: 1px solid var(--line); font-size: .92rem; }
.dlist li:first-child { border-top: 0; }
.dlist .grow { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.dlist .sz { color: var(--muted); font-size: .82rem; white-space: nowrap; }
.dlist .ind-1 { padding-left: 30px; } .dlist .ind-2 { padding-left: 50px; } .dlist .ind-3 { padding-left: 70px; }
.dlist .ind-4, .dlist .ind-5, .dlist .ind-6 { padding-left: 90px; }
.ficon { flex: none; width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center; background: var(--surface-2); }
.ficon svg { width: 15px; height: 15px; }
.ficon.folder { background: color-mix(in srgb, var(--accent) 18%, transparent); }
.ficon.folder svg { fill: var(--accent); }
.ficon.doc svg { stroke: var(--muted); fill: none; }
.iconbtn { width: 32px; height: 32px; padding: 0; display: inline-grid; place-items: center; border-radius: 8px; border-color: transparent; background: none; }
.iconbtn:hover { background: var(--surface-2); border-color: var(--line); }
.iconbtn svg { width: 17px; height: 17px; stroke: var(--muted); fill: none; }
.iconbtn.go svg { stroke: var(--tube); }

@media (max-width: 760px) {
  .flist .c-date, .flist .c-link { display: none; }
  .search input { width: 100%; }
  .tools, .search { width: 100%; }
  .gauge { min-width: 0; width: 100%; text-align: left; }
  .form-row { grid-template-columns: 1fr; }
  .share-new .grid2 { grid-template-columns: 1fr; }
  .panel { padding: 18px; }
}
@media (hover: hover) { .flist .rowmore { visibility: hidden; } .flist tr:hover .rowmore, .flist tr.sel .rowmore { visibility: visible; } }

/* ---------- Kleinigkeiten ---------- */
.m0 { margin: 0; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); z-index: 80; background: var(--ink); color: var(--surface);
         padding: 10px 16px; border-radius: 10px; font-size: .9rem; box-shadow: 0 10px 30px rgba(0,0,0,.25); opacity: 0; pointer-events: none;
         transition: opacity .2s, transform .2s; max-width: calc(100vw - 32px); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.bad { background: var(--bad); color: #fff; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.dialog .flash ul.plain { margin: 6px 0 0; }
@media (max-width: 760px) { .grid2 { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .toast { transition: none; } .nm .tw { transition: none; } }

/* ---------- Ergänzungen ---------- */
button.quiet.danger, button.danger.quiet { color: var(--bad); }
button.quiet.danger:hover { color: var(--bad); text-decoration: underline; }
.solo .lead + form { margin-top: 22px; }
textarea { font: inherit; font-size: 14px; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--r-md);
           background: var(--surface-2); color: var(--ink); width: 100%; resize: vertical; min-height: 54px; }
textarea:focus { border-color: var(--tube); outline: none; box-shadow: 0 0 0 3px var(--glass); }
.note-edit { margin: 4px 0 6px; }
.note-edit .actions { margin-top: 8px; }
.note-field { margin-top: 10px; }
.copy-style { margin-top: 8px; font-size: .85rem; }
.copy-style label { flex-direction: row; align-items: center; gap: 8px; font-weight: 500; flex-wrap: wrap; }
.copy-style select { width: auto; padding: 4px 8px; font-size: .85rem; }
.limit-edit { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-top: 10px; font-size: .88rem; }
.limit-add { display: inline-flex; align-items: center; gap: 6px; }
.limit-add input { width: 70px; padding: 5px 8px; }

/* Anmelden / Registrieren */
.solo .lead.lead-gap { margin-bottom: 24px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Benutzerverwaltung */
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
details.newuser { position: relative; }
details.newuser > summary { list-style: none; cursor: pointer; }
details.newuser > summary::-webkit-details-marker { display: none; }
summary.btn { display: inline-flex; align-items: center; height: 32px; padding: 0 12px; border-radius: 8px; font-weight: 550; font-size: 14px;
              border: 1px solid var(--line); background: var(--surface); color: var(--ink); }
summary.btn.primary { background: var(--tube); border-color: var(--tube); color: var(--tube-ink); }
details.newuser .pop { position: absolute; right: 0; top: calc(100% + 8px); width: min(420px, 92vw); z-index: 20; box-shadow: 0 16px 40px rgba(0,0,0,.18); }
.panel.waiting { border-left: 4px solid var(--accent); }
.panel.waiting h2 { margin-bottom: 8px; }
.cell-actions { text-align: right; white-space: nowrap; }
.cell-actions > * { vertical-align: middle; }
.pill-btn { height: 24px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 650; border: 0; display: inline-flex; align-items: center; }
.pill-btn.ok { color: var(--ok); background: color-mix(in srgb, var(--ok) 15%, transparent); }
.pill-btn.bad { color: var(--bad); background: color-mix(in srgb, var(--bad) 13%, transparent); }
.pill-btn:hover { filter: brightness(.95); }
.pop-form { text-align: left; white-space: normal; min-width: 280px; display: grid; gap: 14px; margin-top: 8px; }
.pop-form .quota-form, .pop-form .danger-zone { border-top: 1px solid var(--line); padding-top: 12px; }
table.list td { vertical-align: middle; }

/* Benutzermenü in der Kopfzeile */
details.usermenu { position: relative; }
details.usermenu > summary { list-style: none; cursor: pointer; color: var(--tube); font-weight: 650; height: 32px; display: inline-flex; align-items: center; gap: 4px; padding: 0 10px; border-radius: 8px; }
details.usermenu > summary::-webkit-details-marker { display: none; }
details.usermenu > summary:hover, details.usermenu[open] > summary { background: var(--tube-soft); }
details.usermenu .caret { font-size: 10px; }
details.usermenu .ctx { position: absolute; right: 0; top: calc(100% + 6px); left: auto; min-width: 180px; }
details.usermenu .ctx a { display: flex; align-items: center; height: 30px; padding: 0 10px; border-radius: 6px; color: var(--ink); text-decoration: none; }
details.usermenu .ctx a:hover { background: var(--tube); color: var(--tube-ink); }
details.usermenu .ctx form { margin: 0; }
nav .badge { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; vertical-align: middle; }

/* Ordnerfarbe (aus Rohrpost) */
:root { --folder: var(--tube); }
.nm .ic.dir, .tile .big.dir, svg.big.dir, .pathbar .ic { fill: var(--folder); }
.ficon.folder { background: color-mix(in srgb, var(--folder) 18%, transparent); }
.ficon.folder svg { fill: var(--folder); }

/* Spalten der Liste */
.flist th.c-more, .flist td.c-more { width: 44px; min-width: 44px; max-width: 44px; padding: 0 6px; text-align: center; overflow: visible; }
.flist .c-num { width: 90px; text-align: right; }
.flist .c-ext { width: 80px; }
.rowmore { width: 30px; height: 26px; padding: 0; border: 0; background: none; border-radius: 6px; display: inline-grid; place-items: center; vertical-align: middle; color: inherit; }
.rowmore svg { width: 16px; height: 16px; fill: currentColor; opacity: .7; display: block; }
.rowmore:hover { background: color-mix(in srgb, var(--ink) 8%, transparent); }
.flist td { vertical-align: middle; }

/* Kurze Erklärung beim Darüberfahren (nur an Symbolen) */
[data-tip] { position: relative; }
[data-tip]:hover::after, [data-tip]:focus-visible::after {
  content: attr(data-tip); position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%);
  white-space: nowrap; background: var(--ink); color: var(--surface); font-size: 12px; font-weight: 500; line-height: 1.2;
  padding: 4px 8px; border-radius: 6px; pointer-events: none; z-index: 60; }
.flist tbody tr:first-child [data-tip]:hover::after { bottom: auto; top: calc(100% + 6px); }

/* Teilen-Fenster: Links als Karten */
.share-sub { margin: 2px 0 16px; }
.lcards { display: grid; gap: 10px; }
.lcard { background: var(--surface-2); border-radius: 12px; border-left: 3px solid var(--ok); padding: 8px 10px 10px 12px; }
.lcard.bad { border-left-color: var(--bad); }
.lcard.neutral { border-left-color: var(--line); }
.lrow { display: flex; align-items: center; gap: 14px; min-height: 32px; flex-wrap: wrap; }
.lrow .pill { height: 24px; display: inline-flex; align-items: center; line-height: 1; }
.lrow .lcol { font-size: 13.5px; line-height: 1; white-space: nowrap; }
.lcard.neutral .lcol { color: var(--muted); }
.licons { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); height: 28px; }
.licons > span { display: inline-flex; align-items: center; height: 28px; }
.licons svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; display: block; }
.lact { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; }
.lact button { height: 28px; padding: 0 10px; font-size: 13px; display: inline-flex; align-items: center; justify-content: center; line-height: 1; }
.lact button.mini { width: 30px; padding: 0; }
.lact button.mini svg { width: 16px; height: 16px; fill: currentColor; display: block; }
input.lnote { margin-top: 6px; width: 100%; font: inherit; font-size: 13px; padding: 5px 9px; border: 1px dashed var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); }
input.lnote:hover, input.lnote:focus { border-style: solid; }
.newbox { margin-top: 18px; border-radius: 14px; background: var(--tube-soft); padding: 16px; display: grid; gap: 10px; }
.newbox h3 { margin: 0; font-size: .98rem; display: flex; align-items: center; gap: 8px; line-height: 22px; }
.newbox h3 .plus { width: 22px; height: 22px; border-radius: 50%; background: var(--tube); color: var(--tube-ink); display: grid; place-items: center; font-size: 15px; line-height: 1; }
.newbox .grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.newbox input { background: var(--surface); }
.newbox .row { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.newbox .row .check { margin: 0; }
.share-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 16px; flex-wrap: wrap; }
.share-foot label { flex-direction: row; align-items: center; gap: 8px; font-weight: 500; font-size: 13px; color: var(--muted); }
.share-foot select { width: auto; font-size: 13px; padding: 4px 8px; }
@media (max-width: 600px) { .newbox .grid2 { grid-template-columns: 1fr; } .lact { margin-left: 0; width: 100%; } }
/* Dialog-Fußzeilen mittig ausrichten */
.dialog .actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.dialog .actions > .muted { margin-right: auto; }
.tile .thumb svg.big.dir { fill: var(--folder); }
@media (hover: hover) { .flist .rowmore { visibility: visible; } }
.flist .rowmore { opacity: 1; }
.share-foot { flex-wrap: nowrap; }
.share-foot label { flex: 1 1 auto; min-width: 0; }
.share-foot select { min-width: 0; max-width: 260px; flex: 0 1 auto; }
.pill-btn { gap: 6px; }
.pill-btn::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.share-foot label { white-space: nowrap; }
.share-foot select { width: 230px; }
#ctx.ctx { z-index: 200; }

/* Link-Einstellungen */
.pwmode { border: 1px solid var(--line, #d0d7de); border-radius: 8px; padding: 8px 12px 10px; display: grid; gap: 6px; margin: 0; }
.pwmode legend { padding: 0 4px; font-weight: 600; }

/* Link-Chip in der Liste: klickbar */
button.pill { border: 0; cursor: pointer; font-family: inherit; line-height: inherit; }
button.pill:hover { filter: brightness(.94); }
.pill.add { color: var(--folder); background: transparent; box-shadow: inset 0 0 0 1px currentColor; opacity: .75; }
.pill.add::before { display: none; }
.pill.add:hover { opacity: 1; }

/* ================================================================== */
/* Flimmerkiste                                                        */
/* ================================================================== */

.wrap { max-width: 1180px; }
.m0 { margin: 0; }
.r { text-align: right !important; white-space: nowrap; }
.nowrap { white-space: nowrap; }
.center { justify-content: center; }
.end { justify-content: flex-end; }
.foot { margin-top: 12px; max-width: none; }
.sans { font-family: var(--font); }
.hidden { display: none !important; }
a.btn { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--line);
        background: var(--surface); color: var(--ink); text-decoration: none; font-weight: 550; font-size: 14px; }
a.btn:hover { border-color: var(--muted); }
button.wide { width: 100%; justify-content: center; }
button.tall { height: 40px; }
button.busy { opacity: .6; pointer-events: none; }
.pill.warn { color: var(--warn); background: var(--warn-bg); }
.pill.tube { color: var(--tube); background: var(--tube-soft); }
.solo-logo { display: flex; justify-content: center; margin-bottom: 8px; }
.solo-logo img { width: 64px; height: 64px; }
.solo h1 { text-align: center; }

/* Formularzeilen */
.frow { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.frow + .frow { margin-top: 12px; }
.frow .grow, .grow { flex: 999 1 280px; min-width: 0; }
.w150 { flex: 1 1 170px; } .w120 { flex: 1 1 120px; max-width: 160px; }
input.w100, select.w100 { width: 100px !important; } input.w80 { width: 80px !important; } input.w60 { width: 64px !important; } input.w120, select.w120 { width: 120px !important; flex: none; }
.frow label.check.pad { padding-bottom: 9px; flex: 1 1 200px; }
.filters { margin-bottom: 12px; }
.filters select { width: auto; }
.inline-ctrl { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.inline-ctrl input, .inline-ctrl select { width: auto; }
.mini-label { flex-direction: row; align-items: center; gap: 6px; font-weight: 600; }
.mini-label select { width: auto; }
.mono-input { font-family: var(--font-mono) !important; font-size: 13px !important; }
.ex { font-family: var(--font-mono); font-weight: 650; color: var(--ok); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { flex-direction: row; display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 8px; border-radius: 999px; border: 1px solid var(--line);
        font-size: .86rem; font-weight: 550; background: var(--surface); cursor: pointer; }
.chip input { width: 15px; height: 15px; margin: 0; accent-color: var(--tube); }
.chip:has(input:checked) { background: var(--tube-soft); border-color: color-mix(in srgb, var(--tube) 40%, var(--line)); color: var(--tube); }

/* Panels ohne Innenabstand (Tabellen) */
.panel.flush { padding: 0; overflow: hidden; }
.empty-panel { display: flex; flex-direction: column; gap: 4px; text-align: center; padding: 48px 20px; }
.empty-panel strong { font-size: 1.05rem; }

/* Treffer */
.res-head { margin: 4px 0 8px; }
.legend { display: inline-flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; }
table.results { min-width: 760px; }
table.results td { vertical-align: middle; }
table.results .c-st { width: 74px; } table.results .c-ch { width: 90px; } table.results .c-dt { width: 104px; }
table.results tr.done td { background: var(--surface-2); }
table.results tr.dead td:not(:last-child) { opacity: .62; }
.t { font-weight: 650; overflow-wrap: anywhere; }
.fn { display: block; margin-top: 3px; color: var(--muted); font-family: var(--font-mono); font-size: 12.5px; overflow-wrap: anywhere; }
.meta-line { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; margin-top: 4px; font-size: .84rem; color: var(--muted); }
.meta-line .pill { font-size: .74rem; }
.acts { display: inline-flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; align-items: center; }
.pill.spin::before { animation: fk-pulse 1s ease-in-out infinite; }
@keyframes fk-pulse { 50% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) { .pill.spin::before { animation: none; } }
table.hist td { vertical-align: middle; }
.fname-cell { font-size: 12.5px; overflow-wrap: anywhere; min-width: 280px; }
.pager { margin-top: 12px; gap: 14px; }

/* Zweispaltig: Liste + Details */
.split { display: flex; flex-wrap: wrap; gap: 18px; align-items: flex-start; }
.split-side { flex: 1 1 260px; min-width: 0; max-width: 340px; }
.split-main { flex: 999 1 620px; min-width: 0; }
@media (max-width: 900px) { .split-side { max-width: none; } }

/* Abo-Karten */
.card-btn { display: block; width: 100%; text-align: left; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface);
            color: var(--ink); margin-bottom: 8px; font-weight: 400; font-size: 15px; line-height: 1.45; }
.card-btn:hover { border-color: var(--muted); }
.card-btn.on { border-color: var(--tube); box-shadow: 0 0 0 3px var(--tube-soft); }
.card-btn .n { font-weight: 700; display: block; }
.card-btn .sub { display: block; color: var(--muted); font-size: .85rem; }
.card-btn .counts { display: flex; flex-wrap: wrap; gap: 4px 10px; margin-top: 6px; font-size: .85rem; }
.counts .open { color: var(--warn); font-weight: 650; }
.bar { height: 8px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); overflow: hidden; margin-top: 8px; display: flex; }
.bar span { display: block; height: 100%; }
.bar .b-loaded { background: var(--tube); } .bar .b-open { background: var(--accent); }
.stats { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.stat { flex: 1 1 140px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.stat b { display: block; font-size: 1.3rem; font-family: var(--font-display); line-height: 1.25; }
.stat b.warnc { color: var(--warn); }
.kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 4px 14px; font-size: .92rem; margin: 0; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; overflow-wrap: anywhere; }
.season { border: 1px solid var(--line); border-radius: 12px; margin-top: 12px; overflow: hidden; }
.season > summary { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 14px;
                    background: var(--surface-2); cursor: pointer; list-style: none; }
.season > summary::-webkit-details-marker { display: none; }
.season > summary h3 { display: flex; align-items: center; gap: 8px; }
.season > summary h3::before { content: "▸"; color: var(--muted); font-size: 22px; line-height: 1; width: 20px; display: inline-block; text-align: center; transition: transform .12s; }
.season[open] > summary h3::before { transform: rotate(90deg); }
.season[open] > summary { border-bottom: 1px solid var(--line); }
.season .pills { display: flex; flex-wrap: wrap; gap: 6px; }
table.eps { min-width: 640px; }
table.eps td { vertical-align: middle; padding-top: 8px; padding-bottom: 8px; }
table.eps .code { font-family: var(--font-mono); font-size: 13px; white-space: nowrap; width: 90px; }
.errline { color: var(--bad); font-size: .88rem; margin-top: 8px; }
.batch { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.tmdb-list { list-style: none; margin: 8px 0 0; padding: 0; border: 1px solid var(--line); border-radius: var(--r-md); max-height: 260px; overflow: auto; }
.tmdb-list li { border-top: 1px solid var(--line); }
.tmdb-list li:first-child { border-top: 0; }
.tmdb-list button { width: 100%; text-align: left; border: 0; border-radius: 0; background: none; padding: 8px 10px; font-weight: 500; display: block; }
.tmdb-list button:hover, .tmdb-list button.on { background: var(--tube-soft); }
.tmdb-list small { display: block; color: var(--muted); font-weight: 400; }
.pick-list { list-style: none; margin: 8px 0 0; padding: 0; max-height: 320px; overflow: auto; border: 1px solid var(--line); border-radius: var(--r-md); }
.pick-list li { border-top: 1px solid var(--line); }
.pick-list li:first-child { border-top: 0; }
.pick-list button { width: 100%; text-align: left; border: 0; border-radius: 0; background: none; padding: 8px 10px; font-weight: 500; }
.pick-list button:hover { background: var(--tube-soft); }
.pick-list small { display: block; color: var(--muted); font-weight: 400; }

/* Namensregeln */
.rule-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px;
             background: var(--surface); margin-bottom: 8px; color: var(--ink); text-align: left; font-weight: 400; font-size: 15px; }
.rule-item:hover { border-color: var(--muted); }
.rule-item.on { border-color: var(--tube); box-shadow: 0 0 0 3px var(--tube-soft); }
.rule-item.def { background: var(--surface-2); }
.rule-item.off .x b { color: var(--muted); text-decoration: line-through; }
.rule-item.drag-over { box-shadow: inset 0 3px 0 var(--tube); }
.rule-item .grip { color: var(--muted); font-size: 13px; letter-spacing: -2px; cursor: grab; user-select: none; }
.rule-item .no { flex: none; width: 24px; height: 24px; border-radius: 999px; display: grid; place-items: center; background: var(--surface-2);
                 font-size: .8rem; font-weight: 700; color: var(--muted); }
.rule-item .x { flex: 1; min-width: 0; }
.rule-item .x b { display: block; }
.rule-item .x span { display: block; color: var(--muted); font-size: .84rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rule-item .mv { display: inline-flex; flex-direction: column; gap: 2px; }
.rule-item .mv button { padding: 0 6px; height: 18px; font-size: 10px; line-height: 1; border-radius: 5px; }
.sec { padding-top: 16px; margin-top: 16px; border-top: 1px solid var(--line); }
.sec h3 { margin: 0 0 8px; font-size: .95rem; }
.sentence { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-weight: 550; margin-bottom: 10px; }
.sentence select { width: auto; padding: 4px 8px; }
.cond { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px;
        background: var(--surface-2); margin-bottom: 8px; }
.cond select { width: auto; background: var(--surface); }
.cond input { background: var(--surface); flex: 999 1 220px; width: auto; min-width: 0; }
.cond .round { width: 30px; height: 30px; padding: 0; justify-content: center; border-radius: 999px; font-size: 17px; display: inline-grid; place-items: center; flex: none; }
.tokview { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; min-height: 34px; padding: 6px 8px; border-radius: 10px; background: var(--surface); border: 1px dashed var(--line); margin-top: 6px; }
.tokview.big { border: 2px solid var(--tube); border-style: solid; }
.tok { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 7px; background: var(--tube); color: var(--tube-ink);
       font-size: .84rem; font-weight: 650; white-space: nowrap; }
.tok small { font-weight: 500; opacity: .85; }
.tok.out { background: color-mix(in srgb, var(--accent) 32%, var(--surface)); color: var(--ink); }
.tok.bad { background: color-mix(in srgb, var(--bad) 22%, var(--surface)); color: var(--bad); }
.lit { font-family: var(--font-mono); font-size: .85rem; white-space: pre; color: var(--ink); }
.palette { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.palette button { padding: 3px 10px; font-size: .84rem; border-style: dashed; }
.preview { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 10px; align-items: center; padding: 10px 12px; border-radius: 12px;
           background: var(--surface-2); border: 1px solid var(--line); margin-top: 8px; }
.preview.hit { border-color: color-mix(in srgb, var(--ok) 40%, var(--line)); }
.preview .arrow { color: var(--muted); font-weight: 700; }
.preview .res { font-family: var(--font-mono); font-size: .84rem; overflow-wrap: anywhere; }
.preview.hit .res { color: var(--ok); font-weight: 700; }
.preview .src { font-size: .88rem; overflow-wrap: anywhere; }
.preview .src small { display: block; color: var(--muted); }
.preview .w { grid-column: 1 / -1; color: var(--warn); font-size: .82rem; }
@media (max-width: 640px) { .preview { grid-template-columns: 1fr; } .preview .arrow { display: none; } }
.helpbox { font-size: .85rem; color: var(--muted); background: var(--surface-2); border-radius: var(--r-md); padding: 10px 12px; margin-top: 10px; }
.helpbox code { color: var(--ink); }
.buttons.spread { justify-content: space-between; }
.ok-text { color: var(--ok); }
.errline.small { margin: 0; }
table.results .acts button { white-space: nowrap; }

input[type=search] { font: inherit; font-weight: 400; padding: 8px 11px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); color: var(--ink); width: 100%; }
input[type=search]:focus { border-color: var(--tube); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--tube) 15%, transparent); }

/* ---------- Version 2 ---------- */

/* Schwebende Speichern-Leiste: bleibt am unteren Rand sichtbar */
.savebar { position: sticky; bottom: 0; z-index: 30; display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 10px 14px;
           margin: 18px -2px 0; padding: 12px 16px; border: 1px solid var(--line); border-radius: 14px;
           background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
           box-shadow: 0 -6px 24px rgba(0,0,0,.08); }
.savebar > .muted { margin-right: auto; }
.savebar > .danger { margin-right: auto; }
.savebar > .danger + .muted { margin-right: 0; }
.split-main.panel .savebar { margin: 18px -10px -10px; }
.warn-text { color: var(--warn); }
.dialog .actions { position: sticky; bottom: -22px; background: var(--surface); padding: 12px 0 2px; margin-bottom: -6px; }

/* Beschriftete Felder eines Treffers */
dl.fields { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 2px 10px; margin: 0; align-items: baseline; }
dl.fields dt { color: var(--muted); font-size: .76rem; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }
dl.fields dd { margin: 0; overflow-wrap: anywhere; }
dl.fields dd.fn { margin: 0; }
dl.small-fields { font-size: .88rem; padding: 8px 10px; background: var(--surface-2); border-radius: var(--r-md); }

/* Drei-Punkte-Menü */
details.rowmenu { position: relative; display: inline-block; }
details.rowmenu > summary { list-style: none; cursor: pointer; width: 32px; height: 30px; display: grid; place-items: center; border-radius: 8px;
                             color: var(--muted); font-weight: 800; font-size: 18px; line-height: 1; }
details.rowmenu > summary::-webkit-details-marker { display: none; }
details.rowmenu > summary:hover, details.rowmenu[open] > summary { background: var(--surface-2); color: var(--ink); }
details.rowmenu .ctx { position: absolute; right: 0; top: calc(100% + 4px); left: auto; min-width: 230px; text-align: left; white-space: normal; }
details.rowmenu .ctx a { display: flex; align-items: center; min-height: 30px; padding: 4px 10px; border-radius: 6px; color: var(--ink); text-decoration: none; font-size: 13.5px; }
details.rowmenu .ctx a:hover { background: var(--tube); color: var(--tube-ink); }

/* Letzte Suchen */
.recent { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 12px; }
.recent:empty { display: none; }
.rchip { display: inline-flex; align-items: stretch; border: 1px solid var(--line); border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.rchip button { border: 0; border-radius: 0; background: none; font-size: 13px; padding: 3px 10px; }
.rchip .rgo small { color: var(--muted); font-weight: 400; }
.rchip .rx { padding: 3px 8px 3px 4px; color: var(--muted); }
.rchip button:hover { background: var(--tube-soft); }

/* Markier-Chips */
button.pill.mark { color: var(--muted); background: transparent; box-shadow: inset 0 0 0 1px var(--line); }
button.pill.mark::before { display: none; }
button.pill.mark:hover { color: var(--tube); box-shadow: inset 0 0 0 1px var(--tube); }
button.pill.mark.on { color: var(--ok); background: color-mix(in srgb, var(--ok) 13%, transparent); box-shadow: none; }
.season > summary .sum-right { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; justify-content: flex-end; }
.hide-done tr.ep-row.done { display: none; }

/* Bedingungs-Gruppen */
.cgroup.nested { border: 1px dashed color-mix(in srgb, var(--tube) 45%, var(--line)); border-radius: 12px; padding: 10px 10px 2px; margin-bottom: 8px;
                 background: color-mix(in srgb, var(--tube-soft) 35%, transparent); }
.cgroup.nested .sentence { font-size: .92rem; }
.cgroup.nested .sentence .small-btn { margin-left: auto; }
.cadd { margin: 2px 0 8px; }
button.small-btn { padding: 3px 10px; font-size: 13px; }
details.suggest > summary { list-style: none; cursor: pointer; }
details.suggest > summary::-webkit-details-marker { display: none; }
details.suggest > summary h3 { display: flex; align-items: center; gap: 8px; margin: 0; }
details.suggest > summary h3::before { content: "▸"; font-size: 22px; line-height: 1; color: var(--muted); width: 20px; text-align: center; transition: transform .12s; }
details.suggest[open] > summary h3::before { transform: rotate(90deg); }
details.suggest[open] > summary { margin-bottom: 10px; }
.plain-list { margin: 4px 0 8px; padding-left: 18px; }

table.eps td:nth-child(2) { min-width: 220px; }
table.eps td:last-child .acts { flex-wrap: nowrap; }
@media (max-width: 760px) { table.eps td:last-child .acts { flex-wrap: wrap; } }
