/* ══════════════════════════════════════════════════════════════════════════
   PN-DETAIL — Beitrags-Detailseite (/beitrag/<id>) und die Bearbeiten-Seiten
   (/beitrag/<id>/edit, /kommentar/<id>/edit) im gemeinsamen PlayedNow-Design.
   ──────────────────────────────────────────────────────────────────────────
   Bausteine (Karte, Kicker, Folgen-Pille, Formularelemente) kommen aus
   pn-ui.css; hier nur Layout und die Angleichung der Altklassen aus
   theme.v2.css. Alles ist auf body.pn-ui begrenzt, kein !important.

   Grundsaetze (Feedback Daniel):
   · Genau EIN Rahmen je Flaeche; Unterteilungen nur per Abstand, Flaeche
     oder feiner Linie (#F3F4F6) — kein Kaestchen im Kaestchen.
   · Georgia fuer Titel, Live-Farben unveraendert.
   · Touch-Ziele >= 44px, Metadaten >= 12px, kein Ueberlauf ab 320px.
   ══════════════════════════════════════════════════════════════════════════ */

/* ══ Detailseite ════════════════════════════════════════════════════════ */
body.pn-ui.detail-page {
  --pn-detail-pad: clamp(1rem, 0.7rem + 1.5vw, 1.75rem);
  --pn-detail-line: #F3F4F6;
}

body.pn-ui.detail-page .detail-container.pn-page { padding-top: 1rem; }

/* Zurueck: Textlink mit 44px Trefferflaeche */
body.pn-ui.detail-page .back-link {
  display: inline-flex; align-items: center;
  min-height: 44px; margin: 0 0 0.5rem;
  font-size: 0.875rem; font-weight: 600; color: var(--bsn);
  text-decoration: none;
}
body.pn-ui.detail-page .back-link:hover { text-decoration: underline; text-underline-offset: 3px; }
body.pn-ui.detail-page .back-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

/* Die Beitragskarte: eine .pn-surface mit genau einem Rahmen */
body.pn-ui.detail-page .detail-card.pn-surface {
  display: flex; flex-direction: column;
  position: relative;
  overflow: visible;
  padding: var(--pn-detail-pad);
}
body.pn-ui.detail-page .detail-card .pn-card__eyebrow { margin: 0 0 1rem; }

/* Ausverkauft-Band: im Fluss statt absolut, folgt der Kartenrundung */
body.pn-ui.detail-page .detail-card .detail-ausverkauft-banner {
  position: static;
  margin: calc(-1 * var(--pn-detail-pad)) calc(-1 * var(--pn-detail-pad)) 1rem;
  border-radius: 15px 15px 0 0;
  font-size: 0.8125rem;
}
body.pn-ui.detail-page .detail-card .detail-ausverkauft-banner .badge-title { font-size: 0.75rem; }

/* Medien: eingerueckt (Kartenabstand), gerundet, ohne Rahmen */
body.pn-ui.detail-page .detail-card .detail-media {
  display: flex; flex-direction: column; gap: 0.75rem;
  margin: 0 0 1.25rem;
}
body.pn-ui.detail-page .detail-card .detail-media-img,
body.pn-ui.detail-page .detail-card .detail-media-video {
  display: block; width: 100%; margin: 0;
  border-radius: var(--pn-radius-sm);
}
body.pn-ui.detail-page .detail-card .detail-media-img { height: auto; cursor: zoom-in; }
body.pn-ui.detail-page .detail-card .detail-media-audio { width: 100%; margin: 0; }

