/* EDMY – Liquid-Glass-Design (an iOS 27 angelehnt) */
:root {
  /* Apple-Systemfarben (hell) */
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", "Segoe UI", Roboto, Arial, sans-serif;
  --bg: #ffffff;                              /* systemBackground */
  --bg-grouped: #f2f2f7;                      /* systemGroupedBackground */
  --bg-tint-1: transparent; --bg-tint-2: transparent; --bg-tint-3: transparent;
  --text: #000000;                            /* label */
  --text-2: rgba(60, 60, 67, .6);             /* secondaryLabel */
  --text-3: rgba(60, 60, 67, .3);             /* tertiaryLabel */
  --line: rgba(60, 60, 67, .18);              /* separator */
  --fill: rgba(118, 118, 128, .12);           /* tertiarySystemFill */
  --fill-2: rgba(120, 120, 128, .16);         /* secondarySystemFill */
  --surface: #ffffff;                         /* secondarySystemGroupedBackground */
  --surface-solid: #ffffff;
  --glass: rgba(255, 255, 255, .72);
  --glass-strong: rgba(255, 255, 255, .86);
  --glass-edge: rgba(255, 255, 255, .9);
  --glass-edge-2: rgba(0, 0, 0, .06);
  --glass-shadow: 0 6px 24px rgba(0, 0, 0, .08), 0 1px 3px rgba(0, 0, 0, .06);
  --glass-blur: blur(24px) saturate(180%);
  --accent: #007aff;                          /* systemBlue */
  --accent-glass: #007aff;
  --accent-soft: rgba(0, 122, 255, .12);
  --on-accent: #ffffff;
  --danger: #ff3b30;                          /* systemRed */
  --danger-soft: rgba(255, 59, 48, .1);
  --ok: #34c759;                              /* systemGreen */
  --overlay: rgba(0, 0, 0, .2);
  --lb-bg: #000000;
  --lb-text: #ffffff;
  --lb-glass: rgba(58, 58, 60, .55);
  --lb-glass-edge: rgba(255, 255, 255, .18);
  --badge-shadow: 0 1px 3px rgba(0, 0, 0, .55);
  --avatar: linear-gradient(180deg, #a5abb6, #858994);
  --r-xs: 8px; --r-s: 12px; --r: 18px; --r-l: 26px; --r-xl: 34px; --r-pill: 999px;
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 20px; --s-6: 24px; --s-8: 32px; --s-10: 40px; --s-12: 48px;
  --fs-s: 15px; --fs: 17px; --fs-m: 20px; --fs-l: 24px; --fs-xl: 34px; --fs-hero: 44px;
  --nav-h: 56px;
  --sb-w: 300px;
  --sb-bg: rgba(242, 242, 247, .82);
  --sb-active: rgba(120, 120, 128, .16);
  --bg-fade: rgba(255, 255, 255, .92);
  --max: 1180px;
  --tile-gap: 2px;
  --ease: cubic-bezier(.32, .72, 0, 1);
  --spring: cubic-bezier(.34, 1.4, .64, 1);
  --focus: 0 0 0 4px rgba(0, 122, 255, .35);
}
@media (prefers-color-scheme: dark) {
  :root {
    /* Apple-Systemfarben (dunkel) */
    --bg: #000000;
    --bg-grouped: #000000;
    --text: #ffffff;
    --text-2: rgba(235, 235, 245, .6);
    --text-3: rgba(235, 235, 245, .3);
    --line: rgba(84, 84, 88, .6);
    --fill: rgba(118, 118, 128, .24);
    --fill-2: rgba(120, 120, 128, .32);
    --surface: #1c1c1e;
    --surface-solid: #1c1c1e;
    --glass: rgba(44, 44, 46, .7);
    --glass-strong: rgba(44, 44, 46, .86);
    --glass-edge: rgba(255, 255, 255, .14);
    --glass-edge-2: rgba(255, 255, 255, .06);
    --glass-shadow: 0 6px 24px rgba(0, 0, 0, .5), 0 1px 3px rgba(0, 0, 0, .4);
    --accent: #0a84ff;
    --accent-glass: #0a84ff;
    --accent-soft: rgba(10, 132, 255, .2);
    --danger: #ff453a;
    --danger-soft: rgba(255, 69, 58, .16);
    --ok: #30d158;
    --overlay: rgba(0, 0, 0, .5);
    --avatar: linear-gradient(180deg, #8e8e93, #6c6c70);
    --sb-bg: rgba(28, 28, 30, .82);
    --sb-active: rgba(120, 120, 128, .32);
    --bg-fade: rgba(0, 0, 0, .88);
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
body {
  margin: 0; min-height: 100vh;
  font-family: var(--font); font-size: var(--fs); line-height: 1.4; letter-spacing: -.02em;
  color: var(--text); background: var(--bg);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
body.grouped { --bg: var(--bg-grouped); --bg-fade: transparent; background: var(--bg-grouped); }
.login-body { background: var(--bg-grouped); }
/* Hintergrund */
.backdrop {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(60vmax 50vmax at 8% -10%, var(--bg-tint-1), transparent 60%),
    radial-gradient(55vmax 45vmax at 105% 10%, var(--bg-tint-2), transparent 60%),
    radial-gradient(50vmax 40vmax at 50% 115%, var(--bg-tint-3), transparent 60%),
    var(--bg);
}
a { color: var(--accent); text-decoration: none; }
a:hover { opacity: .8; }
img { display: block; max-width: 100%; }
h1, h2, h3 { margin: 0; line-height: 1.12; }
h2 { font-size: var(--fs-m); font-weight: 700; letter-spacing: -.025em; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: var(--r-xs); }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--surface-solid); padding: var(--s-2) var(--s-4); border-radius: var(--r-pill); }
.skip:focus { left: 8px; }
.muted { color: var(--text-2); margin: 0; }
.small { font-size: 14px; }
em { font-style: normal; color: var(--text-3); }
.ic { flex: none; }

/* ---------- Glas-Material ---------- */
.glass {
  background: var(--glass);
  -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-edge-2);
  box-shadow: inset 0 1px 0 var(--glass-edge), inset 0 -1px 0 var(--glass-edge-2), var(--glass-shadow);
}

/* ---------- Rahmen: Seitenleiste + Inhalt ---------- */
.app { display: flex; min-height: 100vh; min-height: 100dvh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; height: 100dvh; flex: none; width: var(--sb-w);
  padding: max(var(--s-3), env(safe-area-inset-top)) 0 var(--s-3) max(var(--s-3), env(safe-area-inset-left));
  transition: margin-left .45s var(--ease), transform .45s var(--ease);
  z-index: 40;
}
.sidebar > * { margin-right: 0; }
.sidebar::before {
  content: ""; position: absolute; inset: max(var(--s-3), env(safe-area-inset-top)) 0 var(--s-3) max(var(--s-3), env(safe-area-inset-left));
  border-radius: var(--r-l); background: var(--sb-bg);
  -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-edge-2); box-shadow: inset 0 1px 0 var(--glass-edge), 0 8px 30px rgba(0, 0, 0, .06);
  z-index: -1;
}
.sidebar { display: flex; flex-direction: column; isolation: isolate; }
.sb-head { display: flex; align-items: center; justify-content: space-between; padding: var(--s-4) var(--s-3) var(--s-3) var(--s-5); }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 700; font-size: 18px; letter-spacing: .03em; }
.brand:hover { opacity: 1; }
.logo-mark { border-radius: 26%; box-shadow: 0 2px 8px rgba(0, 122, 255, .3); }
.sb-toggle { width: 36px; height: 36px; border: 0; border-radius: 10px; background: transparent; color: var(--text); display: grid; place-items: center; cursor: pointer; }
.sb-toggle:hover { background: var(--fill); }
.sb-nav { display: grid; gap: 2px; padding: var(--s-2) var(--s-3); }
.sb-item {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 8px 12px; border-radius: 12px; border: 0;
  background: transparent; color: var(--text); font: inherit; font-size: 16px; text-align: left; cursor: pointer;
  transition: background-color .2s var(--ease);
}
.sb-item .ic { width: 22px; height: 22px; color: var(--accent); stroke-width: 1.7; }
.sb-item:hover { background: var(--fill); opacity: 1; }
.sb-item[aria-current="page"] { background: var(--sb-active); color: var(--accent); font-weight: 600; }
.sb-group { padding: var(--s-3) var(--s-3) 0; overflow: auto; flex: 1; min-height: 0; }
.sb-group summary {
  list-style: none; display: flex; align-items: center; justify-content: space-between; cursor: pointer;
  padding: 6px 12px; color: var(--text-2); font-size: 15px; font-weight: 600; border-radius: 10px;
}
.sb-group summary::-webkit-details-marker { display: none; }
.sb-group summary .ic { width: 16px; height: 16px; color: var(--accent); stroke-width: 2.4; transition: transform .3s var(--ease); }
.sb-group:not([open]) summary .ic { transform: rotate(-90deg); }
.sb-group summary:hover { background: var(--fill); }
.sb-album { padding: 6px 12px; }
.sb-thumb { width: 30px; height: 30px; border-radius: 7px; overflow: hidden; flex: none; background: var(--fill); display: grid; place-items: center; }
.sb-thumb img { width: 100%; height: 100%; object-fit: cover; }
.sb-thumb .ic { width: 18px; height: 18px; color: var(--text-3); }
.sb-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.sb-empty { margin: 4px 12px; color: var(--text-3); font-size: 14px; }
.sb-foot { padding: var(--s-3); border-top: 1px solid var(--line); margin: 0 var(--s-3); padding-left: 0; padding-right: 0; display: grid; gap: 2px; }
.sb-foot form { margin: 0; }
.sb-logout { color: var(--text-2); font-size: 15px; }
.sb-logout .ic { color: var(--text-2); }
.avatar {
  width: 40px; height: 40px; border-radius: 50%; display: inline-grid; place-items: center; flex: none;
  background: var(--avatar); color: #fff; font-size: 16px; font-weight: 600;
}
.avatar-xs { width: 26px; height: 26px; font-size: 12px; }
body.sb-collapsed .sidebar { margin-left: calc(-1 * var(--sb-w)); }
.sb-open { display: none !important; }
body.sb-collapsed .sb-open { display: grid !important; }

