/* ---------- Public Topbar (Leitstand 2.0) ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 80;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-soft);
}
.topbar-inner {
  min-height: var(--topbar-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 0;
}
.brand {
  color: var(--text-strong);
  font-size: 1.08rem;
  font-weight: 750;
  letter-spacing: -.01em;
  display: inline-flex;
  align-items: center;
  gap: 13px;
  flex: 0 0 auto;
}
.brand-emblem {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  flex: 0 0 38px;
  box-shadow: 0 6px 18px color-mix(in srgb, var(--primary-dark) 35%, transparent);
}
/* Flammen-Silhouette als CSS-Mask (kein Bild-Asset nötig). */
.brand-emblem::before {
  content: "";
  width: 20px;
  height: 20px;
  background: #fff;
  -webkit-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 2c1 4-3 5.5-3 9a3 3 0 0 0 6 0c0-1-.5-2-1-2.7 3 .7 5 3.2 5 6.2A7 7 0 0 1 5 14.5C5 8.5 10.5 7 12 2z"/></svg>') center / contain no-repeat;
  mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 2c1 4-3 5.5-3 9a3 3 0 0 0 6 0c0-1-.5-2-1-2.7 3 .7 5 3.2 5 6.2A7 7 0 0 1 5 14.5C5 8.5 10.5 7 12 2z"/></svg>') center / contain no-repeat;
}
.brand-logo {
  display: block;
  height: 40px;
  width: auto;
  max-width: 180px;
  flex: 0 0 auto;
  object-fit: contain;
}

/* Single-row site header (Leitstand) */
.site-header-inner {
  min-height: 66px;
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 8px 0;
}
.top-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; flex: 0 0 auto; }
.btn-login { display: inline-flex; align-items: center; gap: 8px; }

/* Mobile-Menü-Schalter (Hamburger) – nur auf kleinen Viewports sichtbar */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 40px;
  padding: 9px 8px;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: var(--radius);
  cursor: pointer;
}
.nav-toggle:hover { background: rgba(255, 255, 255, .12); }
.nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: #f3f6fa;
  border-radius: 2px;
  transition: transform .2s ease, opacity .2s ease;
}
.topbar.nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.topbar.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
.topbar.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Admin dropdown menu in public topbar */
.admin-menu { position: relative; }
.admin-menu-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  min-width: 220px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 6px;
  display: none;
  box-shadow: var(--shadow-md);
  z-index: 90;
}
.admin-menu:hover .admin-menu-panel,
.admin-menu:focus-within .admin-menu-panel { display: grid; gap: 2px; }
.admin-menu-panel a {
  padding: 8px 10px;
  color: var(--text);
  border-radius: var(--radius);
  font-size: 13px;
}
.admin-menu-panel a:hover { background: var(--surface-3); color: var(--text-strong); }

/* ---------- Main Navigation (Pills, Rot-Wash-Auswahl) ---------- */
.mega-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: nowrap;
  overflow: visible;
  margin: 0 auto;
}
.mega-item { position: relative; display: flex; align-items: center; }
.mega-link {
  display: inline-flex;
  align-items: center;
  padding: 9px 16px;
  color: var(--text-soft);
  font-size: 14px;
  font-weight: 550;
  letter-spacing: .01em;
  white-space: nowrap;
  border-radius: var(--radius-pill);
  transition: color .15s, background .15s, box-shadow .15s;
  cursor: pointer;
}
.mega-link:hover,
.mega-item:hover > .mega-link { color: var(--text-strong); background: var(--surface-2); }
.mega-link.active {
  color: var(--primary-soft);
  background: var(--primary-wash);
  box-shadow: inset 0 0 0 1px var(--primary-ring);
  font-weight: 650;
}

/* Simple single-column dropdowns */
.mega-panel {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: calc(100% + 8px);
  min-width: 230px;
  max-width: 320px;
  background: var(--card-grad);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  display: none;
  grid-template-columns: 1fr;
  gap: 2px;
  padding: 8px;
  box-shadow: var(--shadow-lg);
  z-index: 70;
}
.mega-item:hover > .mega-panel,
.mega-item:focus-within > .mega-panel { display: grid; }
/* Transparente Hover-Bruecke ueberbrueckt die 8px-Luecke zwischen Link und Panel,
   damit das Dropdown beim direkten Runterfahren der Maus geoeffnet bleibt. */