/* Galerie (Snap-Scroll) */
body.pn-ui.detail-page .detail-gallery { position: relative; margin: 0 0 1.25rem; }
body.pn-ui.detail-page .gallery-track {
  display: flex; gap: 0.5rem;
  overflow-x: auto; scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  border-radius: var(--pn-radius-sm);
}
body.pn-ui.detail-page .gallery-track::-webkit-scrollbar { display: none; }
body.pn-ui.detail-page .gallery-slide {
  flex: 0 0 100%; scroll-snap-align: center;
  display: flex; align-items: center; justify-content: center;
  min-width: 0;
  background: var(--bg);
  border-radius: var(--pn-radius-sm);
  overflow: hidden;
}
body.pn-ui.detail-page .gallery-img {
  display: block; width: 100%; height: auto;
  max-height: 70vh; object-fit: contain;
  cursor: zoom-in;
}
body.pn-ui.detail-page .gallery-video,
body.pn-ui.detail-page .gallery-audio { width: 100%; }
body.pn-ui.detail-page .gallery-dots { display: flex; justify-content: center; gap: 6px; margin-top: 0.6rem; }
body.pn-ui.detail-page .gallery-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #D1D5DB;
  transition: background-color 0.2s ease;
}
body.pn-ui.detail-page .gallery-dot.active { background: var(--bsn); }
body.pn-ui.detail-page .gallery-count {
  position: absolute; top: 0.6rem; right: 0.6rem;
  display: inline-flex; align-items: center; gap: 0.2rem;
  padding: 0.2rem 0.6rem;
  background: rgba(42, 51, 63, 0.85); color: #fff;
  border-radius: 999px;
  font-size: 0.75rem; font-weight: 700;
  pointer-events: none;
}
body.pn-ui.detail-page .gallery-arrow {
  position: absolute; top: 50%; z-index: 2;
  display: flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; padding: 0;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.4); color: #fff;
  border: 0; border-radius: 50%;
  font: inherit; font-size: 1.5rem; font-weight: 700; line-height: 1;
  cursor: pointer;
  transition: background-color 0.2s ease;
}
body.pn-ui.detail-page .gallery-arrow:hover { background: rgba(0, 0, 0, 0.65); }
body.pn-ui.detail-page .gallery-arrow:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
body.pn-ui.detail-page .gallery-arrow.left { left: 0.6rem; }
body.pn-ui.detail-page .gallery-arrow.right { right: 0.6rem; }
@media (max-width: 768px) {
  body.pn-ui.detail-page .gallery-arrow { display: none; }
}

/* Lightbox */
body.pn-ui.detail-page .gallery-lightbox {
  position: fixed; inset: 0; z-index: 9999;
  display: none; align-items: center; justify-content: center;
  background: rgba(0, 0, 0, 0.92);
  cursor: zoom-out;
}
body.pn-ui.detail-page .gallery-lightbox.open { display: flex; }
body.pn-ui.detail-page .gallery-lightbox img { max-width: 96vw; max-height: 94vh; object-fit: contain; border-radius: 8px; }
body.pn-ui.detail-page .gallery-lightbox .lb-hint {
  position: absolute; bottom: 1.2rem; left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.75); font-size: 0.8125rem;
}

/* Titel: nur echter Spieltitel sichtbar, in Georgia, nie gekuerzt */
body.pn-ui.detail-page .detail-card .pn-card__title {
  margin: 0 0 0.75rem;
  font-size: clamp(1.6rem, 1.25rem + 1.4vw, 2.2rem);
  line-height: 1.15;
  overflow-wrap: anywhere;
}

body.pn-ui.detail-page .detail-card .detail-source-lang {
  margin: 0 0 0.75rem;
  font-size: 0.8125rem; color: var(--muted);
}

/* Halle: kleine dunkle Pille (Flaeche, kein Rahmen) */
body.pn-ui.detail-page .detail-card .detail-halle {
  display: inline-flex; align-items: center; gap: 0.3rem;
  align-self: flex-start;
  margin: 0 0 1rem;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  font-size: 0.8125rem;
}
body.pn-ui.detail-page .detail-card.has-banner .detail-halle { margin-top: 0; }
body.pn-ui.detail-page .detail-halle svg { flex: 0 0 auto; }

body.pn-ui.detail-page .detail-card .detail-content {
  margin: 0 0 1rem;
  font-size: 1.0625rem; line-height: 1.7;
  color: var(--pn-ink);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
body.pn-ui.detail-page .detail-content .detail-link {
  color: var(--bsn); text-decoration: underline; text-underline-offset: 2px;
  overflow-wrap: anywhere;
}

body.pn-ui.detail-page .detail-card .detail-edit-link { align-self: flex-start; margin: 0 0 0.5rem; }

/* Autorzeile + Aktionen wie card-meta der Spielkarte */
body.pn-ui.detail-page .detail-card .card-meta {
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--pn-detail-line);
}
body.pn-ui.detail-page .detail-card .meta-author { font-size: 0.875rem; }
body.pn-ui.detail-page .detail-card .meta-author-name a {
  color: inherit; text-decoration: none;
}
body.pn-ui.detail-page .detail-card .meta-author-name a:hover { text-decoration: underline; text-underline-offset: 2px; }
body.pn-ui.detail-page .detail-card .meta-author-name a:focus-visible,
body.pn-ui.detail-page .detail-card .detail-avatar-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
/* Avatar-Link: 44px Trefferflaeche bei 32px Bild (Abstand per negativem Rand ausgeglichen) */
body.pn-ui.detail-page .detail-card .detail-avatar-link {
  display: inline-flex; flex: 0 0 auto;
  padding: 6px; margin: -6px;
  text-decoration: none;
}
body.pn-ui.detail-page .detail-card .meta-date { font-size: 0.8125rem; }

