/* ══════════════════════════════════════════════════════════════════════════
   PN-FEED — Spielkarten-Feed der Startseite
   ──────────────────────────────────────────────────────────────────────────
   Geladen NACH theme.v2.css (index_new.html → head_extra). Alles hier ist
   auf body.pn-feed begrenzt; Header, Logo, Termine und alle anderen Seiten
   bleiben unberuehrt.

   Grundsaetze (Feedback Daniel):
   · Spielkarten-Anmutung aus dem Entwurf (Georgia-Titel, eingerueckte
     Fotos, ruhige Kopfzeile) — aber in den LIVE-Farben (--bsn, --accent,
     --border, --muted, --bg, --card) statt Creme/Salbei.
   · Genau EIN Rahmen pro Karte. Kein innerer Rahmen um Inhalt oder Foto.
   · Keine festen Hoehen, keine Kuerzung von Spieltiteln.
   · Touch-Ziele >= 44px, Metadaten >= 12px, kein horizontaler Ueberlauf
     ab 320px, sanfte Bewegung nur mit echtem Zeigegeraet.
   · Kein !important — die Spezifitaet von body.pn-feed genuegt.
   ══════════════════════════════════════════════════════════════════════════ */

body.pn-feed {
  --pn-feed-max: 1240px;
  --pn-gutter: 1rem;
  --pn-serif: Georgia, 'Times New Roman', Times, serif;
  --pn-ink: #1F2937;
  --pn-text: #4B5563;
  --pn-card-pad: 0.75rem;
  --pn-shadow: 0 1px 2px rgba(42, 51, 63, 0.04), 0 6px 18px rgba(42, 51, 63, 0.05);
  --pn-shadow-hover: 0 2px 4px rgba(42, 51, 63, 0.06), 0 14px 30px rgba(42, 51, 63, 0.10);
  /* Platz fuer die schwebenden Knoepfe unten, damit sie nie die letzte
     Zeile oder die Seitennavigation verdecken. */
  padding-bottom: calc(4.75rem + env(safe-area-inset-bottom, 0px));
}
@media (max-width: 560px) {
  body.pn-feed { --pn-gutter: 0.75rem; --pn-card-pad: 0.625rem; }
}

/* Nur fuer Screenreader (Label des Suchfelds) */
body.pn-feed .visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); clip-path: inset(50%);
  white-space: nowrap; border: 0;
}

/* ── Gemeinsame Breite: Intro, Werkzeuge, Reiter, Chips, Raster ─────────── */
body.pn-feed .feed-intro,
body.pn-feed .feed-tools,
body.pn-feed .feed-tabs,
body.pn-feed .filter-chips,
body.pn-feed .frontend-filter {
  max-width: var(--pn-feed-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--pn-gutter);
  padding-right: var(--pn-gutter);
  box-sizing: border-box;
}

/* ══ Intro ═══════════════════════════════════════════════════════════════ */
body.pn-feed .feed-intro {
  position: relative;
  margin-top: 2rem;
  margin-bottom: 1.25rem;
  padding-right: calc(var(--pn-gutter) + 3rem); /* Platz fuer den Schliessen-Knopf */
}
body.pn-feed .feed-intro[hidden] { display: none; }

body.pn-feed .feed-intro__eyebrow {
  display: flex; align-items: center; gap: 0.6rem;
  margin: 0 0 0.75rem;
  font-size: 0.75rem; font-weight: 700; line-height: 1.3;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--bsn);
}
/* Orange bleibt Signalfarbe als feine Linie — als Textfarbe waere es bei
   12px nicht kontrastreich genug. */
body.pn-feed .feed-intro__eyebrow::before {
  content: ""; flex: 0 0 auto; width: 1.75rem; height: 2px;
  background: var(--accent); border-radius: 2px;
}

body.pn-feed .feed-intro__title {
  margin: 0 0 0.9rem;
  max-width: 22ch;
  font-family: var(--pn-serif);
  font-weight: 400;
  font-size: clamp(1.85rem, 1.2rem + 2.6vw, 3.1rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--bsn);
  overflow-wrap: break-word;
  hyphens: auto;
}

body.pn-feed .feed-intro__text {
  margin: 0;
  max-width: 38rem;
  font-size: 1rem; line-height: 1.6;
  color: var(--pn-text);
}

body.pn-feed .feed-intro__actions {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: 0.75rem 1.25rem;
  margin-top: 1.4rem;
}

