/*
  Sicht Freigaben (Paket 2): Daumenleiste, großes Bild, Segment, Aktionen,
  Instagram- und Feed-Vorschau, die Blätter Jetzt posten, Faktensperre,
  Freigeben, Ablehnen und Ändern. Bausteine aus stil.css (seg, pille, block,
  cover, blatt), keine eigene Akzentfarbe: Farbe kommt nur aus den Bildern.
  Ecken 20, 12, 8 Pixel, Knöpfe und Segmente Pille, Schrift höchstens 700.
*/

.fg { display: flex; flex-direction: column; min-width: 0; }

.fg-hinweis-platz:empty { display: none; }

.fg-hinweis {
  margin: 0 0 12px;
  padding: 12px 16px;
  border-radius: var(--r-mittel);
  background: var(--flaeche);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
}

/* --- Daumenleiste --- */
.fg-spur {
  display: flex;
  gap: 7px;
  margin: 0 calc(-1 * var(--rand));
  padding: 4px var(--rand) 12px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.fg-spur::-webkit-scrollbar { display: none; }

.fg-daumen {
  flex: 0 0 auto;
  width: 50px;
  height: 76px;
  padding: 0;
  border: 0;
  border-radius: var(--r-klein);
  color: var(--schrift);
  opacity: 0.55;
  cursor: pointer;
  touch-action: manipulation;
}
.fg-daumen[aria-current="true"] {
  opacity: 1;
  outline: 2px solid #ffffff;
  outline-offset: 2px;
}
.fg-skelett-daumen { margin: 0; opacity: 1; animation: skelett-puls 1.2s ease-in-out infinite; }
.fg-skelett-seg { height: 46px; border-radius: 999px; margin: 0 0 var(--kartenabstand); }
.fg-skelett-pille { height: 52px; border-radius: 999px; margin: 0; }
.fg-skelett-block { height: 190px; border-radius: var(--r-mittel); margin: 0 0 16px; }

/* Fehlt ein Bild, steht der Hook als Text auf der Fläche. */
.fg-hook-gross,
.fg-hook-klein {
  position: absolute;
  inset: 0;
  align-items: flex-end;
  background: var(--flaeche);
  color: var(--schrift);
  overflow: hidden;
  overflow-wrap: anywhere;
}
.fg-hook-gross { padding: 20px 18px; font-size: 26px; }
.fg-hook-klein { padding: 5px; font-size: 10px; line-height: 1.12; letter-spacing: 0; }

.fg-bild {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
}

/* --- Großes Bild --- */
.fg-buehne {
  position: relative;
  width: 100%;
  height: clamp(260px, calc(100dvh - 440px), 520px);
  margin: 0 0 var(--kartenabstand);
  border-radius: var(--r-gross);
  background: var(--flaeche);
  overflow: hidden;
}

.fg-buehne.cover::after { content: none; }

.fg-play {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.45);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  color: #ffffff;
  display: grid;
  place-items: center;
  cursor: pointer;
  touch-action: manipulation;
}
.fg-play svg { display: block; margin-left: 2px; }

.fg-laedt { animation: skelett-puls 1.2s ease-in-out infinite; }

.fg-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000000;
}

.fg-buehne-meldung {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 16px;
  z-index: 2;
  margin: 0;
  font-weight: 600;
}

/* Karussell und Bildpost: Seiten als Reihe zum Wischen im selben Rahmen. */
.fg-buehne-seiten { background: transparent; overflow: hidden; }
.fg-seiten {
  display: flex;
  height: 100%;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  gap: 8px;
}
.fg-seiten::-webkit-scrollbar { display: none; }
.fg-seite {
  position: relative;
  flex: 0 0 auto;
  height: 100%;
  aspect-ratio: 4 / 5;
  max-width: 100%;
  border-radius: var(--r-gross);
  scroll-snap-align: center;
}
.fg-buehne-seiten .fg-seiten > .fg-seite:only-child { margin: 0 auto; }