.mega-panel::before {
  content: "";
  position: absolute;
  top: -8px;
  left: 0;
  right: 0;
  height: 8px;
}
.mega-column { border-right: 0; padding: 0; }
.mega-head {
  display: block;
  padding: 10px 14px;
  color: var(--text);
  font-size: 14px;
  font-weight: 550;
  border-radius: var(--radius);
}
.mega-head:hover { background: var(--primary-wash); color: var(--primary-soft); }
.mega-head.active {
  background: var(--primary-wash);
  color: var(--primary-soft);
  font-weight: 650;
  box-shadow: inset 3px 0 0 var(--primary);
}

/* ---------- Hero (Home) ---------- */
.public-home .hero {
  padding: 72px 0 80px;
  border-bottom: 1px solid var(--line-soft);
  background:
    radial-gradient(ellipse at 78% 0%, var(--primary-wash) 0%, transparent 55%),
    linear-gradient(178deg, var(--surface-2) 0%, var(--surface) 100%);
  position: relative;
}
.public-home .hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 3px;
  background: var(--primary);
}
.hero-title {
  margin: 14px 0 12px;
  color: var(--text-strong);
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.08;
  max-width: 920px;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.hero-copy { color: var(--text-soft); max-width: 720px; font-size: 1.05rem; line-height: 1.6; }
.hero-badge {
  display: inline-flex;
  padding: 5px 12px;
  color: var(--text-strong);
  border: 1px solid rgba(255, 255, 255, .25);
  background: rgba(255, 255, 255, .08);
  border-radius: 999px;
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-weight: 700;
}
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 24px; }
.hero-highlights {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 40px;
  margin: 36px 0 0;
  padding: 24px 0 0;
  border-top: 1px solid rgba(255, 255, 255, .1);
  max-width: 760px;
}
.hero-highlights li { display: flex; flex-direction: column; gap: 3px; }
.hero-highlights strong {
  color: var(--text-strong);
  font-size: 1.6rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.01em;
}
.hero-highlights li:nth-child(1) strong,
.hero-highlights li:nth-child(2) strong { color: var(--primary-soft, #ff5a6e); }
.hero-highlights span { color: var(--text-soft); font-size: .9rem; }

/* ---------- Home grid ---------- */
.home-main-section { padding-top: 32px; padding-bottom: 24px; }
.home-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 28px;
  align-items: start;
}
.home-main-content, .home-sidebar { display: grid; gap: 16px; min-width: 0; }
.home-section-head h2 {
  margin: 0 0 6px;
  color: var(--text-strong);
  font-size: clamp(1.4rem, 2vw, 1.8rem);
  position: relative;
  padding-left: 12px;
}
.home-section-head h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: .15em;
  width: 4px;
  height: .85em;
  background: var(--primary);
  border-radius: 2px;
}
.home-section-head p { margin: 0 0 16px; color: var(--text-soft); }

/* ---------- Post cards ---------- */
.post-grid { display: grid; gap: 14px; }
.home-post-grid { grid-template-columns: 1fr; }
.post-card { padding: 22px; transition: border-color .18s, background .18s, transform .18s, box-shadow .18s; }
.post-card:hover { border-color: var(--surface-soft); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.post-card-featured {
  border-left: 4px solid var(--primary);
  background: linear-gradient(180deg, var(--surface-2) 0%, var(--surface) 100%);
}
.post-card h3 {
  margin: 10px 0 8px;
  color: var(--text-strong);
  font-size: clamp(1.2rem, 1.6vw, 1.55rem);
  line-height: 1.25;
}
.post-card p { color: var(--text-soft); margin: 0 0 12px; line-height: 1.55; }
.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
  align-items: center;
}
.post-meta .location { color: var(--text-soft); }
.post-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--primary-soft);
  text-transform: uppercase;
  letter-spacing: .06em;
  font-size: 11px;
  font-weight: 700;
}
.post-link::after { content: "→"; transition: transform .15s; }
.post-link:hover { color: var(--accent); }
.post-link:hover::after { transform: translateX(3px); }
.text-link {
  color: var(--primary-soft);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .06em;
  font-weight: 700;
}
.text-link:hover { color: var(--accent); }
.empty-card {
  padding: 24px;
  text-align: center;
  border-style: dashed;
  border-color: var(--surface-soft);
}
.empty-card h3 { color: var(--text-strong); margin-top: 0; }

