:root {
  /* Ruhige, gedeckte Farben – eine einzige Akzentfarbe (Blau-Grau) */
  --bg: #f6f6f4;
  --surface: #ffffff;
  --subtle: #efefec;
  --text: #22252a;
  --muted: #6b6f76;
  --border: #e3e3df;
  --accent: #3d5672;
  --accent-ink: #ffffff;
  --accent-soft: #e8edf2;
  --danger: #b03a2e;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(20, 24, 30, 0.06);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #151618;
    --surface: #1d1f22;
    --subtle: #26292d;
    --text: #e8e9ea;
    --muted: #9da1a7;
    --border: #303338;
    --accent: #93abc6;
    --accent-ink: #12161b;
    --accent-soft: #263241;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: clamp(1.5rem, 3.5vw, 2.1rem); margin: 0 0 6px; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
main.wrap { padding: 24px 16px 80px; min-height: 80vh; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.grow { flex: 1; min-width: 0; }
.meta { color: var(--muted); font-size: 0.88rem; }

/* ---------- Kopfzeile ---------- */

.topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}
.topbar[hidden] { display: none; }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; height: 60px; gap: 12px; }
.brand { font-weight: 700; font-size: 1.1rem; color: var(--text); display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand-icon { font-size: 1.4rem; }
.topnav { display: flex; gap: 16px; align-items: center; }
.topnav a { color: var(--muted); font-weight: 500; white-space: nowrap; }
.topnav a:hover, .topnav a.active { color: var(--text); text-decoration: none; }
.user-chip { background: var(--bg); border: 1px solid var(--border); padding: 4px 12px; border-radius: 999px; }

/* ---------- Anmeldung ---------- */

.login-page { min-height: 80vh; display: grid; place-items: center; }
.login-card { width: 100%; max-width: 400px; text-align: center; display: flex; flex-direction: column; gap: 12px; padding: 32px 24px; }
.login-card img { margin: 0 auto; }
.login-card label { text-align: left; }

.link-btn { background: none; border: 0; color: var(--accent); font: inherit; font-size: 0.9rem; cursor: pointer; padding: 4px; }
.link-btn:hover { text-decoration: underline; }
.ok-text { color: #3f7a55; }
.off-text { color: var(--danger); }

/* ---------- Startseite ---------- */

.hero {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: var(--radius);
  padding: 30px 28px;
  margin-bottom: 12px;
}
.hero h1 { margin: 0 0 8px; }
.hero p { margin: 0 0 20px; color: var(--muted); }
.hero form { display: flex; gap: 8px; max-width: 520px; }
.verse { margin: 4px 0 20px; padding: 2px 0 2px 16px; border-left: 3px solid var(--accent); }
.verse-label { font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
.verse-label .link-btn { font-size: 0.78rem; text-transform: none; letter-spacing: 0; padding: 0; }
.verse blockquote { margin: 4px 0 2px; font-size: 1.12rem; line-height: 1.55; font-family: Georgia, "Times New Roman", serif; }
.verse-ref { font-size: 0.9rem; color: var(--muted); font-weight: 600; }
.hero input { flex: 1; }

h2.section { margin: 32px 0 14px; font-size: 1.25rem; }
.date-head { font-size: 1rem; margin: 22px 0 10px; }

/* ---------- Ordner ---------- */

.folder-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; margin-top: 8px; }
.folder-tile {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  color: var(--text);
  box-shadow: var(--shadow);
  transition: transform 0.12s;
  display: flex;
  flex-direction: column;
}
.folder-tile:hover { transform: translateY(-2px); text-decoration: none; }
.folder-tile .thumb {
  aspect-ratio: 16 / 10;
  background: var(--subtle);
  display: grid;
  place-items: center;
  font-size: 2.6rem;
  overflow: hidden;
  position: relative;
}
.folder-tile .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.folder-tile .tab { display: none; }
.folder-tile .body { padding: 10px 12px 12px; }
.folder-tile .title { font-weight: 700; line-height: 1.3; }

.crumbs { color: var(--muted); font-size: 0.9rem; margin-bottom: 12px; }
.folder-head { display: flex; gap: 16px; align-items: center; margin-bottom: 14px; }
.folder-icon {
  font-size: 2rem;
  width: 64px;
  height: 64px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: var(--subtle);
}
.folder-head p { margin: 0; }
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 22px; padding: 12px; background: var(--surface); border: 1px dashed var(--border); border-radius: var(--radius); }

/* ---------- Einträge ---------- */

.players, .texts, .doc-list { display: flex; flex-direction: column; gap: 12px; }
.player, .text-card, .doc-row {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  box-shadow: var(--shadow);
}
.player-head { display: flex; gap: 14px; align-items: center; margin-bottom: 10px; }
.player .title, .doc-row .title { font-weight: 700; }
.player audio, .player video { width: 100%; display: block; border-radius: 8px; margin-bottom: 6px; }
.player video { max-height: 70vh; background: #000; }
.desc { white-space: pre-line; margin: 8px 0; }
.date-badge { flex: none; width: 60px; text-align: center; background: var(--accent-soft); border-radius: 10px; padding: 6px 0; line-height: 1.15; }
.date-badge .d { font-size: 1.3rem; font-weight: 700; color: var(--accent); }
.date-badge .m { font-size: 0.72rem; text-transform: uppercase; color: var(--muted); }
.path-link { font-size: 0.82rem; display: inline-block; margin-top: 2px; }

.text-card h3 { margin: 0; }
.text-body { white-space: pre-line; margin-top: 10px; }

.doc-row { display: flex; gap: 12px; align-items: center; }
.doc-icon { font-size: 1.8rem; }

.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 8px; }
.photo-wrap { position: relative; }
.photo { position: relative; width: 100%; aspect-ratio: 1; overflow: hidden; border-radius: 10px; background: var(--border); cursor: zoom-in; border: 0; padding: 0; display: block; }
.photo img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.2s; }
.photo:hover img { transform: scale(1.04); }
.photo .cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 8px 6px; font-size: 0.8rem; color: #fff; background: linear-gradient(transparent, rgba(0,0,0,0.65)); text-align: left; }
.photo-wrap .icon-btn { position: absolute; top: 6px; right: 6px; background: rgba(255,255,255,0.92); color: #333; }

.icon-btn {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  border-radius: 8px;
  width: 34px;
  height: 34px;
  cursor: pointer;
  flex: none;
  font-size: 0.95rem;
}
.icon-btn:hover { border-color: var(--accent); }

/* ---------- Formulare & Knöpfe ---------- */

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); margin-bottom: 20px; }
.card h2 { margin-top: 0; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px 16px; }
.form-grid .full { grid-column: 1 / -1; }
label { display: flex; flex-direction: column; gap: 4px; font-weight: 600; font-size: 0.9rem; }
label small { font-weight: 400; color: var(--muted); }
input, select, textarea {
  font: inherit;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  color: var(--text);
  width: 100%;
}
input[type="color"] { padding: 2px; height: 44px; }
textarea { min-height: 80px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; }

