/* =========================================================================
   Seebrise Mitarbeiterplattform – Design-System
   Mobil zuerst, hell & dunkel, maritim-freundlich
   ========================================================================= */

:root {
  --primary: #0E7490;
  --primary-600: #0891B2;
  --primary-100: #CFFAFE;
  --accent: #F59E0B;
  --accent-100: #FEF3C7;

  --sand: #FDF8F3;
  --ink: #0F172A;
  --ink-2: #334155;
  --muted: #64748B;
  --muted-2: #94A3B8;
  --line: #E2E8F0;
  --bg: #F1F5F9;
  --surface: #FFFFFF;
  --surface-2: #F8FAFC;

  --green: #10B981;
  --green-bg: #DCFCE7;
  --red: #EF4444;
  --red-bg: #FEE2E2;
  --amber: #F59E0B;
  --amber-bg: #FEF3C7;
  --violet: #8B5CF6;
  --violet-bg: #EDE9FE;
  --pink: #EC4899;
  --blue: #3B82F6;

  --r-sm: 10px;
  --r: 16px;
  --r-lg: 22px;
  --r-xl: 28px;

  --sh-1: 0 1px 2px rgba(15,23,42,.06), 0 1px 3px rgba(15,23,42,.05);
  --sh-2: 0 4px 12px rgba(15,23,42,.07), 0 2px 4px rgba(15,23,42,.04);
  --sh-3: 0 12px 32px rgba(15,23,42,.12);
  --sh-glow: 0 8px 24px rgba(14,116,144,.25);

  --nav-h: 68px;
  --side-w: 264px;
  --ease: cubic-bezier(.22,.9,.32,1);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
}

[data-theme="dark"] {
  --sand: #0B1220;
  --ink: #F1F5F9;
  --ink-2: #CBD5E1;
  --muted: #94A3B8;
  --muted-2: #64748B;
  --line: #1E293B;
  --bg: #0B1220;
  --surface: #131C2E;
  --surface-2: #1A2438;
  --primary-100: #164E63;
  --green-bg: #052E1F;
  --red-bg: #3B0F12;
  --amber-bg: #3A2A06;
  --violet-bg: #241C4A;
  --sh-1: 0 1px 2px rgba(0,0,0,.3);
  --sh-2: 0 4px 14px rgba(0,0,0,.35);
  --sh-3: 0 14px 36px rgba(0,0,0,.5);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}

h1, h2, h3, h4 { margin: 0 0 .4em; line-height: 1.25; font-weight: 700; letter-spacing: -.015em; }
h1 { font-size: 1.6rem; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.05rem; }
h4 { font-size: .95rem; }
p  { margin: 0 0 1em; }
a  { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; }
small { font-size: .82rem; }
hr { border: 0; border-top: 1px solid var(--line); margin: 22px 0; }

::selection { background: var(--primary-100); color: var(--ink); }

/* ------------------------------------------------------------------ Layout */
.app { min-height: 100vh; padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom)); }

.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; padding-top: calc(10px + env(safe-area-inset-top));
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.topbar-brand { display: flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: -.02em; color: var(--ink); }
.topbar-brand:hover { text-decoration: none; }
.topbar-logo {
  width: 36px; height: 36px; border-radius: 12px; flex: 0 0 36px;
  background: linear-gradient(135deg, var(--primary), var(--primary-600));
  display: grid; place-items: center; color: #fff; font-weight: 800; font-size: .95rem;
  box-shadow: var(--sh-glow);
}
.topbar-logo img { width: 100%; height: 100%; object-fit: cover; border-radius: 12px; }
.topbar-title { font-size: 1rem; line-height: 1.1; }
.topbar-title small { display: block; font-weight: 500; color: var(--muted); font-size: .72rem; }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 6px; }

.icon-btn {
  position: relative; width: 42px; height: 42px; border-radius: 14px; border: 0;
  background: var(--surface-2); color: var(--ink-2); display: grid; place-items: center;
  cursor: pointer; transition: .18s var(--ease);
}
.icon-btn:hover { background: var(--primary-100); color: var(--primary); transform: translateY(-1px); }
.icon-btn:active { transform: scale(.94); }
.icon-btn .dot {
  position: absolute; top: 7px; right: 7px; min-width: 17px; height: 17px; padding: 0 4px;
  border-radius: 9px; background: var(--red); color: #fff; font-size: .64rem; font-weight: 700;
  display: grid; place-items: center; border: 2px solid var(--surface);
}

.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 16px 14px 28px; }
.wrap-narrow { max-width: 780px; }

.sidebar { display: none; }

/* ---------------------------------------------------------- Untere Navigation */
.bottomnav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 60;
  display: grid; grid-template-columns: repeat(5, 1fr);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}
.bottomnav a {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  padding: 9px 2px 8px; font-size: .68rem; font-weight: 600; color: var(--muted); text-decoration: none;
  transition: color .18s var(--ease); position: relative;
}
.bottomnav a.is-active { color: var(--primary); }
.bottomnav a.is-active::before {
  content: ''; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 26px; height: 3px; border-radius: 0 0 4px 4px; background: var(--primary);
}
.bottomnav a:active { transform: scale(.94); }
.bottomnav .ico { transition: transform .2s var(--ease); }
.bottomnav a.is-active .ico { transform: translateY(-1px) scale(1.08); }

/* ------------------------------------------------------------------ Karten */
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 18px; box-shadow: var(--sh-1);
}
.card + .card { margin-top: 14px; }
.card-tight { padding: 14px; }
.card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.card-head h2, .card-head h3 { margin: 0; }
.card-head .card-more { margin-left: auto; font-size: .82rem; font-weight: 600; }

.grid { display: grid; gap: 14px; }
.grid-2 { grid-template-columns: 1fr; }
.grid-3 { grid-template-columns: 1fr; }
.grid-auto { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }

.section-title { display: flex; align-items: center; gap: 8px; margin: 26px 0 12px; font-size: 1.05rem; font-weight: 700; }
.section-title .ico { color: var(--primary); }
.section-title .more { margin-left: auto; font-size: .82rem; font-weight: 600; }