/* ---------- Sidebar widgets ---------- */
.sidebar-stack { display: grid; gap: 14px; }
.appointments-list { gap: 10px; }
.appointment-item {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 12px;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px solid var(--line-soft);
}
.appointment-item:last-child { border-bottom: 0; }
.appointment-date {
  border: 1px solid var(--line);
  background: var(--surface-3);
  text-align: center;
  padding: 6px 4px;
  border-radius: var(--radius);
}
.appointment-date strong {
  display: block;
  color: var(--text-strong);
  font-size: 1.25rem;
  line-height: 1;
  font-weight: 800;
}
.appointment-date span {
  display: block;
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-top: 2px;
}
.appointment-content p { margin: 0; color: var(--text); font-weight: 600; font-size: 14px; }
.appointment-content small { color: var(--muted); font-size: 12px; }
.support-card { background: linear-gradient(160deg, var(--primary-dark) 0%, var(--primary) 100%); border-color: var(--primary-dark); color: #fff; }
.support-card h3 { color: #fff; }
.support-card p { color: rgba(255, 255, 255, .9); margin: 0 0 14px; }
.support-card .btn { background: #fff; color: var(--primary-dark); border-color: #fff; }
.support-card .btn:hover { background: rgba(255, 255, 255, .92); }

/* ---------- Donation band ---------- */
.donation-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 28px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius-lg);
  flex-wrap: wrap;
}
.donation-band h2 { margin: 0 0 4px; font-size: 1.25rem; }
.donation-band p { margin: 0; color: var(--text-soft); }

/* ---------- Page Hero (subpages/posts) ---------- */
.page-hero-banner {
  padding: 40px 0 30px;
  border-bottom: 1px solid var(--line-soft);
  background: transparent;
  position: relative;
}
.page-hero-kicker {
  color: var(--primary-soft);
  text-transform: uppercase;
  letter-spacing: .1em;
  font-size: 12px;
  font-weight: 700;
}
.page-hero-inner h1 {
  margin: 8px 0 0;
  color: var(--text-strong);
  font-size: clamp(1.7rem, 3vw, 2.5rem);
  letter-spacing: -.01em;
}


/* =========================================================================
   Startseite „Leitstand 2.0" — modulares Widget-Deck (.ffh-*)
   Markup: Views/public/home.php + Views/public/widgets/*.php
   ========================================================================= */

/* Topbar-Status (alle öffentlichen Seiten) */
.top-status { display: flex; align-items: center; gap: 14px; flex: 0 0 auto; }
.top-clock { font-size: 12.5px; color: var(--muted); letter-spacing: .06em; }

/* ---------- Deck (12-Spalten-Raster) ---------- */
.ffh-deck {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 18px;
  padding: 18px 0 26px;
}
.ffh-tile {
  grid-column: span 12;
  background: var(--card-grad);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  min-width: 0;
  position: relative;
  overflow: hidden;
  box-shadow: var(--panel-shadow);
}
@media (min-width: 1024px) {
  .ffh-tile { grid-column: span var(--ffh-span, 4); }
}
.ffh-tile .tile-label { margin-bottom: 14px; flex: 0 0 auto; }

/* Alarm-Zustand: laufender Einsatz hebt die Einsätze-Kachel hervor */
.ffh-tile--alarm { border-color: var(--primary-ring); }
.ffh-tile--alarm::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 1.5px solid var(--primary-ring);
  pointer-events: none;
  animation: ffh-alarm-pulse 1.8s ease-in-out infinite;
}
@keyframes ffh-alarm-pulse { 50% { opacity: .25; } }

/* ---------- Hero ---------- */
.ffh-tile--hero { justify-content: center; padding: 30px 38px; }
.ffh-hero-corner {
  position: absolute;
  top: 0; right: 0;
  width: 320px; height: 100%;
  background: radial-gradient(420px 320px at 100% 0%, var(--primary-wash) 0%, transparent 65%);
  pointer-events: none;
}
.ffh-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--primary-soft);
  font-size: 13px;
  font-weight: 650;
  letter-spacing: .03em;
  margin-bottom: 16px;
}
.ffh-kicker::before { content: ""; width: 26px; height: 2px; background: var(--primary); border-radius: 2px; }
.ffh-h1 {
  font-size: clamp(2rem, 3.6vw, 3.5rem);
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -.03em;
  color: var(--text-strong);
  max-width: 680px;
  margin: 0;
}
.ffh-sub {
  margin: 14px 0 0;
  max-width: 540px;
  color: var(--muted);
  font-size: clamp(.95rem, 1.1vw, 1.05rem);
  line-height: 1.62;
}
.ffh-hero-cta { display: flex; gap: 14px; margin-top: 26px; align-items: center; flex-wrap: wrap; }
.ffh-notruf {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  font-weight: 750;
  font-size: 16.5px;
  padding: 14px 28px;
  border-radius: var(--radius-pill);
  box-shadow: 0 14px 36px color-mix(in srgb, var(--primary-dark) 35%, transparent);
}
.ffh-notruf:hover { filter: brightness(1.1); }