.content { flex: 1; min-width: 0; }
.link { background: none; border: 0; padding: 0; font: inherit; font-size: var(--fs-s); color: var(--accent); cursor: pointer; }
.link:hover { opacity: .75; }
.topbar {
  position: sticky; top: 0; z-index: 30; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: var(--s-3);
  padding: max(var(--s-4), env(safe-area-inset-top)) var(--s-6) var(--s-2);
  background: linear-gradient(var(--bg-fade), transparent);
}
.tb-left { display: flex; gap: var(--s-2); }
.tb-right { display: flex; gap: var(--s-2); justify-content: flex-end; align-items: center; }
.tb-title { text-align: center; min-width: 0; max-width: 46vw; }
.tb-title h1 { font-size: 17px; font-weight: 600; letter-spacing: -.02em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tb-title p { margin: 1px 0 0; font-size: 12.5px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tb-below { display: flex; justify-content: center; padding: var(--s-1) var(--s-6) var(--s-3); position: sticky; top: 76px; z-index: 29; pointer-events: none; }
.tb-below > * { pointer-events: auto; }
.circle {
  width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; flex: none;
  color: var(--text); cursor: pointer; padding: 0; font: inherit;
  transition: transform .4s var(--spring), background-color .2s;
}
.circle .ic { width: 21px; height: 21px; stroke-width: 2; }
.circle:hover { opacity: 1; background: var(--glass-strong); }
.circle:active { transform: scale(.9); }
.circle:disabled { opacity: .4; }
.pill {
  height: 46px; padding: 0 var(--s-5); border-radius: var(--r-pill); display: inline-flex; align-items: center; gap: 6px;
  color: var(--text); font: inherit; font-size: 16px; font-weight: 600; cursor: pointer; white-space: nowrap;
  transition: transform .4s var(--spring), background-color .2s;
}
.pill .ic { width: 19px; height: 19px; stroke-width: 2; }
.pill:hover { background: var(--glass-strong); }
.pill:active { transform: scale(.94); }
.pill:disabled { opacity: .4; cursor: default; transform: none; }

/* Glas-Menü */
.menu-wrap { position: relative; }
.menu {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 45; min-width: 270px; padding: 6px; border-radius: var(--r);
  background: var(--glass-strong); display: grid; animation: menu-in .35s var(--spring); transform-origin: top right;
}
@keyframes menu-in { from { transform: scale(.85); opacity: 0; } to { transform: none; opacity: 1; } }
.menu-item {
  white-space: nowrap;
  display: flex; justify-content: space-between; align-items: center; gap: var(--s-4); padding: 11px 14px; border: 0; border-radius: 10px;
  background: transparent; color: var(--text); font: inherit; font-size: 16px; text-align: left; cursor: pointer;
}
.menu-item .ic { width: 20px; height: 20px; }
.menu-item:hover, .menu-item:focus-visible { background: var(--fill); box-shadow: none; }
.menu-item:disabled { opacity: .4; cursor: default; }

/* iPhone: schwebende Tab-Leiste unten (nur schmale Bildschirme) */
.tabbar { display: none; }

.banner {
  max-width: calc(var(--max) - 40px); margin: 0 auto var(--s-3); text-align: center; font-size: 14px;
  padding: 10px var(--s-5); border-radius: var(--r-pill); width: calc(100% - 32px);
}

/* ---------- Seiten ---------- */
.main { max-width: var(--max); margin: 0 auto; padding: var(--s-3) var(--s-6) 140px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s-4); margin-bottom: var(--s-6); flex-wrap: wrap; }
.title-xl { font-size: var(--fs-xl); font-weight: 800; letter-spacing: -.035em; overflow-wrap: anywhere; }
.back { display: inline-flex; align-items: center; gap: 2px; font-size: var(--fs); font-weight: 500; margin: 0 0 var(--s-2) -6px; }
.back .ic { width: 22px; height: 22px; stroke-width: 2.2; }
.album-desc { color: var(--text-2); margin: 0 auto var(--s-5); max-width: 60ch; font-size: var(--fs-s); text-align: center; }
.toolbar { display: flex; gap: var(--s-2); flex-wrap: wrap; align-items: center; }
.toolbar form { margin: 0; }

/* ---------- Buttons (Glas-Kapseln) ---------- */
.btn {
  -webkit-appearance: none; appearance: none; position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 44px; padding: 0 var(--s-5); border-radius: var(--r-pill);
  border: 0;
  background: var(--accent-glass); color: var(--on-accent);
  -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
  box-shadow: 0 2px 8px rgba(0, 0, 0, .1);
  font: inherit; font-size: var(--fs-s); font-weight: 600; letter-spacing: -.01em;
  cursor: pointer; white-space: nowrap; user-select: none; -webkit-user-select: none;
  transition: transform .4s var(--spring), background-color .2s, opacity .2s, box-shadow .2s;
}
.btn:hover { opacity: 1; filter: brightness(1.06); }
.btn:active { transform: scale(.94); }
.btn:disabled { opacity: .38; cursor: default; transform: none; filter: none; }
.btn .ic { width: 19px; height: 19px; }
.btn-secondary {
  background: var(--glass-strong); color: var(--text); border-color: var(--glass-edge-2);
  box-shadow: inset 0 1px 0 var(--glass-edge), var(--glass-shadow);
}
.btn-danger { background: var(--danger-soft); color: var(--danger); border-color: transparent; box-shadow: none; }
.btn-danger:hover { background: var(--danger); color: #fff; }
.btn-lg { min-height: 52px; font-size: var(--fs); width: 100%; }
.btn-sm { min-height: 38px; padding: 0 var(--s-4); }
.btn-icon { width: 44px; padding: 0; }

/* ---------- Formulare ---------- */
.stack { display: grid; gap: var(--s-4); }
.field { display: grid; gap: 6px; }
.field > span { font-size: 14px; font-weight: 600; color: var(--text-2); padding-left: 4px; }
.input, .select {
  width: 100%; font: inherit; font-size: var(--fs); color: var(--text);
  background: var(--fill); border: 1px solid transparent; border-radius: var(--r-s); padding: 12px 15px;
  transition: border-color .15s, box-shadow .15s, background-color .15s;
}
.input::placeholder { color: var(--text-3); }
textarea.input { resize: vertical; min-height: 84px; }
.input:focus, .select:focus { outline: none; background: var(--surface-solid); border-color: var(--accent); box-shadow: var(--focus); }
.select {
  width: auto; min-width: 180px; padding: 9px 36px 9px 14px; font-size: var(--fs-s); font-weight: 500;
  -webkit-appearance: none; appearance: none; border-radius: var(--r-pill); cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23007aff' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
}
.check { display: flex; gap: 10px; align-items: flex-start; font-size: var(--fs-s); cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--accent); }
.form-error { background: var(--danger-soft); color: var(--danger); border-radius: var(--r-s); padding: var(--s-3) var(--s-4); font-size: var(--fs-s); margin-bottom: var(--s-4); }
.form-foot { padding-top: var(--s-4); }

/* ---------- Login ---------- */
.login { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: var(--s-6); }
.login-card { width: 100%; max-width: 420px; text-align: center; padding: var(--s-10) var(--s-8) var(--s-8); border-radius: var(--r-xl); }
.login-card .logo-mark { margin: 0 auto var(--s-5); box-shadow: 0 12px 30px rgba(0, 122, 255, .35); }
.login-card h1 { font-size: var(--fs-hero); font-weight: 800; letter-spacing: .02em; }
.login-sub { color: var(--text-2); margin: var(--s-2) 0 var(--s-8); }
.field-group { display: grid; border-radius: var(--r); overflow: hidden; background: var(--fill); margin-bottom: var(--s-2); }
.field-group .input { border: 0; border-radius: 0; padding: 16px 18px; background: transparent; }
.field-group .input + label + .input { border-top: 1px solid var(--line); }
.field-group .input:focus { box-shadow: inset 0 0 0 2px var(--accent); background: var(--surface); }

/* ---------- Alben: große Karten mit Titel im Bild ---------- */
.album-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-5); grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.album-card {
  position: relative; display: block; aspect-ratio: 1; border-radius: var(--r-l); overflow: hidden; color: #fff;
  background: var(--fill); box-shadow: 0 10px 30px rgba(0, 0, 0, .12);
  transition: transform .5s var(--spring), box-shadow .4s var(--ease);
}
.album-card::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(to top, rgba(0, 0, 0, .55) 0%, rgba(0, 0, 0, .18) 28%, transparent 48%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14), inset 0 1px 0 rgba(255, 255, 255, .3);
}
.album-card:hover { opacity: 1; transform: scale(1.02); box-shadow: 0 18px 44px rgba(0, 0, 0, .18); }
.album-card:active { transform: scale(.97); }
.album-card img { width: 100%; height: 100%; object-fit: cover; }
.album-cover-empty { display: grid; place-items: center; height: 100%; color: var(--text-3); }
.album-cover-empty .ic { width: 64px; height: 64px; stroke-width: 1.1; }
.album-meta { position: absolute; left: 18px; right: 70px; bottom: 16px; z-index: 1; display: grid; gap: 2px; text-shadow: 0 1px 8px rgba(0, 0, 0, .35); }
.album-title { font-weight: 800; font-size: 22px; letter-spacing: -.02em; line-height: 1.15; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.album-count { font-size: 11.5px; font-weight: 600; letter-spacing: .04em; opacity: .9; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.album-card:has(.album-cover-empty) { color: var(--text); }
.album-card:has(.album-cover-empty)::after { background: none; }
.album-card:has(.album-cover-empty) .album-meta { text-shadow: none; }
.album-play {
  position: absolute; right: 16px; bottom: 16px; z-index: 1; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; color: #fff;
  background: rgba(255, 255, 255, .28); -webkit-backdrop-filter: blur(14px) saturate(180%); backdrop-filter: blur(14px) saturate(180%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45);
}
.album-play .ic { width: 15px; height: 15px; margin-left: 2px; }
.pill-ro {
  position: absolute; left: 14px; top: 14px; z-index: 1; color: #fff; font-size: 12px; font-weight: 600; padding: 5px 11px; border-radius: var(--r-pill);
  background: rgba(30, 30, 30, .3); -webkit-backdrop-filter: blur(16px) saturate(180%); backdrop-filter: blur(16px) saturate(180%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3);
}

/* ---------- Leere Zustände ---------- */
.empty { text-align: center; padding: var(--s-12) var(--s-4); max-width: 440px; margin: 0 auto; display: grid; justify-items: center; gap: var(--s-3); }
.empty h1, .empty h2 { font-size: var(--fs-l); font-weight: 700; }
.empty p { color: var(--text-2); margin: 0 0 var(--s-2); }
.empty-icon {
  width: 84px; height: 84px; border-radius: 26px; display: grid; place-items: center; color: var(--accent);
  background: var(--glass-strong); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
  box-shadow: inset 0 1px 0 var(--glass-edge), var(--glass-shadow);
}
.empty-icon .ic { width: 40px; height: 40px; stroke-width: 1.5; }

/* ---------- Medien-Raster ---------- */
.media-grid { display: grid; gap: var(--tile-gap); grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); border-radius: var(--r); overflow: hidden; }
.tile { position: relative; aspect-ratio: 1; padding: 0; border: 0; margin: 0; background: var(--fill); cursor: pointer; overflow: hidden; border-radius: 0; }
.tile img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s var(--ease), opacity .3s; opacity: 0; }
.tile img.loaded { opacity: 1; }
.tile:hover img { transform: scale(1.04); }
.tile:focus-visible { box-shadow: inset 0 0 0 3px var(--accent); border-radius: 0; }
.badge { position: absolute; right: 7px; bottom: 6px; display: inline-flex; align-items: center; gap: 3px; color: #fff; font-size: 12px; font-weight: 600; text-shadow: var(--badge-shadow); }
.badge .ic { width: 12px; height: 12px; filter: drop-shadow(var(--badge-shadow)); }
.tile-check {
  position: absolute; right: 7px; bottom: 7px; width: 26px; height: 26px; border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, .95); background: rgba(0, 0, 0, .12); display: none; place-items: center; color: #fff;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); box-shadow: 0 1px 4px rgba(0, 0, 0, .3);
}
.tile-check .ic { width: 15px; height: 15px; stroke-width: 3; opacity: 0; }
.selecting .tile-check { display: grid; }
.selecting .badge { right: 40px; }
.tile.selected::after { content: ""; position: absolute; inset: 0; background: rgba(255, 255, 255, .22); }
.tile.selected .tile-check { background: var(--accent); border-color: #fff; z-index: 1; }
.tile.selected .tile-check .ic { opacity: 1; }
.tile-new { animation: pop .6s var(--spring); }
@keyframes pop { from { transform: scale(.8); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- Auswahl-Leiste (schwebend) ---------- */
.selbar {
  position: fixed; left: 50%; bottom: max(var(--s-5), env(safe-area-inset-bottom)); transform: translateX(-50%);
  z-index: 35; width: min(760px, calc(100% - 24px));
  display: flex; align-items: center; gap: var(--s-2); flex-wrap: wrap;
  padding: 8px 8px 8px var(--s-5); border-radius: var(--r-pill);
  background: var(--glass-strong); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-edge-2); box-shadow: inset 0 1px 0 var(--glass-edge), 0 18px 50px rgba(0, 0, 0, .2);
  font-size: var(--fs-s); font-weight: 600; animation: rise .5s var(--spring);
}
@keyframes rise { from { transform: translate(-50%, 30px); opacity: 0; } to { transform: translate(-50%, 0); opacity: 1; } }
.selbar-spacer { flex: 1; }

/* ---------- Drag & Drop ---------- */
.dropzone { position: fixed; inset: 0; z-index: 50; background: var(--overlay); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); display: grid; place-items: center; padding: var(--s-6); }
.dropzone-inner {
  width: min(520px, 100%); aspect-ratio: 16/10; border: 2.5px dashed rgba(255, 255, 255, .9); border-radius: var(--r-xl);
  display: grid; place-content: center; justify-items: center; gap: var(--s-2); color: #fff; font-size: var(--fs-m); font-weight: 700;
  background: rgba(255, 255, 255, .08);
}
.dropzone-inner p { margin: 0; }
.dropzone-inner .ic { width: 52px; height: 52px; }

/* ---------- Upload-Liste ---------- */
.uploads {
  position: fixed; right: max(var(--s-5), env(safe-area-inset-right)); bottom: max(var(--s-5), env(safe-area-inset-bottom)); z-index: 40;
  width: min(370px, calc(100% - 24px)); max-height: 50vh; display: flex; flex-direction: column; overflow: hidden;
  border-radius: var(--r-l);
  background: var(--glass-strong); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-edge-2); box-shadow: inset 0 1px 0 var(--glass-edge), 0 18px 50px rgba(0, 0, 0, .2);
  animation: rise-r .5s var(--spring);
}
@keyframes rise-r { from { transform: translateY(30px); opacity: 0; } to { transform: none; opacity: 1; } }
.uploads header { display: flex; justify-content: space-between; align-items: center; padding: var(--s-4) var(--s-5) var(--s-3); font-size: var(--fs-s); }
.uploads ul { list-style: none; margin: 0; padding: 0 0 var(--s-3); overflow: auto; }
.up-row { padding: var(--s-2) var(--s-5); display: grid; gap: 7px; font-size: 13px; }
.up-top { display: flex; justify-content: space-between; gap: var(--s-3); }
.up-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.up-state { color: var(--text-2); white-space: nowrap; }
.up-row.done .up-state { color: var(--ok); }
.up-row.error .up-state { color: var(--danger); white-space: normal; text-align: right; }
.bar { height: 5px; background: var(--fill-2); border-radius: 3px; overflow: hidden; }
.bar > i { display: block; height: 100%; width: 0; background: var(--accent); border-radius: 3px; transition: width .25s linear; }
.up-row.done .bar > i { background: var(--ok); }
.up-row.error .bar > i { background: var(--danger); }