/* Teilen-Knopf im Intro: gleiche Pillenform wie der schwebende Knopf */
body.pn-feed .feed-share {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.55rem;
  max-width: 100%;
  min-height: 48px; padding: 0 1.25rem;
  background: var(--accent); color: var(--bsn);
  border: 0; border-radius: 999px;
  font-size: 0.95rem; font-weight: 700; line-height: 1.2;
  text-decoration: none; cursor: pointer;
  box-shadow: 0 6px 16px rgba(42, 51, 63, 0.18);
  transition: box-shadow 0.2s ease, background-color 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}
body.pn-feed .feed-share:hover { background: #F06502; box-shadow: 0 8px 22px rgba(42, 51, 63, 0.26); }
body.pn-feed .feed-share:active { transform: scale(0.98); }
body.pn-feed .feed-share:focus-visible { outline: 2px solid var(--bsn); outline-offset: 3px; border-radius: 999px; }
body.pn-feed .feed-share svg { flex: 0 0 auto; width: 18px; height: 18px; color: var(--bsn); }

body.pn-feed .feed-intro__guide {
  display: inline-flex; align-items: center;
  min-height: 44px;
  color: var(--bsn); font-size: 0.95rem; font-weight: 600;
  text-decoration: underline; text-decoration-color: rgba(42, 51, 63, 0.35);
  text-underline-offset: 3px;
}
body.pn-feed .feed-intro__guide:hover { text-decoration-color: var(--accent); }

body.pn-feed .feed-intro__credit {
  margin: 1rem 0 0;
  font-size: 0.8125rem; line-height: 1.5;
  color: var(--muted);
}
body.pn-feed .feed-intro__credit a { color: var(--bsn); font-weight: 600; }

body.pn-feed .feed-intro__dismiss {
  position: absolute; top: -0.35rem; right: var(--pn-gutter);
  display: grid; place-items: center;
  width: 44px; height: 44px; padding: 0;
  background: transparent; color: var(--muted);
  border: 0; border-radius: 999px;
  font: inherit; font-size: 1.25rem; line-height: 1;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}
body.pn-feed .feed-intro__dismiss[hidden] { display: none; }
body.pn-feed .feed-intro__dismiss:hover { background: rgba(42, 51, 63, 0.07); color: var(--bsn); }
body.pn-feed .feed-intro__dismiss svg { width: 18px; height: 18px; }

/* ══ Werkzeuge: Suche, Sortierung, Filter, Folgen ═══════════════════════ */
body.pn-feed .feed-tools {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: 0.75rem;
  margin-top: 0.75rem;
  margin-bottom: 0.5rem;
}

/* Formular enthaelt Suchfeld, Sortierung und Suchen-Knopf nebeneinander */
body.pn-feed .feed-search {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: 0.5rem;
  flex: 1 1 32rem; min-width: 0;
  margin: 0;
}
body.pn-feed .feed-search input[type="search"] {
  flex: 1 1 14rem; min-width: 0; width: 100%;
  min-height: 44px;
  padding: 0.55rem 0.85rem;
  background: var(--card); color: var(--pn-ink);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-family: inherit;
  font-size: 1rem; /* 16px: verhindert iOS-Zoom beim Fokus */
  line-height: 1.3;
  -webkit-appearance: none; appearance: none;
  transition: border-color 0.15s ease;
}
body.pn-feed .feed-search input[type="search"]::placeholder { color: #9CA3AF; }
body.pn-feed .feed-search input[type="search"]:focus { border-color: var(--bsn); }
body.pn-feed .feed-search input[type="search"]:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; border-radius: 10px; }

body.pn-feed .feed-search__submit {
  flex: 0 0 auto;
  display: inline-flex; align-items: center; justify-content: center; gap: 0.35rem;
  min-width: 44px; min-height: 44px;
  padding: 0 0.95rem;
  background: var(--bsn); color: #fff;
  border: 0; border-radius: 10px;
  font-family: inherit; font-size: 0.9rem; font-weight: 600;
  cursor: pointer;
  transition: background-color 0.15s ease;
}
body.pn-feed .feed-search__submit:hover { background: #1F2937; }
body.pn-feed .feed-search__submit svg { width: 18px; height: 18px; }

body.pn-feed .feed-sort {
  display: inline-flex; align-items: center; gap: 0.5rem;
  flex: 0 1 auto; min-width: 0;
  font-size: 0.8125rem; font-weight: 600;
  color: var(--muted);
}
body.pn-feed .feed-sort select {
  min-width: 0; max-width: 100%;
  min-height: 44px;
  padding: 0.5rem 2.1rem 0.5rem 0.8rem;
  background-color: var(--card);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='2.2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  color: var(--pn-ink);
  border: 1.5px solid var(--border); border-radius: 10px;
  font-family: inherit; font-size: 1rem; font-weight: 500;
  -webkit-appearance: none; appearance: none;
  cursor: pointer;
}
body.pn-feed .feed-sort select:focus { border-color: var(--bsn); }

body.pn-feed .feed-filters {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.45rem;
  flex: 0 0 auto;
  min-height: 44px; margin: 0;
  padding: 0 1rem;
  background: var(--card); color: var(--bsn);
  border: 1.5px solid var(--border); border-radius: 10px;
  font-family: inherit; font-size: 0.9rem; font-weight: 600; line-height: 1.2;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}
body.pn-feed .feed-filters:hover { border-color: var(--bsn); }
body.pn-feed .feed-filters.active,
body.pn-feed .feed-filters[aria-expanded="true"] { border-color: var(--bsn); background: var(--bg); }
body.pn-feed .feed-filters:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
body.pn-feed .feed-filters svg { width: 18px; height: 18px; }

/* Folgen-Umschalter: eigene Zeile unter der Suche; Gaeste-Hinweis darunter */
body.pn-feed .feed-follow {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: 0.5rem 0.75rem;
  flex: 1 1 100%; min-width: 0;
}
body.pn-feed .feed-follow__link {
  display: inline-flex; align-items: center;
  min-height: 44px; padding: 0 1rem;
  background: var(--card); color: var(--pn-text);
  border: 1.5px solid var(--border); border-radius: 999px;
  font-size: 0.875rem; font-weight: 600; line-height: 1.2;
  text-decoration: none; white-space: nowrap;
  transition: border-color 0.15s ease, color 0.15s ease, background-color 0.15s ease;
}
body.pn-feed .feed-follow__link:hover { border-color: var(--bsn); color: var(--bsn); }
body.pn-feed .feed-follow__link[aria-current="page"] {
  background: var(--bsn); border-color: var(--bsn); color: #fff;
}
body.pn-feed .feed-follow__hint {
  flex: 1 1 100%; min-width: 0;
  margin: -0.25rem 0 0;
  font-size: 0.8125rem; line-height: 1.45;
  color: var(--muted);
}
body.pn-feed .feed-follow__hint a { color: var(--bsn); font-weight: 600; }

@media (max-width: 560px) {
  body.pn-feed .feed-intro { margin-top: 1.4rem; }
  body.pn-feed .feed-intro__text { font-size: 0.95rem; }
  body.pn-feed .feed-search { flex: 1 1 100%; }
  body.pn-feed .feed-search input[type="search"] { flex-basis: 100%; }
  body.pn-feed .feed-sort { flex: 1 1 8rem; }
  body.pn-feed .feed-search__submit { flex: 0 0 auto; }
  body.pn-feed .feed-filters { flex: 1 1 auto; }
  body.pn-feed .feed-sort select { flex: 1 1 auto; }
  body.pn-feed .feed-follow__link { flex: 1 1 auto; justify-content: center; }
}

/* Reiter bleiben wie sie sind — nur buendig zum Raster */
body.pn-feed .feed-tabs { margin-top: 1rem; }

/* ══ Raster (nur Beitragsraster, NICHT Termine) ══════════════════════════ */
body.pn-feed main.main-grid:not(.main-grid--events) {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.75rem;
  /* Karten einer Reihe gleich hoch; die Meta-Zeile sitzt unten (siehe
     .card-meta margin-top:auto) — wirkt wie ein ausgelegtes Kartenblatt. */
  align-items: stretch;
  max-width: var(--pn-feed-max);
  margin: 1.5rem auto 2rem;
  padding: 0 var(--pn-gutter);
  box-sizing: border-box;
}
@media (max-width: 1099px) {
  body.pn-feed main.main-grid:not(.main-grid--events) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem;
  }
}
@media (max-width: 679px) {
  body.pn-feed main.main-grid:not(.main-grid--events) {
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
    margin-top: 1rem;
  }
}
body.pn-feed main.main-grid:not(.main-grid--events) > .empty-state { grid-column: 1 / -1; }

/* Diskutierte Termine im Community-Reiter: nur Breite und Kante an das
   Raster angleichen. Die Terminkarten selbst behalten ihr eigenes Design;
   der Termine-Reiter (#eventsCalendar) bleibt ganz unberuehrt. */
body.pn-feed .events:not(#eventsCalendar),
body.pn-feed .events:not(#eventsCalendar) + .main-grid--events {
  max-width: var(--pn-feed-max);
  padding-left: var(--pn-gutter);
  padding-right: var(--pn-gutter);
  box-sizing: border-box;
}

/* Bildunterschrift unter dem Raster */
body.pn-feed .feed-caption {
  max-width: var(--pn-feed-max);
  margin: 0 auto 1.5rem;
  padding: 0 var(--pn-gutter);
  box-sizing: border-box;
  font-size: 0.8125rem; line-height: 1.5;
  color: var(--muted);
  text-align: center;
}

/* ══ Spielkarte ══════════════════════════════════════════════════════════
   EIN Rahmen aussen, Foto mit grosszuegigem Innenabstand, kein innerer
   Rahmen. */
body.pn-feed .story-card.pn-card {
  display: flex; flex-direction: column;
  min-width: 0;
  padding: var(--pn-card-pad);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--pn-shadow);
  transform: none;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
/* Theme hebt jede story-card bei :hover um 4px — auf Touch-Geraeten bleibt
   das "kleben". Hier neutral, Anheben (2px) nur mit echtem Zeiger. */
body.pn-feed .story-card.pn-card:hover { transform: none; box-shadow: var(--pn-shadow); }
@media (hover: hover) and (pointer: fine) {
  body.pn-feed .story-card.pn-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--pn-shadow-hover);
  }
}
body.pn-feed .story-card.pn-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Kopfzeile der Karte: Label links, Symbol rechts (wie eine Spielkartenecke) */
body.pn-feed .pn-card__eyebrow {
  display: flex; align-items: center; justify-content: space-between; gap: 0.75rem;
  min-width: 0;
  margin: 0.15rem 0.2rem 0.65rem;
  font-size: 0.75rem; font-weight: 700; line-height: 1.3;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--bsn);
}
body.pn-feed .pn-card__eyebrow > span { min-width: 0; overflow-wrap: anywhere; }
/* Kartenecke: der orangefarbene Zweier-Wuerfel aus dem Chat-Logo */
body.pn-feed .pn-card__icon {
  flex: 0 0 auto;
  display: block;
  width: 24px; height: 24px;
}