.btn {
  font: inherit;
  font-weight: 600;
  border: 0;
  border-radius: 10px;
  padding: 10px 16px;
  background: var(--accent);
  color: var(--accent-ink);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
}
.btn:hover { filter: brightness(1.08); text-decoration: none; }
.btn:disabled { opacity: 0.55; cursor: default; }
.btn.secondary { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn.light { background: var(--accent); color: var(--accent-ink); }
.btn.danger { background: var(--danger); color: #fff; }
.btn.small { padding: 5px 11px; font-size: 0.85rem; border-radius: 8px; }
.btn.wide { width: 100%; }

.filters { display: flex; gap: 10px; flex-wrap: wrap; margin: 14px 0 20px; }
.filters input { flex: 1; min-width: 200px; }

.empty { text-align: center; color: var(--muted); padding: 40px 16px; }
.empty .big { font-size: 2.6rem; }

/* ---------- Dialog ---------- */

dialog {
  border: 0;
  border-radius: 18px;
  padding: 24px;
  width: min(640px, calc(100vw - 24px));
  max-height: calc(100dvh - 24px);
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}
dialog::backdrop { background: rgba(20, 15, 30, 0.55); }
dialog h2 { margin: 0 40px 16px 0; }
dialog form > label { margin-bottom: 12px; }
.dialog-close { position: absolute; top: 14px; right: 14px; border: 0; background: transparent; font-size: 1.2rem; cursor: pointer; color: var(--muted); }
.dialog-actions { margin-top: 18px; }
.dialog-preview { max-width: 100%; max-height: 220px; border-radius: 10px; display: block; margin: 0 auto 14px; }
details summary { cursor: pointer; font-weight: 600; margin: 12px 0 4px; }

.dropzone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  color: var(--muted);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.dropzone.over, .dropzone:hover { border-color: var(--accent); background: var(--accent-soft); }
.file-list { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; max-height: 40vh; overflow-y: auto; }
.file-row { display: flex; gap: 10px; align-items: center; border: 1px solid var(--border); border-radius: 10px; padding: 6px 8px; }
.file-row img, .file-row .file-icon { width: 48px; height: 48px; object-fit: cover; border-radius: 6px; flex: none; display: grid; place-items: center; font-size: 1.6rem; background: var(--bg); }
.file-row input { padding: 6px 8px; }
.file-row .file-date { width: 150px; flex: none; }
.progress { height: 8px; background: var(--border); border-radius: 999px; overflow: hidden; margin-top: 12px; }
.progress > div { height: 100%; width: 0; background: var(--accent); transition: width 0.2s; }

.choice-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.choice {
  font: inherit;
  font-weight: 600;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  border-radius: var(--radius);
  padding: 20px 12px;
  cursor: pointer;
}
.choice:hover { border-color: var(--accent); }
.choice span { display: block; font-size: 2rem; margin-bottom: 6px; }

/* ---------- Verwaltung ---------- */

.tree { display: flex; flex-direction: column; }
.tree-row { display: flex; align-items: center; gap: 8px; padding: 6px 0 6px calc(var(--depth) * 26px); border-bottom: 1px solid var(--border); }
.tree-row a { color: var(--text); }
.tree-icon { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: var(--subtle); margin-right: 4px; }
.user-list { display: flex; flex-direction: column; }
.user-row { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.user-row select { width: auto; padding: 5px 8px; }
.role { display: inline-block; margin-top: 4px; padding: 1px 10px; border-radius: 999px; font-size: 0.8rem; background: var(--accent-soft); color: var(--accent); }

/* ---------- Speicher ---------- */

.danger-card { border: 2px solid var(--danger); background: color-mix(in srgb, var(--danger) 8%, var(--surface)); }
.danger-card h2 { color: var(--danger); }

.storage-head { font-size: 1.05rem; margin-bottom: 8px; }
.storage-bar { height: 14px; background: var(--border); border-radius: 999px; overflow: hidden; }
.storage-bar > div { height: 100%; background: var(--accent); border-radius: 999px; min-width: 4px; }
.storage-bar.warn > div { background: #e0a030; }
.storage-bar.full > div { background: var(--danger); }
.storage-hint { background: color-mix(in srgb, #e0a030 14%, transparent); border-radius: 10px; padding: 8px 12px; }
.storage-rows { display: flex; flex-direction: column; border-top: 1px solid var(--border); margin-top: 10px; }
.storage-row { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border); }

/* ---------- Lightbox ---------- */

.lightbox { position: fixed; inset: 0; background: rgba(10, 8, 14, 0.95); z-index: 100; display: flex; align-items: center; justify-content: center; }
.lightbox[hidden] { display: none; }
.lightbox figure { margin: 0; max-width: 92vw; max-height: 90vh; text-align: center; }
.lightbox img { max-width: 92vw; max-height: 82vh; object-fit: contain; border-radius: 6px; }
.lightbox figcaption { color: #eee; margin-top: 10px; }
.lb-btn { position: absolute; background: rgba(255,255,255,0.12); color: #fff; border: 0; font-size: 2rem; width: 52px; height: 52px; border-radius: 50%; cursor: pointer; }
.lb-btn:hover { background: rgba(255,255,255,0.25); }
.lb-close { top: 16px; right: 16px; font-size: 1.3rem; }
.lb-prev { left: 16px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 16px; top: 50%; transform: translateY(-50%); }

.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--text); color: var(--bg); padding: 10px 18px; border-radius: 10px; z-index: 200; box-shadow: var(--shadow); max-width: calc(100vw - 32px); }
.toast.error { background: var(--danger); color: #fff; }

/* ---------- Hochladen im Hintergrund ---------- */

.upload-pill {
  position: fixed;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%);
  z-index: 150;
  width: min(520px, calc(100vw - 24px));
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.18);
  padding: 10px 14px;
  font-size: 0.88rem;
}
.pill-bar { height: 6px; background: var(--border); border-radius: 999px; overflow: hidden; margin-bottom: 6px; }
.pill-bar > div { height: 100%; width: 0; background: var(--accent); transition: width 0.3s; }
.upload-pill:not([hidden]) ~ .toast { bottom: 100px; }
.size-tip { background: var(--accent-soft); border-radius: 10px; padding: 8px 12px; font-size: 0.88rem; }

.page-head h1 { flex: 1 1 240px; margin: 0; }
.page-head { margin-bottom: 8px; }

/* ---------- Startseite: Hauptbereiche & schlichte Ordner ---------- */

.home-tiles { display: flex; flex-direction: column; gap: 12px; margin: 28px 0 12px; }
.home-tile, .folder-grid .folder-tile {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  color: var(--text);
  transition: border-color 0.15s;
}
.home-tile { padding: 22px 20px; }
.home-tile:hover, .folder-grid .folder-tile:hover { border-color: var(--accent); text-decoration: none; transform: none; }
.home-icon { font-size: 1.9rem; width: 52px; height: 52px; display: grid; place-items: center; background: var(--subtle); border-radius: 12px; flex: none; }
.home-name { display: block; font-size: 1.3rem; font-weight: 700; }
.home-tile .meta, .folder-tile .meta { display: block; }
.home-arrow { font-size: 1.8rem; color: var(--muted); line-height: 1; }
.folder-grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)) !important; }
.folder-grid .folder-tile { padding: 14px 16px; flex-direction: row; overflow: visible; }
.folder-tile-icon { font-size: 1.5rem; width: 44px; height: 44px; display: grid; place-items: center; background: var(--subtle); border-radius: 10px; flex: none; }
.folder-grid .folder-tile .title { display: block; font-weight: 700; }

/* ---------- Terminliste (kompakt) ---------- */

.agenda { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.agenda-day { display: flex; gap: 14px; padding: 10px 14px; border-top: 1px solid var(--border); }
.agenda-day:first-child { border-top: 0; }
.agenda-day.today { background: var(--accent-soft); }
.agenda-date { width: 56px; flex: none; display: flex; flex-direction: column; line-height: 1.25; padding-top: 2px; }
.agenda-date b { font-size: 0.95rem; }
.agenda-date span { font-size: 0.85rem; color: var(--muted); }
.agenda-items { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.agenda-item { display: flex; gap: 12px; align-items: flex-start; }
.agenda-time { width: 104px; flex: none; white-space: nowrap; font-variant-numeric: tabular-nums; color: var(--muted); font-size: 0.92rem; padding-top: 1px; }
.agenda-title { font-weight: 600; }
.agenda-text { font-size: 0.88rem; color: var(--muted); margin-top: 2px; white-space: pre-line; }
.agenda-admin { display: flex; gap: 6px; align-items: center; flex: none; }
.agenda-admin .link-btn { font-size: 0.8rem; color: var(--muted); }
.agenda-item.cancelled .agenda-title, .agenda-item.cancelled .agenda-time { text-decoration: line-through; opacity: 0.55; }
.icon-btn.small { width: 28px; height: 28px; font-size: 0.8rem; }
.icon-btn { display: inline-grid; place-items: center; color: var(--muted); }
.icon-btn:hover { color: var(--text); }
.icon-btn svg { display: block; }
.brand-icon { border-radius: 7px; }
.home-icon, .folder-tile-icon, .folder-icon { color: var(--accent); background: var(--accent-soft) !important; }
.home-icon svg { width: 26px; height: 26px; }
.folder-tile-icon svg { width: 22px; height: 22px; }
.folder-icon svg { width: 30px; height: 30px; }
.bottomnav a span { display: grid; place-items: center; height: 26px; }
@media (max-width: 700px) {
  .agenda-day { gap: 10px; padding: 10px 12px; }
  .agenda-date { width: 44px; }
  .agenda-item { flex-wrap: wrap; gap: 2px 10px; }
  .agenda-time { width: auto; }
  .agenda-item .grow { flex-basis: 100%; order: 2; }
  .agenda-admin { margin-left: auto; order: 1; }
}

/* ---------- Fester Audio-Player ---------- */

.player {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  background: var(--surface);
  border-top: 1px solid var(--border);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
  padding: 0 12px 8px;
}
#player-seek { width: 100%; height: 18px; margin: 0; padding: 0; border: 0; background: transparent; accent-color: var(--accent); display: block; }
.player-row { display: flex; align-items: center; gap: 6px; max-width: 1120px; margin: 0 auto; }
.player-btn { border: 0; background: transparent; color: var(--text); width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; position: relative; flex: none; }
.player-btn small { position: absolute; font-size: 0.55rem; font-weight: 700; top: 50%; left: 50%; transform: translate(-50%, -45%); }
.player-btn.main { background: var(--accent); color: var(--accent-ink); width: 46px; height: 46px; }
.player-btn:hover { background: var(--subtle); }
.player-btn.main:hover { background: var(--accent); filter: brightness(1.1); }
.player-info { flex: 1; min-width: 0; padding-left: 6px; }
.player-title { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-sub { font-size: 0.8rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
body.has-player main.wrap { padding-bottom: 140px; }
body.has-player .toast { bottom: 100px; }
body.has-player .upload-pill { bottom: 96px; }
@media (max-width: 700px) {
  .player { bottom: calc(58px + env(safe-area-inset-bottom)); }
  body.has-player main.wrap { padding-bottom: 200px; }
  body.has-player .toast { bottom: 160px; }
  body.has-player .upload-pill { bottom: 150px; }
}

/* ---------- Gebetsanliegen ---------- */

.prayers { display: flex; flex-direction: column; gap: 10px; }
.prayer {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  box-shadow: var(--shadow);
}
.prayer.pending { border-style: dashed; }
.prayer.answered { background: var(--subtle); }
.prayer-text { white-space: pre-line; margin-bottom: 6px; }
.prayer .answer { margin-top: 8px; font-size: 0.92rem; }
.prayer-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 10px; }
.prayer-actions .btn:disabled { opacity: 1; cursor: default; }
.pending-note { margin: 0 0 10px; font-weight: 600; }
.prayer-preview { margin-top: 8px; }
.prayer-preview .row a { font-size: 0.9rem; }

/* ---------- Gottesdienst-Liste ---------- */

.services { display: flex; flex-direction: column; gap: 8px; }
.service { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.service-head { display: flex; align-items: center; gap: 8px; padding-right: 10px; }
.service-row {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 12px;
  background: none;
  border: 0;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
}
.service-row .title { font-weight: 700; }
.service-row:hover .play-icon { background: var(--accent); color: var(--accent-ink); }
.play-icon {
  flex: none;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 1rem;
  transition: background 0.15s;
}
.service-row.playing .play-icon { background: var(--accent); color: var(--accent-ink); }
.play-icon svg { width: 18px; height: 18px; display: block; }
.service .path-link { margin: 0 0 8px 86px; }
.service-player { padding: 0 14px 12px; }
.service-player audio, .service-player video { width: 100%; display: block; margin-bottom: 6px; }
.service-player video { max-height: 70vh; background: #000; border-radius: 8px; }

/* ---------- Aktuelles ---------- */

.news-preview { margin-top: 8px; }
.news-preview .row a { font-size: 0.9rem; }
.news-columns { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 18px; align-items: start; }
.sub-head { font-size: 1rem; margin: 0 0 10px; }
.empty-news { background: var(--surface); border: 1px dashed var(--border); border-radius: var(--radius); padding: 16px; margin-top: 20px; }
.empty-news p { margin-top: 0; }

.announcements, .events { display: flex; flex-direction: column; gap: 10px; }
.announcement {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 5px solid var(--accent);
  border-radius: var(--radius);
  padding: 14px 16px;
  box-shadow: var(--shadow);
}
.announcement h3 { margin: 0; font-size: 1.05rem; }
.announcement.pinned { border-left-color: var(--text); background: var(--subtle); }
.announcement .text-body { margin-top: 8px; }

.event {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  box-shadow: var(--shadow);
}
.event.today { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.event .title { font-weight: 700; }
.event-day { font-size: 0.8rem; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: 0.02em; }
.event-text { white-space: pre-line; margin-top: 6px; font-size: 0.95rem; }
.event .repeat { font-size: 0.8rem; margin-top: 2px; }
.event-actions { display: flex; flex-direction: column; gap: 6px; align-items: flex-end; }
.event.cancelled .title, .event.cancelled .meta, .event.cancelled .date-badge { text-decoration: line-through; opacity: 0.55; }
.badge-cancel { background: var(--danger); color: #fff; border-radius: 999px; padding: 0 8px; font-size: 0.72rem; margin-left: 6px; text-decoration: none; white-space: nowrap; display: inline-block; }
label.check { flex-direction: row; align-items: center; gap: 8px; font-weight: 500; }
label.check input { width: auto; }

/* ---------- Untere Leiste (nur Handy) ---------- */

.bottomnav { display: none; }

/* ---------- Drucken (z. B. Vermeldungen für den Gottesdienst) ---------- */

@media print {
  .topbar, .bottomnav, .toolbar, .no-print, .icon-btn, .event-actions, .toast { display: none !important; }
  body { background: #fff; color: #000; }
  .event, .announcement { box-shadow: none; break-inside: avoid; }
}

/* ---------- Handy ---------- */

@media (max-width: 700px) {
  .topnav a { display: none; }
  .bottomnav {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 20;
    background: var(--surface);
    border-top: 1px solid var(--border);
    padding: 4px 0 calc(4px + env(safe-area-inset-bottom));
  }
  .bottomnav a { flex: 1; display: flex; flex-direction: column; align-items: center; font-size: 0.7rem; color: var(--muted); padding: 4px 0; }
  .bottomnav a span { font-size: 1.3rem; line-height: 1.2; }
  .bottomnav a.active { color: var(--accent); font-weight: 700; }
  .bottomnav a:hover { text-decoration: none; }
  main.wrap { padding-bottom: 100px; }
  .toast { bottom: 84px; }
  .upload-pill { bottom: 76px; }
  .upload-pill:not([hidden]) ~ .toast { bottom: 156px; }
  .news-columns { grid-template-columns: 1fr; }
  .event { gap: 10px; padding: 10px 12px; }
  .folder-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .photo-grid { grid-template-columns: repeat(3, 1fr); gap: 4px; }
  .photo { border-radius: 6px; }
  .hero { padding: 26px 20px; }
  .file-row { flex-wrap: wrap; }
  .file-row .file-date { width: 100%; }
  .tree-row { padding-left: calc(var(--depth) * 14px); }
  .tree-row .btn.small { padding: 4px 8px; font-size: 0.78rem; }
}