/* ---------- Vollbild-Ansicht ---------- */
.lb { position: fixed; inset: 0; z-index: 60; background: var(--lb-bg); color: var(--lb-text); display: grid; grid-template-rows: 1fr; animation: fade .3s var(--ease); }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.lb-top {
  position: absolute; left: 0; right: 0; top: 0; z-index: 2; display: flex; align-items: center; gap: var(--s-3);
  padding: max(var(--s-3), env(safe-area-inset-top)) var(--s-4) var(--s-3);
}
.lb-title {
  flex: 1; min-width: 0; text-align: center; display: grid; font-size: 13px; max-width: max-content; margin: 0 auto;
  padding: 6px 18px; border-radius: var(--r-pill);
  background: var(--lb-glass); -webkit-backdrop-filter: blur(24px) saturate(180%); backdrop-filter: blur(24px) saturate(180%);
  box-shadow: inset 0 1px 0 var(--lb-glass-edge);
}
.lb-title strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.lb-title span { color: rgba(235, 235, 245, .6); font-size: 12px; }
.lb-actions { display: flex; gap: 2px; padding: 3px; border-radius: var(--r-pill); background: var(--lb-glass); -webkit-backdrop-filter: blur(24px) saturate(180%); backdrop-filter: blur(24px) saturate(180%); box-shadow: inset 0 1px 0 var(--lb-glass-edge); }
.lb-btn {
  width: 42px; height: 42px; border-radius: 50%; border: 0; display: grid; place-items: center;
  background: transparent; color: var(--lb-text); cursor: pointer; transition: background-color .2s, transform .35s var(--spring);
}
.lb-btn:active { transform: scale(.88); }
.lb-btn:hover { background: rgba(255, 255, 255, .14); opacity: 1; }
.lb-top > .lb-btn { background: var(--lb-glass); -webkit-backdrop-filter: blur(24px) saturate(180%); backdrop-filter: blur(24px) saturate(180%); box-shadow: inset 0 1px 0 var(--lb-glass-edge); width: 48px; height: 48px; }
.lb-stage { position: relative; min-height: 0; display: grid; place-items: center; padding: 76px var(--s-2) max(var(--s-6), env(safe-area-inset-bottom)); touch-action: pan-y; }
.lb-stage img, .lb-stage video { max-width: 100%; max-height: 100%; object-fit: contain; user-select: none; -webkit-user-drag: none; border-radius: 4px; animation: zoom .35s var(--ease); }
@keyframes zoom { from { transform: scale(.96); opacity: .4; } to { transform: none; opacity: 1; } }
.lb-stage video { width: 100%; height: 100%; background: #000; }
.lb-hint { text-align: center; color: rgba(235, 235, 245, .7); font-size: var(--fs-s); display: grid; gap: var(--s-3); justify-items: center; }
.lb-hint img { max-height: 50vh; border-radius: var(--r); }
.lb-nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; width: 48px; height: 48px; border-radius: 50%; border: 0;
  background: var(--lb-glass); color: var(--lb-text); display: grid; place-items: center; cursor: pointer;
  -webkit-backdrop-filter: blur(24px) saturate(180%); backdrop-filter: blur(24px) saturate(180%); box-shadow: inset 0 1px 0 var(--lb-glass-edge);
  transition: opacity .2s, transform .35s var(--spring);
}
.lb-nav:active { transform: translateY(-50%) scale(.9); }
.lb-nav:disabled { opacity: 0; pointer-events: none; }
.lb-prev { left: var(--s-4); }
.lb-next { right: var(--s-4); }
.lb-next .ic { transform: rotate(180deg); }
.lb-info {
  position: absolute; right: var(--s-4); top: 80px; z-index: 3; margin: 0; width: min(310px, calc(100% - 32px));
  background: rgba(50, 50, 54, .62); -webkit-backdrop-filter: blur(30px) saturate(180%); backdrop-filter: blur(30px) saturate(180%);
  box-shadow: inset 0 1px 0 var(--lb-glass-edge), 0 18px 50px rgba(0, 0, 0, .4);
  border-radius: var(--r-l); padding: var(--s-5); display: grid; grid-template-columns: auto 1fr; gap: 8px var(--s-4); font-size: 14px;
  animation: rise-r .45s var(--spring);
}
.lb-info dt { color: rgba(235, 235, 245, .6); }
.lb-info { display: block !important; }
.lb-info[hidden] { display: none !important; }
.lb-info dd { margin: 0; overflow-wrap: anywhere; }