/* Medien: Rundung und 4:3 kommen inline aus routes/helpers.py; hier nur
   die rahmenlose Einbettung. */
body.pn-feed .pn-card .media-crop,
body.pn-feed .pn-card .video-thumb,
body.pn-feed .pn-card .audio-preview {
  flex: 0 0 auto;
  border-radius: 8px;
}
body.pn-feed .pn-card .media-crop { aspect-ratio: 4 / 3; }
body.pn-feed .pn-card video { border-radius: 8px; }
body.pn-feed .pn-card audio { max-width: 100%; }

/* Ausverkauft-Band folgt der Kartenrundung */
/* Im Kartenfluss statt absolut: verdeckt sonst die Kartenkopfzeile. */
body.pn-feed .pn-card .story-ausverkauft-badge {
  position: static;
  order: -1;
  margin: calc(-1 * var(--pn-card-pad)) calc(-1 * var(--pn-card-pad)) 0.6rem;
  border-radius: 15px 15px 0 0;
}

body.pn-feed .pn-card .card-content {
  flex: 1 1 auto;
  display: flex; flex-direction: column; gap: 0.5rem;
  min-width: 0;
  padding: 0.95rem 0.2rem 0.1rem;
}

/* Echter Spieltitel — nie gekuerzt, darf umbrechen */
body.pn-feed .pn-card__title {
  margin: 0;
  font-family: var(--pn-serif);
  font-weight: 400;
  font-size: 1.55rem;
  line-height: 1.18;
  letter-spacing: -0.01em;
  color: var(--pn-ink);
  overflow-wrap: break-word;
  hyphens: auto;
}
@media (max-width: 560px) {
  body.pn-feed .pn-card__title { font-size: 1.4rem; }
}