/* ---------- Lage ---------- */
.ffh-lage-weather {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line-soft);
  flex: 0 0 auto;
}
.ffh-lage-icon { flex: 0 0 auto; display: grid; place-items: center; }
.ffh-wicon { width: 44px; height: 44px; }
.ffh-wicon-sm { width: 17px; height: 17px; vertical-align: -3px; display: inline-block; }
.ffh-lage-temp { font-size: 40px; font-weight: 600; color: var(--text-strong); letter-spacing: -.03em; line-height: 1; }
.ffh-lage-desc { font-size: 13px; color: var(--muted); line-height: 1.55; }
.ffh-lage-desc b { color: var(--text); font-weight: 650; }
.ffh-lage-rows { display: flex; flex-direction: column; flex: 1; min-height: 0; justify-content: space-evenly; overflow: hidden; }
.ffh-lage-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; font-size: 13.5px; min-width: 0; }
.ffh-lage-row + .ffh-lage-row { border-top: 1px solid var(--line-soft); }
.ffh-lage-key { color: var(--muted); font-size: 12px; font-weight: 600; width: 116px; flex: 0 0 auto; }
.ffh-lage-val { color: var(--text); font-size: 13px; }
.ffh-lage-days { display: flex; gap: 14px; flex-wrap: wrap; }
.ffh-day { display: inline-flex; align-items: center; gap: 5px; color: var(--text-soft); }
.ffh-day b { color: var(--muted); font-weight: 600; }
.ffh-ok { display: inline-flex; align-items: center; gap: 8px; color: var(--ok); font-weight: 650; font-size: 13.5px; }
.ffh-warnlink { color: var(--warn); font-weight: 700; font-size: 13.5px; }
.ffh-spark { margin-left: auto; flex: 0 0 auto; }