/* ---------- Karten, Listen ---------- */
.settings { display: grid; gap: var(--s-6); max-width: 780px; }
.card {
  border-radius: var(--r-l); padding: var(--s-6);
  background: var(--surface); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-edge-2); box-shadow: inset 0 1px 0 var(--glass-edge), 0 4px 20px rgba(0, 0, 0, .05);
}
.card h2 { margin-bottom: var(--s-4); }
.card > .muted.small { margin-bottom: var(--s-4); }
.card-flush { padding: var(--s-2) 0; max-width: 780px; }
.card-danger h2 { color: var(--danger); }
.list { list-style: none; margin: 0; padding: 0; }
.list > li + li { border-top: 1px solid var(--line); }
.list-row { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-3) 0; min-height: 60px; }
.card-flush .list > li + li { border-top: 0; position: relative; }
.card-flush .list > li + li::before { content: ""; position: absolute; top: 0; left: 76px; right: 0; border-top: 1px solid var(--line); }
.card-flush .list-row { padding: var(--s-3) var(--s-5); }
.list-link { color: var(--text); transition: background-color .15s; }
.list-link:hover { background: var(--fill); opacity: 1; }
.list-main { flex: 1; min-width: 0; display: grid; }
.list-main strong { font-weight: 600; font-size: var(--fs); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tag { font-size: 13px; font-weight: 500; color: var(--text-2); background: var(--fill); padding: 5px 12px; border-radius: var(--r-pill); white-space: nowrap; }
.tag-accent { color: var(--accent); background: var(--accent-soft); }
.chev { color: var(--text-3); display: grid; }
.chev .ic { transform: rotate(180deg); width: 18px; height: 18px; stroke-width: 2.4; }

/* ---------- Dialog (Sheet) ---------- */
.modal {
  border: 1px solid var(--glass-edge-2); padding: var(--s-6); border-radius: var(--r-xl); width: min(460px, calc(100% - 24px));
  background: var(--glass-strong); color: var(--text);
  -webkit-backdrop-filter: blur(40px) saturate(200%); backdrop-filter: blur(40px) saturate(200%);
  box-shadow: inset 0 1px 0 var(--glass-edge), 0 30px 80px rgba(0, 0, 0, .3);
}
.modal::backdrop { background: var(--overlay); }
.modal[open] { animation: sheet .5s var(--spring); }
@keyframes sheet { from { transform: translateY(24px) scale(.96); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-actions { display: flex; justify-content: flex-end; gap: var(--s-2); margin-top: var(--s-2); }

/* ---------- Umschalter (Kapsel) ---------- */
#filter, .seg-nav {
  display: inline-flex; padding: 4px; gap: 2px; border-radius: var(--r-pill);
  background: var(--glass); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-edge-2); box-shadow: inset 0 1px 0 var(--glass-edge), var(--glass-shadow);
}
#filter button, .seg-nav a {
  border: 0; background: transparent; color: var(--text); font: inherit; font-size: 15px; font-weight: 500;
  padding: 7px 20px; border-radius: var(--r-pill); cursor: pointer; transition: background-color .3s var(--ease);
}
#filter button:hover, .seg-nav a:hover { opacity: 1; background: var(--fill); }
#filter button[aria-selected="true"], .seg-nav a[aria-selected="true"] { background: var(--fill-2); font-weight: 600; }

