/* Selection – Oberfläche (hell) */
:root {
  --bg: #ffffff;
  --bg2: #f7f7f8;
  --bg3: #efeff1;
  --line: #e6e6e9;
  --line2: #d4d4d8;
  --text: #18181b;
  --muted: #6b6b76;
  --accent: #18181b;
  --red: #e0202c;
  --orange: #ffb000;
  --green: #0b8a3e;
  --black: #111113;
  --radius: 10px;
  --rh: 230px;
  --side: 268px;
  --top: 0px;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
body.noscroll { overflow: hidden; }
[hidden] { display: none !important; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 600; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .45; }
:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
.lbm:focus-visible, .qc:focus-visible, .tile:focus-visible, .tile:focus { outline: none; }

/* ---------- Farben ---------- */
.c-red { --c: var(--red); }
.c-orange { --c: var(--orange); }
.c-green { --c: var(--green); }
.c-black { --c: var(--black); }
.sw, .dot, .badge, .qc { display: inline-block; border-radius: 50%; background: var(--c, transparent); }
.sw { width: 14px; height: 14px; flex: none; }
.sw.empty { background: transparent; border: 1.5px dashed #b4b4bd; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  border: 1px solid var(--line2); background: var(--bg); color: var(--text);
  padding: 9px 16px; border-radius: 8px; font-weight: 500; text-decoration: none; line-height: 1.2;
}
.btn:hover:not(:disabled) { background: var(--bg2); border-color: #bcbcc4; }
.btn.primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn.primary:hover:not(:disabled) { background: #36363c; border-color: #36363c; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.ghost:hover:not(:disabled) { color: var(--text); background: var(--bg3); }
.btn.danger { background: transparent; border-color: #f0b9bb; color: #c0262c; }
.btn.danger:hover:not(:disabled) { background: #fdecec; }
.btn.sm { padding: 6px 11px; font-size: 13.5px; }
.btn.on { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn.icon-only { padding: 6px 8px; }
.btn.block { display: flex; width: 100%; padding: 9px 12px; font-size: 14.5px; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--muted); text-decoration: underline; font-size: 13px; }
.linkbtn:hover { color: var(--text); }

input[type=text], input[type=password], input[type=date], input[type=search], select, textarea {
  background: var(--bg); border: 1px solid var(--line2); border-radius: 8px; padding: 9px 12px; width: 100%;
}
select.sel { width: auto; padding: 6px 28px 6px 10px; font-size: 13.5px; }
input:focus, select:focus, textarea:focus { border-color: var(--text); outline: none; }
label.check { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--text); cursor: pointer; }
input[type=checkbox], input[type=radio] { accent-color: var(--accent); width: 16px; height: 16px; }

/* ---------- Meldungen / Zentrierte Karten ---------- */
body.msg, body.center { display: grid; place-items: center; min-height: 100vh; padding: 20px; background: var(--bg2); }
.msgbox, .card-center {
  width: min(440px, 100%); background: var(--bg); border: 1px solid var(--line);
  border-radius: 16px; padding: 28px 26px; box-shadow: 0 10px 40px rgba(0, 0, 0, .06);
}
.msgbox h1, .card-center h1 { font-size: 22px; margin-bottom: 8px; }
.msgbox p, .card-center p { color: var(--muted); margin: 0 0 16px; }
.card-center .field { margin: 14px 0; }
.card-center label.fl { display: block; font-size: 13px; color: var(--muted); margin-bottom: 5px; }
.card-center .btn { width: 100%; margin-top: 6px; padding: 11px; }
.err { color: #c0262c; font-size: 14px; min-height: 1.2em; margin-top: 8px; }
.hint { color: var(--muted); font-size: 13px; }

/* ---------- Toast ---------- */
#sel-toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px);
  background: var(--accent); color: #fff; padding: 10px 18px; border-radius: 10px; font-weight: 500; z-index: 400;
  opacity: 0; pointer-events: none; transition: opacity .18s, transform .18s; max-width: 90vw; text-align: center;
  box-shadow: 0 8px 30px rgba(0, 0, 0, .2);
}
#sel-toast.show { opacity: 1; transform: translate(-50%, 0); }
#sel-toast.error { background: #c0262c; color: #fff; }

/* ---------- Viewer: Kopfzeile ---------- */
.sv { min-height: 100vh; }
.sv[data-embed="client"] { --top: 60px; }
.sv[data-embed="admin"] { min-height: 0; --top: 102px; }
.vtop {
  position: sticky; top: 0; z-index: 60; height: 60px; display: flex; align-items: center; gap: 14px;
  padding: 0 24px; background: var(--bg); border-bottom: 1px solid var(--line);
}
.vtop h1 { font-size: 19px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.vcount { color: var(--muted); font-size: 14px; white-space: nowrap; }
.vspacer { flex: 1; }
.vmainbar { display: flex; align-items: center; gap: 12px; padding: 14px 24px 0; }

/* ---------- Viewer: Layout mit linker Seitenleiste ---------- */
.vlayout { display: flex; align-items: flex-start; }
.vmain { flex: 1; min-width: 0; }
.vside {
  position: sticky; top: var(--top); flex: none; width: var(--side); height: calc(100vh - var(--top)); overflow-y: auto;
  padding: 24px 20px 40px 24px; border-right: 1px solid var(--line); background: var(--bg);
}
.vside-head { display: none; }
.vsec { margin-bottom: 28px; }
.vsec-t { font-size: 11.5px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.frows { display: flex; flex-direction: column; gap: 2px; margin: 0 -8px; }
.frow {
  display: flex; align-items: center; gap: 11px; width: 100%; padding: 8px; border: 0; background: transparent;
  border-radius: 8px; text-align: left; font-size: 14.5px;
}
.frow:hover { background: var(--bg2); }
.frow.on { background: var(--bg3); font-weight: 600; }
.frow .cl { flex: 1; }
.frow .cn { color: var(--muted); font-variant-numeric: tabular-nums; font-size: 13px; font-weight: 400; }
.frow.zero { opacity: .5; }
.fopts { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; margin-top: 12px; }
.vrow { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.vrow .lbl { color: var(--muted); font-size: 14px; }
.viewctl select { width: 100%; }
.segs { display: inline-flex; border: 1px solid var(--line2); border-radius: 8px; overflow: hidden; }
.seg { background: transparent; border: 0; padding: 5px 13px; color: var(--muted); font-size: 13px; }
.seg + .seg { border-left: 1px solid var(--line2); }
.seg.on { background: var(--accent); color: #fff; }
.selbar { display: none; align-items: center; justify-content: space-between; gap: 8px; margin: 12px 0; font-size: 13.5px; }
.selinfo { color: var(--muted); }
.selacts { display: inline-flex; gap: 12px; }
.vside .btn + .btn, .vside .selbar + .btn { margin-top: 10px; }
.vside .btn.block + .selbar { margin-top: 12px; }
.fmt { margin-top: 14px; font-size: 13.5px; }
.fmt summary { cursor: pointer; color: var(--muted); }
.fmt summary:hover { color: var(--text); }
.fmt .ptitle { font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 12px 0 4px; }
.fmt .opt { display: flex; gap: 9px; align-items: flex-start; padding: 4px 0; cursor: pointer; line-height: 1.35; }
.fmt .opt input { margin-top: 2px; flex: none; }
.vmenu { display: none; position: relative; }
.mbadge {
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--accent); color: #fff;
  font-size: 11px; font-weight: 600; display: inline-grid; place-items: center;
}
.vback { display: none; }

/* ---------- Viewer: Raster ---------- */
.vgrid { display: flex; flex-wrap: wrap; gap: 8px; padding: 22px 24px 60px; }
.vgrid::after { content: ''; flex-grow: 1000000; }
.rowfill { flex: 1000000 1 0; height: 0; }
.sv[data-size="S"] { --rh: 140px; }
.sv[data-size="M"] { --rh: 230px; }
.sv[data-size="L"] { --rh: 340px; }
.tile {
  position: relative; flex-basis: auto; min-width: 0; max-width: 100%; background: var(--bg3);
  border-radius: 3px; overflow: hidden; cursor: zoom-in;
  user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent;
}
.tile i { display: block; }
.tbg { position: absolute; inset: 0; background: center / cover no-repeat; opacity: 0; transition: opacity .25s; }
.tile.ready .tbg { opacity: 1; }
.tile .frame { position: absolute; inset: 0; pointer-events: none; border-radius: inherit; }
.tile .badge { position: absolute; left: 9px; top: 9px; width: 14px; height: 14px; display: none; box-shadow: 0 0 0 2px #fff; }
.tile .badge[class*="c-"] { display: block; }
.tile .dots { position: absolute; left: 8px; bottom: 8px; display: flex; gap: 4px; flex-wrap: wrap; pointer-events: none; }
.tile .dot { width: 11px; height: 11px; box-shadow: 0 0 0 1.5px #fff; }
.tile .tname {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 22px 10px 7px 10px; font-size: 12px; pointer-events: none; color: #fff;
  background: linear-gradient(transparent, rgba(0, 0, 0, .62)); opacity: 0; transition: opacity .12s; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}
.tile .quick {
  position: absolute; right: 8px; bottom: 8px; display: none; gap: 7px; padding: 6px 8px;
  background: rgba(255, 255, 255, .94); border-radius: 999px; box-shadow: 0 2px 10px rgba(0, 0, 0, .28);
}
.tile .qc { width: 17px; height: 17px; border: 0; padding: 0; box-shadow: 0 0 0 1px rgba(0, 0, 0, .12); }
.tile .qc:hover { transform: scale(1.18); }
.tile .qc.on { transform: scale(1.22); box-shadow: 0 0 0 2px #fff, 0 0 0 3.5px rgba(0, 0, 0, .55); position: relative; }
.tile .qc.on::after { content: ''; position: absolute; left: 50%; top: 50%; width: 5px; height: 5px; margin: -2.5px 0 0 -2.5px; border-radius: 50%; background: #fff; }
.tile .qc.qx { background: #fff; color: #333; font-size: 14px; line-height: 1; display: inline-grid; place-items: center; }
@media (hover: hover) {
  .tile:hover .tname { opacity: 1; }
  .tile:hover .quick { display: flex; }
  .tile:hover .dots { bottom: 42px; }
}
.tile .tcheck {
  position: absolute; right: 9px; top: 9px; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(0, 0, 0, .35); border: 2px solid #fff; color: transparent; cursor: pointer; z-index: 3;
}
.tile .tcheck:hover { background: rgba(0, 0, 0, .55); }
.sv.selmode .tile { cursor: pointer; }
.sv.selmode .tile .tcheck { display: grid; }
.sv.selmode .tile .quick { display: none !important; }
.tile.picked .tcheck { background: var(--accent); color: #fff; }
.tile.picked.ready .tbg { opacity: .65; }
.divider { flex: 1 0 100%; display: flex; align-items: center; gap: 14px; margin: 20px 4px 14px; color: var(--muted); font-size: 13.5px; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.vempty { color: var(--muted); text-align: center; padding: 60px 20px; flex: 1 0 100%; margin: 0; }

/* ---------- Lightbox (hell) ---------- */
.lb {
  position: fixed; inset: 0; z-index: 200; background: #fff; color: var(--text); display: flex; flex-direction: column;
  touch-action: pan-y; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
}
.lb-top { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; padding-top: calc(10px + env(safe-area-inset-top)); gap: 12px; }
.lb-meta { display: flex; gap: 14px; align-items: baseline; min-width: 0; font-size: 14px; }
.lb-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.lb-count { color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.lb-actions { display: flex; gap: 6px; }
.lb-btn { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: transparent; border: 0; color: var(--text); text-decoration: none; }
.lb-btn:hover { background: var(--bg3); }
.lb-stage { position: relative; flex: 1; min-height: 0; min-width: 0; margin: 0 12px; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.lb-img { background: center / contain no-repeat; transition: opacity .15s; max-width: 100%; max-height: 100%; }
.lb-img.loading { opacity: .9; }
.lb-nav {
  position: absolute; top: 50%; transform: translateY(-50%); width: 52px; height: 72px; background: transparent; border: 0; color: var(--text); opacity: .55;
  display: grid; place-items: center; z-index: 2;
}
.lb-nav:hover { opacity: 1; background: rgba(0, 0, 0, .05); }
.lb-nav.prev { left: 4px; border-radius: 0 12px 12px 0; }
.lb-nav.next { right: 4px; border-radius: 12px 0 0 12px; }
.lb-bottom { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 10px 12px calc(16px + env(safe-area-inset-bottom)); }
.lb-marks { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.lbm {
  display: inline-flex; align-items: center; gap: 9px; padding: 9px 16px; border-radius: 999px; background: var(--bg2);
  border: 1px solid var(--line2); color: var(--text); font-size: 14.5px;
}
.lbm .sw { width: 15px; height: 15px; }
.lbm:hover:not(:disabled) { background: var(--bg3); }
.lbm.on { background: var(--accent); color: #fff; border-color: var(--accent); }
.lbm.on.c-black .sw { box-shadow: 0 0 0 1.5px #fff; }
.lb-marks.readonly .lbm:not(.on) { display: none; }
.lb-others { display: flex; flex-wrap: wrap; gap: 6px 14px; justify-content: center; font-size: 13px; color: var(--muted); }
.lb-others .lbo { display: inline-flex; align-items: center; gap: 6px; }
.lb-others .dot { width: 11px; height: 11px; }

/* ---------- Client-Fuß ---------- */
.cfoot { padding: 6px 16px 40px; color: var(--muted); font-size: 13px; text-align: center; }
.cfoot button { background: none; border: 0; padding: 0; text-decoration: underline; color: inherit; font-size: inherit; }

/* ---------- Admin ---------- */
body.admin { background: var(--bg); }
.adm-head {
  display: flex; align-items: center; justify-content: space-between; gap: 14px; height: 53px; padding: 0 20px;
  border-bottom: 1px solid var(--line); background: var(--bg); position: sticky; top: 0; z-index: 70;
}
.adm-head .brand { font-weight: 700; letter-spacing: .02em; text-decoration: none; }
.adm-head nav { display: flex; gap: 6px; align-items: center; }
.adm-wrap { max-width: 1100px; margin: 0 auto; padding: 24px 20px 80px; }
.adm-wrap.wide { max-width: none; padding: 0; }
.adm-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.adm-title h1 { font-size: 24px; }
.gcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.gcard { background: var(--bg); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; box-shadow: 0 1px 2px rgba(0, 0, 0, .04); }
.gcard .cover { aspect-ratio: 3 / 2; background: var(--bg3) center / cover no-repeat; display: grid; place-items: center; color: var(--muted); font-size: 13px; text-decoration: none; }
.gcard .gb { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.gcard h3 { font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gcard .meta { color: var(--muted); font-size: 13px; }
.gcard .acts { display: flex; gap: 8px; margin-top: 10px; }
.tabs { display: flex; gap: 4px; padding: 0 20px; border-bottom: 1px solid var(--line); overflow-x: auto; background: var(--bg); position: sticky; top: 53px; z-index: 65; }
.tab { background: none; border: 0; padding: 12px 14px; color: var(--muted); border-bottom: 2px solid transparent; white-space: nowrap; text-decoration: none; }
.tab:hover { color: var(--text); }
.tab.on { color: var(--text); border-bottom-color: var(--text); font-weight: 500; }
.gtop { display: flex; align-items: center; gap: 14px; padding: 16px 20px 12px; flex-wrap: wrap; }
.gtop h1 { font-size: 22px; }
.linkbox { display: inline-flex; align-items: center; gap: 4px; background: var(--bg2); border: 1px solid var(--line); border-radius: 8px; padding: 2px 4px 2px 12px; font-size: 14px; }
.linkbox code { font: 13.5px ui-monospace, SFMono-Regular, Menlo, monospace; }
.panel { background: var(--bg); border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; margin-bottom: 18px; }
.panel h2 { font-size: 16px; margin-bottom: 12px; }
.formrow { display: grid; grid-template-columns: 240px 1fr; gap: 6px 20px; padding: 12px 0; border-bottom: 1px solid var(--line); align-items: start; }
.formrow:last-child { border-bottom: 0; }
.formrow .fl { font-weight: 500; }
.formrow .fd { color: var(--muted); font-size: 13px; margin-top: 2px; }
.formrow .fc { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.formrow .fc input[type=text], .formrow .fc input[type=password], .formrow .fc input[type=date], .formrow .fc select { max-width: 360px; }
@media (max-width: 720px) { .formrow { grid-template-columns: 1fr; } }
.notice {
  display: flex; gap: 16px; align-items: center; justify-content: space-between; background: #fff8e6; border: 1px solid #f1d98b;
  border-radius: 12px; padding: 14px 16px; margin-bottom: 16px;
}
.notice .hint { margin-top: 3px; color: #7a6a2c; }
.drop {
  border: 2px dashed var(--line2); border-radius: 14px; padding: 30px 20px; text-align: center; color: var(--muted); margin-bottom: 16px;
  transition: background .12s, border-color .12s; background: var(--bg2);
}
.drop.over { background: var(--bg3); border-color: var(--text); color: var(--text); }
.drop .btn { margin-top: 10px; }
.queue { display: flex; flex-direction: column; gap: 6px; margin-bottom: 18px; }
.qrow { display: grid; grid-template-columns: 1fr 90px 110px; gap: 12px; align-items: center; font-size: 13.5px; padding: 8px 12px; background: var(--bg2); border-radius: 8px; border: 1px solid var(--line); }
.qrow .qn { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qrow .qs { color: var(--muted); text-align: right; }
.qrow.fail { border-color: #f0b9bb; background: #fff5f5; }
.qrow.fail .qs { color: #c0262c; grid-column: 1 / -1; text-align: left; }
.bar { height: 6px; background: var(--bg3); border-radius: 3px; overflow: hidden; }
.bar > span { display: block; height: 100%; width: 0; background: var(--accent); transition: width .15s; }
.igrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.icell { position: relative; background: var(--bg2); border-radius: 8px; overflow: hidden; border: 2px solid transparent; cursor: grab; }
.icell.dragover { border-color: var(--text); }
.icell.dragging { opacity: .35; }
.icell img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; pointer-events: none; }
.icell .in { padding: 5px 8px; font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.icell .x { position: absolute; right: 6px; top: 6px; width: 28px; height: 28px; border-radius: 50%; background: rgba(0, 0, 0, .65); border: 0; display: none; place-items: center; color: #fff; }
.icell:hover .x { display: grid; }
.icell .x:hover { background: #c0262c; }
.icell.bad { border-color: #f0b9bb; }
.icell .ph { aspect-ratio: 1; display: grid; place-items: center; text-align: center; padding: 10px; font-size: 12px; color: #c0262c; }
table.t { width: 100%; border-collapse: collapse; font-size: 14px; }
table.t th { text-align: left; font-weight: 500; color: var(--muted); font-size: 12.5px; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.t td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.t .cnts { display: inline-flex; gap: 10px; }
table.t .cnts span { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-size: 13px; }
table.t .rowacts { display: flex; gap: 4px; justify-content: flex-end; }
.pill { display: inline-block; padding: 2px 9px; border-radius: 999px; background: var(--bg3); color: var(--muted); font-size: 12px; }
.sysrow { display: flex; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.sysrow:last-child { border-bottom: 0; }
.sysrow .sym { width: 18px; font-weight: 700; }
.sysrow.ok .sym { color: #1f9d63; }
.sysrow.bad .sym { color: #c0262c; }
.sysrow.warn .sym { color: #c77d0a; }
.sysrow .sval { color: var(--muted); margin-left: auto; text-align: right; }

/* ---------- Dialoge (Admin) ---------- */
.modal-back { position: fixed; inset: 0; z-index: 300; background: rgba(0, 0, 0, .4); display: grid; place-items: center; padding: 16px; }
.modal { width: min(440px, 100%); background: var(--bg); border: 1px solid var(--line); border-radius: 16px; padding: 22px 22px 18px; box-shadow: 0 24px 60px rgba(0, 0, 0, .25); }
.modal h2 { font-size: 18px; margin-bottom: 12px; }
.modal .mbody p { margin: 0; color: var(--muted); }
.modal .mbody label.fl { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.modal .macts { display: flex; gap: 8px; justify-content: flex-end; margin-top: 18px; }

/* ---------- Schmale Bildschirme: Menü als Schublade ---------- */
@media (max-width: 860px) {
  .vtop { padding: 0 14px; height: 56px; }
  .sv[data-embed="client"] { --top: 56px; }
  .vmenu { display: inline-flex; align-items: center; }
  .vmainbar { padding: 12px 10px 0; }
  .vside {
    position: fixed; left: 0; top: 0; bottom: 0; height: 100%; width: min(320px, 88vw); z-index: 120; border-right: 0;
    transform: translateX(-104%); transition: transform .22s ease; box-shadow: 0 0 40px rgba(0, 0, 0, .25);
    padding-top: calc(18px + env(safe-area-inset-top));
  }
  .sv.drawer .vside { transform: none; }
  .vside-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
  .vback { position: fixed; inset: 0; z-index: 110; background: rgba(0, 0, 0, .35); }
  .sv.drawer .vback { display: block; }
  body.noscroll-m { overflow: hidden; }
  .vgrid { padding: 12px 8px 50px; gap: 5px; }
  .sv[data-size="M"] { --rh: 170px; }
  .sv[data-size="L"] { --rh: 260px; }
  .sv[data-size="S"] { --rh: 110px; }
}
@media (max-width: 640px) {
  .vtop h1 { font-size: 17px; }
  .lb-nav { display: none; }
  .adm-wrap { padding: 16px 12px 60px; }
  .qrow { grid-template-columns: 1fr 70px; }
  .qrow .bar { grid-column: 1 / -1; order: 3; }
  .notice { flex-direction: column; align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* Drucken der Galerie unterbinden */
@media print { body { display: none !important; } }

/* Mehrfachauswahl: Farbe für mehrere Bilder setzen */
.bulk { margin: 4px 0 12px; }
.bulk .lbl { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 6px; }
.bulk.off { opacity: .45; }
.bulkmarks { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.bm { display: inline-grid; place-items: center; min-width: 30px; height: 30px; padding: 0 9px; border-radius: 999px; background: var(--bg2); border: 1px solid var(--line2); color: var(--text); font-size: 13px; }
.bm .sw { width: 14px; height: 14px; }
.bm:hover:not(:disabled) { background: var(--bg3); }
.bm:focus-visible { outline: none; }
.vside .btn.block + .btn.block { margin-top: 10px; }
.vside .bulk + .btn { margin-top: 0; }
.selinfo, .selacts .linkbtn { white-space: nowrap; }
.selacts { gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.selbar { flex-wrap: wrap; }

.blockgap { flex: 1 0 100%; height: 34px; }

/* Gespeicherte Auswahlen */
.savedlist { display: flex; flex-direction: column; gap: 10px; }
.savedhint { margin: 0; color: var(--muted); font-size: 13.5px; }
.saveditem { border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; }
.saveditem .sname { font-weight: 500; font-size: 14px; overflow-wrap: anywhere; }
.saveditem .smeta { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.saveditem .sacts { display: flex; gap: 14px; margin-top: 6px; font-size: 13.5px; }
.linkbtn.danger { color: #c4261d; }
.modal input[type=text] { width: 100%; }
.lbm .xs { font-size: 18px; line-height: 1; width: 15px; text-align: center; }