/* Like, Aufrufe, Teilen, Merken: 44px, gleicher Stil wie in der Karte */
body.pn-ui.detail-page .detail-actions .detail-like-btn,
body.pn-ui.detail-page .detail-actions .detail-share-btn,
body.pn-ui.detail-page .detail-actions .detail-bm-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.35rem;
  min-width: 44px; min-height: 44px;
  padding: 0 0.6rem;
  background: none; border: 0; border-radius: 999px;
  font-family: inherit; font-size: 0.8125rem; font-weight: 600; line-height: 1.2;
  color: var(--muted);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background-color 0.15s ease, color 0.15s ease;
}
body.pn-ui.detail-page .detail-actions .detail-like-btn:hover,
body.pn-ui.detail-page .detail-actions .detail-share-btn:hover,
body.pn-ui.detail-page .detail-actions .detail-bm-btn:hover { background: var(--bg); color: var(--bsn); }
body.pn-ui.detail-page .detail-actions .detail-like-btn:focus-visible,
body.pn-ui.detail-page .detail-actions .detail-share-btn:focus-visible,
body.pn-ui.detail-page .detail-actions .detail-bm-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
body.pn-ui.detail-page .detail-actions .detail-like-btn.liked { color: #B91C1C; }
body.pn-ui.detail-page .detail-actions svg { flex: 0 0 auto; }
body.pn-ui.detail-page .detail-actions .detail-share-btn svg { stroke: currentColor; }
body.pn-ui.detail-page .detail-actions .detail-share-btn { margin-left: auto; }
body.pn-ui.detail-page .detail-actions .detail-views {
  display: inline-flex; align-items: center; gap: 0.3rem;
  padding: 0 0.4rem;
  font-size: 0.8125rem;
  color: var(--muted);
}
body.pn-ui.detail-page .detail-actions .detail-views svg { stroke: currentColor; }
/* Schmale Screens: Wort "Aufrufe" (und unter 360px auch "Teilen") nur fuer
   Screenreader, damit Like, Teilen und Merken in jeder Sprache in einer Zeile
   bleiben. Der Teilen-Knopf behaelt sein aria-label. */
@media (max-width: 360px) {
  body.pn-ui.detail-page .detail-share-btn__label {
    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;
  }
}
@media (max-width: 420px) {
  body.pn-ui.detail-page .detail-views__label {
    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;
  }
}

/* ── Kommentare (Redesign 09/2026) ─────────────────────────────────────
   Schreibfeld oben, ruhige Liste ohne Kaestchen darunter. Jeder Kommentar:
   Avatar-Spalte + Inhalt; Antworten haengen an einer duennen Faden-Linie.
   Keine inneren Rahmen (nur Eingabefelder/Knoepfe), Touch-Ziele >= 44px. */
body.pn-ui.detail-page .comments-section.pn-surface {
  max-width: none;
  margin: 1.5rem 0 0;
  padding: var(--pn-detail-pad);
  scroll-margin-top: 5rem;
}
body.pn-ui.detail-page .comments-heading {
  display: flex; align-items: center; gap: 0.6rem;
  margin: 0 0 1.1rem;
  font-family: var(--pn-serif);
  font-size: 1.4rem; font-weight: 400; line-height: 1.2;
  color: var(--bsn);
}
body.pn-ui.detail-page .comments-count {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 1.9rem; height: 1.6rem;
  padding: 0 0.55rem;
  background: var(--bg); color: var(--bsn);
  border-radius: 999px;
  font-family: inherit; font-size: 0.8125rem; font-weight: 700; line-height: 1;
}

/* Schreibfeld (Heimatplatz oben) */
body.pn-ui.detail-page .comment-composer-home {
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--pn-detail-line);
}
body.pn-ui.detail-page .comment-composer-home:not(:has(form)) { display: none; }
body.pn-ui.detail-page .comment-form {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  column-gap: 0.75rem;
  align-items: start;
  margin: 0;
}
body.pn-ui.detail-page .comment-form__main { display: flex; flex-direction: column; gap: 0.65rem; min-width: 0; }
body.pn-ui.detail-page .comment-form .pn-input { width: 100%; }
body.pn-ui.detail-page .comment-form .comment-textarea {
  min-height: 3rem;
  resize: none;
  overflow-y: auto;
  line-height: 1.5;
  transition: border-color 0.15s ease, min-height 0.15s ease;
}
body.pn-ui.detail-page .comment-form.is-active .comment-textarea { min-height: 6rem; }
body.pn-ui.detail-page .comment-form__extra { display: none; flex-direction: column; gap: 0.75rem; min-width: 0; }
body.pn-ui.detail-page .comment-form.is-active .comment-form__extra,
body.pn-ui.detail-page .comment-form:focus-within .comment-form__extra { display: flex; }
body.pn-ui.detail-page .comment-form .reply-info {
  display: none;
  align-items: center; flex-wrap: wrap; gap: 0.25rem 0.5rem;
  margin: 0;
  font-size: 0.8125rem; color: var(--muted);
}
body.pn-ui.detail-page .comment-form .reply-info strong { color: var(--bsn); overflow-wrap: anywhere; }