/* ---------- Nextcloud-Seite ---------- */
.segmented { display: inline-grid; grid-auto-flow: column; background: var(--fill); border-radius: var(--r-pill); padding: 3px; justify-self: start; }
.segmented label { cursor: pointer; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented span { display: block; padding: 8px 20px; border-radius: var(--r-pill); font-size: var(--fs-s); font-weight: 600; color: var(--text-2); transition: background-color .3s var(--ease), color .3s; }
.segmented input:checked + span { background: var(--surface-solid); color: var(--text); box-shadow: 0 2px 8px rgba(0, 0, 0, .12), inset 0 1px 0 rgba(255, 255, 255, .5); }
.segmented input:focus-visible + span { box-shadow: var(--focus); }
.status-line { display: flex; align-items: center; gap: var(--s-2); flex-wrap: wrap; margin: 0 0 var(--s-4); }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--text-3); flex: none; }
.dot-ok { background: var(--ok); box-shadow: 0 0 0 4px rgba(52, 199, 89, .2); }
.ok-text { color: var(--ok); font-size: var(--fs-s); }
.row-actions { display: flex; gap: var(--s-2); flex-wrap: wrap; margin-bottom: var(--s-3); }
.row-actions form { margin: 0; }

/* ---------- Hinweise ---------- */
.toast {
  position: fixed; top: 84px; left: 50%; transform: translateX(-50%); z-index: 70;
  color: var(--text); padding: 12px 22px; border-radius: var(--r-pill); font-size: var(--fs-s); font-weight: 600;
  background: var(--glass-strong); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-edge-2); box-shadow: inset 0 1px 0 var(--glass-edge), 0 18px 50px rgba(0, 0, 0, .2);
  max-width: calc(100% - 32px); text-align: center; animation: toast 4.2s var(--ease) forwards;
}
.toast-error { color: var(--danger); }
@keyframes toast { 0% { opacity: 0; transform: translate(-50%, -14px) scale(.95); } 7%, 88% { opacity: 1; transform: translate(-50%, 0); } 100% { opacity: 0; transform: translate(-50%, -10px); visibility: hidden; } }