/* --- Aktionen --- */
.fg-aktionen { display: flex; flex-direction: column; align-items: stretch; }
.fg-aktionen .pille-reihe { margin: 0; }
.fg-aktionen .pille { min-width: 0; }
.fg-gesperrt { opacity: 0.5; }
.fg-gesperrt:disabled { opacity: 0.4; }

.fg-grund {
  margin: 0 0 var(--kartenabstand);
  padding: 12px 16px;
  border-radius: var(--r-mittel);
  background: var(--flaeche);
  color: var(--schrift-leise);
  font-size: 15px;
  line-height: 1.3;
}

.fg-ablehnen {
  align-self: center;
  min-height: var(--tippziel);
  padding: 0 20px;
  border: 0;
  background: transparent;
  color: var(--grau);
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  touch-action: manipulation;
}

.fg-fuss { margin-top: 8px; }
.fg-fuss .karussell-zeile { margin-bottom: 0; }

/* --- Instagram-Vorschau --- */
.fg-ig { margin: 0 0 var(--kartenabstand); padding: 12px 0 14px; overflow: hidden; }
.fg-ig-kopf { display: flex; align-items: center; gap: 10px; padding: 0 14px 10px; }
.fg-ig-namen { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.fg-ig-namen strong { font-size: 15px; font-weight: 600; }
.fg-ig-namen span { font-size: 13px; color: var(--schrift-leise); }
.fg-ig-bild {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 5;
  border-radius: 0;
}
.fg-ig .fg-seiten { height: auto; gap: 0; }
.fg-ig .fg-seite-ig { height: auto; width: 100%; aspect-ratio: 4 / 5; border-radius: 0; flex: 0 0 100%; }
.fg-ig-symbole { display: flex; gap: 14px; padding: 12px 14px 4px; color: var(--schrift); }
.fg-ig-caption {
  margin: 0;
  padding: 4px 14px 0;
  font-size: 15px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.fg-ig-caption strong { font-weight: 600; }
.fg-ig-mehr { color: var(--schrift-leise); }
.fg-ig-zeile {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 12px 14px 0;
  padding-top: 12px;
  border-top: 0.5px solid var(--linie);
  font-size: 15px;
}
.fg-ig-zeile span { color: var(--schrift-leise); }
.fg-ig-zeile strong { font-weight: 700; letter-spacing: 0.04em; }

/* --- Feed-Vorschau --- */
.fg-feed { margin: 0 0 var(--kartenabstand); }
.fg-raster { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; border-radius: var(--r-gross); overflow: hidden; }
.fg-kachel { position: relative; aspect-ratio: 3 / 4; border-radius: 0; }
.fg-kachel.an { outline: 2px solid #ffffff; outline-offset: -2px; z-index: 1; }
.fg-kachel::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(rgba(0, 0, 0, 0.6), transparent 34%);
  pointer-events: none;
}
.fg-kachel-text {
  position: absolute;
  left: 8px;
  top: 6px;
  z-index: 2;
  font-size: 12px;
  font-weight: 600;
}

/* --- Leere Freigabe: der nächste Post --- */
.fg-leer-titel { font-size: 28px; font-weight: 700; letter-spacing: -0.022em; line-height: 1.1; margin: 0 0 var(--kartenabstand); }
.fg-etikett { margin: 4px 0 8px; color: var(--grau); font-size: 13px; font-weight: 600; }
.fg-naechster { display: flex; flex-direction: column; gap: 2px; margin: 0 0 var(--kartenabstand); }
.fg-naechster strong { font-size: 17px; font-weight: 600; }
.fg-naechster span { color: var(--schrift-leise); font-size: 15px; }
.fg-breit { width: 100%; }
.fg-warnungen { margin-bottom: var(--kartenabstand); }
.fg-warnzeile { cursor: default; }

/* --- Blätter (hell): Titel, Listen, Pillen --- */
.fg-blatt .blatt-inhalt { padding-bottom: max(20px, var(--sicher-unten)); }
.fg-blatt .blatt-inhalt h2 { font-size: 24px; line-height: 1.1; margin: 0 0 14px; }
.fg-blatt .fg-satz { margin: 0 0 14px; font-size: 16px; line-height: 1.4; }
.fg-blatt .fg-satz-leise { color: var(--tinte-grau); font-size: 15px; }
.fg-blatt .fg-reihe { margin-top: 14px; }
.fg-blatt .fg-breit { margin-top: 14px; }
.fg-blatt .meldung { margin: 12px 0 0; }

.fg-pille-grau { background: #e5e5ea; color: #000000; }
.fg-pille-grau:disabled { background: #e5e5ea; color: #a1a1a6; opacity: 1; }
.fg-gesperrt-blatt { gap: 8px; }

.fg-liste { background: #ffffff; border-radius: var(--r-mittel); overflow: hidden; color: #000000; }
.fg-zeile {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 13px 16px;
  font-size: 16px;
  border-top: 0.5px solid var(--tinte-linie);
}
.fg-zeile:first-child { border-top: 0; }
.fg-zeile em { font-style: normal; margin-left: auto; color: var(--tinte-grau); font-size: 15px; text-align: right; }
.fg-zeile em.fg-stich { color: #000000; font-weight: 600; letter-spacing: 0.02em; }
.fg-zeile-tippbar { cursor: pointer; }
.fg-zeile-hinweis { align-items: flex-start; }
.fg-zeile-hinweis svg { flex: 0 0 auto; margin-top: 2px; }
.fg-zeile-hinweis span { display: flex; flex-direction: column; gap: 1px; }
.fg-zeile-hinweis strong { font-weight: 600; }
.fg-zeile small { display: block; color: var(--tinte-grau); font-size: 14px; }
.fg-zeile-aussage { flex-direction: column; align-items: flex-start; gap: 4px; font-size: 15px; line-height: 1.3; }

.fg-mini {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  background: #000000;
  color: #ffffff;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

.fg-jp-kopf { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.fg-jp-kopf h2 { margin: 0; }
.fg-jp-mini { flex: 0 0 auto; width: 66px; height: 96px; border-radius: var(--r-klein); }
.fg-jp-wann { margin: 4px 0 0; color: var(--tinte-grau); font-size: 15px; }
.fg-fuss-text { margin: 14px 0 0; text-align: center; color: var(--tinte-grau); font-size: 15px; font-weight: 600; }

.fg-balken { height: 5px; margin: 14px 0 0; border-radius: 999px; background: #e5e5ea; overflow: hidden; }
.fg-balken[hidden] { display: none; }
.fg-balken-fuellung { width: 0; height: 100%; border-radius: 999px; background: #000000; transition: width 0.15s linear; }

.fg-feld {
  display: block;
  width: 100%;
  min-height: 44px;
  padding: 10px 0 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #000000;
  font: inherit;
  font-size: 16px;
  line-height: 1.35;
  resize: none;
}
.fg-feld:focus { outline: none; }
.fg-blatt textarea.fg-feld { min-height: 0; }
.fg-feld-klein { flex: 1 1 auto; min-width: 0; padding: 8px 12px; min-height: 40px; border-radius: var(--r-klein); background: #f5f5f7; text-align: right; }
.fg-blatt textarea:not(.fg-feld) { background: #ffffff; color: #000000; }

.fg-liste-felder .fg-feldzeile { display: block; padding: 12px 16px; border-top: 0.5px solid var(--tinte-linie); }
.fg-liste-felder .fg-feldzeile:first-child { border-top: 0; }
.fg-feldzeile > span { display: block; color: var(--tinte-grau); font-size: 13px; font-weight: 600; }
.fg-blatt .fg-liste textarea.fg-feld,
.fg-blatt .fg-liste input.fg-feld { padding: 6px 0 0; border: 0; background: transparent; }
.fg-blatt > .blatt-inhalt > textarea.fg-feld {
  background: #ffffff;
  border-radius: var(--r-mittel);
  padding: 12px 16px;
  margin-bottom: 4px;
}

@media (prefers-reduced-motion: reduce) {
  .fg-laedt, .fg-skelett-daumen { animation: none; }
  .fg-balken-fuellung { transition: none; }
}
