/* Sellin / Mucheln Aktuell – Farben aus dem Gemeindewappen: Grün, Gold, Seeblatt-Blau, Mühlrad-Silber */
:root {
  --green-950: #04301a;
  --green-900: #074a27;
  --green: #0b6b34;
  --green-600: #0f8a43;
  --green-100: #dff3e5;
  --gold: #f4c20d;
  --gold-600: #d9a700;
  --gold-100: #fff5cc;
  --blue: #1f4fd6;
  --blue-100: #e3eaff;
  --red: #d6312b;

  --bg: #f5f6f1;
  --surface: #ffffff;
  --surface-2: #eef1ec;
  --line: #e1e5de;
  --text: #13201a;
  --muted: #5b6a61;
  --shadow: 0 1px 2px rgba(10, 40, 20, .06), 0 8px 24px rgba(10, 40, 20, .08);
  --shadow-lg: 0 20px 60px rgba(5, 30, 15, .25);
  --radius: 20px;
  --radius-sm: 12px;
  --nav-h: 64px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0c1410;
    --surface: #141f19;
    --surface-2: #1b2821;
    --line: #26352c;
    --text: #e8efe9;
    --muted: #9aaba0;
    --green-100: #163a24;
    --gold-100: #3a3112;
    --blue-100: #1a2650;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .3);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); background: var(--bg); color: var(--text);
  font-size: 16px; line-height: 1.5; -webkit-font-smoothing: antialiased;
  padding-bottom: calc(var(--nav-h) + var(--safe-b));
  overscroll-behavior-y: none;
}
a { color: inherit; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 6px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------------------------------------------------------------- Kopf */
.topbar {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 12px;
  padding: 10px 16px; padding-top: calc(10px + env(safe-area-inset-top, 0px));
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid transparent; transition: border-color .2s;
}
.topbar.scrolled { border-bottom-color: var(--line); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; min-width: 0; }
.brand img { width: 34px; height: 39px; filter: drop-shadow(0 2px 4px rgba(0,0,0,.15)); }
.brand b { font-size: 18px; letter-spacing: -.01em; white-space: nowrap; }
.brand small { display: block; font-size: 12px; color: var(--muted); margin-top: -3px; white-space: nowrap; }
.topbar .spacer { flex: 1; }
.icon-btn {
  width: 42px; height: 42px; border-radius: 50%; border: 0; background: var(--surface);
  display: grid; place-items: center; box-shadow: var(--shadow);
}
.icon-btn svg { width: 22px; height: 22px; }
.desk-nav { display: none; gap: 4px; }
.desk-nav a {
  text-decoration: none; padding: 8px 14px; border-radius: 999px; font-weight: 600; color: var(--muted);
}
.desk-nav a.active { background: var(--green); color: #fff; }

/* ---------------------------------------------------------------- Untere Navigation */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; height: calc(var(--nav-h) + var(--safe-b));
  padding-bottom: var(--safe-b); display: grid; grid-template-columns: repeat(4, 1fr);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: saturate(1.6) blur(16px); -webkit-backdrop-filter: saturate(1.6) blur(16px);
  border-top: 1px solid var(--line);
}
.tabbar a {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  text-decoration: none; font-size: 11.5px; font-weight: 600; color: var(--muted); position: relative;
}
.tabbar a svg { width: 24px; height: 24px; transition: transform .2s; }
.tabbar a.active { color: var(--green); }
@media (prefers-color-scheme: dark) { .tabbar a.active { color: var(--gold); } }
.tabbar a.active::before {
  content: ""; position: absolute; top: 6px; width: 54px; height: 30px; border-radius: 999px;
  background: var(--green-100); z-index: -1;
}
.tabbar a:active svg { transform: scale(.88); }

main { max-width: 1120px; margin: 0 auto; padding: 0 16px 32px; }
.view-enter { animation: enter .28s cubic-bezier(.2, .8, .2, 1); }
@keyframes enter { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------------------------------------------------------------- Startseite */
.hero {
  position: relative; overflow: hidden; margin: 8px 0 20px; border-radius: 28px; color: #fff;
  background: radial-gradient(120% 140% at 100% 0%, var(--green-600) 0%, var(--green) 45%, var(--green-950) 100%);
  padding: 22px 20px 26px; box-shadow: var(--shadow);
}
/* Zinnenschnitt aus dem Wappen als goldene Kante */
.hero::after {
  content: ""; position: absolute; right: -86px; top: -58px; width: 250px; height: 130px; transform: rotate(-24deg);
  background:
    linear-gradient(var(--gold), var(--gold)) 0 0 / 100% 60px no-repeat,
    repeating-linear-gradient(90deg, var(--gold) 0 26px, transparent 26px 52px) 0 60px / 100% 26px no-repeat;
  opacity: .95;
}
.hero .wheel {
  position: absolute; right: -36px; bottom: -48px; width: 190px; opacity: .1;
}
.hero h1 { font-size: clamp(28px, 7vw, 44px); line-height: 1.05; margin: 0 0 8px; letter-spacing: -.02em; max-width: 13ch; position: relative; z-index: 1; }
.hero p { margin: 0; opacity: .88; max-width: 34ch; position: relative; z-index: 1; }
.hero .hero-actions { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; position: relative; z-index: 1; }
.pill {
  display: inline-flex; align-items: center; gap: 8px; border: 0; border-radius: 999px; padding: 10px 16px;
  font-weight: 700; text-decoration: none; font-size: 15px;
}
.pill svg { width: 18px; height: 18px; }
.pill.gold { background: var(--gold); color: #1b1400; }
.pill.glass { background: rgba(255,255,255,.16); color: #fff; backdrop-filter: blur(6px); }
.pill.green { background: var(--green); color: #fff; }
.pill.ghost { background: var(--surface-2); color: var(--text); }
.pill.danger { background: #fde4e2; color: #a1201b; }
.pill:disabled { opacity: .5; }

.section-head { display: flex; align-items: baseline; justify-content: space-between; margin: 26px 2px 12px; }
.section-head h2 { font-size: 21px; margin: 0; letter-spacing: -.01em; }
.section-head a { font-weight: 700; color: var(--green); text-decoration: none; font-size: 15px; }
@media (prefers-color-scheme: dark) { .section-head a { color: var(--gold); } }

.hscroll {
  display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 16px 12px;
  margin: 0 -16px; scrollbar-width: none;
}
.hscroll::-webkit-scrollbar { display: none; }
.up-card {
  flex: 0 0 min(78%, 300px); scroll-snap-align: start; background: var(--surface); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 14px; display: flex; gap: 14px; text-decoration: none; position: relative;
  overflow: hidden; border: 1px solid var(--line);
}
.up-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--c, var(--green)); }
.datetile {
  flex: 0 0 56px; height: 64px; border-radius: 14px; background: var(--surface-2); display: flex;
  flex-direction: column; align-items: center; justify-content: center; line-height: 1;
}
.datetile .m { font-size: 11px; font-weight: 800; text-transform: uppercase; color: var(--red); letter-spacing: .04em; }
.datetile .d { font-size: 26px; font-weight: 800; margin: 3px 0 2px; }
.datetile .w { font-size: 11px; color: var(--muted); font-weight: 600; }
.up-card h3 { font-size: 16px; margin: 0 0 4px; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.meta { font-size: 13.5px; color: var(--muted); display: flex; align-items: center; gap: 5px; }
.meta svg { width: 15px; height: 15px; flex: none; }

.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 16px 10px; margin: 0 -16px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 7px 14px;
  font-size: 14px; font-weight: 600; display: inline-flex; align-items: center; gap: 7px; white-space: nowrap;
}
.chip .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--c); }
.chip.on { background: var(--text); color: var(--bg); border-color: var(--text); }

.feed { display: grid; gap: 14px; grid-template-columns: 1fr; }
.card {
  background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden;
  text-decoration: none; display: flex; flex-direction: column; border: 1px solid var(--line);
  transition: transform .15s;
}
.card:active { transform: scale(.985); }
.card .img { aspect-ratio: 16 / 9; background: var(--surface-2) center / cover; }
.card .ph {
  aspect-ratio: 16 / 5; display: grid; place-items: center; color: #fff;
  background: linear-gradient(135deg, var(--c, var(--green)), color-mix(in srgb, var(--c, var(--green)) 55%, #000));
}
.card .ph svg { width: 44px; height: 44px; opacity: .55; }
.card .body { padding: 14px 16px 16px; }
.card.compact { flex-direction: row; align-items: center; gap: 2px; padding-left: 14px; border-left: 5px solid var(--c); }
.card.compact .body { padding: 12px 14px; min-width: 0; }
.card.compact h3 { font-size: 17px; margin: 2px 0 4px; }
.card h3 { margin: 6px 0 6px; font-size: 18px; line-height: 1.25; letter-spacing: -.01em; }
.card p { margin: 0; color: var(--muted); font-size: 15px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.tag {
  display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; color: var(--c);
  text-transform: uppercase; letter-spacing: .04em;
}
.tag .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.when {
  display: inline-flex; align-items: center; gap: 6px; background: var(--gold-100); color: var(--text);
  border-radius: 8px; padding: 4px 9px; font-size: 13.5px; font-weight: 700; margin-top: 10px;
}
.when svg { width: 15px; height: 15px; }
.empty { text-align: center; color: var(--muted); padding: 40px 10px; }
.empty svg { width: 54px; height: 54px; opacity: .4; margin: 0 auto 10px; }
.more-btn { margin: 18px auto 0; display: flex; }

/* ---------------------------------------------------------------- Kalender */
.cal-toolbar {
  position: sticky; top: calc(62px + env(safe-area-inset-top, 0px)); z-index: 20; background: var(--bg);
  padding: 8px 0 10px; display: grid; gap: 10px;
}
.cal-row { display: flex; align-items: center; gap: 8px; }
.cal-title { font-size: 24px; font-weight: 800; letter-spacing: -.02em; margin: 0; flex: 1; text-transform: capitalize; }
.nav-btn {
  width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface);
  display: grid; place-items: center;
}
.nav-btn svg { width: 20px; height: 20px; }
.today-btn { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 8px 14px; font-weight: 700; }
.seg {
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--surface-2);
  border-radius: 999px; padding: 4px; gap: 4px;
}
.seg button { border: 0; background: transparent; border-radius: 999px; padding: 8px 10px; font-weight: 700; color: var(--muted); }
.seg button.on { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.12); }

.month { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; border: 1px solid var(--line); touch-action: pan-y; }
.month .dow { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); font-size: 12px; font-weight: 700; color: var(--muted); text-align: center; padding: 10px 0 6px; }
.month .grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.mday {
  min-height: 62px; min-width: 0; overflow: hidden; border-top: 1px solid var(--line); padding: 6px 4px; display: flex; flex-direction: column;
  align-items: center; gap: 4px; background: none; border-left: 0; border-right: 0; border-bottom: 0; position: relative;
}
.mday:not(:nth-child(7n+1)) { border-left: 1px solid var(--line); }
.mday .n { font-size: 14px; font-weight: 600; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; }
.mday.out .n { color: var(--muted); opacity: .5; }
.mday.today .n { background: var(--gold); color: #1b1400; font-weight: 800; }
.mday.sel { background: var(--green-100); }
.mday.sel .n { outline: 2px solid var(--green); }
.mday .dots { display: flex; gap: 3px; flex-wrap: wrap; justify-content: center; max-width: 34px; }
.mday .dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--c); }
.mday .chipsx { display: none; }
.day-panel { margin-top: 16px; }
.day-panel h3 { margin: 0 0 10px; font-size: 17px; }