/* ---------- iPad hochkant / kleine Fenster: Seitenleiste als Overlay ---------- */
@media (max-width: 1024px) {
  .sidebar { position: fixed; left: 0; top: 0; transform: translateX(-105%); box-shadow: none; }
  body.sb-open .sidebar { transform: none; }
  body.sb-open .sidebar::before { box-shadow: inset 0 1px 0 var(--glass-edge), 0 24px 70px rgba(0, 0, 0, .3); background: var(--surface-solid); -webkit-backdrop-filter: none; backdrop-filter: none; }
  body.sb-open::after { content: ""; position: fixed; inset: 0; z-index: 39; background: var(--overlay); animation: fade .3s var(--ease); }
  body.sb-collapsed .sidebar { margin-left: 0; }
  .sb-open { display: grid !important; }
}
/* ---------- iPhone ---------- */
@media (max-width: 700px) {
  .topbar { position: relative; grid-template-columns: auto 1fr; padding: max(10px, env(safe-area-inset-top)) var(--s-4) var(--s-2); gap: var(--s-2) var(--s-2); background: none; }
  .tb-left { grid-column: 1; grid-row: 1; min-height: 44px; }
  .tb-right { grid-column: 2; grid-row: 1; }
  .tb-title { grid-column: 1 / -1; grid-row: 2; text-align: left; max-width: none; padding: var(--s-2) 2px 0; }
  .tb-title h1 { font-size: 32px; font-weight: 800; letter-spacing: -.03em; white-space: normal; overflow-wrap: anywhere; }
  .tb-title p { font-size: 15px; margin-top: 2px; }
  .tb-below { position: sticky; top: max(8px, env(safe-area-inset-top)); padding: var(--s-2) var(--s-4) var(--s-3); }
  .circle, .pill { height: 44px; }
  .circle { width: 44px; }
  .pill { padding: 0 var(--s-4); font-size: 15px; }
  .pill .ic + span { display: none; }
  .pill:has(.ic) { width: 44px; padding: 0; justify-content: center; }
  .sb-open { display: none !important; }
  .tabbar {
    display: flex; position: fixed; z-index: 34; left: 50%; transform: translateX(-50%);
    bottom: max(14px, env(safe-area-inset-bottom)); padding: 5px; gap: 2px; border-radius: var(--r-pill);
    width: max-content; max-width: calc(100% - 28px);
  }
  .tabbar a {
    display: grid; justify-items: center; gap: 1px; min-width: 72px; padding: 7px 12px 6px; border-radius: var(--r-pill);
    color: var(--text); font-size: 10.5px; font-weight: 600; letter-spacing: 0; transition: background-color .3s var(--ease), color .3s, transform .35s var(--spring);
  }
  .tabbar a:hover { opacity: 1; }
  .tabbar a .ic { width: 24px; height: 24px; stroke-width: 1.7; }
  .tabbar a[aria-current="page"] { color: var(--accent); background: var(--fill-2); }
  .tabbar a:active { transform: scale(.92); }
  body.selecting .tabbar { display: none; }
  .main { padding: var(--s-2) var(--s-4) 150px; }
  .album-grid { grid-template-columns: 1fr; gap: var(--s-4); }
  .album-card { aspect-ratio: 4 / 3.4; }
  .media-grid { grid-template-columns: repeat(3, 1fr); margin: 0 calc(-1 * var(--s-4)); border-radius: 0; }
  .card { padding: var(--s-5); }
  .card-flush .list-row { padding: var(--s-3) var(--s-4); }
  .card-flush .list > li + li::before { left: 68px; }
  .list-row { flex-wrap: wrap; }
  .list-row .select { width: 100%; }
  .card-flush .list-row { flex-wrap: nowrap; }
  .card-flush .tag { display: none; }
  .selbar { border-radius: var(--r-l); padding: 8px 8px 8px var(--s-4); bottom: max(14px, env(safe-area-inset-bottom)); }
  .selbar .btn span { display: none; }
  .selbar .btn { width: 44px; padding: 0; }
  .selbar #sel-done { width: auto; padding: 0 var(--s-4); }
  .lb-nav { display: none; }
  .uploads { left: 12px; right: 12px; width: auto; bottom: calc(max(14px, env(safe-area-inset-bottom)) + 76px); }
  .login-card { padding: var(--s-8) var(--s-5); }
  .banner { border-radius: var(--r); width: calc(100% - 32px); }
  .menu { min-width: 230px; }
}
@media (min-width: 701px) and (max-width: 1024px) {
  .album-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Suche (Alben) ---------- */
.below-row { display: flex; gap: var(--s-3); align-items: center; justify-content: center; flex-wrap: wrap; width: min(720px, 100%); }
.search {
  flex: 1 1 260px; display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 16px; border-radius: var(--r-pill); color: var(--text-2);
  background: var(--glass); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-edge-2); box-shadow: inset 0 1px 0 var(--glass-edge), var(--glass-shadow);
}
.search .ic { width: 18px; height: 18px; stroke-width: 2.2; }
.search input { flex: 1; min-width: 0; border: 0; background: transparent; font: inherit; font-size: 16px; color: var(--text); outline: none; }
.search input::placeholder { color: var(--text-2); }
.search:focus-within { box-shadow: var(--focus); }
.search input:focus-visible { box-shadow: none; }
.search input::-webkit-search-cancel-button { -webkit-appearance: none; }
.album-grid > li[hidden] { display: none; }