/* ---------- Feeds (Einsätze, Termine) ---------- */
.ffh-feed { display: flex; flex-direction: column; flex: 1; min-height: 0; overflow: hidden; justify-content: space-evenly; }
.ffh-feed-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; min-width: 0; }
.ffh-feed-row + .ffh-feed-row { border-top: 1px solid var(--line-soft); }
.ffh-chip {
  font-size: 11px;
  font-weight: 750;
  letter-spacing: .05em;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  flex: 0 0 auto;
  white-space: nowrap;
}
.ffh-chip--einsatz { background: var(--primary-wash); color: var(--primary-soft); border: 1px solid var(--primary-ring); }
.ffh-chip--uebung { color: var(--accent); border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); }
.ffh-chip--neutral { color: var(--text-soft); border: 1px solid var(--line); }
.ffh-tag {
  font-size: 10.5px;
  color: var(--text-soft);
  border: 1px solid var(--line);
  padding: 4px 9px;
  border-radius: var(--radius-pill);
  flex: 0 0 auto;
}
.ffh-feed-title {
  font-size: 14.5px;
  font-weight: 650;
  color: var(--text-strong);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.ffh-feed-title:hover { color: var(--primary-soft); }
.ffh-feed-meta { margin-left: auto; font-size: 11.5px; color: var(--muted); flex: 0 0 auto; }

/* Termine */
.ffh-ev { display: flex; align-items: center; gap: 14px; padding: 8px 0; min-width: 0; }
.ffh-ev + .ffh-ev { border-top: 1px solid var(--line-soft); }
.ffh-ev-date {
  flex: 0 0 auto;
  width: 46px; height: 46px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.ffh-ev-date b { font-size: 15px; font-weight: 700; color: var(--text-strong); line-height: 1; }
.ffh-ev-date span { font-size: 9px; font-weight: 750; letter-spacing: .1em; color: var(--primary-soft); text-transform: uppercase; margin-top: 3px; }
.ffh-ev-title { font-size: 14px; color: var(--text); font-weight: 600; line-height: 1.35; min-width: 0; }
.ffh-ev-time { margin-left: auto; font-size: 11.5px; color: var(--muted); flex: 0 0 auto; }

/* ---------- Unsere Wehr (Kennzahlen) ---------- */
.ffh-tile--wehr { justify-content: space-between; }
.ffh-stats { display: flex; flex-direction: column; flex: 1; min-height: 0; justify-content: space-evenly; overflow: hidden; }
.ffh-stat { padding: 10px 0; }
.ffh-stat + .ffh-stat { border-top: 1px solid var(--line-soft); }
.ffh-stat b {
  display: block;
  font-size: 30px;
  font-weight: 700;
  color: var(--text-strong);
  letter-spacing: -.02em;
  line-height: 1.1;
}
.ffh-stat span { font-size: 12px; color: var(--muted); font-weight: 600; }
.ffh-join { margin-top: 12px; align-self: flex-start; flex: 0 0 auto; }

/* ---------- Mitmachen & Spenden (rote CTA-Kachel) ---------- */
.ffh-tile--mitmachen {
  background: linear-gradient(150deg, var(--primary) 0%, var(--primary-dark) 100%);
  border-color: transparent;
  box-shadow: 0 14px 36px color-mix(in srgb, var(--primary-dark) 30%, transparent);
}
.ffh-cta-title { color: #fff; font-size: 17px; font-weight: 800; margin: 0 0 12px; }
.ffh-cta-text { color: rgba(255, 255, 255, .92); font-size: 14.5px; line-height: 1.6; margin: 0; }
.ffh-cta-actions { display: flex; gap: 10px; margin-top: auto; padding-top: 16px; flex-wrap: wrap; }
.ffh-cta-btn {
  display: inline-flex;
  background: #fff;
  color: var(--primary-dark);
  font-size: 13.5px;
  font-weight: 800;
  padding: 10px 20px;
  border-radius: var(--radius-pill);
}
.ffh-cta-btn:hover { background: rgba(255, 255, 255, .9); }
.ffh-cta-btn--ghost { background: rgba(255, 255, 255, .14); color: #fff; border: 1px solid rgba(255, 255, 255, .4); }
.ffh-cta-btn--ghost:hover { background: rgba(255, 255, 255, .24); }

/* ---------- Kontakt & Standort ---------- */
.ffh-contact { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; flex: 1; min-height: 0; }
.ffh-contact-list { display: flex; flex-direction: column; gap: 8px; min-width: 0; font-size: 14px; }
.ffh-contact-list strong { color: var(--text-strong); font-size: 15px; }
.ffh-contact-row { display: flex; align-items: center; gap: 9px; color: var(--text-soft); }
.ffh-contact-row svg { flex: 0 0 auto; color: var(--primary-soft); }
a.ffh-contact-row:hover { color: var(--text-strong); }
.ffh-contact-notruf { margin-top: auto; color: var(--primary-soft); font-weight: 700; letter-spacing: .08em; font-size: 13px; }
.ffh-contact-map { min-height: 150px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.ffh-map-frame { width: 100%; height: 100%; min-height: 150px; border: 0; display: block; filter: grayscale(.35) contrast(1.05); }

/* ---------- Galerie ---------- */
.ffh-gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; flex: 1; min-height: 0; }
.ffh-gallery-item { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); min-height: 0; }
.ffh-gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s; }
.ffh-gallery-item:hover img { transform: scale(1.04); }

/* ---------- Neue Widgets: Liveticker / Infos / Besetzt / Jahresstatistik ---------- */
.ffh-muted { color: var(--muted); font-size: 14px; }

.ffh-ticker { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; flex: 1; min-height: 0; overflow: hidden; }
.ffh-ticker-item { display: grid; grid-template-columns: auto auto 1fr; align-items: baseline; gap: 9px; font-size: 14px; padding-bottom: 8px; border-bottom: 1px solid var(--line-soft); }
.ffh-ticker-item:last-child { border-bottom: 0; }
.ffh-ticker-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--muted); align-self: center; }
.ffh-ticker-item--warnung .ffh-ticker-dot { background: var(--warn, #d6912d); }
.ffh-ticker-item--kritisch .ffh-ticker-dot { background: var(--primary); }
.ffh-ticker-time { color: var(--muted); font-size: 12px; white-space: nowrap; }
.ffh-ticker-item--kritisch .ffh-ticker-msg { font-weight: 700; }

.ffh-infos { color: var(--text-soft); font-size: 15px; line-height: 1.55; flex: 1; min-height: 0; overflow: auto; }

.ffh-besetzt { display: flex; align-items: center; gap: 16px; flex: 1; }
.ffh-led { width: 26px; height: 26px; border-radius: 50%; flex: 0 0 auto; }
.ffh-led--green { background: #16a34a; box-shadow: 0 0 14px rgba(22, 163, 74, .7); }
.ffh-led--red { background: var(--primary); box-shadow: 0 0 14px var(--primary-ring, rgba(232, 50, 63, .6)); }
.ffh-besetzt-state { font-size: 22px; font-weight: 800; }
.ffh-besetzt--on .ffh-besetzt-state { color: #16a34a; }
.ffh-besetzt--off .ffh-besetzt-state { color: var(--primary); }

.ffh-stat-hero { display: flex; flex-direction: column; margin-bottom: 12px; }
.ffh-stat-num { font-size: clamp(34px, 5vh, 48px); font-weight: 800; line-height: 1; color: var(--primary); }
.ffh-stat-hero span { font-size: 13px; color: var(--muted); font-weight: 600; margin-top: 4px; }
.ffh-stat-bars { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.ffh-stat-bar { display: grid; grid-template-columns: 6.5em 1fr auto; align-items: center; gap: 10px; font-size: 13px; }
.ffh-stat-bar-label { color: var(--text-soft); }
.ffh-stat-bar-track { height: 8px; background: var(--surface-2, #171b22); border-radius: 999px; overflow: hidden; }
.ffh-stat-bar-fill { display: block; height: 100%; background: var(--primary); border-radius: 999px; }
.ffh-stat-bar-cnt { font-weight: 700; }

/* ---------- Leitstand-Modus: ein Bildschirm, Kacheln teilen die Höhe ---------- */
@media (orientation: landscape) and (min-width: 1024px) and (min-height: 720px) {
  body.home-leitstand main.ffh {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
  }
  body.home-leitstand .ffh-deck {
    flex: 1 1 auto;
    min-height: 0;
    grid-auto-rows: minmax(0, 1fr);
    padding: 14px 0 16px;
    overflow: hidden;
    align-items: stretch;
  }
  body.home-leitstand .ffh-tile { min-height: 0; overflow: hidden; }
  body.home-leitstand .ffh-h1 { font-size: clamp(1.8rem, 3.4vh, 3.3rem); }
}

/* Mobil: Status-Chip kompakt, Uhr ausblenden */
@media (max-width: 860px) {
  .top-clock { display: none; }
  .top-status .status-chip { padding: 6px 12px; font-size: 12px; }
}

/* Leitstand-Modus: kompakte Dichte, keine angeschnittenen Zeilen */
@media (orientation: landscape) and (min-width: 1024px) and (min-height: 720px) {
  body.home-leitstand .ffh-feed-row { padding: 7px 0; }
  body.home-leitstand .ffh-ev { padding: 6px 0; }
  body.home-leitstand .ffh-feed-row:nth-child(n+5),
  body.home-leitstand .ffh-ev:nth-child(n+4) { display: none; }
  body.home-leitstand .ffh-stat { padding: 7px 0; }
  body.home-leitstand .ffh-stat b { font-size: clamp(20px, 2.6vh, 28px); }
  body.home-leitstand .ffh-join { margin-top: 8px; padding: 8px 16px; font-size: 12.5px; }
  body.home-leitstand .ffh-lage-row { padding: 7px 0; }
}
@media (orientation: landscape) and (min-width: 1024px) and (min-height: 1000px) {
  body.home-leitstand .ffh-feed-row:nth-child(n+5) { display: flex; }
  body.home-leitstand .ffh-ev:nth-child(n+4) { display: flex; }
  body.home-leitstand .ffh-ev:nth-child(n+5) { display: none; }
}

/* „Unsere Wehr" im One-Screen-Modus: kompakt, Button kollidiert nie */
@media (orientation: landscape) and (min-width: 1024px) and (min-height: 720px) {
  body.home-leitstand .ffh-tile--wehr .tile-label { margin-bottom: 8px; }
  body.home-leitstand .ffh-stat b { font-size: clamp(19px, 2.3vh, 25px); }
  body.home-leitstand .ffh-stat span { font-size: 11px; }
  body.home-leitstand .ffh-stat { padding: 5px 0; }
  body.home-leitstand .ffh-join { margin-top: 6px; padding: 7px 14px; font-size: 12px; }
}