/* Vorschautext (Auszug, darf gekuerzt werden) */
body.pn-feed .pn-card.has-text .story-preview,
body.pn-feed .pn-card.text-only .story-preview {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  overflow: hidden;
  margin: 0;
  font-size: 0.9375rem; line-height: 1.6;
  color: var(--pn-text);
  overflow-wrap: break-word;
}
body.pn-feed .pn-card .story-preview .read-more { color: var(--bsn); font-weight: 600; }

/* Textkarten ohne Foto: ruhige Flaeche statt Bild, Georgia wie ein Zitat.
   Flaeche statt Rahmen — so bleibt es bei genau einer Kontur. */
body.pn-feed .pn-card.text-only .card-content { padding-top: 0.2rem; }
body.pn-feed .pn-card.text-only .story-preview {
  -webkit-line-clamp: 7;
  padding: 1.1rem 1.15rem;
  background: var(--bg);
  border-radius: 8px;
  font-family: var(--pn-serif);
  font-size: 1.0625rem; line-height: 1.55;
  color: var(--pn-ink);
}
body.pn-feed .pn-card.text-only .story-preview .read-more {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 0.875rem;
}

/* Externe Quelle: kompakte Vorschau-Zeile */
body.pn-feed .pn-card__source {
  display: flex; align-items: center; gap: 0.55rem;
  min-width: 0; min-height: 44px;
  padding: 0.5rem 0.75rem;
  background: var(--bg);
  border-radius: 8px;
  color: var(--bsn);
  font-size: 0.8125rem; font-weight: 600; line-height: 1.35;
  text-decoration: none;
  overflow-wrap: anywhere;
  transition: background-color 0.15s ease;
}
body.pn-feed .pn-card__source:hover { background: #EEF0F3; text-decoration: underline; text-underline-offset: 2px; }
body.pn-feed .pn-card__source svg,
body.pn-feed .pn-card__source img { flex: 0 0 auto; width: 16px; height: 16px; object-fit: contain; }

/* ── Metadaten — nur in Spielkarten der Startseite (card_meta.html wird
      auch auf Profilseiten genutzt und bleibt dort unveraendert) ───────── */
body.pn-feed .pn-card .card-meta {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: 0.35rem 0.5rem;
  margin-top: auto;
  padding-top: 0.7rem;
  border-top: 1px solid #F3F4F6;
}

body.pn-feed .pn-card .meta-author {
  flex: 1 1 100%;
  display: flex; align-items: center; gap: 0.5rem;
  min-width: 0;
  font-size: 0.8125rem; font-weight: 500;
  color: var(--muted);
}
body.pn-feed .pn-card .meta-author .author-avatar {
  width: 32px; height: 32px; font-size: 0.75rem;
}
body.pn-feed .pn-card .meta-author-name {
  min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: #374151; font-weight: 600;
}
body.pn-feed .pn-card .meta-date {
  flex: 0 0 auto;
  margin-left: auto;
  font-size: 0.78rem;
  color: var(--muted);
  white-space: nowrap;
}
body.pn-feed .pn-card .meta-spacer { display: none; }

body.pn-feed .pn-card__actions {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: 0.15rem;
  flex: 1 1 100%; min-width: 0;
  margin-left: -0.5rem; /* Herz steht optisch buendig unter dem Avatar */
}

body.pn-feed .pn-card .card-meta-item {
  font-size: 0.8125rem;
  color: var(--muted);
}
body.pn-feed .pn-card .card-meta-item svg { stroke: currentColor; }

body.pn-feed .pn-card .stat-like-btn {
  min-width: 44px; min-height: 44px;
  padding: 0 0.6rem;
  gap: 0.35rem;
  font-size: 0.8125rem; font-weight: 600;
  color: var(--muted);
}
body.pn-feed .pn-card .stat-like-btn.liked { color: #B91C1C; }

body.pn-feed .pn-card__comments {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.35rem;
  min-width: 44px; min-height: 44px;
  padding: 0 0.6rem;
  border-radius: 999px;
  font-size: 0.8125rem; font-weight: 600;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s ease, background-color 0.15s ease;
}
body.pn-feed .pn-card__comments svg { stroke: currentColor; flex: 0 0 auto; }
body.pn-feed .pn-card__comments:hover { color: var(--bsn); background: var(--bg); }

body.pn-feed .pn-card .bm-btn {
  min-width: 44px; min-height: 44px;
  border-radius: 999px;
}
/* Herz/Kommentar links, Merken rechts */
body.pn-feed .pn-card__actions > .bm-btn { margin-left: auto; }
body.pn-feed .pn-card .stat-like-btn:hover,
body.pn-feed .pn-card .bm-btn:hover { background: var(--bg); }

/* Folgen neben dem Namen: 44px Trefferflaeche, sichtbar als schmale Pille.
   Zustand kommt nur ueber .following (gesetzt von _card_actions.html). */
body.pn-feed .pn-card .pn-follow {
  flex: 0 0 auto;
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 44px; min-height: 44px;
  margin: -0.35rem 0;
  padding: 0;
  background: none; border: 0;
  font: inherit; text-decoration: none;
  cursor: pointer;
}
body.pn-feed .pn-card .pn-follow > span {
  display: inline-flex; align-items: center; gap: 0.3rem;
  padding: 0.32rem 0.75rem;
  border: 0; border-radius: 999px; /* randlos: keine zweite Linie in der Karte */
  font-size: 0.78rem; font-weight: 700; line-height: 1.2;
  color: var(--bsn); background: #FFF1E6;
  white-space: nowrap;
  transition: background-color 0.15s ease, color 0.15s ease;
}
body.pn-feed .pn-card .pn-follow__add::before {
  content: "+"; color: var(--accent); font-size: 1rem; line-height: 0.8; font-weight: 700;
}
body.pn-feed .pn-card .pn-follow__done::before { content: "\2713"; color: var(--accent); }
body.pn-feed .pn-card .pn-follow .pn-follow__done,
body.pn-feed .pn-card .pn-follow .pn-follow__undo,
body.pn-feed .pn-card .pn-follow.following .pn-follow__add { display: none; }
body.pn-feed .pn-card .pn-follow.following .pn-follow__done {
  display: inline-flex;
  background: var(--bg); color: var(--muted);
}
body.pn-feed .pn-card .pn-follow:hover .pn-follow__add { background: #FFE2CC; }
body.pn-feed .pn-card .pn-follow:focus-visible { outline: none; }
body.pn-feed .pn-card .pn-follow:focus-visible > span { outline: 2px solid var(--accent); outline-offset: 2px; }
/* Entfolgen erst bei Zeiger/Tastaturfokus zeigen – verhindert versehentliches Entfolgen */
@media (hover: hover) and (pointer: fine) {
  body.pn-feed .pn-card .pn-follow.following:hover .pn-follow__done { display: none; }
  body.pn-feed .pn-card .pn-follow.following:hover .pn-follow__undo { display: inline-flex; }
}
body.pn-feed .pn-card .pn-follow.following:focus-visible .pn-follow__done { display: none; }
body.pn-feed .pn-card .pn-follow.following:focus-visible .pn-follow__undo { display: inline-flex; }
body.pn-feed .pn-card .pn-follow .pn-follow__undo { background: #FEF2F2; color: #B91C1C; }
body.pn-feed .pn-card .pn-follow:active > span { transform: scale(0.97); }
@media (prefers-reduced-motion: reduce) {
  body.pn-feed .pn-card .pn-follow > span { transition: none; }
  body.pn-feed .pn-card .pn-follow:active > span { transform: none; }
}

/* ══ Schwebende Knoepfe ══════════════════════════════════════════════════ */

/* Einreichen: beschriftete Pille unten LINKS (Chat-Wuerfel sitzt rechts).
   Live-Orange bleibt erhalten; BSN-Schrift liefert ausreichenden Kontrast. */
body.pn-feed .submit-bubble {
  left: calc(1.5rem + env(safe-area-inset-left, 0px));
  right: auto;
  bottom: calc(1.5rem + env(safe-area-inset-bottom, 0px));
  width: auto; height: auto;
  min-height: 52px;
  /* Rand links + Chat-Wuerfel (64px) + Rand rechts + 12px Luft. */
  max-width: calc(100% - 3rem - 64px - 12px - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px));
  padding: 0.4rem 1.2rem 0.4rem 0.45rem;
  text-align: left;
  gap: 0.6rem;
  background: var(--accent); color: var(--bsn);
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.95rem; font-weight: 700; line-height: 1.2;
  letter-spacing: 0.01em;
  box-shadow: 0 8px 22px rgba(42, 51, 63, 0.28);
  transform: none;
  animation: none;
  transition: box-shadow 0.2s ease, opacity 0.2s ease, background-color 0.2s ease;
}
body.pn-feed .submit-bubble:hover { background: #F06502; box-shadow: 0 10px 28px rgba(42, 51, 63, 0.36); }
body.pn-feed .submit-bubble:active { transform: scale(0.97); }
body.pn-feed .submit-bubble.hidden { opacity: 0; pointer-events: none; }
body.pn-feed .submit-bubble:focus-visible { outline: 2px solid var(--bsn); outline-offset: 3px; border-radius: 999px; }

/* Plus-Symbol: Span im Knopf, der NICHT das Label ist */
body.pn-feed .submit-bubble > span:not(.submit-bubble__label) {
  flex: 0 0 auto;
  display: grid; place-items: center;
  width: 36px; height: 36px;
  background: var(--bsn); color: #fff;
  border-radius: 50%;
  font-size: 1.45rem; font-weight: 400; line-height: 1;
}
body.pn-feed .submit-bubble > span:not(.submit-bubble__label) svg { width: 18px; height: 18px; }
/* Lange Uebersetzungen (fr/pt/it/pl) brechen auf zwei Zeilen um, statt
   abgeschnitten zu werden; kurze bleiben einzeilig. */
body.pn-feed .submit-bubble__label {
  min-width: 0;
  white-space: normal;
  overflow-wrap: break-word;
  line-height: 1.15;
}

/* Chat-Wuerfel: Bild bleibt, Dauer-Schweben entfaellt, Safe-Area beachten */
body.pn-feed .chat-bubble {
  right: calc(1.5rem + env(safe-area-inset-right, 0px));
  bottom: calc(1.5rem + env(safe-area-inset-bottom, 0px));
  animation: none;
  transform: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
@media (hover: hover) and (pointer: fine) {
  body.pn-feed .chat-bubble:hover { transform: scale(1.08); }
}
body.pn-feed .chat-bubble:active { transform: scale(0.94); }

@media (max-width: 500px) {
  body.pn-feed .submit-bubble {
    left: calc(1rem + env(safe-area-inset-left, 0px));
    bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
    max-width: calc(100% - 2rem - 64px - 12px - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px));
    transform: none;
    animation: none;
  }
  body.pn-feed .submit-bubble:active { transform: scale(0.97); }
  body.pn-feed .chat-bubble {
    right: calc(1rem + env(safe-area-inset-right, 0px));
    bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
  }
}
@media (max-width: 360px) {
  body.pn-feed .submit-bubble {
    padding-right: 0.95rem;
    font-size: 0.875rem;
  }
  body.pn-feed .submit-bubble > span:not(.submit-bubble__label) { width: 32px; height: 32px; }
}

/* ══ Filter-Fenster ══════════════════════════════════════════════════════
   theme.v2.css begrenzt die Hoehe nur bis 400px Breite (Vollbild). Darueber
   — Handy quer, kleine Tablets — ragte der Dialog unten aus dem Bildschirm
   und war wegen der Scroll-Sperre nicht erreichbar. */
body.pn-feed .filter-backdrop.open {
  padding-left: env(safe-area-inset-left, 0px);
  padding-right: env(safe-area-inset-right, 0px);
}
body.pn-feed .filter-overlay {
  max-height: calc(100vh - 5rem);
  max-height: calc(100dvh - 5rem);
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
@media (max-height: 520px) {
  body.pn-feed .filter-backdrop.open { padding-top: 0.75rem; }
  body.pn-feed .filter-overlay {
    max-height: calc(100vh - 1.5rem);
    max-height: calc(100dvh - 1.5rem);
  }
}
@media (max-width: 400px) {
  body.pn-feed .filter-overlay {
    max-height: none;
    padding-bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
  }
}

/* Toast nicht unter die Pille legen */
body.pn-feed .pn-toast { bottom: calc(5.25rem + env(safe-area-inset-bottom, 0px)); }

/* ══ Reduzierte Bewegung ═════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  body.pn-feed .story-card.pn-card,
  body.pn-feed .submit-bubble,
  body.pn-feed .chat-bubble,
  body.pn-feed .feed-share { transition: none; }
  body.pn-feed .story-card.pn-card:hover,
  body.pn-feed .chat-bubble:hover,
  body.pn-feed .chat-bubble:active,
  body.pn-feed .submit-bubble:active,
  body.pn-feed .feed-share:active { transform: none; }
  body.pn-feed .pn-card .media-crop img { animation: none; }
}
