:root{
  --bg:#eef2f7;
  --panel:#fff;
  --ink:#172033;
  --muted:#64748b;
  --muted-strong:#475569;
  --line:#dbe3ed;
  --blue:#2563eb;
  --blue-soft:#eff6ff;
  --editor:#0f172a;

  --ok:#047857; --ok-bg:#ecfdf5;
  --bad:#b91c1c; --bad-bg:#fef2f2;
  --warn:#92400e; --warn-bg:#fffbeb;
  --tip:#1e40af; --tip-bg:#eff6ff;

  --k-image:#7c3aed; --k-audio:#0f766e; --k-video:#c2410c; --k-document:#1d4ed8; --k-data:#047857; --k-archive:#475569; --k-subtitle:#a21caf;
  --mono:ui-monospace,SFMono-Regular,Consolas,"Liberation Mono",monospace;
}
*{box-sizing:border-box}
[hidden]{display:none !important}
body{margin:0;background:var(--bg);color:var(--ink);font:15px/1.55 Inter,system-ui,sans-serif}
.app{max-width:1600px;margin:auto;padding:20px}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
a{color:var(--blue)}
code{font-family:var(--mono);font-size:.92em;background:#f1f5f9;border-radius:4px;padding:0 4px}

.back{display:inline-block;margin-bottom:12px;color:var(--muted-strong);font-size:13px;font-weight:650;text-decoration:none}
.back:hover{color:var(--blue)}

header,.panel{background:var(--panel);border:1px solid var(--line);border-radius:17px;box-shadow:0 8px 25px #0f172a10}
header{display:flex;justify-content:space-between;align-items:center;gap:16px;padding:15px 18px;margin-bottom:17px;flex-wrap:wrap}
header h1{margin:0;font-size:21px}
header p{margin:1px 0;color:var(--muted);font-size:13px}
.privacy{display:flex;align-items:center;gap:8px;color:var(--ok) !important;font-weight:650;background:var(--ok-bg);border-radius:999px;padding:5px 12px !important}
.privacy .dot{width:8px;height:8px;border-radius:50%;background:var(--ok);flex:none}

.panel{padding:16px 18px;margin-bottom:17px}
.panel-head{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;margin-bottom:10px}
.panel-head h2{margin:0;font-size:16px}
.panel h2{font-size:16px}
.count{color:var(--muted);font-weight:600}
.head-actions{display:flex;gap:8px;flex-wrap:wrap}

button,.button{border:1px solid var(--line);border-radius:10px;background:#fff;padding:9px 13px;font:inherit;font-weight:750;cursor:pointer;color:var(--ink);display:inline-flex;align-items:center;gap:6px;text-decoration:none;line-height:1.2}
button:hover,.button:hover{border-color:#93c5fd}
button:disabled{cursor:default;opacity:.45}
button:disabled:hover{border-color:var(--line)}
button.small,.button.small{padding:5px 10px;font-size:13px;border-radius:8px}
.primary{background:var(--blue);border-color:var(--blue);color:#fff}
.primary:hover{border-color:var(--blue);background:#1d4ed8}
.button input[type=file]{position:absolute;width:1px;height:1px;opacity:0;pointer-events:none}
.button{position:relative}
button:focus-visible,.button:focus-within,select:focus-visible,input:focus-visible,.drop:focus-visible,summary:focus-visible{outline:3px solid #93c5fd;outline-offset:2px}

/* ---------- Ablagefläche ---------- */
.drop-panel{padding:10px}
.drop{border:2px dashed #b9c7da;border-radius:13px;padding:30px 18px 22px;text-align:center;transition:background .15s,border-color .15s;background:linear-gradient(180deg,#f8fafc,#fff)}
.drop.over{border-color:var(--blue);background:var(--blue-soft)}
.drop-ico{width:46px;height:46px;color:var(--blue)}
.drop-title{margin:6px 0 10px;font-size:19px}
.drop-actions{display:flex;justify-content:center;gap:10px;flex-wrap:wrap;margin:0 0 8px}
.hint{color:var(--muted);font-size:13px;margin:4px 0}
.kinds{list-style:none;padding:0;margin:16px auto 0;display:flex;flex-wrap:wrap;justify-content:center;gap:6px 14px;max-width:1100px;color:var(--muted-strong);font-size:13px}
.kinds li{white-space:normal}
.kinds b{color:var(--ink);margin-right:4px}

/* ---------- Arbeitsbereich ---------- */
.work{display:grid;grid-template-columns:minmax(0,1fr) 380px;gap:17px;align-items:start}
.work .panel{margin-bottom:0}
.opts-panel{position:sticky;top:12px;max-height:calc(100vh - 24px);overflow:auto}
.bulk{display:flex;flex-wrap:wrap;gap:8px 14px;margin-bottom:10px}
.bulk:empty{display:none}
.bulk label{display:flex;align-items:center;gap:6px;font-size:13px;font-weight:650;color:var(--muted-strong)}

.queue{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:10px}
.item{border:1px solid var(--line);border-radius:13px;padding:10px;display:grid;grid-template-columns:72px minmax(0,1fr) auto;gap:4px 12px;align-items:start;background:#fff}
.item.done{border-color:#a7f3d0}
.item.failed{border-color:#fecaca}
.thumb{width:72px;height:72px;border-radius:9px;background:#f1f5f9;display:flex;align-items:center;justify-content:center;overflow:hidden;color:#fff;font-weight:800;font-size:12px;letter-spacing:.03em;grid-row:span 2}
.thumb img{width:100%;height:100%;object-fit:cover}
.thumb.k-image{background:var(--k-image)} .thumb.k-audio{background:var(--k-audio)} .thumb.k-video{background:var(--k-video)}
.thumb.k-document{background:var(--k-document)} .thumb.k-data{background:var(--k-data)} .thumb.k-archive,.thumb.k-unknown{background:var(--k-archive)}
.thumb.has-img{background:#e2e8f0 repeating-conic-gradient(#e2e8f0 0 25%,#f8fafc 0 50%) 0 0/12px 12px}
.i-main{min-width:0}
.i-name{font-weight:750;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin:0}
.i-sub{color:var(--muted-strong);font-size:13px;margin:1px 0 4px;display:flex;flex-wrap:wrap;gap:4px 10px}
.badges{display:flex;flex-wrap:wrap;gap:5px;margin:2px 0 0}
.badge{font-size:12px;font-weight:700;border-radius:999px;padding:1px 9px;background:#f1f5f9;color:var(--muted-strong)}
.badge.warn{background:var(--warn-bg);color:var(--warn)}
.badge.bad{background:var(--bad-bg);color:var(--bad)}
.badge.ok{background:var(--ok-bg);color:var(--ok)}
.badge.tip{background:var(--tip-bg);color:var(--tip)}
.badge button{all:unset;cursor:pointer;text-decoration:underline;font-weight:800;margin-left:4px}
.badge button:focus-visible{outline:2px solid #93c5fd}
.i-side{display:flex;flex-direction:column;align-items:flex-end;gap:6px}
.i-target{display:flex;align-items:center;gap:6px;font-size:13px;font-weight:650;color:var(--muted-strong)}
.i-target select{max-width:210px}
.i-actions{display:flex;gap:6px;flex-wrap:wrap;justify-content:flex-end}
.i-x{border:none;background:none;color:var(--muted);font-size:18px;padding:2px 6px;line-height:1}
.i-x:hover{color:var(--bad)}
.i-wide{grid-column:2 / -1}
.prog{height:8px;border-radius:99px;background:#e2e8f0;overflow:hidden;margin-top:6px}
.prog > span{display:block;height:100%;width:0;background:var(--blue);transition:width .2s}
.prog.indet > span{width:35%;animation:indet 1.2s infinite ease-in-out}
@keyframes indet{0%{transform:translateX(-100%)}100%{transform:translateX(300%)}}
.i-msg{font-size:13px;color:var(--muted-strong);margin:4px 0 0}
.i-msg.err{color:var(--bad);font-weight:650}
.notes{margin:4px 0 0;padding:0;list-style:none;font-size:13px;color:var(--muted-strong)}
.notes li::before{content:"· "}
.results{list-style:none;margin:8px 0 0;padding:0;display:flex;flex-direction:column;gap:6px}
.res{display:flex;flex-wrap:wrap;align-items:center;gap:6px 10px;padding:7px 9px;border-radius:9px;background:var(--ok-bg)}
.res .r-name{font-weight:700;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0;flex:1 1 180px}
.res .r-size{font-size:13px;color:var(--muted-strong);white-space:nowrap}
.res .r-delta.smaller{color:var(--ok);font-weight:700}
.res .r-delta.bigger{color:var(--warn);font-weight:700}
.meta-box{margin-top:6px}
.meta-box summary{cursor:pointer;font-size:13px;font-weight:700;color:var(--muted-strong)}
.meta-box table{border-collapse:collapse;font-size:13px;margin:6px 0;width:100%}
.meta-box th{text-align:left;color:var(--muted-strong);font-weight:650;padding:2px 10px 2px 0;vertical-align:top;white-space:nowrap}
.meta-box td{padding:2px 0;word-break:break-word}
.meta-box caption{text-align:left;font-weight:750;padding-top:6px}
.meta-actions{display:flex;gap:6px;flex-wrap:wrap;margin:4px 0}

/* ---------- Einstellungen ---------- */
.tabs{display:flex;gap:4px;flex-wrap:wrap;margin-bottom:10px;border-bottom:1px solid var(--line);padding-bottom:8px}
.tab{padding:6px 11px;border-radius:8px;font-size:13px}
.tab[aria-selected="true"]{background:var(--ink);border-color:var(--ink);color:#fff}
.tab.has-files::after{content:"";width:7px;height:7px;border-radius:50%;background:var(--blue);display:inline-block;margin-left:2px}
.tab[aria-selected="true"].has-files::after{background:#93c5fd}
.opt-body fieldset{border:none;border-top:1px solid var(--line);padding:10px 0 4px;margin:0}
.opt-body legend{font-weight:800;font-size:13px;padding:0 6px 0 0;color:var(--ink)}
.row{display:flex;flex-wrap:wrap;gap:8px 10px;align-items:flex-end;margin:6px 0}
.row.checks{gap:4px 14px}
.fld{display:flex;flex-direction:column;gap:3px;font-size:12.5px;font-weight:700;color:var(--muted-strong);min-width:0}
.fld.grow{flex:1 1 160px}
.fld.num input{width:92px}
.fld.color{flex-direction:row;align-items:center;gap:8px;margin:6px 0}
.fld output{font-weight:800;color:var(--ink)}
select,input[type=text],input[type=number],input[type=password]{font:inherit;font-size:14px;border:1px solid var(--line);border-radius:8px;padding:6px 8px;background:#fff;color:var(--ink);min-width:0}
input[type=range]{width:100%}
input[type=color]{width:44px;height:30px;border:1px solid var(--line);border-radius:6px;padding:1px;background:#fff}
.checkbox,.radio{display:flex;align-items:flex-start;gap:7px;font-size:13.5px;margin:4px 0;cursor:pointer}
.checkbox input,.radio input{margin-top:3px;flex:none}
.radios{display:flex;flex-direction:column}
.more{border-top:1px solid var(--line);padding:8px 0}
.more summary{cursor:pointer;font-weight:800;font-size:13px}
.presets{display:flex;flex-wrap:wrap;gap:6px;margin:0 0 10px}
.presets:empty{display:none}
.pgroup{width:100%;font-size:11.5px;font-weight:800;color:var(--muted);text-transform:uppercase;letter-spacing:.04em;margin-top:4px}
.preset{font-size:12.5px;padding:5px 10px;border-radius:999px;font-weight:700}
.preset[aria-pressed="true"]{background:var(--blue);border-color:var(--blue);color:#fff}

/* ---------- Infos ---------- */
.info{margin-top:17px}
.info-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:12px 22px}
.info h3{font-size:14px;margin:4px 0}
.info p{font-size:13.5px;color:var(--muted-strong);margin:0 0 6px}
.licenses{border-top:1px solid var(--line);padding-top:10px;margin-top:10px !important}

/* ---------- Statusleiste ---------- */
.status-bar{position:fixed;left:50%;bottom:16px;transform:translateX(-50%);z-index:20;display:flex;flex-direction:column;gap:6px;width:min(560px,calc(100% - 32px))}
.st{background:var(--editor);color:#e2e8f0;border-radius:12px;padding:9px 13px;font-size:13px;box-shadow:0 10px 30px #0f172a40}
.st b{color:#fff}
.st .prog{background:#334155;margin-top:5px}
.st .prog > span{background:#60a5fa}
.st.err{background:#7f1d1d}

/* ---------- Vorschau ---------- */
.viewer{border:none;border-radius:17px;padding:0;width:min(1000px,calc(100% - 32px));max-height:calc(100vh - 32px);box-shadow:0 20px 60px #0f172a50}
.viewer::backdrop{background:#0f172a99}
.viewer-head{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:10px 14px;border-bottom:1px solid var(--line)}
.viewer-head h2{margin:0;font-size:15px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.viewer-body{padding:12px;overflow:auto;max-height:calc(100vh - 110px);display:flex;justify-content:center;background:repeating-conic-gradient(#f1f5f9 0 25%,#fff 0 50%) 0 0/16px 16px}
.viewer-body img,.viewer-body video{max-width:100%;max-height:calc(100vh - 140px)}
.viewer-body audio{width:100%;margin:40px 0}
.viewer-body pre{background:#fff;width:100%;margin:0;white-space:pre-wrap;word-break:break-word;font-family:var(--mono);font-size:13px}

/* ---------- schmal ---------- */
@media (max-width:1100px){
  .work{grid-template-columns:1fr}
  .opts-panel{position:static;max-height:none}
}
@media (max-width:640px){
  .app{padding:12px}
  .panel{padding:12px}
  .drop{padding:20px 10px 16px}
  .item{grid-template-columns:52px minmax(0,1fr);gap:4px 10px}
  .thumb{width:52px;height:52px}
  .i-side{grid-column:1 / -1;align-items:stretch}
  .i-target{justify-content:space-between}
  .i-target select{max-width:none;flex:1}
  .i-actions{justify-content:stretch}
  .i-actions > *{flex:1;justify-content:center}
  .i-wide{grid-column:1 / -1}
  .head-actions{width:100%}
  .head-actions > *{flex:1;justify-content:center}
  .kinds{text-align:left;justify-content:flex-start}
}
.viewer-body .pdf-pages{display:flex;flex-direction:column;align-items:center;gap:12px;width:100%}
.viewer-body .pdf-pages img{max-height:none;box-shadow:0 2px 10px #0f172a30;background:#fff}
.viewer-body .pdf-pages p{margin:0;background:#fff;padding:4px 10px;border-radius:8px;font-size:13px}

/* ---------- Paket 13 ---------- */
.thumb.k-subtitle{background:var(--k-subtitle)}
.hero-side{display:flex;flex-direction:column;align-items:flex-end;gap:8px}
.hero-actions{display:flex;flex-wrap:wrap;gap:6px;justify-content:flex-end}
.hero-actions button{padding:6px 11px;font-size:13px}
.tools-box{margin:0 0 12px;border:1px solid var(--line);border-radius:12px;background:#f8fafc;padding:8px 12px}
.tools-box > summary{cursor:pointer;font-weight:800;font-size:14px}
.tools-body{display:flex;flex-direction:column;gap:10px;margin-top:10px}
.tool-row{display:flex;flex-wrap:wrap;justify-content:space-between;gap:8px 14px;align-items:center;padding:8px 10px;background:#fff;border:1px solid var(--line);border-radius:10px}
.tool-txt{display:flex;flex-direction:column;min-width:200px;flex:1 1 260px}
.tool-txt strong{font-size:14px}
.tool-txt .hint{margin:0}
.tool-ctl{display:flex;flex-wrap:wrap;gap:6px 8px;align-items:center}
.tool-ctl select,.tool-ctl input[type=color]{font:inherit;font-size:13px}
.tool-checks{display:flex;flex-direction:column;gap:2px;font-size:13px}
.tool-state{font-size:13px;color:var(--muted-strong)}
.tool-state.err{color:var(--bad)}
.tools-out{display:flex;flex-direction:column;gap:8px}
.tool-res{border-top:1px dashed var(--line);padding-top:8px}
.tr-title{margin:0;font-size:13px;font-weight:700;color:var(--muted-strong)}
.tel-body{font-size:13px}
.tel-list{list-style:none;padding:0;margin:6px 0;display:flex;flex-direction:column;gap:4px}
.tel-list li{display:grid;grid-template-columns:1.2em 1fr;align-items:center;gap:2px 6px}
.tel-list li button{grid-column:2;justify-self:start}
@media (min-width:641px){.tel-list li{grid-template-columns:1.2em auto auto;justify-content:start}.tel-list li button{grid-column:auto}}
.tel-mark{font-weight:900;width:1.2em;text-align:center}
.tel-list li.ok .tel-mark{color:var(--ok)}
.tel-list li.no .tel-mark{color:var(--bad)}
.tel-hint{margin:3px 0;color:var(--muted-strong)}
.tel-hint.warn{color:var(--warn)}
.rec-body,.cut-body,.form-body{padding:14px;display:flex;flex-direction:column;gap:10px;max-height:calc(100vh - 110px);overflow:auto}
.rec-src,.rec-actions{display:flex;flex-wrap:wrap;gap:8px}
.rec-body video,.cut-body video{max-width:100%;max-height:50vh;background:#000;border-radius:10px}
.cut-body audio{width:100%}
#recMeter,#cutWave{width:100%;height:auto;background:#f1f5f9;border-radius:8px}
#cutWave{cursor:pointer}
.rec-state{margin:0;font-weight:650}
.preset-wrap{display:inline-flex;align-items:center}
.preset.mine{border-style:dashed}
.preset-del{border:none;background:none;padding:2px 6px;font-size:15px;color:var(--muted-strong);cursor:pointer}
.preset-del:hover{color:var(--bad)}
.my-presets{margin-top:12px}
@media (max-width:640px){.hero-side{align-items:stretch}.hero-actions{justify-content:flex-start}}
/* Paket 16: Formular, Vergleich, Schwärzen */
.form-fields{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:10px 14px;align-items:end}
.form-fields textarea{width:100%;font:inherit;border:1px solid var(--line);border-radius:10px;padding:8px 10px;background:var(--panel);color:var(--ink);resize:vertical}
.form-fields .checkbox{align-self:center}
.cmp-scroll{max-width:100%;overflow:auto;max-height:72vh}
.cmp{--pos:50%;position:relative;display:inline-block;line-height:0;cursor:ew-resize;touch-action:none;user-select:none;background-color:#fff;background-image:linear-gradient(45deg,#e2e8f0 25%,transparent 25%),linear-gradient(-45deg,#e2e8f0 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#e2e8f0 75%),linear-gradient(-45deg,transparent 75%,#e2e8f0 75%);background-size:16px 16px;background-position:0 0,0 8px,8px -8px,-8px 0}
.cmp img{display:block;max-width:100%;max-height:70vh;pointer-events:none}
.cmp.full img{max-width:none;max-height:none}
.cmp .cmp-after{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;clip-path:inset(0 0 0 var(--pos))}
.cmp-line{position:absolute;top:0;bottom:0;left:var(--pos);width:2px;margin-left:-1px;background:#fff;box-shadow:0 0 0 1px #0f172a66}
.cmp-tag{position:absolute;top:8px;line-height:1.3;font-size:12px;font-weight:600;padding:3px 8px;border-radius:999px;background:#0f172acc;color:#fff}
.cmp-tag.l{left:8px}.cmp-tag.r{right:8px}
.cmp-ctl{margin-top:10px;align-items:end}
.cmp-ctl input[type=range]{width:100%}
.red-body{padding:14px;display:flex;flex-direction:column;gap:10px;max-height:calc(100vh - 110px);overflow:auto}
.red-tools{align-items:end}
.red-stage{position:relative;align-self:center;line-height:0;max-width:100%}
.red-stage img{display:block;max-width:100%;max-height:62vh;user-select:none;-webkit-user-drag:none}
.red-stage canvas{position:absolute;inset:0;width:100%;height:100%;cursor:crosshair;touch-action:none}