/* Gaeste: Name + E-Mail nebeneinander, Hinweis darunter */
body.pn-ui.detail-page .comment-guest {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem 0.75rem;
}
body.pn-ui.detail-page .comment-guest__field { min-width: 0; }
body.pn-ui.detail-page .comment-label {
  display: block;
  margin: 0 0 0.3rem;
  font-size: 0.8125rem; font-weight: 600;
  color: var(--pn-ink);
}
body.pn-ui.detail-page .comment-label__req { color: #B45309; }
body.pn-ui.detail-page .comment-form .pn-input[aria-invalid="true"] { border-color: #B45309; }
body.pn-ui.detail-page .comment-field-hint {
  grid-column: 1 / -1;
  display: flex; align-items: flex-start; gap: 0.4rem;
  margin: 0;
  font-size: 0.8125rem; line-height: 1.45; color: var(--muted);
}
body.pn-ui.detail-page .comment-field-hint svg { flex: 0 0 auto; margin-top: 0.15rem; }
body.pn-ui.detail-page .comment-login-link { color: var(--bsn); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
body.pn-ui.detail-page .comment-login-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

/* Leiste: Bild links, Zaehler, Abbrechen + Senden rechts */
body.pn-ui.detail-page .comment-form__bar {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: 0.5rem;
  min-width: 0;
}
body.pn-ui.detail-page .comment-form__buttons { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-left: auto; }
body.pn-ui.detail-page .comment-media-upload { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; min-width: 0; }
body.pn-ui.detail-page .comment-media-upload .comment-image-btn {
  width: auto; height: auto;
  padding: 0 0.8rem;
  background: var(--bg); color: var(--bsn);
  border-color: transparent;
  border-radius: 999px;
}
body.pn-ui.detail-page .comment-media-upload .comment-image-btn:hover { border-color: var(--border); }
body.pn-ui.detail-page .comment-media-upload:focus-within .comment-image-btn { outline: 2px solid var(--accent); outline-offset: 2px; }
body.pn-ui.detail-page .comment-image-preview { display: flex; align-items: center; gap: 0.25rem; }
body.pn-ui.detail-page .comment-image-preview[hidden] { display: none; }
body.pn-ui.detail-page .comment-image-preview img {
  display: block;
  width: 56px; height: 56px;
  object-fit: cover;
  border-radius: 8px;
}
body.pn-ui.detail-page .comment-image-remove {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px;
  padding: 0;
  background: none; color: var(--muted);
  border: 0; border-radius: 50%;
  font-size: 1.35rem; line-height: 1;
  cursor: pointer;
}
body.pn-ui.detail-page .comment-image-remove:hover { background: var(--bg); color: #B91C1C; }
body.pn-ui.detail-page .comment-image-remove:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
body.pn-ui.detail-page .comment-counter { font-size: 0.78rem; color: var(--muted); font-variant-numeric: tabular-nums; }
body.pn-ui.detail-page .comment-counter[hidden] { display: none; }
body.pn-ui.detail-page .comment-counter.is-limit { color: #B91C1C; font-weight: 600; }
body.pn-ui.detail-page .comment-form .comment-cancel-btn {
  background: none; color: var(--muted);
  border-color: transparent;
}
body.pn-ui.detail-page .comment-form .comment-cancel-btn:hover { background: var(--bg); color: var(--bsn); border-color: transparent; }
body.pn-ui.detail-page .comment-form .comment-submit-btn { padding: 0 1.3rem; }
body.pn-ui.detail-page .comment-form .comment-submit-btn:disabled { opacity: 0.6; cursor: default; }
body.pn-ui.detail-page .comment-status {
  margin: 0; padding: 0.6rem 0.8rem;
  border-radius: var(--pn-radius-sm);
  font-size: 0.875rem;
}
body.pn-ui.detail-page .comment-status[hidden] { display: none; }
body.pn-ui.detail-page .comment-status.is-ok { background: #E8F5E9; color: #2E7D32; }
body.pn-ui.detail-page .comment-status.is-warn { background: #FFF3E0; color: #B45309; }
body.pn-ui.detail-page .comment-status.is-error { background: #FCE4EC; color: #B91C1C; }

/* Antworten: dasselbe Formular direkt unter dem Kommentar */
body.pn-ui.detail-page .comment-reply-slot:empty { display: none; }
body.pn-ui.detail-page .comment-reply-slot { margin: 0.35rem 0 0.75rem; }
body.pn-ui.detail-page .comment-form.is-reply { grid-template-columns: 28px minmax(0, 1fr); column-gap: 0.6rem; }
body.pn-ui.detail-page .comment-form.is-reply .comment-form__avatar { width: 28px; height: 28px; font-size: 0.7rem; }
body.pn-ui.detail-page .comment-form.is-reply .comment-guest { grid-template-columns: minmax(0, 1fr); }

/* Leerer Zustand */
body.pn-ui.detail-page .comments-empty {
  margin: 0;
  padding: 1.5rem 0 0.25rem;
  font-size: 0.95rem; color: var(--muted);
  text-align: center;
}

/* Liste */
body.pn-ui.detail-page .comment-list { margin-top: 0.5rem; }
body.pn-ui.detail-page .comments-section .comment-item {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  column-gap: 0.75rem;
  margin: 0;
  padding: 1rem 0 0.35rem;
  background: none;
  border-radius: 0;
  border-top: 1px solid var(--pn-detail-line);
  min-width: 0;
  scroll-margin-top: 6rem;
}
body.pn-ui.detail-page .comment-list > .comment-item:first-child { border-top: 0; }
body.pn-ui.detail-page .comment-avatar,
body.pn-ui.detail-page .comment-avatar-img {
  grid-column: 1;
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px;
  border-radius: 50%;
}
body.pn-ui.detail-page .comment-avatar-img { object-fit: cover; }
body.pn-ui.detail-page .comment-avatar {
  background: var(--bsn); color: #fff;
  font-size: 0.8rem; font-weight: 700;
}
body.pn-ui.detail-page .comment-avatar--guest { background: var(--bg); color: var(--muted); }
body.pn-ui.detail-page .comment-body {
  grid-column: 2;
  min-width: 0;
  border-radius: 8px;
  transition: background-color 0.8s ease, box-shadow 0.8s ease;
}
body.pn-ui.detail-page .comment-item.is-highlight > .comment-body {
  background-color: #FFF4E6;
  box-shadow: 0 0 0 0.45rem #FFF4E6;
}

/* Antworten: eingerueckt an einer Faden-Linie unter dem Avatar */
body.pn-ui.detail-page .comments-section .comment-children {
  grid-column: 1 / -1;
  position: relative;
  margin: 0;
  padding-left: calc(36px + 0.75rem);
  border-left: 0;
}
body.pn-ui.detail-page .comments-section .comment-children::before {
  content: "";
  position: absolute;
  left: 17px; top: 0; bottom: 0.9rem;
  width: 2px;
  background: var(--pn-detail-line);
  border-radius: 2px;
}
body.pn-ui.detail-page .comments-section .comment-children[hidden] { display: none; }
body.pn-ui.detail-page .comments-section .comment-item.comment-nested {
  grid-template-columns: 28px minmax(0, 1fr);
  column-gap: 0.6rem;
  padding: 0.7rem 0 0.2rem;
  border-top: 0;
}
body.pn-ui.detail-page .comment-nested > .comment-avatar,
body.pn-ui.detail-page .comment-nested > .comment-avatar-img { width: 28px; height: 28px; font-size: 0.7rem; }
body.pn-ui.detail-page .comments-section .comment-children .comment-children { padding-left: calc(28px + 0.6rem); }
body.pn-ui.detail-page .comments-section .comment-children .comment-children::before { left: 13px; }
/* Ab der dritten Ebene nicht weiter einruecken (kein Ueberlauf auf 320px) */
body.pn-ui.detail-page .comments-section .comment-children .comment-children .comment-children { padding-left: 0; }
body.pn-ui.detail-page .comments-section .comment-children .comment-children .comment-children::before { display: none; }

/* Redaktion: dezente Flaeche statt Rahmen; nur oben ein Orange-Balken links
   (Farbe/Balken setzt das Bestands-Attribut, hier nur Abstaende). */
body.pn-ui.detail-page .comments-section .comment-item.comment-redaktion {
  margin-top: 0.5rem;
  padding: 0.8rem 0.85rem 0.35rem;
  background: #FFF6F0;
  border-top-color: transparent;
  border-radius: var(--pn-radius-sm);
}
body.pn-ui.detail-page .comments-section .comment-item.comment-redaktion--top { padding-left: 0.9rem; }

body.pn-ui.detail-page .comment-header {
  display: flex; flex-wrap: wrap; align-items: baseline;
  gap: 0.15rem 0.5rem;
  margin: 0.1rem 0 0.25rem;
  min-width: 0;
}
body.pn-ui.detail-page .comment-author {
  min-width: 0;
  font-size: 0.9rem; font-weight: 700;
  color: var(--bsn);
  overflow-wrap: anywhere;
}
body.pn-ui.detail-page .comment-badge {
  display: inline-flex; align-items: center;
  align-self: center;
  padding: 0.1rem 0.55rem;
  background: var(--accent); color: var(--bsn);
  border-radius: 999px;
  font-size: 0.75rem; font-weight: 700; letter-spacing: 0.02em;
}
body.pn-ui.detail-page .comment-date { font-size: 0.78rem; color: var(--muted); }
body.pn-ui.detail-page .comment-date::before { content: "\00B7"; margin-right: 0.45rem; }
body.pn-ui.detail-page .comment-source-lang { margin: 0 0 0.25rem; font-size: 0.78rem; color: var(--muted); }
body.pn-ui.detail-page .comment-text {
  margin: 0;
  font-size: 0.95rem; line-height: 1.6;
  color: var(--pn-ink);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
body.pn-ui.detail-page .comment-annotation {
  display: flex; align-items: flex-start; gap: 0.5rem;
  margin-top: 0.6rem;
  padding: 0.6rem 0.8rem;
  background: var(--bsn); color: #fff;
  border-radius: var(--pn-radius-sm);
  font-size: 0.82rem; line-height: 1.5;
}
body.pn-ui.detail-page .comment-annotation svg { flex: 0 0 auto; margin-top: 1px; }
body.pn-ui.detail-page .comment-media { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.55rem; }
body.pn-ui.detail-page .comment-media-open {
  display: inline-flex; padding: 0;
  background: none; border: 0; border-radius: 10px;
  cursor: zoom-in;
}
body.pn-ui.detail-page .comment-media-open:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
body.pn-ui.detail-page .comment-media-img {
  display: block;
  min-width: 44px; min-height: 44px;
  max-width: min(100%, 240px); max-height: 240px;
  object-fit: cover;
  border-radius: 10px;
}

/* Kommentar-Aktionen: randlose Textknoepfe mit 44px */
body.pn-ui.detail-page .comment-actions {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: 0.1rem;
  margin: 0.15rem 0 0 -0.6rem;
}
body.pn-ui.detail-page .comments-section .comment-like-btn,
body.pn-ui.detail-page .comments-section .reply-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.35rem;
  min-width: 44px; min-height: 44px;
  margin: 0;
  padding: 0 0.6rem;
  background: none; border: 0; border-radius: 999px;
  font-family: inherit; font-size: 0.8125rem; font-weight: 600; line-height: 1.2;
  color: var(--muted);
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}
body.pn-ui.detail-page .comments-section .comment-like-btn:hover,
body.pn-ui.detail-page .comments-section .reply-btn:hover { background: var(--bg); color: var(--bsn); opacity: 1; text-decoration: none; }
body.pn-ui.detail-page .comments-section .comment-like-btn:focus-visible,
body.pn-ui.detail-page .comments-section .reply-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
body.pn-ui.detail-page .comments-section .comment-like-btn svg { flex: 0 0 auto; fill: none; stroke: currentColor; }
body.pn-ui.detail-page .comments-section .comment-like-btn:hover { color: #DC2626; }
body.pn-ui.detail-page .comments-section .comment-like-btn.liked { color: #DC2626; }
body.pn-ui.detail-page .comments-section .comment-like-btn.liked svg { fill: currentColor; }
body.pn-ui.detail-page .comments-section .clike-count:empty { display: none; }
body.pn-ui.detail-page .comments-section .toggle-replies {
  margin: 0 0 0.15rem -0.6rem;
  color: var(--bsn); font-weight: 700;
}
body.pn-ui.detail-page .toggle-replies__chev {
  flex: 0 0 auto;
  width: 0.45rem; height: 0.45rem;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  transition: transform 0.15s ease;
}
body.pn-ui.detail-page .toggle-replies[aria-expanded="true"] .toggle-replies__chev { transform: translateY(2px) rotate(-135deg); }

@media (max-width: 560px) {
  body.pn-ui.detail-page .comment-form,
  body.pn-ui.detail-page .comments-section .comment-item { grid-template-columns: 32px minmax(0, 1fr); column-gap: 0.6rem; }
  body.pn-ui.detail-page .comment-form__avatar,
  body.pn-ui.detail-page .comment-list .comment-item:not(.comment-nested) > .comment-avatar,
  body.pn-ui.detail-page .comment-list .comment-item:not(.comment-nested) > .comment-avatar-img { width: 32px; height: 32px; font-size: 0.75rem; }
  body.pn-ui.detail-page .comments-section .comment-children { padding-left: calc(32px + 0.6rem); }
  body.pn-ui.detail-page .comments-section .comment-children::before { left: 15px; }
  body.pn-ui.detail-page .comment-guest { grid-template-columns: minmax(0, 1fr); }
  body.pn-ui.detail-page .comment-form__buttons { flex: 1 1 100%; }
  body.pn-ui.detail-page .comment-form__buttons .pn-btn { flex: 1 1 0; }
}
@media (max-width: 360px) {
  body.pn-ui.detail-page .comment-media-upload .comment-image-btn__label { display: none; }
}

body.pn-ui.detail-page .detail-id-line {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 var(--pn-gutter) 2.5rem;
  box-sizing: border-box;
  font-size: 0.75rem; color: var(--muted);
  text-align: center;
  overflow-wrap: anywhere;
}
body.pn-ui.detail-page .detail-id-line strong { color: var(--bsn); }

@media (prefers-reduced-motion: reduce) {
  body.pn-ui.detail-page .detail-actions .detail-like-btn,
  body.pn-ui.detail-page .detail-actions .detail-share-btn,
  body.pn-ui.detail-page .detail-actions .detail-bm-btn,
  body.pn-ui.detail-page .comments-section .comment-like-btn,
  body.pn-ui.detail-page .comments-section .reply-btn,
  body.pn-ui.detail-page .comment-body,
  body.pn-ui.detail-page .toggle-replies__chev,
  body.pn-ui.detail-page .comment-form .comment-textarea,
  body.pn-ui.detail-page .gallery-arrow,
  body.pn-ui.detail-page .gallery-dot { transition: none; }
  body.pn-ui.detail-page .detail-like-btn:active,
  body.pn-ui.detail-page .detail-bm-btn:active,
  body.pn-ui.detail-page .detail-fw-btn:active,
  body.pn-ui.detail-page .comment-submit-btn:active { transform: none; }
  body.pn-ui.detail-page .gallery-track { scroll-behavior: auto; }
}

/* ══ Bearbeiten-Seiten (Beitrag + Kommentar) ═════════════════════════════ */
body.pn-ui .edit-container .edit-card { min-width: 0; }
body.pn-ui .edit-container .pn-heading { margin-bottom: 1.25rem; }
body.pn-ui .edit-field { margin: 0 0 1.25rem; min-width: 0; }
body.pn-ui .edit-label {
  display: block;
  margin: 0 0 0.45rem;
  font-size: 0.875rem; font-weight: 600;
  color: var(--pn-ink);
}
body.pn-ui .edit-hint { margin-top: 0.4rem; font-size: 0.8125rem; color: var(--muted); }
body.pn-ui .edit-container .pn-input,
body.pn-ui .edit-container .pn-select { width: 100%; }
body.pn-ui .edit-container .edit-textarea { min-height: 10rem; resize: vertical; line-height: 1.55; }
body.pn-ui .edit-container .edit-error {
  margin: 0 0 1.1rem; padding: 0.7rem 0.9rem;
  background: #FEF2F2; color: #B91C1C;
  border-radius: var(--pn-radius-sm);
  font-size: 0.9rem;
}
body.pn-ui .edit-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.5rem; }
body.pn-ui .edit-actions .edit-save { flex: 1 1 12rem; min-height: 48px; font-size: 1rem; }
body.pn-ui .edit-actions .edit-cancel { flex: 0 1 auto; min-height: 48px; font-size: 1rem; }
body.pn-ui .edit-danger-zone {
  margin-top: 1.75rem; padding-top: 1.25rem;
  border-top: 1px solid #F3F4F6;
}
body.pn-ui .edit-danger-title {
  margin: 0 0 0.6rem;
  font-size: 0.75rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--muted);
}
body.pn-ui .edit-container .pn-btn.edit-delete {
  width: 100%; min-height: 48px; margin-top: 0.75rem;
  color: #B91C1C; border-color: #FECACA;
}
body.pn-ui .edit-danger-zone .pn-btn.edit-delete { margin-top: 0; }
body.pn-ui .edit-container .pn-btn.edit-delete:hover { background: #FEF2F2; border-color: #B91C1C; }
body.pn-ui .edit-container .pn-btn.edit-delete svg { width: 16px; height: 16px; }

/* Galerie-Verwaltung: Zeilen als Flaeche statt Rahmen */
body.pn-ui .edit-gallery { display: flex; flex-direction: column; gap: 0.6rem; margin-bottom: 0.75rem; }
body.pn-ui .edit-media-row {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem;
  min-width: 0;
  padding: 0.5rem 0.6rem;
  background: var(--bg);
  border-radius: var(--pn-radius-sm);
  transition: background-color 0.15s ease, opacity 0.15s ease;
}
body.pn-ui .edit-media-row.is-removed { opacity: 0.45; }
body.pn-ui .edit-media-row.is-rotated { background: #FFF1E6; }
body.pn-ui .edit-media-thumb {
  flex: none;
  width: 64px; height: 64px;
  object-fit: cover;
  border-radius: 8px;
  background: #EEF0F3;
}
body.pn-ui .edit-media-pending {
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.4rem; color: var(--muted);
}
/* Vorschau der Drehung — die Datei selbst wird erst beim Speichern gedreht. */
body.pn-ui .edit-media-thumb[data-rot="90"]  { transform: rotate(90deg); }
body.pn-ui .edit-media-thumb[data-rot="180"] { transform: rotate(180deg); }
body.pn-ui .edit-media-thumb[data-rot="270"] { transform: rotate(270deg); }
body.pn-ui .edit-media-pos {
  min-width: 2rem;
  font-size: 0.8125rem; font-weight: 700; color: var(--muted);
  text-align: center;
}
body.pn-ui .edit-media-actions {
  display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0.35rem;
  margin-left: auto;
  min-width: 0;
}
body.pn-ui .edit-media-actions .pn-btn.edit-media-btn { width: 44px; padding: 0; font-size: 1rem; }
body.pn-ui .edit-media-actions .pn-btn.edit-media-btn:disabled { opacity: 0.35; cursor: default; }
body.pn-ui .edit-media-actions .pn-btn.edit-media-btn.danger { color: #B91C1C; }
body.pn-ui .edit-container .pn-btn.edit-add-label { width: 100%; min-height: 48px; }
body.pn-ui .edit-media-add:focus-within .edit-add-label { outline: 2px solid var(--accent); outline-offset: 2px; }
body.pn-ui .edit-new-list { margin-top: 0.45rem; font-size: 0.8125rem; color: var(--muted); overflow-wrap: anywhere; }

@media (prefers-reduced-motion: reduce) {
  body.pn-ui .edit-media-row { transition: none; }
}