.ev-row {
  display: flex; gap: 12px; padding: 12px 14px; background: var(--surface); border-radius: var(--radius-sm);
  text-decoration: none; margin-bottom: 8px; border: 1px solid var(--line); align-items: center;
}
.ev-row .bar { width: 4px; align-self: stretch; border-radius: 4px; background: var(--c); flex: none; }
.ev-row .t { flex: 0 0 52px; font-weight: 800; font-size: 14px; line-height: 1.2; }
.ev-row .t small { display: block; font-weight: 600; color: var(--muted); }
.ev-row b { display: block; font-size: 15.5px; line-height: 1.3; }
.ev-row .draft-badge { margin-left: auto; }

.week-wrap { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid var(--line); overflow-x: auto; touch-action: pan-x pan-y; }
.week { display: grid; grid-template-columns: 48px repeat(7, minmax(108px, 1fr)); min-width: 820px; position: relative; }
.week .wh { position: sticky; top: 0; background: var(--surface); z-index: 2; text-align: center; padding: 8px 2px; border-bottom: 1px solid var(--line); font-size: 12px; font-weight: 700; color: var(--muted); }
.week .wh b { display: block; font-size: 20px; color: var(--text); }
.week .wh.today b { color: var(--green); }
.week .allday { border-bottom: 1px solid var(--line); padding: 4px; min-height: 30px; display: flex; flex-direction: column; gap: 3px; }
.week .hours { position: sticky; left: 0; z-index: 3; background: var(--surface); }
.week .wh:first-child, .week .allday:nth-child(9) { position: sticky; left: 0; z-index: 4; background: var(--surface); }
.week .hl { height: 48px; border-top: 1px solid var(--line); font-size: 11px; color: var(--muted); text-align: right; padding-right: 6px; transform: translateY(-8px); border-top-color: transparent; }
.week .col { position: relative; border-left: 1px solid var(--line); background: repeating-linear-gradient(to bottom, var(--line) 0 1px, transparent 1px 48px); }
.week .blk {
  position: absolute; left: 3px; right: 3px; border-radius: 8px; padding: 4px 6px; font-size: 12px; line-height: 1.25;
  color: #fff; background: var(--c); overflow: hidden; text-decoration: none; box-shadow: 0 2px 6px rgba(0,0,0,.15);
}
.week .blk b { display: block; font-size: 12.5px; }
.week .adb { background: var(--c); color: #fff; border-radius: 6px; padding: 2px 6px; font-size: 12px; font-weight: 700; text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nowline { position: absolute; left: 0; right: 0; height: 2px; background: var(--red); z-index: 1; }
.nowline::before { content: ""; position: absolute; left: -5px; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: var(--red); }

.agenda-day { margin-bottom: 14px; }
.agenda-day h4 {
  position: sticky; top: calc(170px + env(safe-area-inset-top, 0px)); background: var(--bg); margin: 0; padding: 8px 2px;
  font-size: 14px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; z-index: 1;
}
.agenda-day h4.today { color: var(--green); }
.subscribe-box {
  margin-top: 22px; background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius);
  padding: 16px; display: flex; gap: 14px; align-items: center;
}
.subscribe-box svg { width: 34px; height: 34px; color: var(--green); flex: none; }
.subscribe-box p { margin: 2px 0 0; color: var(--muted); font-size: 14px; }