/* ---------- Ein/Aus-Schalter (iOS) ---------- */
.switch { position: relative; display: inline-flex; flex: none; cursor: pointer; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch-ui { width: 51px; height: 31px; border-radius: 16px; background: var(--fill-2); position: relative; transition: background-color .25s var(--ease); }
.switch-ui::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff;
  box-shadow: 0 3px 8px rgba(0, 0, 0, .15), 0 1px 1px rgba(0, 0, 0, .16); transition: transform .35s var(--spring);
}
.switch input:checked + .switch-ui { background: var(--ok); }
.switch input:checked + .switch-ui::after { transform: translateX(20px); }
.switch input:focus-visible + .switch-ui { box-shadow: var(--focus); }
.row-switch { display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); cursor: pointer; }
.row-switch > span:first-child { display: grid; gap: 4px; }
.field-tag { display: inline-block; justify-self: start; padding: 2px 10px !important; border-radius: var(--r-pill); color: #fff !important; font-size: 13px !important; }
.field-tag-no { background: var(--danger); }
.field-tag-yes { background: var(--ok); }

/* ---------- 3-Stufen-Schalter: Nein · neutral · Ja ---------- */
.tri { border: 0; margin: 0; padding: 0; display: grid; gap: var(--s-3); }
.tri legend { font-weight: 600; font-size: 16px; margin-bottom: var(--s-3); padding: 0; }
.tri-track {
  position: relative; display: grid; grid-template-columns: repeat(3, 1fr); align-items: center; height: 56px; padding: 4px;
  border-radius: var(--r-pill); background: var(--fill); cursor: pointer; user-select: none; -webkit-user-select: none;
  transition: background-color .35s var(--ease); touch-action: none;
}
.tri-track[data-pos="no"] { background: rgba(255, 59, 48, .16); }
.tri-track[data-pos="yes"] { background: rgba(52, 199, 89, .18); }
.tri-track input { position: absolute; opacity: 0; pointer-events: none; }
.tri-track label {
  position: relative; z-index: 1; height: 100%; display: grid; place-items: center; border-radius: var(--r-pill);
  font-weight: 700; font-size: 16px; color: var(--text-2); cursor: pointer; transition: color .3s;
}
.tri-track label[for="pub-mid"]::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--text-3); }
.tri-track[data-pos="no"] label[for="pub-no"] { color: var(--danger); }
.tri-track[data-pos="yes"] label[for="pub-yes"] { color: #248a3d; }
.tri-knob {
  position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc((100% - 8px) / 3); border-radius: var(--r-pill);
  background: var(--surface-solid); box-shadow: 0 3px 10px rgba(0, 0, 0, .14), 0 1px 2px rgba(0, 0, 0, .1);
  transform: translateX(100%); transition: transform .45s var(--spring);
}
.tri-track[data-pos="no"] .tri-knob { transform: translateX(0); }
.tri-track[data-pos="yes"] .tri-knob { transform: translateX(200%); }
.tri-track:has(input:focus-visible) { box-shadow: var(--focus); }
.tri-text { font-size: 15px; line-height: 1.45; color: var(--text-2); background: var(--fill); border-radius: var(--r-s); padding: var(--s-3) var(--s-4); min-height: 72px; }
.tri-text.is-no { background: rgba(255, 59, 48, .08); color: var(--text); }
.tri-text.is-yes { background: rgba(52, 199, 89, .1); color: var(--text); }
.upload-sheet { width: min(520px, calc(100% - 24px)); }
@media (prefers-color-scheme: dark) { .tri-track[data-pos="yes"] label[for="pub-yes"] { color: var(--ok); } }

/* ---------- Info & Kennzeichnung ---------- */
.badge-lock {
  position: absolute; left: 6px; bottom: 6px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; color: #fff;
  background: rgba(0, 0, 0, .35); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.badge-lock .ic { width: 12px; height: 12px; }
.lb-info dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 8px var(--s-4); }
.info-pub { margin-top: var(--s-4); padding-top: var(--s-3); border-top: 1px solid rgba(255, 255, 255, .14); display: grid; gap: 8px; }
.info-pub > span { color: rgba(235, 235, 245, .6); }
.info-seg { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 3px; border-radius: var(--r-pill); background: rgba(118, 118, 128, .3); }
.info-seg button { border: 0; border-radius: var(--r-pill); padding: 7px; font: inherit; font-size: 14px; font-weight: 600; color: #fff; background: transparent; cursor: pointer; }
.info-seg button[aria-pressed="true"] { background: rgba(255, 255, 255, .22); }

/* ---------- Schutz ---------- */
[data-protect] .tile.locked, [data-protect] .tile.locked img, [data-protect] .lb.locked img, [data-protect] .lb.locked video {
  -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; -webkit-user-drag: none;
}
body.shielded .tile.locked img, body.shielded .lb.locked .lb-stage img, body.shielded .lb.locked .lb-stage video, body.shielded .lb.locked .lb-stage canvas { filter: blur(40px) brightness(.7) !important; transition: none !important; }
body.shielded .lb.locked .lb-stage::after {
  content: "Ansicht geschützt"; position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 20px;
}
@media print {
  img, video, canvas, .media-grid, .album-grid, .lb { display: none !important; }
  body::after { content: "Drucken ist in EDMY nicht vorgesehen."; }
}


/* ---------- Öffentliche Ordner ---------- */
.link-card { display: grid; gap: var(--s-4); }
.link-head { display: flex; align-items: center; gap: var(--s-4); }
.link-cover { width: 64px; height: 64px; border-radius: 14px; overflow: hidden; flex: none; background: var(--fill); display: grid; place-items: center; color: var(--text-3); }
.link-cover img { width: 100%; height: 100%; object-fit: cover; }
.link-row { display: flex; gap: var(--s-2); align-items: center; flex-wrap: wrap; }
.link-url { flex: 1 1 260px; font-size: 14px; padding: 9px 14px; border-radius: var(--r-pill); font-family: ui-monospace, "SF Mono", Menlo, monospace; }
.link-actions { margin: 0; }
.share-body .share { max-width: none; }
.share-top { grid-template-columns: 1fr auto 1fr; }
.share-top .brand { font-size: 17px; }
.share-body .tb-below { top: 76px; }
@media (max-width: 700px) {
  .share-top { grid-template-columns: auto 1fr; }
  .share-top .brand span { display: none; }
  .link-head .btn span { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass, .card, .selbar, .uploads, .modal, .toast, .sidebar::before, .menu { background: var(--surface-solid); }
}