/* ------------------------------------------------------------------ Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 20px; border-radius: 14px; border: 1px solid transparent;
  font: inherit; font-weight: 650; font-size: .93rem; cursor: pointer;
  background: var(--primary); color: #fff; text-decoration: none;
  transition: .18s var(--ease); box-shadow: var(--sh-1);
}
.btn:hover { background: var(--primary-600); text-decoration: none; transform: translateY(-1px); box-shadow: var(--sh-2); }
.btn:active { transform: translateY(0) scale(.98); }
.btn[disabled], .btn.is-disabled { opacity: .5; pointer-events: none; }
.btn-ghost { background: var(--surface-2); color: var(--ink-2); border-color: var(--line); }
.btn-ghost:hover { background: var(--primary-100); color: var(--primary); border-color: transparent; }
.btn-outline { background: transparent; color: var(--primary); border-color: var(--primary); }
.btn-outline:hover { background: var(--primary-100); color: var(--primary); }
.btn-danger { background: var(--red); }
.btn-danger:hover { background: #DC2626; }
.btn-accent { background: var(--accent); color: #422006; }
.btn-accent:hover { background: #FBBF24; }
.btn-sm { padding: 8px 14px; font-size: .84rem; border-radius: 11px; }
.btn-lg { padding: 15px 26px; font-size: 1rem; border-radius: 16px; }
.btn-block { width: 100%; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; }

/* ------------------------------------------------------------------ Chips */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 11px; border-radius: 999px; font-size: .76rem; font-weight: 650;
  background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line);
  white-space: nowrap;
}
.chip-primary { background: var(--primary-100); color: var(--primary); border-color: transparent; }
.chip-green { background: var(--green-bg); color: #15803D; border-color: transparent; }
.chip-red { background: var(--red-bg); color: #B91C1C; border-color: transparent; }
.chip-amber { background: var(--amber-bg); color: #B45309; border-color: transparent; }
.chip-violet { background: var(--violet-bg); color: #6D28D9; border-color: transparent; }
[data-theme="dark"] .chip-green { color: #4ADE80; }
[data-theme="dark"] .chip-red { color: #FCA5A5; }
[data-theme="dark"] .chip-amber { color: #FCD34D; }
[data-theme="dark"] .chip-violet { color: #C4B5FD; }
.chips { display: flex; flex-wrap: wrap; gap: 7px; }

.pill-nav { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 10px; scrollbar-width: none; }
.pill-nav::-webkit-scrollbar { display: none; }
.pill-nav a {
  flex: 0 0 auto; padding: 9px 16px; border-radius: 999px; font-size: .85rem; font-weight: 650;
  background: var(--surface); border: 1px solid var(--line); color: var(--ink-2); text-decoration: none;
  transition: .18s var(--ease);
}
.pill-nav a:hover { border-color: var(--primary); color: var(--primary); text-decoration: none; }
.pill-nav a.is-active { background: var(--primary); border-color: var(--primary); color: #fff; box-shadow: var(--sh-glow); }

/* ------------------------------------------------------------------ Avatare */
.avatar {
  width: 40px; height: 40px; border-radius: 50%; flex: 0 0 auto;
  display: grid; place-items: center; font-weight: 700; font-size: .85rem; color: #fff;
  background: var(--primary); overflow: hidden; text-transform: uppercase; letter-spacing: .02em;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-lg { width: 68px; height: 68px; font-size: 1.35rem; }
.avatar-xl { width: 92px; height: 92px; font-size: 1.9rem; }
.avatar-sm { width: 30px; height: 30px; font-size: .7rem; }

/* ------------------------------------------------------------------ Fortschritt */
.bar { height: 9px; border-radius: 99px; background: var(--surface-2); overflow: hidden; border: 1px solid var(--line); }
.bar > span {
  display: block; height: 100%; border-radius: 99px;
  background: linear-gradient(90deg, var(--primary), var(--primary-600));
  transition: width .9s var(--ease);
}
.bar.is-green > span { background: linear-gradient(90deg, var(--green), #34D399); }
.bar.is-amber > span { background: linear-gradient(90deg, var(--accent), #FBBF24); }
.bar-lg { height: 13px; }

/* Der Ring braucht immer sein eigenes Layout – auch wenn Hilfsklassen daneben stehen */
.ring, .ring.desktop-only, .ring.mobile-only { position: relative; display: grid; place-items: center; }
.ring svg { transform: rotate(-90deg); }
.ring circle { fill: none; stroke-linecap: round; }
.ring .track { stroke: var(--line); }
.ring .val { stroke: url(#ringGrad); transition: stroke-dashoffset 1.1s var(--ease); }
.ring-label { position: absolute; text-align: center; line-height: 1.1; }
.ring-label b { display: block; font-size: 1.4rem; font-weight: 800; letter-spacing: -.03em; }
.ring-label span { font-size: .68rem; color: var(--muted); font-weight: 600; }

/* ------------------------------------------------------------------ Kacheln */
.stat {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  padding: 14px; text-align: center; box-shadow: var(--sh-1);
  transition: .2s var(--ease);
}
.stat:hover { transform: translateY(-2px); box-shadow: var(--sh-2); }
.stat b { display: block; font-size: 1.45rem; font-weight: 800; letter-spacing: -.03em; line-height: 1.15; }
.stat span { font-size: .74rem; color: var(--muted); font-weight: 600; }
.stat .emoji { font-size: 1.15rem; display: block; margin-bottom: 2px; }
.stats-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stats-row-4 { grid-template-columns: repeat(2, 1fr); }
.stats-row-5 { grid-template-columns: repeat(2, 1fr); }

/* ------------------------------------------------------------------ Listen */
.list { display: flex; flex-direction: column; gap: 2px; }
.list-item {
  display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: var(--r);
  color: inherit; text-decoration: none; transition: .16s var(--ease); background: transparent;
}
.list-item:hover { background: var(--surface-2); text-decoration: none; transform: translateX(2px); }
.list-item-body { min-width: 0; flex: 1; }
.list-item-title { font-weight: 650; font-size: .95rem; display: block; }
.list-item-sub { font-size: .8rem; color: var(--muted); display: block; margin-top: 1px; }
.list-item .ico-end { color: var(--muted-2); flex: 0 0 auto; }
.list-divided .list-item + .list-item { border-top: 1px solid var(--line); border-radius: 0; }

.tile-icon {
  width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; flex: 0 0 42px;
  background: var(--primary-100); color: var(--primary);
}

/* ------------------------------------------------------------------ Formulare */
.field { margin-bottom: 16px; }
.field label, .label { display: block; font-size: .85rem; font-weight: 650; margin-bottom: 6px; color: var(--ink-2); }
.field .hint { font-size: .78rem; color: var(--muted); margin-top: 5px; }

input[type=text], input[type=password], input[type=email], input[type=number], input[type=date],
input[type=time], input[type=search], input[type=tel], input[type=datetime-local], input[type=url],
select, textarea {
  width: 100%; padding: 12px 14px; font: inherit; font-size: .95rem;
  border: 1.5px solid var(--line); border-radius: 13px; background: var(--surface); color: var(--ink);
  transition: .16s var(--ease); appearance: none;
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 14%, transparent);
}
input::placeholder, textarea::placeholder { color: var(--muted-2); }
textarea { min-height: 110px; resize: vertical; line-height: 1.6; }
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%2364748B' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; padding-right: 40px;
}
input[type=color] { width: 54px; height: 44px; padding: 4px; border-radius: 12px; cursor: pointer; }
input[type=file] { padding: 10px; background: var(--surface-2); border-style: dashed; cursor: pointer; }

.check {
  display: flex; align-items: flex-start; gap: 10px; padding: 11px 13px; border-radius: 13px;
  border: 1.5px solid var(--line); background: var(--surface); cursor: pointer; transition: .16s var(--ease);
  font-size: .9rem; margin-bottom: 8px;
}
.check:hover { border-color: var(--primary); background: var(--surface-2); }
.check input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--primary); flex: 0 0 20px; cursor: pointer; }
.check.is-on { border-color: var(--primary); background: var(--primary-100); }
.check span small { display: block; color: var(--muted); font-size: .78rem; font-weight: 500; margin-top: 1px; }
.check-grid { display: grid; grid-template-columns: 1fr; gap: 0; }

.form-row { display: grid; grid-template-columns: 1fr; gap: 0 14px; }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.switch-row:last-child { border-bottom: 0; }
.switch-row .switch-label { font-weight: 600; font-size: .92rem; }
.switch-row .switch-label small { display: block; font-weight: 500; color: var(--muted); font-size: .78rem; }

.switch { position: relative; width: 50px; height: 29px; flex: 0 0 50px; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch i {
  position: absolute; inset: 0; background: var(--line); border-radius: 99px; transition: .22s var(--ease); cursor: pointer;
}
.switch i::after {
  content: ''; position: absolute; top: 3px; left: 3px; width: 23px; height: 23px; border-radius: 50%;
  background: #fff; transition: .22s var(--ease); box-shadow: var(--sh-1);
}
.switch input:checked + i { background: var(--primary); }
.switch input:checked + i::after { transform: translateX(21px); }

.searchbar { position: relative; }
.searchbar input { padding-left: 44px; border-radius: 999px; }
.searchbar .ico { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }


/* ------------------------------------------------------------------ Suche */
.searchbar-row { display: flex; gap: 8px; align-items: stretch; }
.searchbar-row .btn { flex: 0 0 auto; border-radius: 999px; padding: 0 18px; }
.searchbar-row .btn-label { display: none; }
.search-snippet { display: block; color: var(--muted); line-height: 1.5; }
.search-snippet mark, .list-item-title mark {
  background: var(--amber-bg); color: inherit; padding: 0 2px; border-radius: 3px; font-weight: 700;
}
[data-theme="dark"] .search-snippet mark, [data-theme="dark"] .list-item-title mark { color: #FCD34D; }
.chapter-card { color: inherit; text-decoration: none; transition: .2s var(--ease); }
.chapter-card:hover { text-decoration: none; transform: translateY(-3px); box-shadow: var(--sh-2); }
@media (min-width: 700px) { .searchbar-row .btn-label { display: inline; } }

/* ------------------------------------------------------------------ Meldungen */
.flashes { position: fixed; left: 12px; right: 12px; top: calc(12px + env(safe-area-inset-top)); z-index: 200; display: grid; gap: 8px; pointer-events: none; }
.flash {
  display: flex; align-items: flex-start; gap: 10px; padding: 13px 15px; border-radius: 15px;
  background: var(--surface); box-shadow: var(--sh-3); border: 1px solid var(--line);
  font-size: .9rem; font-weight: 550; pointer-events: auto;
  animation: slideDown .45s var(--ease);
}
.flash.is-success { border-left: 4px solid var(--green); }
.flash.is-error { border-left: 4px solid var(--red); }
.flash.is-info { border-left: 4px solid var(--primary); }
.flash .ico { flex: 0 0 auto; margin-top: 1px; }
.flash.is-success .ico { color: var(--green); }
.flash.is-error .ico { color: var(--red); }
.flash.is-info .ico { color: var(--primary); }
.flash button { margin-left: auto; background: 0; border: 0; color: var(--muted); cursor: pointer; padding: 0; }

.note {
  display: flex; gap: 11px; padding: 13px 15px; border-radius: var(--r);
  background: var(--surface-2); border: 1px solid var(--line); font-size: .89rem; line-height: 1.55;
}
.note-warn { background: var(--amber-bg); border-color: transparent; color: #92400E; }
.note-danger { background: var(--red-bg); border-color: transparent; color: #991B1B; }
.note-success { background: var(--green-bg); border-color: transparent; color: #14532D; }
[data-theme="dark"] .note-warn { color: #FCD34D; }
[data-theme="dark"] .note-danger { color: #FCA5A5; }
[data-theme="dark"] .note-success { color: #86EFAC; }
.note .ico { flex: 0 0 auto; margin-top: 2px; }

.empty { text-align: center; padding: 34px 18px; color: var(--muted); }
.empty .emoji { font-size: 2.4rem; display: block; margin-bottom: 10px; }
.empty h3 { color: var(--ink-2); }

/* ------------------------------------------------------------------ Tabellen */
.table-wrap { overflow-x: auto; margin: 0 -18px; padding: 0 18px; -webkit-overflow-scrolling: touch; }
table.data { width: 100%; border-collapse: collapse; font-size: .88rem; min-width: 560px; }
table.data th {
  text-align: left; font-size: .74rem; text-transform: uppercase; letter-spacing: .05em;
  color: var(--muted); font-weight: 700; padding: 9px 10px; border-bottom: 2px solid var(--line); white-space: nowrap;
}
table.data td { padding: 11px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.data tr:last-child td { border-bottom: 0; }
table.data tbody tr { transition: background .15s var(--ease); }
table.data tbody tr:hover { background: var(--surface-2); }
table.data .num { text-align: right; font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------------ Inhalt (Blöcke) */
.content { font-size: 1rem; line-height: 1.72; color: var(--ink-2); }
.content > *:last-child { margin-bottom: 0; }
.content strong { color: var(--ink); font-weight: 680; }

.blk-lead { font-size: 1.08rem; font-weight: 550; color: var(--ink); line-height: 1.62; margin-bottom: 1.1em; }
.blk-h { margin: 1.5em 0 .55em; font-size: 1.02rem; font-weight: 700; color: var(--ink); }
.blk-text ul, .blk-text ol { padding-left: 1.25em; margin: 0 0 1em; }
.blk-text li { margin-bottom: .35em; }

.blk-callout {
  border-radius: var(--r); padding: 14px 16px; margin: 18px 0;
  background: var(--surface-2); border: 1px solid var(--line); border-left: 4px solid var(--muted-2);
}
.blk-callout-head { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: .88rem; margin-bottom: 6px; }
.blk-callout-body { font-size: .93rem; }
.blk-callout-body > *:last-child { margin-bottom: 0; }
.blk-callout.is-info { background: var(--primary-100); border-left-color: var(--primary); border-color: transparent; }
.blk-callout.is-info .blk-callout-head { color: var(--primary); }
.blk-callout.is-tipp { background: var(--violet-bg); border-left-color: var(--violet); border-color: transparent; }
.blk-callout.is-tipp .blk-callout-head { color: var(--violet); }
.blk-callout.is-achtung { background: var(--red-bg); border-left-color: var(--red); border-color: transparent; }
.blk-callout.is-achtung .blk-callout-head { color: var(--red); }
.blk-callout.is-regel { background: var(--amber-bg); border-left-color: var(--accent); border-color: transparent; }
.blk-callout.is-regel .blk-callout-head { color: #B45309; }
.blk-callout.is-beispiel { background: var(--green-bg); border-left-color: var(--green); border-color: transparent; }
.blk-callout.is-beispiel .blk-callout-head { color: #15803D; }
[data-theme="dark"] .blk-callout.is-regel .blk-callout-head { color: #FCD34D; }
[data-theme="dark"] .blk-callout.is-beispiel .blk-callout-head { color: #4ADE80; }

.blk-list { list-style: none; padding: 0; margin: 0 0 1.1em; }
.blk-list li { display: flex; gap: 10px; align-items: flex-start; padding: 6px 0; }
.blk-list.is-number { list-style: decimal; padding-left: 1.3em; }
.blk-list.is-number li { display: list-item; padding: 4px 0; }
.blk-tick { color: var(--green); flex: 0 0 auto; margin-top: 4px; }
.blk-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--primary); flex: 0 0 6px; margin-top: 10px; }

.blk-steps { list-style: none; padding: 0; margin: 18px 0; counter-reset: step; }
.blk-step { display: flex; gap: 14px; padding-bottom: 18px; position: relative; }
.blk-step:not(:last-child)::before {
  content: ''; position: absolute; left: 15px; top: 34px; bottom: 2px; width: 2px;
  background: linear-gradient(180deg, var(--primary), var(--line));
  opacity: .35; border-radius: 2px;
}
.blk-step-no {
  width: 32px; height: 32px; flex: 0 0 32px; border-radius: 50%;
  background: var(--primary); color: #fff; display: grid; place-items: center;
  font-weight: 700; font-size: .84rem; z-index: 1; box-shadow: var(--sh-glow);
}
.blk-step-title { font-weight: 680; color: var(--ink); margin-bottom: 2px; padding-top: 4px; }
.blk-step-text { font-size: .94rem; }
.blk-step-text > *:last-child { margin-bottom: 0; }

.blk-table-wrap { overflow-x: auto; margin: 18px -18px; padding: 0 18px; }
.blk-table { width: 100%; border-collapse: collapse; font-size: .89rem; min-width: 440px; }
.blk-table th { background: var(--surface-2); text-align: left; padding: 10px 12px; font-weight: 700; font-size: .8rem; border-bottom: 2px solid var(--line); }
.blk-table td { padding: 10px 12px; border-bottom: 1px solid var(--line); }
.blk-table tr:last-child td { border-bottom: 0; }

.blk-quote {
  margin: 20px 0; padding: 18px 20px; border-radius: var(--r);
  background: linear-gradient(135deg, var(--primary-100), transparent);
  border-left: 4px solid var(--primary); font-size: 1.03rem; font-weight: 550; font-style: italic; color: var(--ink);
}
.blk-quote cite { display: block; margin-top: 8px; font-size: .82rem; font-style: normal; color: var(--muted); font-weight: 600; }

.blk-faq { margin: 18px 0; display: grid; gap: 8px; }
.blk-faq-item { border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); overflow: hidden; }
.blk-faq-item summary {
  padding: 13px 15px; font-weight: 650; font-size: .93rem; cursor: pointer; list-style: none;
  display: flex; align-items: center; gap: 10px; transition: background .15s var(--ease);
}
.blk-faq-item summary::-webkit-details-marker { display: none; }
.blk-faq-item summary .ico { margin-left: auto; transition: transform .25s var(--ease); color: var(--muted); }
.blk-faq-item[open] summary { background: var(--surface-2); }
.blk-faq-item[open] summary .ico { transform: rotate(180deg); }
.blk-faq-a { padding: 0 15px 14px; font-size: .92rem; color: var(--ink-2); }

.blk-figure { margin: 20px 0; }
.blk-figure img, .blk-figure video {
  width: 100%; border-radius: var(--r); border: 1px solid var(--line); background: var(--surface-2); display: block;
}
.blk-figure figcaption { margin-top: 8px; font-size: .8rem; color: var(--muted); text-align: center; }
.blk-embed { position: relative; padding-bottom: 56.25%; height: 0; border-radius: var(--r); overflow: hidden; background: #000; }
.blk-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.blk-video-empty {
  display: flex; gap: 12px; align-items: center; padding: 20px; border-radius: var(--r);
  border: 2px dashed var(--line); color: var(--muted); margin: 18px 0; background: var(--surface-2);
}
.blk-video-empty strong { display: block; color: var(--ink-2); font-size: .92rem; }
.blk-video-empty span { font-size: .82rem; }

.blk-dd { display: grid; gap: 12px; margin: 18px 0; }
.blk-dd-col { border-radius: var(--r); padding: 14px 16px; }
.blk-dd-col.is-do { background: var(--green-bg); }
.blk-dd-col.is-dont { background: var(--red-bg); }
.blk-dd-head { display: flex; align-items: center; gap: 7px; font-weight: 700; font-size: .86rem; margin-bottom: 8px; }
.blk-dd-col.is-do .blk-dd-head { color: #15803D; }
.blk-dd-col.is-dont .blk-dd-head { color: #B91C1C; }
[data-theme="dark"] .blk-dd-col.is-do .blk-dd-head { color: #4ADE80; }
[data-theme="dark"] .blk-dd-col.is-dont .blk-dd-head { color: #FCA5A5; }
.blk-dd-col ul { margin: 0; padding-left: 1.15em; font-size: .9rem; }
.blk-dd-col li { margin-bottom: 5px; }

.blk-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin: 18px 0; }
.blk-fact { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 11px 13px; }
.blk-fact-label { display: block; font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 700; }
.blk-fact-value { display: block; font-weight: 650; margin-top: 2px; font-size: .95rem; }

.blk-contacts { list-style: none; padding: 0; margin: 18px 0; display: grid; gap: 8px; }
.blk-contacts li {
  display: flex; align-items: center; gap: 11px; padding: 12px 14px;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r); font-size: .93rem;
}
.blk-contacts .ico { color: var(--primary); flex: 0 0 auto; }
.blk-contact-label { font-weight: 650; }
.blk-contact-value { margin-left: auto; font-weight: 700; color: var(--primary); }

.blk-training {
  display: flex; align-items: center; gap: 13px; padding: 15px; margin: 20px 0;
  border-radius: var(--r); border: 1.5px solid var(--primary); background: var(--surface);
  color: inherit; text-decoration: none; transition: .2s var(--ease);
}
.blk-training:hover { text-decoration: none; transform: translateY(-2px); box-shadow: var(--sh-2); background: var(--primary-100); }
.blk-training-icon { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; flex: 0 0 46px; }
.blk-training-body { flex: 1; min-width: 0; }
.blk-training-body strong { display: block; font-size: .95rem; }
.blk-training-body span { font-size: .82rem; color: var(--muted); display: block; }
.blk-training-arrow { color: var(--primary); flex: 0 0 auto; }

.blk-download {
  display: flex; align-items: center; gap: 12px; padding: 13px 15px; margin: 16px 0;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r); color: inherit; text-decoration: none;
}
.blk-download:hover { border-color: var(--primary); text-decoration: none; }
.blk-download .ico { color: var(--primary); }
.blk-download strong { display: block; font-size: .92rem; }
.blk-download small { color: var(--muted); }

/* ------------------------------------------------------------------ Spezial */
.hero {
  border-radius: var(--r-xl); padding: 22px; color: #fff; position: relative; overflow: hidden;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-600) 55%, #22D3EE 130%);
  box-shadow: var(--sh-glow);
}
.hero::after {
  content: ''; position: absolute; right: -60px; top: -70px; width: 220px; height: 220px; border-radius: 50%;
  background: rgba(255,255,255,.12);
}
.hero::before {
  content: ''; position: absolute; right: 30px; bottom: -80px; width: 150px; height: 150px; border-radius: 50%;
  background: rgba(255,255,255,.08);
}
.hero > * { position: relative; z-index: 1; }
.hero h1 { color: #fff; margin-bottom: 4px; font-size: 1.45rem; }
.hero p { color: rgba(255,255,255,.9); margin-bottom: 0; font-size: .93rem; }
.hero-row { display: flex; align-items: center; gap: 16px; }

.streak-pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 13px; border-radius: 999px;
  background: rgba(255,255,255,.2); font-size: .82rem; font-weight: 700; backdrop-filter: blur(6px);
}

.badge-tile {
  text-align: center; padding: 15px 10px; border-radius: var(--r); background: var(--surface);
  border: 1px solid var(--line); transition: .22s var(--ease);
}
.badge-tile.is-locked { opacity: .45; filter: grayscale(1); }
.badge-tile:not(.is-locked):hover { transform: translateY(-3px) scale(1.02); box-shadow: var(--sh-2); }
.badge-emoji { font-size: 2rem; display: block; line-height: 1.1; margin-bottom: 5px; }
.badge-tile b { display: block; font-size: .82rem; font-weight: 700; }
.badge-tile small { color: var(--muted); font-size: .72rem; display: block; margin-top: 2px; line-height: 1.35; }

.rank-row { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: var(--r); transition: .16s var(--ease); }
.rank-row:hover { background: var(--surface-2); }
.rank-row.is-me { background: var(--primary-100); border: 1.5px solid var(--primary); }
.rank-no { width: 30px; text-align: center; font-weight: 800; color: var(--muted); flex: 0 0 30px; font-size: .95rem; }
.rank-1 .rank-no, .rank-2 .rank-no, .rank-3 .rank-no { font-size: 1.25rem; }
.rank-score { margin-left: auto; font-weight: 800; color: var(--primary); font-variant-numeric: tabular-nums; }

.quiz-q { animation: fadeUp .4s var(--ease); }
.quiz-opt {
  display: flex; align-items: center; gap: 12px; padding: 15px 16px; border-radius: var(--r);
  border: 2px solid var(--line); background: var(--surface); cursor: pointer; margin-bottom: 10px;
  transition: .16s var(--ease); font-size: .95rem; font-weight: 550;
}
.quiz-opt:hover { border-color: var(--primary); transform: translateX(3px); }
.quiz-opt input { width: 22px; height: 22px; accent-color: var(--primary); flex: 0 0 22px; cursor: pointer; }
.quiz-opt.is-on { border-color: var(--primary); background: var(--primary-100); }
.quiz-opt.is-right { border-color: var(--green); background: var(--green-bg); }
.quiz-opt.is-wrong { border-color: var(--red); background: var(--red-bg); }
.quiz-progress { display: flex; gap: 4px; margin-bottom: 18px; }
.quiz-progress i { flex: 1; height: 5px; border-radius: 3px; background: var(--line); transition: background .3s; }
.quiz-progress i.is-done { background: var(--primary); }

.result-score {
  width: 128px; height: 128px; border-radius: 50%; margin: 0 auto 16px; display: grid; place-items: center;
  font-size: 2.3rem; font-weight: 800; color: #fff; animation: pop .55s var(--ease);
  background: linear-gradient(135deg, var(--primary), var(--primary-600)); box-shadow: var(--sh-glow);
}
.result-score.is-fail { background: linear-gradient(135deg, #F97316, var(--red)); box-shadow: 0 8px 24px rgba(239,68,68,.3); }

/* Monatsraster im Kalender – Termine sind als farbige Streifen mit Titel sichtbar,
   damit ein Tag mit Terminen nicht mehr übersehen werden kann. */
.cal-bar { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.cal-title { font-size: 1.05rem; flex: 1; text-align: center; }
.cal-today-btn { flex: 0 0 auto; }

.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-head { font-size: .68rem; text-align: center; color: var(--muted); font-weight: 700; padding: 5px 0; text-transform: uppercase; }
.cal-head abbr { text-decoration: none; border: 0; }
.cal-day {
  min-height: 96px; border-radius: 12px; padding: 5px; font-size: .78rem; position: relative;
  background: var(--surface-2); border: 1px solid transparent; display: flex; flex-direction: column;
  gap: 3px; overflow: hidden; cursor: default;
}
.cal-day.is-blank { background: transparent; min-height: 0; }
.cal-day.is-weekend { background: color-mix(in srgb, var(--surface-2) 62%, transparent); }
.cal-num { display: flex; align-items: center; justify-content: space-between; gap: 4px;
           font-weight: 700; color: var(--muted); padding: 1px 3px 0; line-height: 1.2; }
.cal-count { display: none; }
.cal-day.is-today { border-color: var(--primary); background: var(--primary-100);
                    box-shadow: inset 0 0 0 1px var(--primary); }
.cal-day.is-today .cal-num { color: var(--primary); }
.cal-day.is-today .cal-num::before {
  content: 'heute'; font-size: .58rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em;
  color: #fff; background: var(--primary); border-radius: 5px; padding: 1px 5px; order: 2;
}

.cal-evs { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cal-ev {
  --evc: var(--primary);
  display: flex; align-items: center; gap: 5px; min-width: 0;
  font-size: .7rem; line-height: 1.25; font-weight: 600; padding: 3px 5px; border-radius: 7px;
  background: color-mix(in srgb, var(--evc) 15%, transparent);
  color: color-mix(in srgb, var(--evc) 78%, var(--text));
  border-left: 3px solid var(--evc);
}
.cal-ev i { display: none; }
.cal-ev-t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.cal-ev-more { background: transparent; border-left-color: transparent; color: var(--muted);
               font-weight: 700; padding-top: 0; padding-bottom: 0; }

.cal-day.has-events { cursor: pointer; }
.cal-day.has-events:hover { background: var(--surface); box-shadow: var(--sh-1); border-color: var(--line); }
.cal-day.has-events:focus-visible { outline: 2px solid var(--primary); outline-offset: 1px; }

.cal-legend { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 14px; padding-top: 12px;
              border-top: 1px solid var(--line); font-size: .76rem; color: var(--muted); }

/* Auf kleinen Bildschirmen bleibt kein Platz für Titel: dann kräftige Farbbalken
   und eine Zahl, wie viele Termine an dem Tag anstehen. */
@media (max-width: 860px) {
  .cal-grid { gap: 3px; }
  .cal-day { min-height: 62px; padding: 4px 3px; border-radius: 10px; }
  .cal-num { justify-content: center; font-size: .8rem; padding: 0; }
  .cal-day.is-today .cal-num::before { display: none; }
  .cal-count {
    display: inline-grid; place-items: center; min-width: 15px; height: 15px; padding: 0 3px;
    border-radius: 8px; background: var(--primary); color: #fff; font-size: .6rem; font-weight: 800;
  }
  .cal-ev { padding: 0; border-left: 0; border-radius: 3px; height: 5px;
            background: var(--evc); }
  .cal-ev-t { display: none; }
  .cal-ev-more { display: none; }
  .cal-evs { gap: 2px; margin-top: auto; }
}

.timeline { position: relative; padding-left: 26px; }
.timeline::before { content: ''; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 2px; background: var(--line); border-radius: 2px; }
.timeline-item { position: relative; padding-bottom: 18px; }
.timeline-item::before {
  content: ''; position: absolute; left: -23px; top: 5px; width: 12px; height: 12px; border-radius: 50%;
  background: var(--surface); border: 3px solid var(--primary);
}
.timeline-item.is-done::before { background: var(--green); border-color: var(--green); }

.editor-block {
  border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); margin-bottom: 12px; overflow: hidden;
}
.editor-block-head {
  display: flex; align-items: center; gap: 10px; padding: 10px 13px; background: var(--surface-2);
  border-bottom: 1px solid var(--line); font-size: .84rem; font-weight: 700;
}
.editor-block-head .grab { cursor: grab; color: var(--muted); }
.editor-block-head .spacer { flex: 1; }
.editor-block-body { padding: 13px; }
.editor-block-body .field:last-child { margin-bottom: 0; }
.editor-add { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 12px; }
.editor-add button {
  padding: 7px 13px; border-radius: 10px; border: 1px dashed var(--line); background: var(--surface);
  font: inherit; font-size: .8rem; font-weight: 650; color: var(--ink-2); cursor: pointer; transition: .16s var(--ease);
}
.editor-add button:hover { border-color: var(--primary); color: var(--primary); border-style: solid; }
.repeat-row { display: flex; gap: 8px; align-items: flex-start; margin-bottom: 8px; flex-wrap: wrap; }
/* Text- und Auswahlfelder teilen sich den Platz gerecht. Ohne eigene Flex-Regel
   würden die Auswahlfelder ihre natürliche (sehr breite) Größe behalten und die
   Textfelder auf wenige Pixel zusammendrücken. */
.repeat-row input[type="text"],
.repeat-row input[type="number"],
.repeat-row textarea { flex: 2 1 170px; min-width: 0; }
.repeat-row select { flex: 1 1 150px; min-width: 0; max-width: 100%; }
.repeat-row input[type="hidden"] { display: none; }
.repeat-del {
  width: 42px; height: 44px; flex: 0 0 42px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--surface-2); color: var(--red); cursor: pointer; display: grid; place-items: center;
}
.repeat-del:hover { background: var(--red-bg); }

.toc { position: sticky; top: 84px; }
.toc a { display: block; padding: 6px 10px; border-radius: 9px; font-size: .85rem; color: var(--muted); text-decoration: none; }
.toc a:hover, .toc a.is-active { background: var(--primary-100); color: var(--primary); text-decoration: none; }

.reading-progress {
  position: fixed; top: 0; left: 0; height: 3px; background: linear-gradient(90deg, var(--primary), var(--accent));
  z-index: 100; transition: width .1s linear; width: 0;
}

.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 300; overflow: hidden; }
.confetti i {
  position: absolute; width: 9px; height: 15px; opacity: .95;
  animation: fall linear forwards;
}

/* ------------------------------------------------------------------ Animation */
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes slideDown { from { opacity: 0; transform: translateY(-14px); } to { opacity: 1; transform: none; } }
@keyframes pop { 0% { transform: scale(.6); opacity: 0; } 60% { transform: scale(1.08); } 100% { transform: scale(1); opacity: 1; } }
@keyframes fall { to { transform: translateY(105vh) rotate(720deg); opacity: 0; } }
@keyframes shimmer { 100% { background-position: 200% 0; } }
@keyframes pulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.06); } }

.anim-in { animation: fadeUp .45s var(--ease) both; }
.anim-in-2 { animation: fadeUp .45s var(--ease) .07s both; }
.anim-in-3 { animation: fadeUp .45s var(--ease) .14s both; }
.anim-in-4 { animation: fadeUp .45s var(--ease) .21s both; }
.pulse { animation: pulse 2.2s ease-in-out infinite; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ------------------------------------------------------------------ Utilities */
.mt-0 { margin-top: 0 !important; } .mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; }
.mb-0 { margin-bottom: 0 !important; } .mb-1 { margin-bottom: 8px; } .mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 24px; }
.muted { color: var(--muted); }
.small { font-size: .82rem; }
.center { text-align: center; }
.right { text-align: right; }
.bold { font-weight: 700; }
.flex { display: flex; align-items: center; gap: 10px; }
.flex-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.flex-wrap { flex-wrap: wrap; }
.gap-sm { gap: 6px; }
.spacer { flex: 1; }
.nowrap { white-space: nowrap; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hide { display: none !important; }
.desktop-only { display: none; }
.clickable { cursor: pointer; }

.back-link { display: inline-flex; align-items: center; gap: 6px; font-size: .86rem; font-weight: 650; color: var(--muted); margin-bottom: 12px; }
.back-link:hover { color: var(--primary); text-decoration: none; }

.page-head { margin-bottom: 18px; }
.page-head h1 { margin-bottom: 4px; }
.page-head p { color: var(--muted); font-size: .92rem; margin-bottom: 0; }

/* ------------------------------------------------------------------ Tablet+ */
@media (min-width: 700px) {
  .grid-2 { grid-template-columns: 1fr 1fr; }
  .stats-row-4 { grid-template-columns: repeat(4, 1fr); }
  .stats-row-5 { grid-template-columns: repeat(5, 1fr); }
  .form-row { grid-template-columns: 1fr 1fr; }
  .blk-dd { grid-template-columns: 1fr 1fr; }
  .check-grid { grid-template-columns: 1fr 1fr; gap: 0 10px; }
  .wrap { padding: 22px 20px 32px; }
  h1 { font-size: 1.9rem; }
  .hero { padding: 28px; }
  .hero h1 { font-size: 1.75rem; }
}

/* ------------------------------------------------------------------ Desktop */
@media (min-width: 1000px) {
  .app { display: grid; grid-template-columns: var(--side-w) 1fr; padding-bottom: 0; }
  .bottomnav { display: none; }
  .desktop-only { display: block; }
  .mobile-only { display: none !important; }

  .sidebar {
    display: flex; flex-direction: column; gap: 3px; position: sticky; top: 0; height: 100vh;
    padding: 18px 12px; background: var(--surface); border-right: 1px solid var(--line); overflow-y: auto;
  }
  .sidebar-brand { display: flex; align-items: center; gap: 11px; padding: 6px 10px 18px; color: var(--ink); font-weight: 800; }
  .sidebar-brand:hover { text-decoration: none; }
  .sidebar a.nav-link {
    display: flex; align-items: center; gap: 12px; padding: 11px 13px; border-radius: 13px;
    color: var(--ink-2); font-size: .92rem; font-weight: 600; text-decoration: none; transition: .16s var(--ease);
  }
  .sidebar a.nav-link:hover { background: var(--surface-2); color: var(--primary); text-decoration: none; transform: translateX(2px); }
  .sidebar a.nav-link.is-active { background: var(--primary); color: #fff; box-shadow: var(--sh-glow); }
  .sidebar a.nav-link .ico { flex: 0 0 auto; }
  .sidebar a.nav-link .count {
    margin-left: auto; background: var(--red); color: #fff; font-size: .68rem; font-weight: 700;
    padding: 1px 7px; border-radius: 99px;
  }
  .sidebar a.nav-link.is-active .count { background: rgba(255,255,255,.25); }
  .sidebar-label {
    font-size: .68rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted-2);
    font-weight: 800; padding: 16px 13px 6px;
  }
  .sidebar-foot { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); }

  .main { min-width: 0; }
  .topbar { padding: 12px 24px; }
  .wrap { padding: 24px; max-width: 1100px; }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .dash-grid { display: grid; grid-template-columns: 1.55fr 1fr; gap: 16px; align-items: start; }
  .topic-layout { display: grid; grid-template-columns: 1fr 220px; gap: 26px; align-items: start; }
  .flashes { left: auto; right: 20px; width: 380px; top: 76px; }
  .table-wrap { margin: 0; padding: 0; }
  table.data { min-width: 0; }
}

@media (min-width: 1300px) {
  .wrap { max-width: 1240px; }
}

/* Druck */
@media print {
  .topbar, .bottomnav, .sidebar, .btn, .flashes, .editor-add { display: none !important; }
  .app { display: block; padding: 0; }
  .card { box-shadow: none; border: 1px solid #ddd; break-inside: avoid; }
  body { background: #fff; }
}

/* ------------------------------------------------------------------ Hausauswahl */
.house-picker { display: grid; gap: 10px; }
.house-btn {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 18px;
  background: var(--surface); color: inherit; cursor: pointer;
  transition: border-color .16s var(--ease), transform .16s var(--ease), box-shadow .16s var(--ease);
  font: inherit;
}
.house-btn:hover, .house-btn:focus-visible {
  border-color: var(--primary); transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(14, 116, 144, .16);
}
.house-mark {
  flex: 0 0 46px; width: 46px; height: 46px; border-radius: 14px; overflow: hidden;
  display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 1.15rem;
}
.house-mark img { width: 100%; height: 100%; object-fit: cover; }
.house-text { flex: 1; min-width: 0; display: block; }
.house-text strong { display: block; font-size: .96rem; }
.house-text small { display: block; color: var(--muted); font-size: .8rem; }
.house-btn .ico-end { flex: 0 0 auto; color: var(--muted); }

/* Karten, die sich auf die volle Breite verteilen (auch bei nur einem Element) */
.grid-wide { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.hotel-card .house-text, .hotel-card strong { overflow-wrap: anywhere; }

/* Aufklappbare Kapitel in der Handbuchverwaltung */
.chapter-details > summary {
  display: flex; align-items: center; gap: 8px; cursor: pointer; list-style: none;
  padding: 8px 10px; margin: 0 -10px; border-radius: 12px;
  font-size: .86rem; font-weight: 600; color: var(--primary);
}
.chapter-details > summary::-webkit-details-marker { display: none; }
.chapter-details > summary:hover { background: var(--surface-2); }
.chapter-details > summary .det-ico { transition: transform .18s var(--ease); }
.chapter-details[open] > summary .det-ico { transform: rotate(90deg); }
.chapter-details[open] > summary { margin-bottom: 4px; }

/* ================================================================ Werkzeugkasten */
.tools-head { margin: 6px 0 22px; }
.tools-head h1 { font-size: 1.7rem; letter-spacing: -.02em; margin-bottom: 4px; }
.tools-head p { color: var(--muted); margin: 0; }

.tool-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); align-items: stretch; }

.tool-card {
  --tool: var(--primary);
  display: flex; flex-direction: column; gap: 12px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 22px;
  padding: 22px 20px 18px; color: inherit; position: relative; overflow: hidden;
  box-shadow: 0 1px 2px rgba(15,23,42,.04); text-decoration: none;
  transition: transform .18s var(--ease), box-shadow .18s var(--ease), border-color .18s var(--ease);
  animation: fadeUp .45s var(--ease) both;
}
.tool-card, .tool-card *,
a.tool-card:hover, a.tool-card:hover *,
a.tool-card:focus-visible, a.tool-card:focus-visible * { text-decoration: none; }
.tool-card::before {
  content: ''; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--tool);
}
a.tool-card:hover, a.tool-card:focus-visible {
  transform: translateY(-3px); border-color: var(--tool);
  box-shadow: 0 16px 36px rgba(15,23,42,.13);
}
.tool-card.is-locked { opacity: .74; }
.tool-card.is-locked .tool-icon { filter: grayscale(.5); }

.tool-icon {
  width: 58px; height: 58px; border-radius: 18px; display: grid; place-items: center;
  background: color-mix(in srgb, var(--tool) 13%, transparent); color: var(--tool); flex: 0 0 auto;
}
.tool-body { display: block; flex: 1; }
.tool-name  { display: block; font-size: 1.12rem; font-weight: 700; letter-spacing: -.01em; }
.tool-claim { display: block; font-size: .82rem; font-weight: 600; color: var(--tool); margin-top: 2px; }
.tool-text  { display: block; font-size: .88rem; color: var(--muted); margin-top: 8px; line-height: 1.55; }

.tool-points { display: flex; flex-direction: column; gap: 4px; margin-top: 12px; }
.tool-point  { display: flex; align-items: center; gap: 6px; font-size: .8rem; color: var(--muted); }
.tool-point .ico { color: var(--tool); flex: 0 0 auto; }

.tool-foot {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  border-top: 1px solid var(--line); padding-top: 12px; margin-top: auto;
}
.tool-badge { font-size: .8rem; color: var(--muted); flex: 1; min-width: 0; }
.tool-go { margin-left: auto; display: inline-flex; align-items: center; gap: 5px;
           font-size: .85rem; font-weight: 700; color: var(--tool); }
a.tool-card:hover .tool-go .ico { transform: translateX(3px); }
.tool-go .ico { transition: transform .18s var(--ease); }
.tool-request { margin-top: -8px; }

.nav-tools { font-weight: 700; }
.nav-tools .ico { color: var(--accent); }

@media (max-width: 720px) {
  .tool-grid { grid-template-columns: 1fr; gap: 12px; }
  .tool-card { padding: 18px 16px 14px; border-radius: 18px; }
  .tools-head h1 { font-size: 1.35rem; }
}

/* ================================================================ Social Media */
.social-filter { padding: 14px 16px; }
.filter-details > summary {
  display: flex; align-items: center; gap: 8px; cursor: pointer; list-style: none;
  font-size: .84rem; font-weight: 600; color: var(--primary); padding: 6px 0;
}
.filter-details > summary::-webkit-details-marker { display: none; }
.filter-details > summary .det-ico { transition: transform .18s var(--ease); }
.filter-details[open] > summary .det-ico { transform: rotate(90deg); }

.account-filter { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; }
.account-group { width: 100%; font-size: .72rem; font-weight: 700; color: var(--muted);
                 text-transform: uppercase; letter-spacing: .04em; margin-top: 6px; }
.account-chip {
  --acc: var(--primary);
  display: inline-flex; align-items: center; gap: 7px; cursor: pointer;
  padding: 6px 12px 6px 9px; border: 1.5px solid var(--line); border-radius: 999px;
  background: var(--surface); font-size: .82rem; transition: .16s var(--ease);
}
.account-chip input { position: absolute; opacity: 0; pointer-events: none; }
.account-chip:hover { border-color: var(--acc); }
.account-chip.is-on { border-color: var(--acc); background: color-mix(in srgb, var(--acc) 10%, transparent); }
.account-chip span { display: flex; flex-direction: column; line-height: 1.15; }
.account-chip small { font-size: .68rem; color: var(--muted); }
.acc-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--acc); flex: 0 0 auto; display: inline-block; }

/* ---------------------------------------------------------------- Kalender */
.soc-cal-head { display: flex; align-items: center; gap: 10px; margin: 22px 0 10px; flex-wrap: wrap; }
.soc-cal-title { font-size: 1.15rem; min-width: 165px; text-align: center; }

.soc-cal-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.soc-cal-grid {
  display: grid; grid-template-columns: repeat(7, minmax(140px, 1fr)); gap: 1px;
  background: var(--line); border: 1px solid var(--line); border-radius: 16px; overflow: hidden;
  min-width: 980px;
}
.soc-cal-dow {
  background: var(--surface-2); padding: 8px 10px; font-size: .74rem; font-weight: 700;
  color: var(--muted); text-transform: uppercase; letter-spacing: .05em;
}
.soc-cal-day { background: var(--surface); min-height: 122px; padding: 6px 7px 8px; display: flex; flex-direction: column; gap: 3px; }
.soc-cal-day.is-out { background: var(--surface-2); opacity: .62; }
.soc-cal-day.is-weekend:not(.is-out) { background: color-mix(in srgb, var(--surface-2) 55%, var(--surface)); }
.soc-cal-day.is-today { box-shadow: inset 0 0 0 2px var(--primary); }
.soc-cal-daynum { display: flex; align-items: center; justify-content: space-between;
              font-size: .8rem; font-weight: 700; color: var(--ink-2); margin-bottom: 2px; }
.soc-cal-day.is-today .soc-cal-daynum span:first-child {
  background: var(--primary); color: #fff; border-radius: 50%;
  width: 22px; height: 22px; display: grid; place-items: center; font-size: .74rem;
}
.soc-cal-add { opacity: 0; color: var(--muted); display: grid; place-items: center;
           width: 20px; height: 20px; border-radius: 6px; transition: .14s var(--ease); }
.soc-cal-day:hover .soc-cal-add { opacity: 1; }
.soc-cal-add:hover { background: var(--primary); color: #fff; }

.soc-cal-occ {
  --occ: #94A3B8;
  font-size: .68rem; font-weight: 600; color: var(--occ);
  background: color-mix(in srgb, var(--occ) 12%, transparent);
  border-radius: 5px; padding: 2px 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.soc-cal-post {
  --pc: var(--primary);
  display: block; border-radius: 8px; padding: 5px 7px; font-size: .74rem; color: inherit;
  background: var(--surface-2); border-left: 3px solid var(--pc);
  transition: .14s var(--ease); text-decoration: none;
}
.soc-cal-post:hover { background: color-mix(in srgb, var(--pc) 12%, transparent); text-decoration: none; transform: translateX(1px); }
.soc-cal-post.is-veroeffentlicht { opacity: .72; }
.soc-cal-post.is-verworfen { opacity: .5; text-decoration: line-through; }
.soc-cal-post-time  { font-weight: 700; color: var(--pc); font-size: .7rem; margin-right: 4px; }
.soc-cal-post-title { font-weight: 600; display: inline; }
.soc-cal-post-meta  { display: flex; align-items: center; gap: 4px; margin-top: 3px; color: var(--muted); }
.soc-cal-post-meta .acc-dot { width: 7px; height: 7px; }
.soc-cal-tasks { font-size: .66rem; font-weight: 700; }

.soc-cal-legend { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 12px; font-size: .76rem; color: var(--muted); }
.legend-item { display: inline-flex; align-items: center; gap: 6px; }
.legend-item i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }

@media (max-width: 900px) {
  .soc-cal-grid { min-width: 760px; grid-template-columns: repeat(7, minmax(108px, 1fr)); }
  .soc-cal-day { min-height: 104px; }
  .soc-cal-post { font-size: .7rem; padding: 4px 5px; }
}

/* ---------------------------------------------------------------- Social: Beitrag */
.prewrap { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.6; }
.caption-box {
  background: var(--surface-2); border-radius: 12px; padding: 14px 16px;
  font-size: .92rem; border-left: 3px solid var(--primary);
}
.hashtag-box {
  margin-top: 10px; font-size: .84rem; color: var(--primary); font-weight: 600;
  background: color-mix(in srgb, var(--primary) 8%, transparent);
  border-radius: 10px; padding: 9px 12px; overflow-wrap: anywhere;
}

.status-bar { padding: 16px; }
.status-flow { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.flow-step {
  --fc: var(--muted);
  display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; font-weight: 600;
  color: var(--muted); padding: 4px 10px 4px 8px; border-radius: 999px; background: var(--surface-2);
}
.flow-step i { width: 8px; height: 8px; border-radius: 50%; background: currentColor; opacity: .45; }
.flow-step.is-done { color: var(--fc); }
.flow-step.is-done i { background: var(--fc); opacity: 1; }
.flow-step.is-now { background: color-mix(in srgb, var(--fc) 14%, transparent); box-shadow: inset 0 0 0 1.5px var(--fc); }
.status-form { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.status-note {
  min-width: 190px; padding: 7px 11px; border: 1px solid var(--line); border-radius: 10px;
  font: inherit; font-size: .84rem; background: var(--surface);
}

.media-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
.media-item { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--surface-2); }
.media-item img, .media-item video { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; }
.media-foot { display: flex; align-items: center; gap: 6px; padding: 5px 8px; }
.media-foot .small { flex: 1; min-width: 0; }

.task-row { gap: 10px; }
.task-row.is-done .list-item-title { text-decoration: line-through; color: var(--muted); }
.task-check {
  width: 22px; height: 22px; flex: 0 0 auto; border-radius: 7px; cursor: pointer;
  border: 1.8px solid var(--line); background: var(--surface); display: grid; place-items: center;
  color: #fff; padding: 0; transition: .15s var(--ease);
}
.task-check:hover { border-color: var(--primary); }
.task-row.is-done .task-check { background: var(--green); border-color: var(--green); }

.comment-list { display: flex; flex-direction: column; gap: 14px; }
.comment { display: flex; gap: 10px; align-items: flex-start; }
.comment-body { flex: 1; min-width: 0; background: var(--surface-2); border-radius: 12px; padding: 9px 13px; font-size: .89rem; }
.comment-head { display: flex; gap: 8px; align-items: baseline; margin-bottom: 3px; }

.hist-line { display: flex; flex-direction: column; gap: 2px; position: relative; padding-left: 4px; }
.hist-item { display: flex; gap: 11px; align-items: flex-start; padding: 7px 0; position: relative; }
.hist-item i { width: 10px; height: 10px; border-radius: 50%; flex: 0 0 auto; margin-top: 5px; }
.hist-item:not(:last-child)::before {
  content: ''; position: absolute; left: 4.5px; top: 19px; bottom: -7px; width: 1.5px; background: var(--line);
}
.hist-item strong { font-size: .86rem; }
.hist-note { color: var(--ink-2); font-style: italic; margin-top: 2px; }

/* ---------------------------------------------------------------- Social: Editor */
.counter-row { display: flex; align-items: center; gap: 10px; margin-top: 5px; }
.counter { font-size: .78rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.counter.is-near { color: #B45309; font-weight: 600; }
.counter.is-over { color: var(--red); font-weight: 700; }

.snip-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 8px; }
.snip-label { font-size: .76rem; font-weight: 600; color: var(--muted); display: inline-flex; align-items: center; gap: 5px; }
.snip-btn {
  font: inherit; font-size: .76rem; font-weight: 600; cursor: pointer;
  padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); color: var(--primary); transition: .14s var(--ease);
}
.snip-btn:hover { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 9%, transparent); }

.tpl-strip { display: flex; gap: 9px; flex-wrap: wrap; }
.tpl-chip {
  --tpl: var(--primary);
  display: inline-flex; align-items: center; gap: 9px; padding: 9px 14px 9px 10px;
  border: 1.5px solid var(--line); border-radius: 14px; background: var(--surface);
  color: inherit; text-decoration: none; transition: .16s var(--ease);
}
.tpl-chip:hover, .tpl-chip.is-on { border-color: var(--tpl); text-decoration: none; transform: translateY(-1px); }
.tpl-chip.is-on { background: color-mix(in srgb, var(--tpl) 9%, transparent); }
.tpl-icon { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
            background: color-mix(in srgb, var(--tpl) 13%, transparent); color: var(--tpl); flex: 0 0 auto; }
.tpl-chip span:last-child { display: flex; flex-direction: column; line-height: 1.25; }
.tpl-chip small { font-size: .72rem; color: var(--muted); }

/* ---------------------------------------------------------------- Social: Ideen */
.idea-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(255px, 1fr)); }
.idea-card { display: flex; flex-direction: column; gap: 8px; }
.idea-title { font-size: .98rem; }
.idea-text { margin: 0; }
.idea-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px;
             margin-top: auto; padding-top: 10px; border-top: 1px solid var(--line); }

.occ-strip { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; }
.occ-card {
  --occ: var(--accent);
  flex: 0 0 235px; border: 1px solid var(--line); border-left: 3px solid var(--occ);
  border-radius: 12px; padding: 11px 13px; display: flex; flex-direction: column; gap: 7px;
}
.occ-date { display: flex; align-items: baseline; gap: 8px; }
.occ-date strong { color: var(--occ); font-size: .92rem; }
.occ-date span { font-size: .74rem; color: var(--muted); }
.occ-body p { margin: 5px 0 0; }

/* ---------------------------------------------------------------- Social: Woche */
.week-list { display: flex; flex-direction: column; gap: 10px; }
.week-day { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.week-day.is-today { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); }
.week-daybar { display: flex; align-items: center; gap: 10px; padding: 10px 14px;
               background: var(--surface-2); flex-wrap: wrap; }
.week-daybar strong { display: block; font-size: .92rem; }
.week-empty { padding: 12px 14px; margin: 0; }

.post-row .post-meta { font-size: .74rem; opacity: .85; }
.acc-inline { display: inline-flex; align-items: center; gap: 4px; }

@media (max-width: 720px) {
  .status-note { min-width: 100%; }
  .occ-card { flex-basis: 210px; }
}

/* ---------------------------------------------------------------- Social: weitere */
.icon-pick { display: flex; flex-wrap: wrap; gap: 7px; }
.icon-opt input { position: absolute; opacity: 0; pointer-events: none; }
.icon-opt span {
  width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; cursor: pointer;
  border: 1.5px solid var(--line); background: var(--surface); color: var(--muted); transition: .15s var(--ease);
}
.icon-opt input:checked + span { border-color: var(--primary); color: var(--primary);
  background: color-mix(in srgb, var(--primary) 10%, transparent); }

.snip-card .snip-body {
  background: var(--surface-2); border-radius: 10px; padding: 9px 12px;
  font-size: .84rem; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 170px; overflow-y: auto;
}
.snip-card .snip-body.is-tags { color: var(--primary); font-weight: 600; }

.year-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.year-month { padding: 14px 16px; }
.year-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px;
             padding-bottom: 8px; margin-bottom: 8px; border-bottom: 1px solid var(--line); }
.year-list { display: flex; flex-direction: column; gap: 7px; }
.year-item { --occ: var(--accent); display: flex; gap: 9px; align-items: flex-start; }
.year-date { font-size: .8rem; font-weight: 700; color: var(--occ); min-width: 26px; flex: 0 0 auto; }
.year-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.year-body strong { font-size: .85rem; font-weight: 600; }
.year-body small { font-size: .74rem; color: var(--muted); }
.year-add { opacity: 0; color: var(--muted); flex: 0 0 auto; width: 22px; height: 22px;
            border-radius: 6px; display: grid; place-items: center; transition: .14s var(--ease); }
.year-item:hover .year-add { opacity: 1; }
.year-add:hover { background: var(--primary); color: #fff; }

.bar-chart { display: flex; align-items: flex-end; gap: 8px; height: 190px; padding-top: 10px; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end;
           gap: 4px; height: 100%; min-width: 28px; }
.bar-stack { width: 100%; max-width: 46px; background: var(--primary); border-radius: 7px 7px 0 0;
             display: flex; flex-direction: column; justify-content: flex-end; overflow: hidden; min-height: 4px; }
.bar-part.is-done { width: 100%; background: var(--green); }
.bar-value { font-size: .74rem; font-weight: 700; }
.bar-label { font-size: .68rem; color: var(--muted); }

.stat.is-warn { border-color: var(--amber); }
.soc-cal-occ.is-range { opacity: .8; font-weight: 500; }

/* Monatsliste als Kalenderersatz auf dem Handy */
.cal-agenda { display: flex; flex-direction: column; gap: 10px; }
.agenda-day { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.agenda-day.is-today { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); }
.agenda-head { display: flex; align-items: center; gap: 11px; padding: 9px 12px; background: var(--surface-2); }
.agenda-date { display: flex; flex-direction: column; align-items: center; line-height: 1.05; flex: 0 0 34px; }
.agenda-date strong { font-size: 1.15rem; }
.agenda-date small { font-size: .68rem; color: var(--muted); text-transform: uppercase; }
.agenda-title { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; gap: 5px; }

/* Sichtbarkeits-Helfer haben Vorrang vor eigenen display-Regeln */
.soc-cal-legend.desktop-only, .soc-cal-wrap.desktop-only, .cal-agenda.mobile-only { display: none; }
@media (min-width: 1000px) {
  .soc-cal-legend.desktop-only { display: flex; }
  .soc-cal-wrap.desktop-only { display: block; }
}
@media (max-width: 999px) {
  .cal-agenda.mobile-only { display: flex; }
  .stats-row-5 > :last-child { grid-column: 1 / -1; }
}
.admin-tile { display: block; padding: 16px; }
.admin-tile:hover { border-color: var(--primary); transform: translateY(-2px); box-shadow: var(--sh-2); }
.tool-admin.is-off { opacity: .6; }

/* Favoriten-Stern auf den Werkzeugkacheln */
.tool-wrap { position: relative; display: flex; flex-direction: column; gap: 8px; }
.tool-wrap .tool-card { flex: 1; }
.fav-form { position: absolute; top: 14px; right: 12px; }
.fav-btn {
  width: 30px; height: 30px; border-radius: 9px; border: 0; cursor: pointer;
  background: transparent; color: var(--line); font-size: 1.15rem; line-height: 1;
  transition: .15s var(--ease); padding: 0;
}
.fav-btn:hover:not(:disabled) { color: var(--accent); background: var(--surface-2); transform: scale(1.1); }
.fav-btn.is-on { color: var(--accent); }
.fav-btn:disabled { opacity: .35; cursor: not-allowed; }
.fav-hint { display: flex; align-items: center; gap: 6px; margin: -12px 0 16px; }
.tool-ext { color: var(--muted); vertical-align: -2px; margin-left: 3px; }

/* Werkzeugsuche */
.tool-search { padding: 14px 16px; margin-bottom: 16px; }
.pill-count {
  display: inline-block; margin-left: 5px; padding: 0 6px; border-radius: 999px;
  background: var(--surface-2); font-size: .72rem; font-weight: 700; color: var(--muted);
}
.pill-nav a.is-active .pill-count { background: rgba(255,255,255,.25); color: inherit; }
.tool-wrap[hidden] { display: none !important; }

/* Dashboard: Neuigkeiten und Termine */
.news-card { display: flex; gap: 13px; align-items: flex-start; padding: 14px; margin-bottom: 10px;
             color: inherit; text-decoration: none; }
.news-card:hover { border-color: var(--primary); transform: translateY(-2px); box-shadow: var(--sh-2); text-decoration: none; }
.news-img { flex: 0 0 76px; width: 76px; height: 76px; border-radius: 13px; overflow: hidden;
            background: var(--surface-2); display: grid; place-items: center; color: var(--muted); }
.news-img img { width: 100%; height: 100%; object-fit: cover; }
.news-body { flex: 1; min-width: 0; display: block; }
.news-title { display: block; font-weight: 650; font-size: .96rem; }
.news-teaser { display: block; font-size: .85rem; color: var(--muted); margin-top: 3px; line-height: 1.5; }
.news-meta { display: block; font-size: .76rem; color: var(--muted-2); margin-top: 5px; }

/* Haus-Bubbles: in welchem Haus wurde das veröffentlicht? */
.house-bubbles { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px; }
.house-bubble {
  --hc: var(--primary);
  display: inline-flex; align-items: center; gap: 5px; max-width: 100%;
  padding: 2px 9px 2px 2px; border-radius: 999px; font-size: .7rem; font-weight: 700; line-height: 1.5;
  background: color-mix(in srgb, var(--hc) 12%, transparent);
  color: color-mix(in srgb, var(--hc) 80%, var(--text));
  border: 1px solid color-mix(in srgb, var(--hc) 26%, transparent);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.house-bubble i {
  flex: 0 0 auto; display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%;
  background: var(--hc); color: #fff; font-size: .58rem; font-weight: 800; font-style: normal; letter-spacing: .02em;
}
.house-bubble.is-all { padding: 2px 9px; background: var(--surface-2); color: var(--muted);
                       border-color: var(--line); }
.house-bubble.is-all .ico { color: var(--muted-2); }

.ev-row { gap: 12px; }
.ev-date { --evc: var(--primary); flex: 0 0 44px; display: flex; flex-direction: column; align-items: center;
           justify-content: center; padding: 5px 0; border-radius: 11px; line-height: 1.05;
           background: color-mix(in srgb, var(--evc) 12%, transparent); color: var(--evc); }
.ev-date strong { font-size: 1.1rem; }
.ev-date small { font-size: .64rem; text-transform: uppercase; letter-spacing: .03em; }
.ev-row.is-today { background: color-mix(in srgb, var(--primary) 7%, transparent); border-radius: var(--r); }

/* ---------------------------------------------------------------- Haus wechseln */
.house-switch { margin: 2px 0 8px; }
.house-switch > summary {
  display: flex; align-items: center; gap: 8px; cursor: pointer; list-style: none;
  padding: 8px 11px; border-radius: 11px; border: 1px solid var(--line);
  background: var(--surface-2); font-size: .84rem; font-weight: 600; color: var(--ink-2);
  transition: .15s var(--ease);
}
.house-switch > summary::-webkit-details-marker { display: none; }
.house-switch > summary:hover { border-color: var(--primary); color: var(--primary); }
.house-switch > summary .truncate { flex: 1; min-width: 0; }
.hs-caret { flex: 0 0 auto; color: var(--muted); transition: transform .18s var(--ease); }
.house-switch[open] > summary .hs-caret { transform: rotate(180deg); }
.house-menu { display: flex; flex-direction: column; gap: 2px; margin-top: 5px; padding: 4px;
              border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.house-opt {
  display: flex; align-items: center; gap: 9px; width: 100%; text-align: left; cursor: pointer;
  padding: 8px 10px; border: 0; border-radius: 9px; background: transparent; color: inherit;
  font: inherit; font-size: .84rem; transition: .14s var(--ease);
}
.house-opt:hover { background: var(--surface-2); }
.house-opt.is-on { background: var(--primary-100); color: var(--primary); font-weight: 650; }
.house-opt span { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.house-opt small { font-size: .72rem; color: var(--muted); }
.house-dot { width: 10px; height: 10px; border-radius: 50%; flex: 0 0 10px; }