/* ---------------------------------------------------------------- Beitrag */
.article { max-width: 720px; margin: 0 auto; }
.article .cover { margin: 8px -16px 0; aspect-ratio: 16 / 10; background: var(--surface-2) center / cover; }
.article .cover.ph { display: grid; place-items: center; background: linear-gradient(135deg, var(--c), color-mix(in srgb, var(--c) 50%, #000)); color: #fff; aspect-ratio: 16 / 6; }
.article .cover.ph svg { width: 60px; height: 60px; opacity: .5; }
.article .content { background: var(--surface); border-radius: 28px 28px var(--radius) var(--radius); margin: -24px -4px 0; position: relative; padding: 22px 18px; box-shadow: var(--shadow); }
.article h1 { font-size: clamp(25px, 6vw, 36px); line-height: 1.12; margin: 8px 0 14px; letter-spacing: -.02em; }
.facts { display: grid; gap: 10px; margin: 0 0 18px; }
.fact { display: flex; gap: 12px; align-items: center; background: var(--surface-2); border-radius: 14px; padding: 12px 14px; text-decoration: none; }
.fact svg { width: 22px; height: 22px; color: var(--green); flex: none; }
@media (prefers-color-scheme: dark) { .fact svg { color: var(--gold); } }
.fact b { display: block; }
.fact small { color: var(--muted); }
.article .lead { font-size: 18px; font-weight: 600; margin: 0 0 12px; }
.article .text p { margin: 0 0 14px; }
.article .text a { color: var(--blue); }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; margin: 16px 0; }
.gallery img { border-radius: 12px; aspect-ratio: 1; object-fit: cover; width: 100%; cursor: zoom-in; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.actions .pill { flex: 1 1 auto; justify-content: center; }
.byline { color: var(--muted); font-size: 13.5px; margin-top: 18px; display: flex; gap: 6px; align-items: center; }
.back { display: inline-flex; align-items: center; gap: 4px; text-decoration: none; font-weight: 700; color: var(--muted); margin: 6px 0; }
.back svg { width: 20px; height: 20px; }

/* ---------------------------------------------------------------- Unterseite (Sheet) */
.sheet-bg { position: fixed; inset: 0; background: rgba(4, 20, 10, .45); z-index: 60; opacity: 0; transition: opacity .2s; }
.sheet-bg.open { opacity: 1; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 61; background: var(--surface); border-radius: 26px 26px 0 0;
  padding: 10px 18px calc(20px + var(--safe-b)); box-shadow: var(--shadow-lg); transform: translateY(100%);
  transition: transform .28s cubic-bezier(.2, .8, .2, 1); max-height: 88vh; overflow-y: auto;
}
.sheet.open { transform: none; }
.sheet .grab { width: 42px; height: 5px; border-radius: 3px; background: var(--line); margin: 0 auto 14px; }
.sheet h3 { margin: 0 0 12px; font-size: 19px; }
.sheet-list { display: grid; gap: 8px; }
.sheet-list a, .sheet-list button {
  display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: 14px; background: var(--surface-2);
  border: 0; text-decoration: none; font-weight: 600; text-align: left; width: 100%;
}
.sheet-list svg { width: 24px; height: 24px; flex: none; }
.sheet-list small { display: block; font-weight: 500; color: var(--muted); font-size: 13px; }

.toast {
  position: fixed; left: 50%; bottom: calc(var(--nav-h) + var(--safe-b) + 14px); transform: translate(-50%, 20px);
  background: var(--text); color: var(--bg); padding: 11px 18px; border-radius: 999px; font-weight: 600; z-index: 80;
  opacity: 0; transition: .25s; pointer-events: none; max-width: 90vw; text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,.92); z-index: 90; display: grid; place-items: center; padding: 16px; }
.lightbox img { max-height: 92vh; border-radius: 10px; }

/* ---------------------------------------------------------------- Suche */
.searchbox { position: relative; margin: 10px 0 14px; }
.searchbox input {
  width: 100%; border: 1px solid var(--line); background: var(--surface); border-radius: 16px; padding: 14px 16px 14px 46px;
  font-size: 17px; box-shadow: var(--shadow);
}
.searchbox svg { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); width: 22px; height: 22px; color: var(--muted); }

/* ---------------------------------------------------------------- Redaktion */
.panel { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; border: 1px solid var(--line); }
.login { max-width: 420px; margin: 30px auto; text-align: center; }
.login img { width: 70px; margin: 0 auto 10px; }
.field { display: grid; gap: 6px; margin-bottom: 14px; text-align: left; }
.field label { font-size: 14px; font-weight: 700; }
.field .hint { font-size: 13px; color: var(--muted); }
.input, .field input, .field select, .field textarea {
  width: 100%; border: 1px solid var(--line); background: var(--bg); border-radius: 12px; padding: 12px 13px; font-size: 16px;
}
.field textarea { min-height: 150px; resize: vertical; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.switch { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.switch input { appearance: none; width: 50px; height: 30px; border-radius: 999px; background: var(--line); position: relative; transition: .2s; flex: none; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: .2s; box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.switch input:checked { background: var(--green); }
.switch input:checked::after { left: 23px; }
.cat-pick { display: flex; flex-wrap: wrap; gap: 8px; }
.cat-pick label { cursor: pointer; }
.cat-pick input { display: none; }
.cat-pick span { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line); border-radius: 999px; padding: 7px 12px; font-size: 14px; font-weight: 600; }
.cat-pick span i { width: 9px; height: 9px; border-radius: 50%; background: var(--c); }
.cat-pick input:checked + span { background: var(--c); color: #fff; border-color: var(--c); }
.cat-pick input:checked + span i { background: #fff; }
.drop {
  border: 2px dashed var(--line); border-radius: 16px; padding: 18px; text-align: center; color: var(--muted);
  display: block; cursor: pointer; transition: .15s;
}
.drop.over { border-color: var(--green); background: var(--green-100); }
.drop svg { width: 30px; height: 30px; margin: 0 auto 6px; }
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; margin-top: 10px; }
.thumb { position: relative; }
.thumb img { aspect-ratio: 1; object-fit: cover; border-radius: 10px; width: 100%; }
.thumb button { position: absolute; top: 4px; right: 4px; width: 26px; height: 26px; border-radius: 50%; border: 0; background: rgba(0,0,0,.65); color: #fff; font-weight: 800; line-height: 1; }
.admin-head { display: flex; align-items: center; gap: 10px; margin: 10px 0 14px; }
.admin-head h2 { margin: 0; flex: 1; font-size: 22px; }
.admin-tabs { margin-bottom: 14px; }
.adm-item { display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); margin-bottom: 8px; }
.adm-item .bar { width: 4px; align-self: stretch; border-radius: 4px; background: var(--c); flex: none; }
.adm-item .info { flex: 1; min-width: 0; }
.adm-item b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.adm-item .btns { display: flex; gap: 6px; }
.adm-item .btns button { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); background: var(--bg); display: grid; place-items: center; }
.adm-item .btns svg { width: 18px; height: 18px; }
.badge { display: inline-block; font-size: 11.5px; font-weight: 800; padding: 2px 8px; border-radius: 999px; text-transform: uppercase; letter-spacing: .03em; }
.badge.draft { background: var(--gold-100); color: #8a6a00; }
.badge.pub { background: var(--green-100); color: var(--green); }
.badge.src { background: var(--blue-100); color: var(--blue); }
@media (prefers-color-scheme: dark) { .badge.draft { color: var(--gold); } .badge.pub { color: #7fd8a0; } .badge.src { color: #a9bcff; } }
.info-box { background: var(--green-100); border-radius: 16px; padding: 14px 16px; margin-bottom: 14px; font-size: 15px; }
.info-box code { background: var(--surface); padding: 2px 6px; border-radius: 6px; font-size: 14px; word-break: break-all; }
.log-row { padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.log-row:last-child { border-bottom: 0; }
.err { color: var(--red); font-weight: 600; min-height: 1.4em; }
.footer { text-align: center; color: var(--muted); font-size: 13px; padding: 26px 0 10px; }
.footer a { color: var(--muted); }

/* ---------------------------------------------------------------- Breiter Bildschirm */
@media (min-width: 760px) {
  .feed { grid-template-columns: repeat(2, 1fr); }
  .hero { padding: 40px 40px 44px; }
  .hero::after { width: 420px; height: 200px; right: -60px; top: -50px; }
  .mday { min-height: 108px; align-items: stretch; }
  .mday .n { align-self: flex-end; width: 28px; height: 28px; font-size: 13px; }
  .mday .dots { display: none; }
  .mday .chipsx { display: flex; flex-direction: column; gap: 3px; }
  .mday .chipsx span { font-size: 12px; font-weight: 600; background: color-mix(in srgb, var(--c) 16%, transparent); border-left: 3px solid var(--c); border-radius: 5px; padding: 1px 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: left; }
  .mday .chipsx em { font-size: 11.5px; color: var(--muted); font-style: normal; text-align: left; padding-left: 4px; }
  .article .cover { margin: 8px 0 0; border-radius: var(--radius); }
  .article .content { margin: -40px 24px 0; padding: 30px; }
  .sheet { left: 50%; right: auto; width: 480px; bottom: 50%; transform: translate(-50%, 60%); opacity: 0; border-radius: 26px; transition: .22s; }
  .sheet.open { transform: translate(-50%, 50%); opacity: 1; }
}
@media (min-width: 980px) {
  body { padding-bottom: 0; }
  .tabbar { display: none; }
  .desk-nav { display: flex; }
  .feed { grid-template-columns: repeat(3, 1fr); }
  .toast { bottom: 24px; }
  .cal-toolbar { grid-template-columns: 1fr auto; align-items: center; }
  .cal-toolbar .seg { width: 300px; }
  .agenda-day h4 { top: 118px; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* Ladeanimation mit dem Wappen */
.lade {
  position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center;
  background: radial-gradient(120% 90% at 50% 38%, #0a4a2a 0%, #052a18 50%, #02140c 100%);
  transition: opacity .5s ease;
}
.lade.weg { opacity: 0; pointer-events: none; }
.lade-aus .lade { display: none; }
.lade canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.lade img { width: min(34vw, 150px); filter: drop-shadow(0 12px 30px rgba(0, 0, 0, .4)); transition: opacity .3s ease; }
.lade.lade-3d img { opacity: 0; }
.lade p {
  position: absolute; left: 0; right: 0; bottom: calc(5vh + var(--safe-b)); margin: 0; text-align: center;
  color: #fff; font-weight: 700; font-size: clamp(1.05rem, 3.6vw, 1.5rem); letter-spacing: .01em;
}
@media (prefers-reduced-motion: reduce) { .lade, .lade img { transition: none; } }

/* Nächster Termin mit Countdown in Tagen */
.next {
  position: relative; z-index: 1; display: flex; align-items: center; gap: 14px; margin-top: 16px; max-width: 460px;
  padding: 12px 16px; border-radius: 18px; color: #fff; text-decoration: none;
  background: rgba(255, 255, 255, .13); border: 1px solid rgba(255, 255, 255, .22);
}
.next[hidden] { display: none; }
.next-n { font-size: clamp(24px, 6vw, 32px); font-weight: 800; line-height: 1; color: var(--gold); white-space: nowrap; }
.next-t { display: grid; min-width: 0; font-size: 14px; line-height: 1.3; }
.next-t small { opacity: .8; font-size: 12px; }
.next-t b, .next-t span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.next-t span { opacity: .88; }
.soon { color: var(--green-600); font-weight: 700; }
