/* Attersee Media Content Cloud – Farben & Typografie nach atterseemedia.at (Archivo, Instrument Serif, Türkis #028a98) */
@font-face { font-family: 'Archivo'; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url('/fonts/archivo/archivo-latin-wght-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Archivo'; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url('/fonts/archivo/archivo-latin-ext-wght-normal.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Instrument Serif'; font-style: italic; font-weight: 400; font-display: swap;
  src: url('/fonts/instrument-serif/instrument-serif-latin-400-italic.woff2') format('woff2'); }

:root {
  --bg: #faf9f7;            /* warmes Weiß */
  --surface: #ffffff;
  --surface-2: #f3f2f0;
  --surface-3: #ebeae7;
  --ink: #1d1d1f;           /* Anthrazit */
  --ink-2: #424245;
  --muted: #6e6e73;
  --muted-2: #8e8e93;
  --line: rgba(0, 0, 0, 0.08);
  --line-2: rgba(0, 0, 0, 0.14);
  --teal: #028a98;          /* Akzent */
  --teal-d: #016d78;
  --teal-tint: #e9f6f7;
  --stage: #121314;
  --danger: #c4321f;
  --warn-tint: #fff4e5;
  --radius: 22px;
  --radius-sm: 14px;
  --shadow-lg: 0 1px 0 rgba(0,0,0,.03), 0 30px 80px -30px rgba(0,0,0,.35);
  --ease: cubic-bezier(.16, 1, .3, 1);
  --font: 'Archivo', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --serif: 'Instrument Serif', Georgia, serif;
  --pad: clamp(18px, 4vw, 56px);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
body.no-scroll { overflow: hidden; }
::selection { background: var(--teal); color: #fff; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--teal); }
img, video, canvas { display: block; max-width: 100%; }
h1, h2, h3 { text-wrap: balance; margin: 0; }
p { text-wrap: pretty; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid rgba(2, 138, 152, .45); outline-offset: 2px; }
.icon { width: 1.15em; height: 1.15em; flex: none; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 18px;
  border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); font-weight: 600; font-size: 15px;
  transition: background .2s, color .2s, border-color .2s, transform .2s var(--ease), box-shadow .2s; white-space: nowrap; text-decoration: none; }
.btn:hover { border-color: var(--teal); color: var(--teal); }
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--teal); border-color: var(--teal); color: #fff; box-shadow: 0 8px 20px -10px rgba(2,138,152,.7); }
.btn-primary:hover { background: var(--teal-d); border-color: var(--teal-d); color: #fff; }
.btn-dark { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn-dark:hover { background: #000; color: #fff; border-color: #000; }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-ghost:hover { background: var(--surface-2); border-color: transparent; color: var(--ink); }
.btn-danger { color: var(--danger); border-color: transparent; background: transparent; }
.btn-danger:hover { background: #fdecea; color: var(--danger); border-color: transparent; }
.btn-lg { min-height: 52px; padding: 0 26px; font-size: 16px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.icon-btn { width: 42px; height: 42px; padding: 0; border-radius: 50%; display: inline-grid; place-items: center;
  border: 0; background: transparent; color: inherit; transition: background .2s; }
.icon-btn:hover { background: rgba(0,0,0,.06); }

/* ---------- Boot / Spinner ---------- */
.boot { min-height: 100vh; display: grid; place-items: center; }
.spinner { width: 28px; height: 28px; border-radius: 50%; border: 3px solid rgba(2,138,152,.2); border-top-color: var(--teal);
  animation: spin .8s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Login ---------- */
.login { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); }
.login-visual { position: relative; overflow: hidden; background: #0f1112; color: #fff; padding: clamp(32px, 5vw, 72px);
  display: flex; flex-direction: column; justify-content: space-between; }
.login-visual::before { content: ''; position: absolute; inset: -20%; background:
  radial-gradient(40% 50% at 20% 25%, rgba(3,163,179,.55), transparent 70%),
  radial-gradient(35% 45% at 85% 80%, rgba(2,138,152,.45), transparent 70%),
  radial-gradient(30% 30% at 70% 20%, rgba(255,255,255,.08), transparent 70%); filter: blur(10px); }
.login-visual > * { position: relative; }
.login-mosaic { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 40px 0; max-width: 520px; }
.login-mosaic span { aspect-ratio: 4/3; border-radius: 14px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.1);
  display: grid; place-items: center; color: rgba(255,255,255,.75); backdrop-filter: blur(8px); }
.login-mosaic span:nth-child(2n) { background: rgba(3,163,179,.22); }
.login-mosaic .icon { width: 26px; height: 26px; }
.login-claim { font-size: clamp(34px, 4.4vw, 64px); line-height: 1.02; letter-spacing: -.04em; font-weight: 700; max-width: 12ch; }
.login-claim em { font-family: var(--serif); font-weight: 400; letter-spacing: -.01em; }
.login-note { color: rgba(255,255,255,.65); max-width: 44ch; font-size: 16px; }
.login-panel { display: grid; place-items: center; padding: clamp(28px, 5vw, 72px); }
.login-form { width: 100%; max-width: 380px; display: grid; gap: 18px; }
.login-form h1 { font-size: clamp(30px, 3vw, 40px); letter-spacing: -.035em; line-height: 1.05; }
.login-form .lead { margin: 10px 0 6px; color: var(--muted); }
.field { display: grid; gap: 7px; }
.field > span, .label { font-size: 13px; font-weight: 600; color: var(--ink-2); letter-spacing: .01em; }
.input, .textarea, .select { width: 100%; border: 1px solid var(--line-2); background: var(--surface); border-radius: 12px;
  padding: 12px 14px; font-size: 16px; outline: none; transition: border-color .2s, box-shadow .2s; }
.input:focus, .textarea:focus, .select:focus { border-color: var(--teal); box-shadow: 0 0 0 4px rgba(2,138,152,.14); }
.textarea { min-height: 92px; resize: vertical; line-height: 1.5; }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%236e6e73' stroke-width='1.8'%3E%3Cpath d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; padding-right: 38px; }
.form-error { color: var(--danger); font-size: 14px; min-height: 20px; margin: -6px 0 0; }
.demo-hint { border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); padding: 14px 16px; font-size: 14px; color: var(--muted); }
.demo-hint strong { color: var(--ink); }
.demo-hint .row { display: flex; justify-content: space-between; gap: 12px; padding-top: 8px; }
.demo-hint button { border: 0; background: none; color: var(--teal); font-weight: 600; padding: 0; }
.demo-hint code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; color: var(--ink); background: var(--surface-2); padding: 2px 6px; border-radius: 6px; }

/* ---------- Kopfzeile ---------- */
.topbar { position: sticky; top: 0; z-index: 30; background: rgba(250, 249, 247, .82); backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px); border-bottom: 1px solid var(--line); }
.topbar-in { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 24px; height: 68px; padding: 0 var(--pad); }
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; text-decoration: none; color: var(--ink); }
.brand-mark { width: 34px; height: 34px; flex: none; }
.brand-name { display: flex; flex-direction: column; line-height: 1.05; }
.brand-name b { font-size: 15px; font-weight: 700; letter-spacing: -.01em; }
.brand-name i { font-family: var(--serif); font-size: 19px; font-style: italic; color: var(--teal); }
.search { position: relative; justify-self: center; width: 100%; max-width: 560px; }
.search .icon { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--muted-2); pointer-events: none; }
.search input { width: 100%; height: 44px; border-radius: 999px; border: 1px solid transparent; background: var(--surface-3);
  padding: 0 44px 0 44px; font-size: 15px; outline: none; transition: background .2s, border-color .2s, box-shadow .2s; }
.search input::placeholder { color: var(--muted-2); }
.search input:focus { background: var(--surface); border-color: var(--teal); box-shadow: 0 0 0 4px rgba(2,138,152,.12); }
.search .clear { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 32px; height: 32px; }
.top-actions { display: flex; align-items: center; gap: 10px; }
.avatar { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--ink); color: #fff; font-weight: 700; font-size: 14px; }
.menu { position: absolute; right: var(--pad); top: 62px; width: 260px; background: var(--surface); border: 1px solid var(--line);
  border-radius: 18px; box-shadow: var(--shadow-lg); padding: 8px; animation: pop .22s var(--ease); }
.menu-head { padding: 12px 12px 10px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.menu-head b { display: block; }
.menu-head span { color: var(--muted); font-size: 13px; }
.menu button { width: 100%; text-align: left; border: 0; background: none; padding: 10px 12px; border-radius: 10px; display: flex; gap: 10px; align-items: center; }
.menu button:hover { background: var(--surface-2); }
@keyframes pop { from { opacity: 0; transform: translateY(-6px) scale(.98); } to { opacity: 1; transform: none; } }

/* ---------- Mediathek ---------- */
.main { padding: clamp(28px, 4.5vw, 64px) var(--pad) 96px; max-width: 1680px; margin: 0 auto; }
.lib-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; margin-bottom: clamp(22px, 3vw, 36px); }
.lib-title { font-size: clamp(36px, 5vw, 64px); line-height: 1; letter-spacing: -.045em; font-weight: 700; }
.lib-title em { font-family: var(--serif); font-weight: 400; letter-spacing: -.01em; color: var(--teal); }
.lib-sub { margin: 12px 0 0; color: var(--muted); font-size: clamp(15px, 1.2vw, 18px); }
.tabs { display: inline-flex; gap: 2px; padding: 4px; background: var(--surface-3); border-radius: 999px; overflow-x: auto; max-width: 100%;
  scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { border: 0; background: transparent; padding: 9px 16px; border-radius: 999px; font-weight: 600; font-size: 14.5px; color: var(--ink-2);
  display: inline-flex; gap: 7px; align-items: center; white-space: nowrap; transition: background .25s var(--ease), color .2s, box-shadow .25s; }
.tab:hover { color: var(--ink); }
.tab[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.08), 0 4px 12px -6px rgba(0,0,0,.15); }
.tab .count { font-size: 12px; font-weight: 600; color: var(--muted-2); font-variant-numeric: tabular-nums; }
.tab[aria-selected="true"] .count { color: var(--teal); }
.filter-note { display: flex; align-items: center; gap: 10px; margin: -12px 0 24px; color: var(--muted); font-size: 15px; flex-wrap: wrap; }
.filter-note b { color: var(--ink); }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: clamp(26px, 3vw, 40px) clamp(18px, 2vw, 28px); }
.card { display: flex; flex-direction: column; gap: 14px; text-align: left; border: 0; padding: 0; background: none; border-radius: var(--radius);
  animation: rise .5s var(--ease) both; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.thumb { position: relative; aspect-ratio: 16 / 10; border-radius: var(--radius); overflow: hidden; background: var(--surface-3);
  transition: box-shadow .45s var(--ease), transform .45s var(--ease); isolation: isolate; }
.thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ease); }
.thumb.fit { background: linear-gradient(180deg, #efeeeb, #e6e5e1); }
.thumb.fit img { object-fit: contain; padding: 18px; filter: drop-shadow(0 10px 18px rgba(0,0,0,.16)); }
.card:hover .thumb { box-shadow: 0 24px 50px -26px rgba(0,0,0,.45); transform: translateY(-3px); }
.card:hover .thumb img { transform: scale(1.035); }
.thumb .placeholder { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted-2); }
.thumb .placeholder .icon { width: 44px; height: 44px; }
.thumb .ext { position: absolute; left: 50%; top: 58%; transform: translateX(-50%); font-weight: 700; font-size: 13px; letter-spacing: .1em; color: var(--muted); }
.chip-type { position: absolute; left: 12px; top: 12px; display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px 6px 8px;
  border-radius: 999px; background: rgba(255,255,255,.88); backdrop-filter: blur(10px); font-size: 12.5px; font-weight: 600; color: var(--ink); }
.chip-type .icon { width: 15px; height: 15px; color: var(--teal); }
.chip-lock { position: absolute; right: 12px; top: 12px; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(29,29,31,.72); color: #fff; backdrop-filter: blur(10px); }
.chip-lock .icon { width: 15px; height: 15px; }
.chip-dur { position: absolute; right: 12px; bottom: 12px; padding: 4px 9px; border-radius: 8px; background: rgba(0,0,0,.6); color: #fff;
  font-size: 12.5px; font-weight: 600; font-variant-numeric: tabular-nums; }
.play { position: absolute; left: 50%; top: 50%; width: 56px; height: 56px; margin: -28px 0 0 -28px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(255,255,255,.9); color: var(--ink); opacity: 0; transform: scale(.85); transition: opacity .3s, transform .4s var(--ease); }
.card:hover .play { opacity: 1; transform: none; }
.play .icon { width: 22px; height: 22px; margin-left: 3px; }
.processing { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(250,249,247,.7); font-size: 13px; font-weight: 600; color: var(--ink-2); gap: 8px; align-content: center; }
.card-body { padding: 0 4px; display: grid; gap: 4px; }
.card-title { font-size: 17px; font-weight: 600; letter-spacing: -.015em; line-height: 1.3; color: var(--ink);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-meta { font-size: 14px; color: var(--muted); display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.card-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: currentColor; opacity: .6; }
.card-meta .ok { color: var(--teal); font-weight: 600; }
.empty { text-align: center; padding: 80px 20px; color: var(--muted); display: grid; justify-items: center; gap: 10px; }
.empty .icon { width: 40px; height: 40px; color: var(--muted-2); }
.empty h3 { color: var(--ink); font-size: 22px; letter-spacing: -.02em; }

/* ---------- Detailansicht ---------- */
.viewer { position: fixed; inset: 0; z-index: 60; display: grid; grid-template-columns: minmax(0, 1fr) clamp(340px, 30vw, 440px); background: var(--stage);
  animation: fade .25s ease; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.stage { position: relative; min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.stage-bar { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; color: rgba(255,255,255,.85); gap: 12px; }
.stage-bar .icon-btn { color: #fff; }
.stage-bar .icon-btn:hover { background: rgba(255,255,255,.12); }
.stage-bar .pos { font-size: 13px; color: rgba(255,255,255,.55); font-variant-numeric: tabular-nums; }
.stage-media { flex: 1; min-height: 0; display: grid; grid-template: minmax(0, 1fr) / minmax(0, 1fr); place-items: center; padding: 0 clamp(16px, 3vw, 48px) clamp(16px, 3vw, 40px); position: relative; }
.stage-media video { width: auto; height: auto; max-width: 100%; max-height: 100%; border-radius: 12px; background: #000; box-shadow: 0 30px 80px -30px rgba(0,0,0,.9); }
.stage-media .img-wrap { width: 100%; height: 100%; display: grid; place-items: center; overflow: hidden; cursor: zoom-in; border-radius: 12px; }
.stage-media .img-wrap img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 8px; user-select: none; -webkit-user-drag: none; }
.stage-media .img-wrap.zoomed { overflow: auto; cursor: zoom-out; place-items: start; }
.stage-media .img-wrap.zoomed img { max-width: none; max-height: none; }
.stage-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 48px; height: 48px; border-radius: 50%; border: 0; display: grid; place-items: center;
  background: rgba(255,255,255,.1); color: #fff; backdrop-filter: blur(8px); transition: background .2s; z-index: 2; }
.stage-nav:hover { background: rgba(255,255,255,.22); }
.stage-nav.prev { left: 14px; } .stage-nav.next { right: 14px; }
.pdf { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; gap: 14px; min-height: 0; }
.pdf-scroll { flex: 1; min-height: 0; width: 100%; overflow: auto; display: grid; place-items: center; }
.pdf canvas { background: #fff; border-radius: 4px; box-shadow: 0 20px 60px -20px rgba(0,0,0,.8); }
.pdf-bar { display: inline-flex; align-items: center; gap: 6px; padding: 6px; border-radius: 999px; background: rgba(255,255,255,.1); color: #fff; backdrop-filter: blur(10px); }
.pdf-bar .icon-btn { color: #fff; width: 36px; height: 36px; }
.pdf-bar .icon-btn:hover { background: rgba(255,255,255,.14); }
.pdf-bar .icon-btn[disabled] { opacity: .35; pointer-events: none; }
.pdf-bar span { min-width: 96px; text-align: center; font-size: 14px; font-variant-numeric: tabular-nums; }
.no-preview { color: rgba(255,255,255,.7); text-align: center; display: grid; gap: 10px; justify-items: center; }
.no-preview .icon { width: 56px; height: 56px; }

.panel { background: var(--surface); overflow-y: auto; padding: clamp(22px, 2.4vw, 34px); display: flex; flex-direction: column; gap: 24px; min-width: 0; }
.panel-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.badge { display: inline-flex; gap: 6px; align-items: center; font-size: 13px; font-weight: 600; color: var(--teal); background: var(--teal-tint);
  padding: 5px 11px 5px 9px; border-radius: 999px; }
.badge .icon { width: 15px; height: 15px; }
.panel h2 { font-size: clamp(24px, 2vw, 30px); line-height: 1.12; letter-spacing: -.03em; font-weight: 700; }
.panel .desc { margin: 10px 0 0; color: var(--ink-2); font-size: 16px; line-height: 1.6; white-space: pre-line; }
.section-title { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted-2); margin: 0 0 10px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag { border: 1px solid var(--line-2); background: var(--surface); border-radius: 999px; padding: 6px 12px; font-size: 13.5px; font-weight: 500; color: var(--ink-2);
  transition: border-color .2s, color .2s, background .2s; }
button.tag:hover { border-color: var(--teal); color: var(--teal); }
.facts { margin: 0; display: grid; grid-template-columns: auto minmax(0, 1fr); border-top: 1px solid var(--line); }
.facts dt, .facts dd { margin: 0; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.facts dt { color: var(--muted); padding-right: 18px; }
.facts dd { text-align: right; font-weight: 500; overflow-wrap: anywhere; }
.dl-box { display: grid; gap: 10px; }
.locked { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--radius-sm); background: var(--surface-2); color: var(--ink-2); font-size: 14.5px; }
.locked .icon { margin-top: 2px; color: var(--muted); }
.locked b { display: block; color: var(--ink); }
.admin-box { border: 1px solid var(--line); border-radius: 18px; padding: 16px; display: grid; gap: 14px; background: #fcfcfb; }
.admin-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.admin-row small { display: block; color: var(--muted); font-size: 13px; }
.admin-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* Schalter */
.switch { position: relative; width: 51px; height: 31px; flex: none; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: #d9d9de; transition: background .25s; pointer-events: none; }
.switch span::after { content: ''; position: absolute; left: 2px; top: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,.2); transition: transform .3s var(--ease); }
.switch input:checked + span { background: var(--teal); }
.switch input:checked + span::after { transform: translateX(20px); }
.switch input:focus-visible + span { outline: 3px solid rgba(2,138,152,.45); outline-offset: 2px; }

/* Schlagwort-Eingabe */
.tag-input { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; border: 1px solid var(--line-2); border-radius: 12px; padding: 7px 8px; background: var(--surface);
  transition: border-color .2s, box-shadow .2s; cursor: text; }
.tag-input:focus-within { border-color: var(--teal); box-shadow: 0 0 0 4px rgba(2,138,152,.14); }
.tag-input .t { display: inline-flex; align-items: center; gap: 4px; background: var(--teal-tint); color: var(--teal-d); border-radius: 999px; padding: 4px 6px 4px 11px; font-size: 14px; font-weight: 600; }
.tag-input .t button { border: 0; background: none; color: inherit; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; padding: 0; }
.tag-input .t button:hover { background: rgba(2,138,152,.15); }
.tag-input input { flex: 1; min-width: 120px; border: 0; outline: none; padding: 5px 4px; font-size: 15px; background: transparent; }
.suggest { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.suggest button { border: 1px dashed var(--line-2); background: none; border-radius: 999px; padding: 4px 10px; font-size: 13px; color: var(--muted); }
.suggest button:hover { border-color: var(--teal); color: var(--teal); }

/* ---------- Dialoge (Upload, Bestätigung) ---------- */
.overlay { position: fixed; inset: 0; z-index: 80; background: rgba(18,19,20,.42); backdrop-filter: blur(6px); display: grid; place-items: center;
  padding: clamp(0px, 3vw, 32px); animation: fade .2s ease; }
.dialog { width: min(820px, 100%); max-height: min(920px, 100%); background: var(--bg); border-radius: 28px; box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column; overflow: hidden; animation: pop .3s var(--ease); }
.dialog.small { width: min(440px, 100%); }
.dialog-head { display: flex; justify-content: space-between; align-items: center; padding: 22px 26px 8px; gap: 16px; }
.dialog-head h2 { font-size: 26px; letter-spacing: -.03em; }
.dialog-body { padding: 14px 26px 22px; overflow-y: auto; display: grid; gap: 18px; }
.dialog-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 26px; border-top: 1px solid var(--line); background: var(--surface); flex-wrap: wrap; }
.dialog-foot .hint { color: var(--muted); font-size: 14px; }
.drop { border: 1.5px dashed rgba(2,138,152,.45); border-radius: 22px; background: var(--surface); padding: clamp(28px, 4vw, 48px) 20px; text-align: center;
  display: grid; justify-items: center; gap: 10px; transition: background .2s, border-color .2s, transform .3s var(--ease); cursor: pointer; }
.drop.over { background: var(--teal-tint); border-color: var(--teal); transform: scale(1.01); }
.drop .circle { width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center; background: var(--teal-tint); color: var(--teal); }
.drop .circle .icon { width: 26px; height: 26px; }
.drop h3 { font-size: 19px; letter-spacing: -.02em; }
.drop p { margin: 0; color: var(--muted); font-size: 14.5px; }
.drop.compact { padding: 16px; grid-auto-flow: column; justify-content: center; align-items: center; gap: 12px; }
.drop.compact .circle { width: 38px; height: 38px; }
.drop.compact p { display: none; }
.drop.compact h3 { font-size: 15px; }
.up-item { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 16px; display: grid; grid-template-columns: 148px minmax(0, 1fr); gap: 18px; }
.up-prev { position: relative; aspect-ratio: 4/3; border-radius: 14px; overflow: hidden; background: var(--surface-3); display: grid; place-items: center; color: var(--muted); }
.up-prev img, .up-prev video { width: 100%; height: 100%; object-fit: cover; }
.up-prev .icon { width: 34px; height: 34px; }
.up-fields { display: grid; gap: 12px; min-width: 0; }
.up-row { display: grid; grid-template-columns: minmax(0, 1fr) 170px; gap: 12px; }
.up-file { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); }
.up-file span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.up-dl { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); font-size: 14px; }
.up-dl small { color: var(--muted); display: block; font-size: 12.5px; }
.progress { height: 6px; background: var(--surface-3); border-radius: 999px; overflow: hidden; }
.progress i { display: block; height: 100%; width: 0; background: var(--teal); transition: width .2s; }
.up-state { font-size: 13px; font-weight: 600; }
.up-state.ok { color: var(--teal); } .up-state.err { color: var(--danger); }

.page-drop { position: fixed; inset: 12px; z-index: 90; border: 2px dashed var(--teal); border-radius: 28px; background: rgba(233,246,247,.86);
  display: grid; place-items: center; font-size: 22px; font-weight: 700; color: var(--teal-d); pointer-events: none; animation: fade .15s; }

/* ---------- Toasts ---------- */
.toasts { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 100; display: grid; gap: 8px; justify-items: center; pointer-events: none; }
.toast { background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 14px; font-size: 14.5px; font-weight: 500; box-shadow: 0 12px 30px -12px rgba(0,0,0,.5);
  display: flex; gap: 10px; align-items: center; animation: toast .35s var(--ease); max-width: calc(100vw - 32px); }
.toast.err { background: var(--danger); }
.toast .icon { color: #5fd3de; }
.toast.err .icon { color: #fff; }
@keyframes toast { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* ---------- Responsiv ---------- */
@media (max-width: 1080px) {
  .viewer { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto; overflow-y: auto; }
  .stage { height: min(62vh, 640px); flex: none; }
  .panel { overflow: visible; border-radius: 26px 26px 0 0; margin-top: -10px; position: relative; }
}
@media (max-width: 860px) {
  .login { grid-template-columns: 1fr; }
  .login-visual { min-height: 0; padding-bottom: 36px; }
  .login-mosaic { display: none; }
  .login-claim { font-size: 38px; margin-top: 28px; }
  .topbar-in { grid-template-columns: minmax(0, 1fr) auto; height: auto; padding-top: 10px; padding-bottom: 10px; row-gap: 10px; }
  .search { grid-column: 1 / -1; grid-row: 2; max-width: none; }
  .btn-new-label { display: none; }
  .btn-new { width: 42px; padding: 0; }
  .up-item { grid-template-columns: 1fr; }
  .up-prev { aspect-ratio: 16/9; }
  .up-row { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .brand-name b { font-size: 14px; }
  .brand-name i { font-size: 17px; }
  .lib-head { margin-bottom: 18px; }
  .tabs { width: 100%; }
  .stage { height: 46vh; }
  .stage-nav { display: none; }
  .overlay { padding: 0; align-items: end; }
  .dialog { border-radius: 24px 24px 0 0; max-height: 94vh; }
  .dialog-head, .dialog-body, .dialog-foot { padding-left: 18px; padding-right: 18px; }
  .dialog-foot .btn { flex: 1; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ======================================================================= Erweiterungen: Navigation, eigene Tabs, Auswahl, Teilen, Formate, Anfragen */
.topbar-in { grid-template-columns: auto auto minmax(0, 1fr) auto; }
.nav { display: flex; gap: 2px; }
.nav-link { position: relative; border: 0; background: none; padding: 9px 14px; border-radius: 999px; font-weight: 600; font-size: 14.5px; color: var(--muted); transition: background .2s, color .2s; white-space: nowrap; }
.nav-link:hover { color: var(--ink); background: rgba(0,0,0,.04); }
.nav-link[aria-current="page"] { color: var(--ink); background: var(--surface-3); }
.nav-badge { position: absolute; top: 2px; right: 2px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--teal); color: #fff; font-size: 11px; line-height: 18px; text-align: center; }
.btn-sm { min-height: 36px; padding: 0 14px; font-size: 14px; }
.select-sm { padding: 8px 34px 8px 12px; font-size: 14px; border-radius: 999px; width: auto; background-color: var(--surface); }
.hint { color: var(--muted); font-size: 14px; margin: 0; }
.hint code { font-family: ui-monospace, Menlo, monospace; background: var(--surface-2); padding: 2px 6px; border-radius: 6px; color: var(--ink); }
.opt { font-weight: 500; color: var(--muted-2); }
.lead-sm { margin: 0; color: var(--ink-2); font-size: 15px; }
.dot { display: inline-block; width: 3px; height: 3px; border-radius: 50%; background: currentColor; opacity: .55; margin: 0 8px; vertical-align: middle; }
.spinner.sm { width: 12px; height: 12px; border-width: 2px; vertical-align: -1px; }

/* Eigene Tabs */
.colbar { display: flex; align-items: center; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: -6px 0 22px; padding: 2px 0; }
.colbar::-webkit-scrollbar { display: none; }
.colbar-label { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted-2); white-space: nowrap; margin-right: 4px; }
.colbar-label .icon { width: 15px; height: 15px; }
.ctab { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; border: 1px solid var(--line-2); background: var(--surface); border-radius: 999px; padding: 7px 14px; font-size: 14px; font-weight: 600; color: var(--ink-2); transition: border-color .2s, background .2s, color .2s; }
.ctab small { font-weight: 500; color: var(--muted-2); font-size: 12.5px; }
.ctab .count { font-size: 12px; color: var(--muted-2); font-variant-numeric: tabular-nums; }
.ctab:hover { border-color: var(--teal); }
.ctab[aria-selected="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.ctab[aria-selected="true"] small, .ctab[aria-selected="true"] .count { color: rgba(255,255,255,.7); }
.ctab.add { border-style: dashed; color: var(--teal); border-color: rgba(2,138,152,.5); }
.ctab.add .icon { width: 15px; height: 15px; }
.colinfo { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; padding: 22px 24px; margin-bottom: 26px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.colinfo h2 { font-size: 26px; letter-spacing: -.03em; }
.colinfo p { margin: 6px 0 0; color: var(--muted); font-size: 14.5px; display: flex; align-items: center; flex-wrap: wrap; }
.colinfo p .icon { width: 15px; height: 15px; margin-right: 5px; }
.colinfo .colinfo-desc { color: var(--ink-2); max-width: 70ch; }

/* Werkzeugleiste: Anzahl, Auswählen, Sortieren */
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 0 0 22px; flex-wrap: wrap; }
.toolbar .filter-note { margin: 0; display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 15px; }
.toolbar .filter-note .icon { color: var(--teal); }
.tools { display: flex; align-items: center; gap: 8px; }
.sort { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }
.sort .icon { width: 16px; height: 16px; }
#btn-select[aria-pressed="true"] { background: var(--ink); color: #fff; }

/* Auswahl */
.chip-check { position: absolute; left: 12px; top: 12px; width: 28px; height: 28px; border-radius: 50%; border: 2px solid #fff; background: rgba(0,0,0,.25); display: none; place-items: center; color: transparent; box-shadow: 0 2px 8px rgba(0,0,0,.25); }
.chip-check .icon { width: 16px; height: 16px; }
.grid.selecting .chip-check { display: grid; }
.grid.selecting .chip-type, .grid.selecting .play { display: none; }
.card.selected .chip-check { background: var(--teal); border-color: var(--teal); color: #fff; }
.card.selected .thumb { box-shadow: 0 0 0 3px var(--teal), 0 20px 40px -24px rgba(2,138,152,.7); }
.card.selectable:hover .thumb { transform: none; }
.chip-formats { position: absolute; left: 12px; bottom: 12px; padding: 4px 8px; border-radius: 8px; background: rgba(255,255,255,.9); font-size: 12px; font-weight: 700; color: var(--teal-d); }
.selbar { position: fixed; left: 50%; bottom: max(18px, env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 50; display: flex; align-items: center; gap: 8px; padding: 8px 8px 8px 18px;
  background: rgba(29,29,31,.94); color: #fff; border-radius: 999px; box-shadow: 0 20px 50px -18px rgba(0,0,0,.6); backdrop-filter: blur(14px); animation: toast .35s var(--ease); max-width: calc(100vw - 24px); overflow-x: auto; }
.selbar-count { white-space: nowrap; font-size: 14.5px; margin-right: 4px; }
.selbar .btn { border-color: rgba(255,255,255,.18); background: rgba(255,255,255,.08); color: #fff; }
.selbar .btn:hover { border-color: rgba(255,255,255,.4); color: #fff; }
.selbar .btn-primary { background: var(--teal); border-color: var(--teal); }
.selbar .btn-ghost { background: transparent; border-color: transparent; }
.selbar .icon-btn { color: #fff; flex: none; }
.selbar .icon-btn:hover { background: rgba(255,255,255,.12); }
.selbar-sep { width: 1px; height: 22px; background: rgba(255,255,255,.2); flex: none; }

/* Detailansicht: Formate */
.stage-bar { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; }
.stage-bar .pos { justify-self: end; padding-right: 6px; }
.formats { display: flex; justify-content: center; gap: 4px; flex-wrap: wrap; }
.fpill { border: 0; background: rgba(255,255,255,.1); color: rgba(255,255,255,.8); padding: 7px 13px; border-radius: 999px; font-size: 13px; font-weight: 600; display: inline-flex; gap: 6px; align-items: center; }
.fpill:hover { background: rgba(255,255,255,.18); color: #fff; }
.fpill[aria-selected="true"] { background: #fff; color: var(--ink); }
.panel-top .panel-tools { display: flex; gap: 6px; }
.fmt-list { display: grid; border-top: 1px solid var(--line); }
.fmt-row { display: flex; align-items: center; gap: 6px; border-bottom: 1px solid var(--line); padding: 4px 0; }
.fmt-name { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 1px; border: 0; background: none; padding: 8px 4px; text-align: left; border-radius: 10px; }
.fmt-name:hover { background: var(--surface-2); }
.fmt-name b { font-size: 15px; }
.fmt-name small { color: var(--muted); font-size: 13px; }
.fmt-row .icon-btn { width: 36px; height: 36px; color: var(--ink-2); }
.fmt-row a.icon-btn { color: var(--teal); }
.fmt-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.tag .icon { width: 14px; height: 14px; vertical-align: -2px; }
.tag-col { border-color: rgba(2,138,152,.35); color: var(--teal-d); background: var(--teal-tint); }
.tag-add { border-style: dashed; color: var(--muted); background: transparent; }
button.tag-add:hover { color: var(--teal); }

/* Auswahl-Chips */
.choices { display: flex; flex-wrap: wrap; gap: 8px; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.choice span { display: inline-flex; align-items: center; border: 1px solid var(--line-2); background: var(--surface); border-radius: 999px; padding: 8px 14px; font-size: 14px; font-weight: 500; color: var(--ink-2); transition: all .18s; }
.choice input:checked + span { background: var(--teal); border-color: var(--teal); color: #fff; }
.choice input:focus-visible + span { outline: 3px solid rgba(2,138,152,.4); outline-offset: 2px; }
.choice:hover span { border-color: var(--teal); }
.fs { border: 0; padding: 0; margin: 0; display: grid; gap: 10px; }
.fs legend { font-size: 13px; font-weight: 600; color: var(--ink-2); padding: 0; margin-bottom: 8px; }
.up-row.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* Teilen */
.share-sum { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 12px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.share-sum p { margin: 0; font-size: 14.5px; color: var(--ink-2); display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.share-sum .icon { width: 15px; height: 15px; }
.thumb-strip { display: flex; gap: 6px; flex-wrap: wrap; }
.mini { position: relative; width: 52px; height: 40px; border-radius: 8px; overflow: hidden; background: var(--surface-3); display: grid; place-items: center; color: var(--muted); flex: none; }
.mini img { width: 100%; height: 100%; object-fit: cover; }
.mini .icon { width: 18px; height: 18px; }
.mini-lock { position: absolute; right: 2px; bottom: 2px; width: 16px; height: 16px; border-radius: 50%; background: rgba(29,29,31,.8); color: #fff; display: grid; place-items: center; }
.mini-lock .icon { width: 10px; height: 10px; }
.mini.more { font-size: 13px; font-weight: 700; color: var(--ink-2); }
.share-done { display: flex; align-items: center; gap: 14px; }
.share-done p { margin: 0; color: var(--ink-2); }
.share-done.big { flex-direction: column; text-align: center; padding: 18px 0; gap: 10px; }
.share-done.big h3 { font-size: 22px; letter-spacing: -.02em; }
.done-icon { width: 46px; height: 46px; border-radius: 50%; background: var(--teal); color: #fff; display: grid; place-items: center; flex: none; }
.done-icon .icon { width: 24px; height: 24px; }
.link-box { display: flex; gap: 8px; }
.link-box .input { font-family: ui-monospace, Menlo, monospace; font-size: 14px; background: var(--surface-2); }
.link-box.sm .input { padding: 8px 12px; font-size: 13px; }
.share-list, .req-list { display: grid; gap: 14px; }
.share-row { display: grid; grid-template-columns: 120px minmax(0, 1fr) auto auto; gap: 20px; align-items: center; padding: 18px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.share-row.revoked, .share-row.expired { opacity: .72; }
.share-thumbs { position: relative; height: 80px; }
.share-thumbs span { position: absolute; width: 96px; height: 68px; border-radius: 12px; overflow: hidden; background: var(--surface-3); border: 2px solid #fff; box-shadow: 0 6px 16px -8px rgba(0,0,0,.35); display: grid; place-items: center; color: var(--muted); }
.share-thumbs span:nth-child(1) { left: 0; top: 0; z-index: 3; } .share-thumbs span:nth-child(2) { left: 12px; top: 6px; z-index: 2; transform: rotate(4deg); } .share-thumbs span:nth-child(3) { left: 22px; top: 12px; z-index: 1; transform: rotate(8deg); }
.share-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.share-title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.share-title h3 { font-size: 18px; letter-spacing: -.02em; }
.share-meta { margin: 4px 0 10px; color: var(--muted); font-size: 14px; display: flex; align-items: center; flex-wrap: wrap; }
.share-meta .icon { width: 14px; height: 14px; margin-right: 3px; }
.share-stats { display: grid; gap: 4px; font-size: 13.5px; color: var(--muted); text-align: right; white-space: nowrap; }
.share-stats b { color: var(--ink); font-size: 16px; }
.share-actions { display: flex; align-items: center; gap: 4px; }
.share-actions .icon-btn { color: var(--ink-2); }
.pill { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 700; background: var(--surface-3); color: var(--ink-2); white-space: nowrap; }
.pill-active, .pill-erledigt { background: var(--teal-tint); color: var(--teal-d); }
.pill-neu { background: #e8f0ff; color: #1d4ed8; }
.pill-in_bearbeitung { background: var(--warn-tint); color: #a15c00; }
.pill-expired, .pill-revoked, .pill-abgelehnt { background: #f3f3f5; color: var(--muted); }

/* Anfragen */
.req-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-bottom: 40px; }
.req-card { text-align: left; border: 1px solid var(--line); background: var(--surface); border-radius: 26px; padding: 26px; display: grid; gap: 10px; align-content: start; transition: transform .4s var(--ease), box-shadow .4s, border-color .2s; }
.req-card:hover { transform: translateY(-3px); border-color: rgba(2,138,152,.4); box-shadow: 0 24px 50px -30px rgba(0,0,0,.35); }
.req-card b { font-size: 22px; letter-spacing: -.025em; }
.req-card > span:not(.req-ic) { color: var(--muted); font-size: 15px; line-height: 1.5; }
.req-card i { font-style: normal; color: var(--teal); font-weight: 600; font-size: 14.5px; display: inline-flex; align-items: center; gap: 4px; margin-top: 6px; }
.req-ic { width: 48px; height: 48px; border-radius: 14px; background: var(--teal-tint); color: var(--teal); display: grid; place-items: center; }
.req-ic .icon { width: 24px; height: 24px; }
.req-ic.sm { width: 38px; height: 38px; border-radius: 11px; flex: none; }
.req-ic.sm .icon { width: 19px; height: 19px; }
.section-h { font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted-2); margin: 0 0 14px; }
.req { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; }
.req summary { list-style: none; display: flex; align-items: center; gap: 14px; padding: 16px 18px; cursor: pointer; }
.req summary::-webkit-details-marker { display: none; }
.req-head { flex: 1; min-width: 0; display: grid; }
.req-head b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.req-head small { color: var(--muted); font-size: 13.5px; }
.req-body { padding: 0 18px 18px 70px; display: grid; gap: 14px; }
.facts.compact dt, .facts.compact dd { padding: 8px 0; font-size: 14px; }
.facts.compact dd { white-space: pre-line; }
.req-note { margin: 0; padding: 12px 14px; border-radius: 12px; background: var(--teal-tint); color: var(--teal-d); font-size: 14.5px; }
.req-admin { display: grid; grid-template-columns: 200px minmax(0, 1fr) auto; gap: 10px; align-items: end; padding: 14px; border-radius: 14px; background: var(--surface-2); }

@media (max-width: 1180px) {
  .topbar-in { grid-template-columns: auto minmax(0, 1fr) auto; }
  .nav { grid-column: 1 / -1; grid-row: 2; overflow-x: auto; }
  .topbar-in { height: auto; padding-top: 10px; padding-bottom: 8px; row-gap: 6px; }
}
@media (max-width: 860px) {
  .topbar-in { grid-template-columns: minmax(0, 1fr) auto; }
  .search { grid-row: 2; }
  .nav { grid-row: 3; }
  .share-row { grid-template-columns: 1fr; gap: 12px; }
  .share-thumbs { display: none; }
  .share-stats { text-align: left; display: flex; gap: 16px; }
  .req-cards { grid-template-columns: 1fr; }
  .req-body { padding-left: 18px; }
  .req-admin { grid-template-columns: 1fr; }
  .up-row.three { grid-template-columns: 1fr; }
  .selbar { left: 12px; right: 12px; transform: none; border-radius: 22px; }
  .selbar-count b { font-size: 16px; }
  .colinfo { padding: 18px; }
}
@media (max-width: 560px) {
  .toolbar .filter-note { font-size: 14px; }
  .tools { width: 100%; justify-content: space-between; }
  .stage-bar { grid-template-columns: 42px minmax(0, 1fr); }
  .stage-bar .pos { display: none; }
}

/* ======================================================================= Öffentliche Paketseite */
.pub-top { position: sticky; top: 0; z-index: 30; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 14px var(--pad);
  background: rgba(250,249,247,.85); backdrop-filter: saturate(180%) blur(18px); border-bottom: 1px solid var(--line); }
.opt-light { font-weight: 500; opacity: .8; }
.pub-main { padding-top: clamp(28px, 5vw, 72px); }
.pub-hero { margin-bottom: clamp(28px, 4vw, 48px); max-width: 860px; }
.pub-kicker { margin: 0 0 12px; font-size: 13px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--teal); }
.pub-message { margin: 18px 0 0; font-size: clamp(16px, 1.3vw, 19px); color: var(--ink-2); line-height: 1.6; white-space: pre-line; }
.pub-foot { margin-top: 72px; padding-top: 22px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.pub-msg { min-height: calc(100vh - 80px); display: grid; place-content: center; justify-items: center; text-align: center; gap: 12px; padding: 24px; }
.pub-msg h1 { font-size: clamp(28px, 3vw, 40px); letter-spacing: -.035em; }
.pub-msg p { margin: 0; color: var(--muted); max-width: 44ch; }
.pub-ic { width: 64px; height: 64px; border-radius: 20px; background: var(--teal-tint); color: var(--teal); display: grid; place-items: center; }
.pub-ic .icon { width: 30px; height: 30px; }
.pub-pw { display: flex; gap: 8px; width: min(380px, 100%); margin-top: 10px; }
.stage-media.portrait video, .stage-media.portrait .img-wrap img { max-height: 100%; }
@media (max-width: 560px) { .pub-top .btn .opt-light { display: none; } .pub-top .brand-name { display: none; } }

body:has(.selbar) .main { padding-bottom: 140px; }
.card-meta .nowrap { white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
@media (max-width: 860px) {
  .selbar { flex-wrap: wrap; padding: 10px 10px 10px 16px; gap: 6px; overflow: visible; }
  .selbar-count { flex: 1 1 auto; }
  .selbar-sep { display: none; }
  .selbar .btn-sm { min-height: 34px; padding: 0 12px; font-size: 13.5px; }
}

/* Ergebnis von Attersee Media hinterlegen */
.req-deliver { display: grid; gap: 8px; padding: 14px; border-radius: 14px; border: 1px dashed rgba(2,138,152,.45); }
.req-deliver .section-title { margin: 0 0 4px; }
.deliver-row { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto auto; gap: 10px; align-items: center; }
.deliver-row .up-state { grid-column: 2 / -1; font-size: 13px; }
.deliver-row .up-state:empty { display: none; }
.deliver-title { display: grid; min-width: 0; }
.deliver-title b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14.5px; }
.deliver-title small { color: var(--muted); font-size: 12.5px; }
@media (max-width: 560px) { .deliver-row { grid-template-columns: 52px minmax(0, 1fr); } }

/* ======================================================================= Dunkles Design (Schalter in der Kopfzeile, gespeichert pro Browser) */
html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0e0f11; --surface: #18191c; --surface-2: #202125; --surface-3: #2a2b30;
  --ink: #f2f2f4; --ink-2: #c9c9ce; --muted: #9a9aa0; --muted-2: #7c7c83;
  --line: rgba(255,255,255,.08); --line-2: rgba(255,255,255,.16);
  --teal: #14a3b2; --teal-d: #5fd3de; --teal-tint: rgba(20,163,178,.16);
  --stage: #08090a; --danger: #ff6b5a; --warn-tint: rgba(255,170,60,.14);
  --shadow-lg: 0 1px 0 rgba(255,255,255,.03), 0 30px 80px -30px rgba(0,0,0,.9);
}
html[data-theme="dark"] .topbar, html[data-theme="dark"] .pub-top { background: rgba(14,15,17,.8); }
html[data-theme="dark"] .btn-primary:hover { background: #0f8f9c; border-color: #0f8f9c; }
html[data-theme="dark"] .btn-dark, html[data-theme="dark"] .avatar, html[data-theme="dark"] .toast:not(.err),
html[data-theme="dark"] .ctab[aria-selected="true"], html[data-theme="dark"] #btn-select[aria-pressed="true"] { background: #f2f2f4; border-color: #f2f2f4; color: #111214; }
html[data-theme="dark"] .btn-dark:hover { background: #fff; color: #000; border-color: #fff; }
html[data-theme="dark"] .ctab[aria-selected="true"] small, html[data-theme="dark"] .ctab[aria-selected="true"] .count { color: rgba(0,0,0,.55); }
html[data-theme="dark"] .toast:not(.err) .icon { color: var(--teal); }
html[data-theme="dark"] .btn-danger:hover { background: rgba(255,107,90,.14); }
html[data-theme="dark"] .thumb.fit { background: linear-gradient(180deg, #222327, #1b1c1f); }
html[data-theme="dark"] .chip-type, html[data-theme="dark"] .chip-formats { background: rgba(24,25,28,.85); color: var(--ink); }
html[data-theme="dark"] .chip-formats { color: var(--teal-d); }
html[data-theme="dark"] .play { background: rgba(24,25,28,.88); color: #fff; }
html[data-theme="dark"] .processing { background: rgba(14,15,17,.72); }
html[data-theme="dark"] .admin-box { background: var(--surface-2); }
html[data-theme="dark"] .switch span { background: #3a3b41; }
html[data-theme="dark"] .share-thumbs span { border-color: var(--surface); }
html[data-theme="dark"] .pill-neu { background: rgba(80,140,255,.18); color: #9dbdff; }
html[data-theme="dark"] .pill-expired, html[data-theme="dark"] .pill-revoked, html[data-theme="dark"] .pill-abgelehnt { background: var(--surface-3); }
html[data-theme="dark"] .pill-in_bearbeitung { color: #ffb45e; }
html[data-theme="dark"] .demo-hint, html[data-theme="dark"] .colinfo, html[data-theme="dark"] .req, html[data-theme="dark"] .req-card,
html[data-theme="dark"] .share-row, html[data-theme="dark"] .up-item, html[data-theme="dark"] .share-sum { background: var(--surface); }
html[data-theme="dark"] .dialog-foot { background: var(--surface); }
html[data-theme="dark"] .page-drop { background: rgba(14,15,17,.88); }
html[data-theme="dark"] .login-visual { background: #08090a; }
html[data-theme="dark"] ::selection { color: #fff; }

/* Schalter */
.theme-btn { color: var(--ink-2); }
.theme-btn:hover { color: var(--ink); background: var(--surface-3); }
.theme-btn .icon { width: 20px; height: 20px; }
.login-panel { position: relative; }
.theme-float { position: absolute; top: clamp(14px, 3vw, 28px); right: clamp(14px, 3vw, 28px); }
.menu .menu-theme { display: none; }
@media (max-width: 560px) {
  .top-actions .theme-btn { display: none; }
  .menu .menu-theme { display: flex; }
}

.pub-actions { display: flex; align-items: center; gap: 8px; }
@media (max-width: 560px) { .top-actions .theme-btn { display: none; } .pub-actions .theme-btn { display: inline-grid; } }
.fpill[aria-selected="true"] { color: #1d1d1f; }
