/* Schriften selbst gehostet (kein Google-Fonts-Request: schneller, DSGVO-sauber). Variable Fonts, latin + latin-ext. */
@font-face {
  font-family: "Bricolage Grotesque";
  font-style: normal;
  font-weight: 500 800;
  font-display: swap;
  src: url(/fonts/bricolage-grotesque-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Bricolage Grotesque";
  font-style: normal;
  font-weight: 500 800;
  font-display: swap;
  src: url(/fonts/bricolage-grotesque-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(/fonts/source-sans-3-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(/fonts/source-sans-3-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --bg: #101114;
  --bg-2: #17181c;
  --card: #1a1b20;
  --line: #2a2c33;
  --text: #f2f3f5;
  --muted: #9a9ea8;
  --red: #e2231a;
  --red-hover: #ff3a30;
  --header-h: 64px;
  --radius: 14px;
  --font-display: "Bricolage Grotesque", "Source Sans 3", system-ui, sans-serif;
  --font-body: "Source Sans 3", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html {
  height: 100%;
  scroll-behavior: smooth;
  /* Kein Doppeltipp- und Pinch-Zoom (Doppeltipp = Like im Feed); Scrollen bleibt möglich */
  touch-action: pan-x pan-y;
  -webkit-text-size-adjust: 100%;
}

html, body {
  /* Nichts darf die Seite horizontal breiter machen (Handy) */
  overflow-x: hidden;
  overflow-x: clip;
}

body {
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: anywhere; /* lange Titel/Tags/Benutzernamen brechen um statt überzustehen */
}

body.no-scroll { overflow: hidden; }

/* Feste Oberflächentexte (Navigation, Buttons, Beschriftungen) lassen sich nicht markieren oder kopieren.
   Markierbar bleiben Eingabefelder sowie die Inhalte der Creator: Beschreibungen und Kommentare. */
body { user-select: none; -webkit-user-select: none; }
input, textarea, [contenteditable="true"],
.post-desc, .post-text-body, .comment-text { user-select: text; -webkit-user-select: text; }

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
img, video { display: block; max-width: 100%; }
/* Bilder/Videos nicht auf den Desktop ziehen, kein Langdruck-Menü „Bild sichern“ (iOS) */
img, video { -webkit-user-drag: none; -webkit-touch-callout: none; }
svg { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
[hidden] { display: none !important; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Header ---------- */

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 40;
  height: var(--header-h);
  background: rgba(23, 24, 28, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  height: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
}

.header-lead { display: flex; align-items: center; gap: 8px; min-width: 0; }
.nav-slot { display: block; min-width: 0; }
.nav-toggle { display: none; }
.nav-drawer-title { display: none; }
.nav-backdrop { display: none; }

.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand-mark { width: 34px; height: 34px; display: grid; place-items: center; }
.brand-cube { width: 22px; height: 22px; background: var(--red); border-radius: 4px; transform: rotate(12deg); box-shadow: 4px 4px 0 #8a140f; }
.brand-copy { display: flex; flex-direction: column; line-height: 1.05; }
.brand-kicker { font-size: 11px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.brand-name { font-family: var(--font-display); font-size: 18px; font-weight: 800; }

.nav {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  z-index: 41;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.nav-link {
  position: relative;
  padding: 8px 14px;
  border-radius: 9px;
  font-weight: 600;
  font-size: 15px;
  color: var(--muted);
  white-space: nowrap;
  transition: color 0.15s, background 0.15s;
}
.nav-link:hover { color: var(--text); background: #1f2127; }
.nav-link.is-active { color: var(--text); }
.nav-link.is-active::after {
  content: "";
  position: absolute;
  left: 14px; right: 14px; bottom: 2px;
  height: 3px;
  border-radius: 3px;
  background: var(--red);
}

.header-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }

/* Sprachwahl (Globus + natives Select, als Ghost-Button gestaltet) */
.lang-pick {
  position: relative;
  display: inline-flex;
  align-items: center;
  height: 38px;
  padding: 0 10px 0 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--muted);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.lang-pick:hover { background: #1f2127; border-color: #3a3d46; color: var(--text); }
.lang-pick > svg { width: 18px; height: 18px; flex: 0 0 auto; }
.lang-select {
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  padding: 0 6px 0 8px;
  max-width: 130px;
  cursor: pointer;
}
.lang-select:focus { outline: none; }
.lang-pick:focus-within { border-color: #4a4d58; color: var(--text); }
.lang-select option { color: #111; background: #fff; }

/* Hinweis: Seite gibt es auch in der Browsersprache */
.lang-banner {
  position: sticky;
  top: var(--header-h);
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 8px 16px;
  background: #1c1e25;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  font-size: 14px;
}
.lang-banner .icon-btn { width: 30px; height: 30px; font-size: 18px; }

/* Postanschrift im Impressum/Datenschutz */
.legal-address { margin: 8px 0 14px; padding: 12px 16px; border-left: 3px solid var(--red); border-radius: 0 10px 10px 0; background: var(--bg-2); font-style: normal; line-height: 1.55; }

/* Rechtstexte in Fremdsprache: Hinweis auf die verbindliche deutsche Fassung */
.legal-lang { margin: -6px 0 18px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg-2); color: var(--muted); font-size: 14px; }

/* „Übersetzt · Original anzeigen“ */
.post-translated, .comment-translated {
  display: inline-block;
  margin-top: 6px;
  padding: 0;
  border: 0;
  background: none;
  color: rgba(255, 255, 255, 0.72);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}
.comment-translated { color: var(--muted); text-shadow: none; }
.post-translated u, .comment-translated u { text-underline-offset: 2px; }
.post-translated:hover, .comment-translated:hover { color: #fff; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 38px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
}
.btn:disabled { opacity: 0.55; cursor: default; }
.btn svg { width: 18px; height: 18px; }
.btn-red { background: var(--red); color: #fff; }
.btn-red:hover:not(:disabled) { background: var(--red-hover); }
.btn-ghost { border-color: var(--line); background: transparent; color: var(--text); }
.btn-ghost:hover:not(:disabled) { background: #1f2127; border-color: #3a3d46; }
.btn-block { width: 100%; height: 42px; margin-top: 4px; font-size: 15px; font-weight: 700; }
.btn-sm { height: 32px; padding: 0 10px; font-size: 13px; }
.btn-danger { border-color: rgba(226, 35, 26, 0.4); color: #ff6b63; }
.btn-danger:hover:not(:disabled) { background: rgba(226, 35, 26, 0.12); border-color: var(--red); }

.icon-btn {
  display: grid; place-items: center;
  width: 36px; height: 36px;
  border: 0; border-radius: 50%;
  background: transparent; color: var(--muted);
  font-size: 22px; line-height: 1; cursor: pointer;
}
.icon-btn:hover { background: #24262d; color: var(--text); }

.link-button { border: 0; background: none; color: var(--text); font-weight: 600; text-decoration: underline; cursor: pointer; }

/* ---------- Avatar ---------- */

.avatar {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  background: linear-gradient(135deg, #3b2f6e, #6b1e5c);
  color: #fff;
  font-weight: 700;
  overflow: hidden;
  user-select: none;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-sm { width: 32px; height: 32px; font-size: 14px; }
.avatar-md { width: 44px; height: 44px; font-size: 18px; }
.avatar-lg { width: 96px; height: 96px; font-size: 38px; }

/* ---------- Benutzer-Badges: Verified, Partner (nur Anzeige), Admin ---------- */
.ubadges {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 5px;
  vertical-align: middle;
  line-height: 0;
}
.ubadge {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 1.05em;
  height: 1.05em;
  min-width: 15px;
  min-height: 15px;
  border-radius: 50%;
  font-size: inherit;
  line-height: 0;
  box-sizing: border-box;
  overflow: hidden;
}
.ubadge svg {
  display: block;
  width: 62%;
  height: 62%;
  margin: 0;
  flex-shrink: 0;
  overflow: visible;
}
/* Optische Feinjustierung der Pfade im Kreis */
.ubadge-verified svg { transform: translateY(0.5px); }
.ubadge-partner svg { transform: translateY(-0.5px); }
.ubadge-admin svg { transform: translate(0.5px, 0.5px); }
.ubadge-verified { background: #d9dde3; color: #0b0c10; }
.ubadge-partner { background: #c9a227; color: #1a1408; box-shadow: 0 0 0 1.5px rgba(201, 162, 39, 0.35); }
.ubadge-partner svg { fill: currentColor; stroke: none; }
.ubadge-admin { background: var(--red); color: #fff; box-shadow: 0 0 0 1.5px rgba(226, 35, 26, 0.25); }
/* Mit Beschriftung (Profilkopf) */
.ubadge-label {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  width: auto;
  height: auto;
  min-width: 0;
  min-height: 0;
  gap: 6px;
  padding: 4px 10px 4px 6px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1;
  overflow: visible;
}
.ubadge-label > span { line-height: 1.2; }
.ubadge-label svg {
  width: 16px;
  height: 16px;
  padding: 3px;
  box-sizing: border-box;
  border-radius: 50%;
  flex-shrink: 0;
  transform: none;
}
.ubadge-label.ubadge-verified { background: rgba(217, 221, 227, 0.14); color: #e8eaee; }
.ubadge-label.ubadge-verified svg { color: #0b0c10; background: #d9dde3; }
.ubadge-label.ubadge-verified svg { transform: translateY(0.5px); }
.ubadge-label.ubadge-partner { background: rgba(201, 162, 39, 0.18); color: #e8c75a; box-shadow: none; }
.ubadge-label.ubadge-partner svg { color: #1a1408; background: #c9a227; fill: currentColor; stroke: none; }
.ubadge-label.ubadge-admin { background: rgba(226, 35, 26, 0.16); color: #ff8a84; box-shadow: none; }
.ubadge-label.ubadge-admin svg { color: #fff; background: var(--red); }
.ubadge-label.ubadge-admin svg { transform: translate(0.5px, 0.5px); }
.ubadge-title { width: 0.9em; height: 0.9em; margin-right: 10px; vertical-align: -0.08em; box-shadow: none; overflow: hidden; }
.profile-badges { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.profile-head h1 .ubadges { margin-left: 8px; font-size: 22px; vertical-align: middle; }
.profile-menu-name { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 2px; }
.profile-menu-name .ubadges { font-size: 13px; }
.post-creator .ubadges { font-size: 14px; }
.card-author .ubadges { margin-left: 2px; font-size: 13px; }
.comment-head .ubadges { margin-left: 0; font-size: 12px; align-self: center; }

/* ---------- Profilmenü ---------- */

.profile { position: relative; }
.profile-btn {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 4px 2px 2px;
  border: 1px solid var(--line); border-radius: 999px;
  background: transparent; cursor: pointer;
}
.profile-btn:hover, .profile-btn[aria-expanded="true"] { background: #1f2127; }
.profile-btn .chev { width: 16px; height: 16px; color: var(--muted); }
.profile-menu {
  position: absolute; right: 0; top: calc(100% + 8px);
  width: 250px;
  padding: 6px;
  border: 1px solid var(--line); border-radius: 14px;
  background: #1c1d23;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.5);
  animation: pop-in 0.16s var(--ease-out);
}
.profile-menu-head { display: flex; align-items: center; gap: 12px; padding: 10px 10px 12px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.profile-menu-head strong { display: block; font-size: 15px; }
.profile-menu-sub { font-size: 12px; color: var(--muted); }
.menu-item {
  display: flex; align-items: center; gap: 10px;
  width: 100%;
  padding: 9px 10px;
  border: 0; border-radius: 9px;
  background: none; color: var(--text);
  font-size: 14px; font-weight: 500; text-align: left; cursor: pointer;
}
.menu-item svg { width: 18px; height: 18px; color: var(--muted); }
.menu-item:hover { background: #26282f; }
.menu-item-danger { color: #ff6b63; }
.menu-item-danger svg { color: inherit; }
.menu-item-admin svg { color: var(--red); }

@keyframes pop-in { from { opacity: 0; transform: translateY(-6px) scale(0.98); } to { opacity: 1; transform: none; } }

/* ---------- Layout ---------- */

.view { padding-top: var(--header-h); min-height: 100vh; }
.view:focus { outline: none; }
/* Feed ist Vollbild: Ansicht exakt so hoch wie der sichtbare Bereich (kein 100vh-Überhang, der unten drückt) */
body.no-scroll .view { min-height: 0; height: var(--feed-vh, 100svh); overflow: hidden; }
body.no-scroll .lang-banner { display: none; }

.container { max-width: 1240px; margin: 0 auto; padding: 32px 24px 72px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.page-title { font-family: var(--font-display); font-size: clamp(26px, 3vw, 36px); font-weight: 800; letter-spacing: -0.01em; line-height: 1.1; }
.page-sub { color: var(--muted); margin-top: 6px; }

.state { padding: 60px 20px; text-align: center; color: var(--muted); }
.state strong { display: block; color: var(--text); font-size: 18px; margin-bottom: 6px; }
.state .btn { margin-top: 16px; }

/* ---------- Hero + Suche (Startseite) ---------- */

.hero {
  position: relative;
  padding: 56px 0 40px;
  text-align: center;
}
.hero::before {
  /* Glow bleibt innerhalb der Seitenbreite – sonst entsteht auf dem Handy horizontales Scrollen */
  content: "";
  position: absolute; inset: -80px 0 auto;
  height: 420px;
  background: radial-gradient(ellipse 80% 100% at 50% 50%, rgba(226, 35, 26, 0.22), transparent 70%);
  pointer-events: none;
}
.hero > * { position: relative; }
.hero-kicker { display: inline-block; padding: 4px 12px; border: 1px solid var(--line); border-radius: 999px; font-size: 12px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.hero-title { font-family: var(--font-display); font-size: clamp(34px, 5.5vw, 62px); font-weight: 800; line-height: 1.02; letter-spacing: -0.02em; margin: 18px 0 12px; }
.hero-title em { font-style: normal; color: var(--red); }
.hero-sub { max-width: 620px; margin: 0 auto; color: var(--muted); font-size: 17px; }

.search {
  position: relative;
  max-width: 720px;
  margin: 28px auto 0;
}
.search svg { position: absolute; left: 18px; top: 50%; width: 22px; height: 22px; translate: 0 -50%; color: var(--muted); pointer-events: none; }
.search input {
  width: 100%;
  height: 58px;
  padding: 0 120px 0 52px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--bg-2);
  color: var(--text);
  font: inherit; font-size: 17px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.search input:focus { outline: none; border-color: #4a4d58; box-shadow: 0 0 0 4px rgba(226, 35, 26, 0.16), 0 10px 40px rgba(0, 0, 0, 0.35); }
.search button { position: absolute; right: 8px; top: 8px; height: 42px; }
.search-hints { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 12px; font-size: 13px; color: var(--muted); }
.search-hints button { border: 0; background: #1f2127; color: var(--muted); padding: 4px 10px; border-radius: 999px; cursor: pointer; font-size: 13px; }
.search-hints button:hover { color: var(--text); }

/* ---------- Filter + Chips ---------- */

.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin: 28px 0 18px; }
.segmented { display: inline-flex; padding: 4px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg-2); }
.segmented button {
  height: 34px; padding: 0 14px;
  border: 0; border-radius: 9px;
  background: transparent; color: var(--muted);
  font-size: 14px; font-weight: 600; cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.segmented button:hover { color: var(--text); }
.segmented button.is-active { background: #2a2c33; color: var(--text); }

.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 32px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: 999px;
  background: transparent; color: var(--muted);
  font-size: 13px; font-weight: 600; cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.chip:hover { color: var(--text); border-color: #3a3d46; }
.chip.is-active { color: var(--text); border-color: var(--red); background: rgba(226, 35, 26, 0.12); }
.chip-count { font-size: 12px; color: var(--muted); }
.result-info { color: var(--muted); font-size: 14px; }

/* ---------- Karten-Grid ---------- */

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }

.card {
  display: flex; flex-direction: column;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--card);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s var(--ease-out), border-color 0.2s, box-shadow 0.2s;
}
.card:hover { transform: translateY(-3px); border-color: #3a3d46; box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4); }
.card:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }

.thumb { position: relative; aspect-ratio: 16 / 10; background: #0b0c0f; overflow: hidden; }
.thumb img, .thumb video { width: 100%; height: 100%; object-fit: cover; }
.thumb-text {
  height: 100%;
  display: flex; align-items: center; justify-content: center;
  padding: 18px;
  background: linear-gradient(135deg, #1d1330, #2c1024);
  font-family: var(--font-display); font-weight: 800; font-size: 20px; line-height: 1.15; text-align: center;
  color: #fff;
}
.thumb-text.is-tile { font-size: 15px; padding: 12px; }
.badge-play {
  position: absolute; right: 10px; bottom: 10px;
  display: grid; place-items: center;
  width: 30px; height: 30px; border-radius: 50%;
  background: rgba(0, 0, 0, 0.6); color: #fff;
}
.badge-play svg { width: 14px; height: 14px; fill: currentColor; stroke: none; }
.badge-type { position: absolute; left: 10px; top: 10px; padding: 3px 8px; border-radius: 6px; background: rgba(0, 0, 0, 0.6); font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.badge-draft { position: absolute; right: 10px; top: 10px; padding: 3px 8px; border-radius: 6px; background: #b58900; color: #000; font-size: 11px; font-weight: 700; }

.card-body { padding: 14px 16px 10px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card-title { font-family: var(--font-display); font-size: 18px; font-weight: 700; line-height: 1.2; }
.card-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.card-author { display: inline-flex; align-items: center; gap: 6px; color: var(--text); font-weight: 600; }
.card-author:hover { text-decoration: underline; }
.card-author .avatar { width: 20px; height: 20px; font-size: 10px; }
.tag-cat { padding: 2px 8px; border-radius: 6px; background: rgba(226, 35, 26, 0.16); color: #ff8a84; font-size: 12px; font-weight: 700; }
.card-stats { display: flex; align-items: center; gap: 16px; padding: 10px 16px 14px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.stat { display: inline-flex; align-items: center; gap: 6px; }
.stat svg { width: 16px; height: 16px; }
.stat.is-liked { color: #ff5a52; }
.stat.is-liked svg { fill: currentColor; }
.card-stats .spacer { flex: 1; }
.card-stats time { font-size: 12px; }

.skeleton { border-radius: var(--radius); background: linear-gradient(90deg, #1a1b20 25%, #22242b 50%, #1a1b20 75%); background-size: 200% 100%; animation: shimmer 1.4s infinite; min-height: 300px; border: 1px solid var(--line); }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

.pager { display: flex; justify-content: center; margin-top: 28px; }

/* ---------- Kategorien-Seite ---------- */

.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.cat-card {
  display: flex; flex-direction: column; gap: 8px;
  padding: 22px;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--card);
  transition: transform 0.2s var(--ease-out), border-color 0.2s;
}
.cat-card:hover { transform: translateY(-3px); border-color: var(--red); }
.cat-card strong { font-family: var(--font-display); font-size: 22px; }
.cat-card span { color: var(--muted); font-size: 14px; }
.cat-icon { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; background: rgba(226, 35, 26, 0.14); color: #ff8a84; margin-bottom: 6px; }
.cat-icon svg { width: 22px; height: 22px; }

/* ---------- Feed ---------- */

.feed-wrap {
  position: relative;
  /* svh / --feed-vh: stabile Höhe – 100dvh springt mit der Mobil-Adressleiste und schiebt die Posts */
  height: calc(var(--feed-vh, 100svh) - var(--header-h));
  background: #000;
  overflow: hidden;
}
/* Kein Scroll-Container mehr: Die Spur wird per transform seitenweise verschoben (TikTok-Pager) */
.feed {
  height: 100%;
  overflow: hidden;
  touch-action: none; /* Wischen übernimmt hub.js, kein Browser-Scrolling/Pull-to-Refresh */
  user-select: none;
  -webkit-user-select: none;
  overscroll-behavior: contain;
  cursor: grab;
}
.feed-track {
  height: 100%;
  will-change: transform;
  /* Animation läuft in hub.js (Spring per requestAnimationFrame) – keine CSS-Transition, sonst doppelt */
  transition: none;
}
.feed-track.is-static { transition: none; }
.feed-track.is-dragging { cursor: grabbing; }

.post {
  position: relative;
  height: 100%;
  overflow: hidden;
  background: #000;
}

.post-media { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; }
.post-media.is-cover { object-fit: cover; }
.post-backdrop { position: absolute; inset: -40px; background-size: cover; background-position: center; filter: blur(40px) brightness(0.45); transform: scale(1.1); }

.post-text {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 72px 96px 200px;
  text-align: center;
  background:
    radial-gradient(ellipse at 30% 20%, rgba(226, 35, 26, 0.22), transparent 55%),
    radial-gradient(ellipse at 80% 80%, rgba(84, 64, 160, 0.3), transparent 55%),
    linear-gradient(160deg, #15121d, #0f1014);
}
.post-text-kicker { font-size: 13px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: #ff8a84; }
.post-text-title { font-family: var(--font-display); font-size: clamp(34px, 5vw, 64px); font-weight: 800; line-height: 1.02; letter-spacing: -0.02em; margin: 14px 0 20px; max-width: 900px; }
.post-text-body { max-width: 680px; font-size: clamp(16px, 1.6vw, 20px); line-height: 1.55; color: #d3d5db; white-space: pre-line; display: -webkit-box; -webkit-line-clamp: 8; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------- Partner-Posts: goldener Look, damit man Partner auf einen Blick erkennt ---------- */
:root {
  --partner: #c9a227;
  --partner-soft: #e8c75a;
  --partner-glow: rgba(201, 162, 39, 0.55);
}
.post.is-partner { background: #120f08; }
/* Goldener Rahmen + weicher Glow am Rand (liegt über dem Medium, lässt Klicks durch) */
.post.is-partner::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  box-shadow:
    inset 0 0 0 2px rgba(201, 162, 39, 0.9),
    inset 0 0 0 4px rgba(201, 162, 39, 0.25),
    inset 0 0 90px rgba(201, 162, 39, 0.28);
}
/* Sanft pulsierende Aura hinter dem Medium (sichtbar bei Bildern mit Rand und Text-Posts) */
.post-partner-glow {
  position: absolute;
  inset: -20%;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 20% 15%, rgba(201, 162, 39, 0.38), transparent 55%),
    radial-gradient(ellipse at 85% 85%, rgba(232, 199, 90, 0.28), transparent 55%),
    linear-gradient(160deg, #1a1408, #0f0d07);
  animation: partner-aura 6s ease-in-out infinite alternate;
}
@keyframes partner-aura {
  from { transform: scale(1) rotate(0deg); opacity: 0.9; }
  to { transform: scale(1.08) rotate(2deg); opacity: 1; }
}
.post.is-partner .post-media,
.post.is-partner .post-backdrop,
.post.is-partner .post-text { position: absolute; z-index: 1; }
.post.is-partner .post-media { background: transparent; }
/* Text-Post: goldene Variante statt rot/violett */
.post.is-partner .post-text {
  background:
    radial-gradient(ellipse at 30% 20%, rgba(201, 162, 39, 0.32), transparent 55%),
    radial-gradient(ellipse at 80% 80%, rgba(232, 199, 90, 0.22), transparent 55%),
    linear-gradient(160deg, #1c160a, #0f0d07);
}
.post.is-partner .post-text-kicker { color: var(--partner-soft); }
.post.is-partner .post-tag.is-cat { background: rgba(201, 162, 39, 0.4); color: #fff6d6; }
.post.is-partner .post-bar {
  background: linear-gradient(to top, rgba(18, 15, 8, 0.94) 0%, rgba(18, 15, 8, 0.66) 45%, rgba(18, 15, 8, 0) 100%);
}
/* Ribbon oben links */
.post-partner-ribbon {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px 6px 9px;
  border-radius: 999px;
  background: linear-gradient(135deg, #e8c75a, #c9a227 60%, #a8841c);
  color: #1a1408;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  box-shadow: 0 6px 20px rgba(201, 162, 39, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.45);
  pointer-events: none;
}
.post-partner-ribbon svg { width: 14px; height: 14px; fill: currentColor; stroke: none; }
.post.is-partner .post-mute { top: 16px; right: 16px; }

/* Karten im Katalog */
.card.is-partner {
  position: relative;
  border-color: rgba(201, 162, 39, 0.55);
  background:
    linear-gradient(180deg, rgba(201, 162, 39, 0.1), rgba(201, 162, 39, 0) 40%),
    var(--card);
  box-shadow: 0 0 0 1px rgba(201, 162, 39, 0.18), 0 10px 30px rgba(201, 162, 39, 0.12);
}
.card.is-partner:hover { border-color: var(--partner); box-shadow: 0 0 0 1px rgba(201, 162, 39, 0.35), 0 16px 40px rgba(201, 162, 39, 0.22); }
.card-partner {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px 4px 7px;
  border-radius: 999px;
  background: linear-gradient(135deg, #e8c75a, #c9a227 60%, #a8841c);
  color: #1a1408;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  box-shadow: 0 4px 14px rgba(201, 162, 39, 0.45);
}
.card-partner svg { width: 12px; height: 12px; fill: currentColor; stroke: none; }
.card.is-partner .thumb-text { background: linear-gradient(135deg, #2a2110, #3a2c12); }
@media (prefers-reduced-motion: reduce) { .post-partner-glow { animation: none; } }

/* Großes Play-Zeichen, solange das sichtbare Video pausiert (wie bei TikTok / Shorts) */
.post-paused {
  position: absolute; left: 50%; top: 50%; z-index: 3;
  transform: translate(-50%, -50%);
  display: none; place-items: center;
  width: 96px; height: 96px; border-radius: 50%;
  background: rgba(0, 0, 0, 0.4); /* dunkler Kreis, damit das Zeichen auch auf hellen Videos sichtbar ist */
  backdrop-filter: blur(6px);
  color: rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.45);
  pointer-events: none;
}
.post-paused svg { width: 58%; height: 58%; margin-left: 7%; fill: currentColor; stroke: none; }
.post.is-paused .post-paused { display: grid; animation: paused-in 0.22s var(--ease-out); }
@keyframes paused-in {
  from { opacity: 0; transform: translate(-50%, -50%) scale(0.6); }
  to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

.post-mute {
  position: absolute; top: 16px; right: 16px; z-index: 2;
  display: grid; place-items: center;
  width: 40px; height: 40px; border: 0; border-radius: 50%;
  background: rgba(0, 0, 0, 0.55); color: #fff; cursor: pointer;
  opacity: 0; transition: opacity 0.2s;
}
.post-mute svg { width: 20px; height: 20px; }
.post:hover .post-mute, .post-mute:focus-visible { opacity: 1; }
@media (hover: none) { .post-mute { opacity: 1; } }

/* Rechte Aktionsleiste */
.rail {
  position: absolute; right: 14px; bottom: 120px; z-index: 3;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
}
/* Die Leiste liegt über beliebigen Medien – auch weißen Bildern. Weiße Icons brauchen deshalb einen eigenen,
   kontrollierten Untergrund (dunkles Glas) plus Schatten, sonst ist der 3:1-Kontrast (WCAG 1.4.11) nicht
   garantiert. Ohne backdrop-filter (ältere Browser) wird der Kreis einfach etwas dunkler. */
.rail-item { display: flex; flex-direction: column; align-items: center; gap: 3px; color: #fff; font-size: 12px; font-weight: 700; line-height: 1; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.85), 0 0 8px rgba(0, 0, 0, 0.55); }
.rail-btn {
  display: grid; place-items: center;
  width: 48px; height: 48px;
  border: 0; border-radius: 50%;
  background: rgba(0, 0, 0, 0.6);
  color: #fff; cursor: pointer;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35), inset 0 0 0 1px rgba(255, 255, 255, 0.16);
  transition: transform 0.15s var(--ease-out), background 0.15s;
  touch-action: manipulation;
  -webkit-touch-callout: none;
}
@supports (backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px)) {
  .rail-btn { background: rgba(0, 0, 0, 0.42); -webkit-backdrop-filter: blur(10px) saturate(1.3); backdrop-filter: blur(10px) saturate(1.3); }
}
.rail-btn:hover { background: rgba(0, 0, 0, 0.62); transform: scale(1.06); }
.rail-btn:active { transform: scale(0.92); }
.rail-btn svg { width: 24px; height: 24px; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.6)); }
.rail-avatar { position: relative; width: 48px; height: 48px; font-size: 20px; border: 2px solid #fff; box-shadow: 0 2px 12px rgba(0, 0, 0, 0.45); }
/* Nutzer mit Kontrast-/Transparenz-Präferenz: deckend, ohne Glas */
@media (prefers-contrast: more), (prefers-reduced-transparency: reduce) {
  .rail-btn { background: rgba(0, 0, 0, 0.88); -webkit-backdrop-filter: none; backdrop-filter: none; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.85); }
  .rail-btn:hover { background: #000; }
}
.rail-user { position: relative; margin-bottom: 8px; }
/* Rotes „+“ unter dem Avatar → Creator folgen; wird nach dem Folgen zum Haken und blendet aus */
.rail-follow {
  position: absolute; left: 50%; bottom: -9px; translate: -50% 0;
  display: grid; place-items: center;
  width: 21px; height: 21px; padding: 0; border: 0; border-radius: 50%;
  background: var(--red); color: #fff;
  font-size: 17px; font-weight: 700; line-height: 1;
  cursor: pointer;
  transition: transform 0.15s var(--ease-out), background 0.2s;
}
.rail-follow:hover:not(:disabled) { transform: scale(1.15); background: var(--red-hover); }
.rail-follow svg { width: 13px; height: 13px; stroke-width: 3.2; }
.rail-follow.is-done { background: #fff; color: var(--red); cursor: default; animation: follow-pop 0.45s var(--ease-out), follow-fade 0.3s ease 0.65s forwards; }
@keyframes follow-pop {
  0% { transform: scale(1); }
  40% { transform: scale(1.45); }
  100% { transform: scale(1); }
}
@keyframes follow-fade { to { opacity: 0; transform: scale(0.4); } }
.rail-btn.is-liked { color: #ff3b30; }
.rail-btn.is-liked svg { fill: currentColor; }
.rail-btn.is-liked.was-toggled svg { animation: heart-pop 0.45s var(--ease-out); }
.rail-btn.was-toggled:not(.is-liked) svg { animation: heart-drop 0.3s var(--ease-out); }
.rail-btn.is-quick { font-size: 26px; line-height: 1; animation: quick-pop 0.45s var(--ease-out); }
@keyframes quick-pop { 0% { transform: scale(0.6); } 55% { transform: scale(1.18); } 100% { transform: scale(1); } }

/* Schnellkommentar-Bubble (Long-Press auf Kommentar-Symbol, wie bei TikTok) */
.quick-react {
  position: fixed;
  z-index: 65;
  pointer-events: none;
}
.quick-react-bubble {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 6px 8px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(0, 0, 0, 0.06);
  pointer-events: auto;
  animation: quick-bubble-in 0.22s var(--ease-out);
  transform-origin: right center;
}
.quick-react-bubble::after {
  content: "";
  position: absolute;
  right: -5px;
  top: 50%;
  width: 10px;
  height: 10px;
  background: #fff;
  transform: translateY(-50%) rotate(45deg);
  box-shadow: 2px -2px 0 rgba(0, 0, 0, 0.04);
}
.quick-react-bubble { position: relative; }
.quick-emoji {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  transition: transform 0.12s var(--ease-out), background 0.12s;
}
.quick-emoji:hover,
.quick-emoji.is-hot {
  background: rgba(0, 0, 0, 0.06);
  transform: scale(1.22);
}
@keyframes quick-bubble-in {
  from { opacity: 0; transform: scale(0.7) translateX(8px); }
  to { opacity: 1; transform: none; }
}
@keyframes heart-pop {
  0% { transform: scale(1); }
  30% { transform: scale(1.45) rotate(-8deg); }
  60% { transform: scale(0.9); }
  100% { transform: scale(1); }
}
.rail-btn.was-toggled:not(.is-liked) svg { animation: heart-drop 0.3s var(--ease-out); }
@keyframes heart-drop { 0% { transform: scale(0.7); } 100% { transform: scale(1); } }

/* Großes Herz beim Doppeltipp auf den Post */
.heart-burst {
  position: absolute; z-index: 4;
  width: 120px; height: 120px;
  translate: -50% -50%;
  color: #ff3b30;
  filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.45));
  pointer-events: none;
  animation: heart-burst 0.9s var(--ease-out) forwards;
}
.heart-burst svg { width: 100%; height: 100%; fill: currentColor; stroke: #fff; stroke-width: 0.8; }
@keyframes heart-burst {
  0% { opacity: 0; transform: scale(0.3) rotate(var(--tilt, 0deg)); }
  18% { opacity: 1; transform: scale(1.15) rotate(var(--tilt, 0deg)); }
  40% { transform: scale(1) rotate(var(--tilt, 0deg)); }
  70% { opacity: 1; transform: scale(1) rotate(var(--tilt, 0deg)); }
  100% { opacity: 0; transform: scale(1.1) translateY(-60px) rotate(var(--tilt, 0deg)); }
}

/* Untere Leiste mit Gradient */
.post-bar {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
  display: flex; align-items: flex-end; justify-content: space-between; gap: 20px;
  padding: 120px 88px 28px 28px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.92) 0%, rgba(0, 0, 0, 0.65) 45%, rgba(0, 0, 0, 0) 100%);
  color: #fff;
  pointer-events: none;
}
.post-bar > * { pointer-events: auto; }
.post-info { min-width: 0; max-width: 620px; }
.post-creator { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 15px; }
.post-creator:hover { text-decoration: underline; }
.post-creator .avatar { width: 24px; height: 24px; font-size: 11px; }
.post-title { font-family: var(--font-display); font-size: clamp(20px, 2.2vw, 28px); font-weight: 800; line-height: 1.15; margin: 6px 0 8px; }
.post-desc { color: #d3d5db; font-size: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.post-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.post-tag { padding: 3px 9px; border-radius: 6px; background: rgba(255, 255, 255, 0.14); font-size: 12px; font-weight: 600; }
.post-tag.is-cat { background: rgba(226, 35, 26, 0.35); }
.post-tag.is-price { background: #fff; color: var(--red); font-weight: 800; }

.btn-download {
  display: inline-flex; align-items: center; gap: 10px;
  height: 52px; padding: 0 22px 0 18px;
  border: 0; border-radius: 14px;
  background: var(--red); color: #fff;
  font-size: 16px; font-weight: 800; letter-spacing: 0.01em;
  box-shadow: 0 10px 30px rgba(226, 35, 26, 0.4);
  cursor: pointer; white-space: nowrap;
  transition: transform 0.15s var(--ease-out), background 0.15s;
}
.btn-download:hover { background: var(--red-hover); transform: translateY(-2px); }
.btn-download:active { transform: translateY(0) scale(0.98); }
.btn-download svg { width: 22px; height: 22px; }
.btn-download small { display: block; font-size: 11px; font-weight: 600; opacity: 0.85; letter-spacing: 0.06em; text-transform: uppercase; }
/* Kauf-Button: drei gleich hohe Elemente (Icon-Kreis · Text · Preis-Plakette) mit symmetrischem Innenabstand */
.btn-buy { gap: 12px; padding: 0 8px; }
.buy-icon {
  flex: none; display: grid; place-items: center;
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
}
.buy-icon svg { width: 20px; height: 20px; }
.buy-text { text-align: left; line-height: 1.15; }
.buy-text small { margin-top: 3px; }
.buy-price {
  flex: none; display: inline-flex; align-items: center; justify-content: center;
  min-width: 64px; height: 36px; padding: 0 14px;
  border-radius: 10px;
  background: #fff; color: var(--red);
  font-size: 17px; font-weight: 900; letter-spacing: 0.01em; line-height: 1;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}

.feed-loader { height: 80px; display: grid; place-items: center; color: var(--muted); font-size: 14px; }
.feed-track > .feed-loader { height: 100%; } /* im Pager ist der Loader eine eigene Seite */
.feed-end { height: 100%; display: grid; place-items: center; text-align: center; color: var(--muted); padding: 40px; }
.feed-end strong { display: block; color: var(--text); font-family: var(--font-display); font-size: 24px; margin-bottom: 8px; }

.feed-back {
  position: absolute; top: 16px; left: 16px; z-index: 5;
  display: inline-flex; align-items: center; gap: 8px;
  height: 38px; padding: 0 14px 0 10px;
  border: 0; border-radius: 999px;
  background: rgba(0, 0, 0, 0.55); color: #fff;
  font-weight: 600; cursor: pointer; backdrop-filter: blur(6px);
}
.feed-back:hover { background: rgba(0, 0, 0, 0.75); }
.feed-back svg { width: 18px; height: 18px; }

/* Hinweis beim Öffnen des Feeds – steht still und blendet nur ein/aus (keine Dauer-Animation) */
.feed-hint {
  position: absolute; left: 50%; top: 16px; z-index: 4;
  transform: translateX(-50%);
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px 6px 9px; border-radius: 999px;
  background: rgba(0, 0, 0, 0.55); color: #fff; font-size: 12px; font-weight: 600;
  white-space: nowrap;
  backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}
.feed-hint.is-visible { opacity: 1; }
.feed-hint svg { width: 14px; height: 14px; }

/* Pfeil-Buttons zum Blättern (Desktop; auf Touch-Geräten wischt man) */
.feed-nav {
  position: absolute; right: 14px; top: 50%; z-index: 4; translate: 0 -50%;
  display: flex; flex-direction: column; gap: 10px;
}
.feed-nav button {
  display: grid; place-items: center;
  width: 44px; height: 44px; border: 0; border-radius: 50%;
  background: rgba(255, 255, 255, 0.12); color: #fff; cursor: pointer;
  backdrop-filter: blur(6px);
  transition: background 0.15s, transform 0.15s var(--ease-out), opacity 0.2s;
}
.feed-nav button:hover:not(:disabled) { background: rgba(255, 255, 255, 0.24); transform: scale(1.08); }
.feed-nav button:active:not(:disabled) { transform: scale(0.94); }
.feed-nav button:disabled { opacity: 0.25; cursor: default; }
.feed-nav svg { width: 22px; height: 22px; }
@media (max-height: 920px) {
  /* auf flachen Fenstern würde die Mitte mit der Aktionsleiste kollidieren → oben links */
  .feed-nav { top: 16px; left: 16px; right: auto; translate: none; flex-direction: row; }
}
@media (hover: none) and (pointer: coarse), (max-width: 640px) { .feed-nav { display: none; } }

/* Immersiv-Modus (hub.js setzt .is-idle): Läuft das Video, blenden Aktionsleiste, Infos, Ton-Knopf, Partner-Band und
   Pfeile nach kurzer Ruhe aus – wie bei Videoplayern üblich. Jede Eingabe holt sie zurück, bei Pause bleiben sie.
   Nur Deckkraft, kein display/visibility: Screenreader und Tab-Fokus finden die Bedienelemente weiterhin. */
.rail, .post-bar, .post-partner-ribbon, .feed-nav, .feed-back { transition: opacity 0.4s ease; }
.feed-wrap.is-idle .rail,
.feed-wrap.is-idle .post-bar,
.feed-wrap.is-idle .post-partner-ribbon,
.feed-wrap.is-idle .feed-nav,
.feed-wrap.is-idle .feed-back,
.feed-wrap.is-idle .post-mute,
.feed-wrap.is-idle .post:hover .post-mute { opacity: 0; }
.feed-wrap.is-idle .rail,
.feed-wrap.is-idle .post-bar > *,
.feed-wrap.is-idle .post-mute,
.feed-wrap.is-idle .feed-nav,
.feed-wrap.is-idle .feed-back { pointer-events: none; }
.feed-wrap.is-idle .post { cursor: none; } /* Zeiger ruht auf dem Video → wie im Vollbild ausblenden */

/* Fortschrittsleiste mit Spulen (wie TikTok / Shorts): dünne Linie am unteren Rand mit großzügiger Trefffläche;
   bei Hover/Ziehen wird sie dicker, ein Knopf und die Zeitangabe erscheinen, Leiste und Infos treten zurück. */
.post-progress {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 4;
  height: 24px; /* Trefffläche für Finger – die sichtbare Linie ist nur 3 px */
  display: flex; align-items: flex-end;
  cursor: pointer;
  touch-action: none;
  -webkit-tap-highlight-color: transparent;
  outline: none;
}
.post-progress-track { position: relative; width: 100%; height: 3px; background: rgba(255, 255, 255, 0.28); transition: height 0.15s var(--ease-out); }
.post-progress-fill { position: absolute; inset: 0; transform-origin: left center; transform: scaleX(var(--p, 0)); background: var(--red); }
.post-progress-knob {
  position: absolute; top: 50%; left: calc(var(--p, 0) * 100%);
  width: 14px; height: 14px; border-radius: 50%;
  translate: -50% -50%; transform: scale(0.6);
  background: #fff; box-shadow: 0 1px 6px rgba(0, 0, 0, 0.5);
  opacity: 0; transition: opacity 0.15s, transform 0.15s var(--ease-out);
}
.post-progress:hover .post-progress-track, .post.is-scrubbing .post-progress-track { height: 6px; }
.post-progress:hover .post-progress-knob, .post.is-scrubbing .post-progress-knob { opacity: 1; transform: scale(1); }
.feed-wrap.is-idle .post-progress { cursor: pointer; }
.feed-wrap.is-idle .post-progress-track { background: rgba(255, 255, 255, 0.18); }
.post-time {
  position: absolute; left: 50%; bottom: 44px; z-index: 4; translate: -50% 0;
  padding: 6px 12px; border-radius: 999px;
  background: rgba(0, 0, 0, 0.6); color: #fff; font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums;
  backdrop-filter: blur(6px);
  opacity: 0; pointer-events: none; transition: opacity 0.15s;
}
.post.is-scrubbing .post-time { opacity: 1; }
.post.is-scrubbing .rail, .post.is-scrubbing .post-bar, .post.is-scrubbing .post-mute, .post.is-scrubbing .post-partner-ribbon { opacity: 0; pointer-events: none; }
.post.is-scrubbing .post-paused { display: none; } /* Pause beim Ziehen ist technisch, kein Nutzerzustand */
@media (hover: none) { .post-progress-track { height: 3px; } }

.spinner { width: 22px; height: 22px; border: 3px solid #2a2c33; border-top-color: var(--red); border-radius: 50%; animation: spin 1.45s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Profil ---------- */

/* Kopfbereich wie bei TikTok/YouTube: Avatar links, daneben Name, Handle, Kennzahlen-Leiste, Aktionen */
.profile-head { display: flex; align-items: flex-start; gap: 28px; padding: 28px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
.profile-head h1 { font-family: var(--font-display); font-size: 32px; font-weight: 800; line-height: 1.15; overflow-wrap: anywhere; display: inline-flex; align-items: center; flex-wrap: wrap; column-gap: 2px; }
.profile-meta { color: var(--muted); font-size: 14px; margin-top: 4px; overflow-wrap: anywhere; }
.profile-main { flex: 1; min-width: 0; }
.profile-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }

/* Kennzahlen-Leiste: gleich breite Spalten, Zahl gross über der Bezeichnung, feine Trennlinien */
.stats { display: flex; align-items: stretch; margin-top: 18px; }
.stat-item {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  min-width: 96px; padding: 6px 18px; border-left: 1px solid var(--line);
  text-align: center; color: inherit;
}
.stat-item:first-child { border-left: 0; padding-left: 0; min-width: 78px; }
.stat-item strong { font-family: var(--font-display); font-size: 24px; font-weight: 800; line-height: 1.05; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.stat-item span { font-size: 13px; font-weight: 600; color: var(--muted); white-space: nowrap; }
/* Anklickbare Kennzahlen (Follower / Folgt) */
.stat-btn { border: 0; background: none; font: inherit; cursor: pointer; border-radius: 10px; }
.stat-btn:hover span, .stat-btn:focus-visible span { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.stat-btn:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
/* Viele Kennzahlen (Admin): umbrechen statt überlaufen */
.stats-wrap { flex-wrap: wrap; row-gap: 12px; }
.stats-wrap .stat-item { min-width: 0; }

/* Folgen-Button: „Folge ich“ zeigt beim Hover „Entfolgen“ */
.btn-follow { min-width: 112px; justify-content: center; }
.btn-follow.btn-sm { min-width: 96px; }
.btn-follow .f-on { display: inline-flex; align-items: center; gap: 6px; }
.btn-follow .f-on svg { width: 16px; height: 16px; stroke-width: 2.6; }
.btn-follow .f-off { display: none; }
@media (hover: hover) {
  .btn-follow.is-following:hover:not(:disabled) { border-color: rgba(226, 35, 26, 0.5); color: #ff6b63; }
  .btn-follow.is-following:hover:not(:disabled) .f-on { display: none; }
  .btn-follow.is-following:hover:not(:disabled) .f-off { display: inline; }
}

/* Benutzerliste (Follower / Folgt) */
.modal-card-list { width: min(480px, 100%); }
.ulist { display: flex; flex-direction: column; gap: 4px; min-height: 160px; margin: 0 -8px; }
.ulist .state { padding: 40px 20px; }
.ulist .feed-loader { height: 160px; }
.ulist-more { align-self: center; margin-top: 10px; }
.urow { display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 12px; padding: 8px; border-radius: 12px; }
.urow:hover { background: #1c1e24; }
.urow-name { display: inline-flex; align-items: center; gap: 6px; min-width: 0; font-weight: 700; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.urow-name:hover { text-decoration: underline; }
.urow-name .ubadges { font-size: 13px; }
.urow-you { padding: 2px 7px; border-radius: 6px; background: #2a2c33; color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }

.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 24px; }
.tile { position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: #0b0c0f; cursor: pointer; border: 0; padding: 0; }
.tile img, .tile video { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s var(--ease-out); }
.tile:hover img, .tile:hover video { transform: scale(1.04); }
.tile .thumb { aspect-ratio: auto; height: 100%; }
.tile .thumb-text { border-radius: 0; }
.tile-stats {
  position: absolute; inset: auto 0 0 0;
  display: flex; gap: 14px;
  padding: 26px 12px 10px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
  color: #fff; font-size: 13px; font-weight: 700;
  opacity: 0; transition: opacity 0.2s;
}
.tile:hover .tile-stats, .tile:focus-visible .tile-stats { opacity: 1; }
@media (hover: none) { .tile-stats { opacity: 1; } }

/* ---------- Upload ---------- */

.form-card { max-width: 760px; margin: 0 auto; padding: 28px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
.form-grid { display: grid; gap: 18px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-size: 13px; font-weight: 700; color: var(--muted); }
.field small { font-weight: 500; text-transform: none; letter-spacing: 0; }
.field input, .field textarea, .field select {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--line); border-radius: 10px;
  background: var(--bg); color: var(--text);
  font: inherit; font-size: 15px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.field textarea { resize: vertical; min-height: 110px; }
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: #4a4d58; box-shadow: 0 0 0 3px rgba(226, 35, 26, 0.18); }
/* Gesperrtes Feld (z. B. Preis ohne eingerichtete Stripe-Auszahlungen) */
.field.is-locked > span { opacity: 0.7; }
.field.is-locked input { opacity: 0.5; cursor: not-allowed; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.drop {
  position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  min-height: 150px; padding: 20px;
  border: 2px dashed var(--line); border-radius: 12px;
  background: var(--bg);
  text-align: center; color: var(--muted);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.drop:hover, .drop.is-over { border-color: var(--red); background: rgba(226, 35, 26, 0.06); }
.drop.has-file { border-style: solid; border-color: #3a3d46; color: var(--text); }
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.drop-idle { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.drop-idle > span { font-size: 13px; }
.drop svg { width: 30px; height: 30px; color: var(--muted); }
.drop strong { color: var(--text); }
.drop-file { display: flex; flex-direction: column; align-items: center; gap: 10px; width: 100%; font-weight: 600; }
.drop-name { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 10px; background: #1f2127; max-width: 100%; }
.drop-name svg { width: 18px; height: 18px; flex: 0 0 auto; }
.drop-file small { color: var(--muted); font-weight: 500; }
.drop-preview { width: 100%; max-height: 260px; object-fit: contain; border-radius: 10px; background: #000; }
.drop-remove { position: relative; z-index: 1; }

.progress { height: 8px; border-radius: 4px; background: #24262d; overflow: hidden; }
.progress > span { display: block; height: 100%; width: 0; background: var(--red); transition: width 0.15s; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 6px; }
.form-error { padding: 10px 12px; border-radius: 9px; background: rgba(226, 35, 26, 0.12); color: #ff8a84; font-size: 14px; font-weight: 600; }

/* ---------- Dashboard ---------- */

/* Kennzahlen im Dashboard: dieselbe Leiste, als eine Karte mit gleich breiten Spalten */
.stats-cards { margin: 0 0 26px; padding: 18px 8px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
.stats-cards .stat-item { flex: 1 1 0; min-width: 0; padding: 4px 8px; }
.stats-cards .stat-item:first-child { padding-left: 8px; }
.stats-cards .stat-item strong { font-size: 28px; }

.rows { display: flex; flex-direction: column; gap: 10px; }
.row {
  display: grid; grid-template-columns: 96px 1fr auto; gap: 16px; align-items: center;
  padding: 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card);
}
.row .thumb { aspect-ratio: 16 / 10; border-radius: 8px; }
.row .thumb-text { font-size: 12px; padding: 8px; }
.row .badge-type, .row .badge-draft, .row .badge-play { display: none; }
.row-main { min-width: 0; }
.row-title { font-family: var(--font-display); font-size: 17px; font-weight: 700; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.row-title a:hover { text-decoration: underline; }
.row-meta { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 4px; font-size: 13px; color: var(--muted); }
.row-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.pill-draft { padding: 2px 8px; border-radius: 6px; background: #b58900; color: #000; font-size: 11px; font-weight: 700; }
.pill-public { padding: 2px 8px; border-radius: 6px; background: rgba(46, 204, 113, 0.18); color: #6ee7a1; font-size: 11px; font-weight: 700; }
.pill-price { padding: 2px 8px; border-radius: 6px; background: rgba(255, 255, 255, 0.1); color: #f5f5f5; font-size: 11px; font-weight: 700; }
.stripe-card {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 20px;
  padding: 16px 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
}
.stripe-card-main { flex: 1 1 220px; }
.stripe-card-main strong { display: block; margin-bottom: 4px; }
.stripe-card-main p { margin: 0; color: var(--muted, #9aa3af); font-size: 14px; }
.stripe-card-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.btn.is-busy,
.btn-download.is-busy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  opacity: 0.88;
}

/* ---------- Werkstatt (Admin) ---------- */
.admin-search { position: relative; display: block; max-width: 520px; margin-bottom: 10px; }
.admin-search > svg { position: absolute; left: 14px; top: 50%; width: 18px; height: 18px; translate: 0 -50%; color: var(--muted); pointer-events: none; }
.admin-search input {
  width: 100%; height: 46px; padding: 0 14px 0 42px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--card); color: var(--text); font-size: 15px;
}
.admin-search input:focus { outline: none; border-color: #4a4d58; box-shadow: 0 0 0 3px rgba(226, 35, 26, 0.16); }
.admin-meta { color: var(--muted); font-size: 13px; margin-bottom: 14px; min-height: 1.2em; }
.admin-row { grid-template-columns: 44px 1fr auto; }
.admin-row .btn svg { width: 15px; height: 15px; }
.admin-row .btn:disabled { opacity: 0.45; cursor: not-allowed; }

/* Konto-Detail (Admin-Tool) */
.back-link { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 14px; color: var(--muted); font-weight: 600; font-size: 14px; }
.back-link svg { width: 16px; height: 16px; }
.back-link:hover { color: var(--text); }
.admin-head { margin-bottom: 18px; }
.admin-head h1 { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 28px; }
.admin-head h1 .ubadges { margin-left: 0; font-size: 20px; }
.admin-head-main { flex: 1; min-width: 0; }
.admin-head .stat-item strong { font-size: 22px; }
.tabs { display: flex; gap: 4px; margin-bottom: 18px; border-bottom: 1px solid var(--line); overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { position: relative; padding: 10px 14px; border: 0; background: none; color: var(--muted); font: inherit; font-size: 14px; font-weight: 700; white-space: nowrap; cursor: pointer; }
.tab:hover { color: var(--text); }
.tab.is-active { color: var(--text); }
.tab.is-active::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: 0; height: 2px; border-radius: 2px; background: var(--red); }
.admin-form { padding: 20px; margin-bottom: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
.admin-form input:disabled, .admin-form select:disabled { opacity: 0.55; cursor: not-allowed; }
.check { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; cursor: pointer; }
.check input { width: 16px; height: 16px; accent-color: var(--red); }
.check input:disabled { cursor: not-allowed; }
.danger-zone { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 16px 20px; border: 1px solid rgba(226, 35, 26, 0.35); border-radius: var(--radius); background: rgba(226, 35, 26, 0.06); }
.danger-zone strong { display: block; margin-bottom: 2px; }
.danger-zone span { color: var(--muted); font-size: 13px; }
.admin-asset .row-actions .btn svg, .admin-like .row-actions .btn svg { width: 14px; height: 14px; }
.subrows { grid-column: 1 / -1; padding-top: 10px; border-top: 1px solid var(--line); }
.subrows-note { padding: 4px 2px; color: var(--muted); font-size: 13px; }
.subrows-more { margin-top: 8px; }
.crows { gap: 8px; }
.crow { display: grid; grid-template-columns: 32px 1fr auto; gap: 12px; align-items: start; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); }
.subrows .crow { background: var(--bg); }
.subrows .crow + .crow { margin-top: 8px; }
.crow-main { min-width: 0; }
.crow-main .comment-head { flex-wrap: wrap; }
.crow-main .comment-text { font-size: 14px; }
.crow-on { color: var(--muted); font-size: 12px; }
.crow-on a { color: var(--text); font-weight: 600; }
.crow-on a:hover { text-decoration: underline; }
.crow-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.c-editor { display: flex; flex-direction: column; gap: 8px; margin-top: 6px; }
.c-editor textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--bg); color: var(--text); font: inherit; font-size: 14px; resize: vertical; }
.c-editor textarea:focus { outline: none; border-color: #4a4d58; box-shadow: 0 0 0 3px rgba(226, 35, 26, 0.18); }
.c-editor .form-actions { margin-top: 0; }

/* ---------- Modal ---------- */

.modal { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 20px; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.7); backdrop-filter: blur(4px); }
.modal-card {
  position: relative;
  width: min(440px, 100%);
  max-height: calc(100vh - 40px);
  overflow: auto;
  padding: 28px;
  border: 1px solid var(--line); border-radius: 18px;
  background: #1a1b20;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
  animation: modal-in 0.22s var(--ease-out);
}
.modal-card-wide { width: min(640px, 100%); }
@keyframes modal-in { from { opacity: 0; transform: translateY(14px) scale(0.98); } to { opacity: 1; transform: none; } }
.modal-close { position: absolute; top: 12px; right: 12px; width: 36px; height: 36px; border: 0; border-radius: 50%; background: transparent; color: var(--muted); font-size: 24px; cursor: pointer; }
.modal-close:hover { background: #24262d; color: var(--text); }
.modal-head { text-align: center; margin-bottom: 20px; }
.modal-head .brand-mark { margin: 0 auto 8px; }
.modal-title { font-family: var(--font-display); font-size: 26px; font-weight: 800; }
.modal-sub { color: var(--muted); font-size: 14px; margin-top: 4px; }
#edit-modal .modal-title { margin-bottom: 18px; }

.oauth-buttons { display: flex; flex-direction: column; gap: 10px; }
.btn-oauth {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  height: 46px; border-radius: 11px;
  font-size: 15px; font-weight: 700; color: #fff;
  transition: filter 0.15s, transform 0.1s;
}
.btn-oauth svg { width: 22px; height: 22px; stroke: none; }
.btn-oauth:hover { filter: brightness(1.1); }
.btn-oauth:active { transform: scale(0.99); }
.btn-oauth.is-disabled { opacity: 0.45; filter: grayscale(0.6); cursor: not-allowed; }
.btn-discord { background: #5865f2; }
.btn-github { background: #24292f; border: 1px solid #3a3f46; }
.oauth-note { font-size: 12px; color: var(--muted); text-align: center; }

.divider { display: flex; align-items: center; gap: 12px; margin: 20px 0 14px; color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.modal-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: 11px; margin-bottom: 16px; }
.modal-tab { height: 34px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font-weight: 600; cursor: pointer; }
.modal-tab.is-active { background: #2a2c33; color: var(--text); }

.auth-form { display: flex; flex-direction: column; gap: 14px; }
.auth-form.is-busy { opacity: 0.7; }

/* ---------- Kommentar-Sheet ---------- */

.sheet { position: fixed; inset: 0; z-index: 70; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.5); animation: fade-in 0.2s; }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
.sheet-panel {
  position: absolute; left: 50%; bottom: 0; translate: -50% 0;
  width: min(640px, 100%);
  max-height: min(78vh, 720px);
  display: flex; flex-direction: column;
  border: 1px solid var(--line); border-bottom: 0;
  border-radius: 20px 20px 0 0;
  background: #17181c;
  box-shadow: 0 -20px 60px rgba(0, 0, 0, 0.5);
  animation: sheet-in 0.32s var(--ease-out);
  padding-bottom: env(safe-area-inset-bottom);
}
.sheet.is-closing .sheet-panel { animation: sheet-out 0.22s ease-in forwards; }
.sheet.is-closing .sheet-backdrop { animation: fade-out 0.22s forwards; }
@keyframes sheet-in { from { transform: translateY(100%); } to { transform: none; } }
@keyframes sheet-out { to { transform: translateY(100%); } }
@keyframes fade-out { to { opacity: 0; } }
.sheet-handle { width: 44px; height: 5px; border-radius: 3px; background: #3a3d46; margin: 10px auto 0; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 16px 12px 20px; border-bottom: 1px solid var(--line); }
.sheet-head h2 { font-family: var(--font-display); font-size: 18px; font-weight: 800; }
.sheet-count { color: var(--muted); font-weight: 600; font-size: 15px; }
.sheet-list { flex: 1; overflow-y: auto; padding: 12px 20px; display: flex; flex-direction: column; gap: 14px; min-height: 160px; }
.comment { display: grid; grid-template-columns: 32px 1fr auto; gap: 12px; align-items: start; }
.comment-body { min-width: 0; }
.comment-head { display: flex; align-items: baseline; gap: 8px; font-size: 13px; }
.comment-head a { font-weight: 700; }
.comment-head a:hover { text-decoration: underline; }
.comment-head time { color: var(--muted); font-size: 12px; }
.comment-text { margin-top: 2px; font-size: 15px; white-space: pre-wrap; word-break: break-word; }
.comment-delete { width: 28px; height: 28px; font-size: 18px; }
.sheet-more { align-self: center; }
.sheet-form { display: flex; align-items: center; gap: 10px; padding: 12px 16px 14px; border-top: 1px solid var(--line); }
.sheet-form input { flex: 1; height: 42px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--bg); color: var(--text); font: inherit; font-size: 15px; }
.sheet-form input:focus { outline: none; border-color: #4a4d58; }
.sheet-login { padding: 14px 20px 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; text-align: center; }

/* ---------- Teilen-Sheet ---------- */

.sheet-share .sheet-panel { width: min(520px, 100%); }
.share-preview { display: flex; align-items: center; gap: 14px; padding: 14px 20px 4px; min-width: 0; }
.share-preview .thumb { flex: 0 0 72px; width: 72px; aspect-ratio: 1; border-radius: 12px; }
.share-preview .thumb .badge-type, .share-preview .thumb .badge-play, .share-preview .thumb .badge-draft { display: none; }
.share-preview .thumb-text { font-size: 11px; padding: 8px; }
.share-preview-body { min-width: 0; }
.share-preview strong { display: block; font-family: var(--font-display); font-size: 17px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.share-preview span { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Ziele als horizontal scrollbare Reihe runder Icons (wie bei TikTok/YouTube) */
.share-targets { display: flex; gap: 6px; padding: 14px 14px 8px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.share-targets::-webkit-scrollbar { display: none; }
.share-target {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  flex: 0 0 auto; width: 76px; padding: 6px 2px;
  border: 0; border-radius: 12px; background: transparent; color: var(--text);
  font: inherit; font-size: 12px; font-weight: 600; text-decoration: none; cursor: pointer;
  transition: background 0.15s;
}
.share-target:hover { background: #22242a; }
.share-target:active .share-icon { transform: scale(0.94); }
.share-icon {
  display: grid; place-items: center; width: 54px; height: 54px; border-radius: 50%;
  background: var(--c, #2c2e36); color: #fff; transition: transform 0.12s, filter 0.15s;
}
.share-target:hover .share-icon { filter: brightness(1.12); }
.share-icon svg { width: 26px; height: 26px; }
.share-target-x .share-icon { background: #000; border: 1px solid #3a3d46; }
.share-link { display: flex; align-items: center; gap: 10px; padding: 10px 16px 16px; border-top: 1px solid var(--line); margin-top: 6px; }
.share-link input { flex: 1; min-width: 0; height: 42px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--bg); color: var(--muted); font: inherit; font-size: 14px; }
.share-link input:focus { outline: none; border-color: #4a4d58; color: var(--text); }
.share-link .btn { flex: 0 0 auto; }
/* Desktop: kein Bottom-Sheet, sondern zentrierter Dialog (Kommentare und Teilen) */
@media (min-width: 720px) and (min-height: 560px) and (hover: hover) {
  .sheet-panel {
    bottom: auto; top: 50%; translate: -50% -50%;
    border-bottom: 1px solid var(--line); border-radius: 20px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
    animation: modal-in 0.22s var(--ease-out);
    padding-bottom: 0;
  }
  .sheet-handle { display: none; }
  .sheet.is-closing .sheet-panel { animation: fade-out 0.18s forwards; }
  #comment-sheet .sheet-panel { max-height: min(80vh, 760px); }
  .share-targets { justify-content: center; flex-wrap: wrap; }
}

/* ---------- Profilbild bearbeiten ---------- */

.avatar-edit {
  position: relative; display: inline-grid; flex: 0 0 auto; padding: 0; border: 0; border-radius: 50%;
  background: transparent; color: inherit; font: inherit; cursor: pointer;
}
.avatar-edit .avatar { display: grid; }
.avatar-edit-badge {
  position: absolute; right: -2px; bottom: -2px;
  display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%;
  background: var(--red); color: #fff; border: 3px solid var(--card);
  transition: transform 0.15s;
}
.avatar-edit-badge svg { width: 16px; height: 16px; }
.avatar-edit:hover .avatar-edit-badge { transform: scale(1.08); }
.avatar-edit::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: rgba(0, 0, 0, 0.35) center / 28px no-repeat;
  opacity: 0; transition: opacity 0.15s;
}
.avatar-edit:hover::after, .avatar-edit.is-busy::after { opacity: 1; }
.avatar-edit .spinner { position: absolute; left: 50%; top: 50%; translate: -50% -50%; display: none; z-index: 1; }
.avatar-edit.is-busy .spinner { display: block; }
.avatar-edit.is-busy { pointer-events: none; }
.avatar-edit:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }

/* ---------- Toasts ---------- */

.toasts { position: fixed; left: 50%; bottom: 24px; z-index: 90; translate: -50% 0; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast { padding: 10px 16px; border-radius: 10px; background: #26282f; color: var(--text); font-size: 14px; font-weight: 600; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5); animation: toast-in 0.25s var(--ease-out); }
.toast.is-error { background: #3a1513; color: #ff8a84; }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .header-inner { grid-template-columns: auto 1fr auto; gap: 12px; padding: 0 14px; }
  .brand-copy { display: none; }
  .nav-link { padding: 8px 10px; font-size: 14px; }
  .btn-upload span { display: none; }
  .btn-upload { width: 38px; padding: 0; }
  .stat-item { min-width: 0; padding: 6px 14px; }
  .row { grid-template-columns: 80px 1fr; }
  .admin-row { grid-template-columns: 44px 1fr; }
  .row-actions { grid-column: 1 / -1; justify-content: flex-start; }
  .crow { grid-template-columns: 32px 1fr; }
  .crow-actions { grid-column: 1 / -1; justify-content: flex-start; }
}

@media (max-width: 720px) {
  .header-inner { grid-template-columns: auto 1fr; gap: 8px; padding: 0 10px; }
  .nav-toggle {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--text);
    cursor: pointer;
    flex: 0 0 auto;
  }
  .nav-toggle:hover { background: #1f2127; }
  .nav-toggle-bars,
  .nav-toggle-bars::before,
  .nav-toggle-bars::after {
    display: block;
    width: 18px;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
    transition: transform 0.18s, opacity 0.18s;
  }
  .nav-toggle-bars { position: relative; }
  .nav-toggle-bars::before,
  .nav-toggle-bars::after {
    content: "";
    position: absolute;
    left: 0;
  }
  .nav-toggle-bars::before { top: -6px; }
  .nav-toggle-bars::after { top: 6px; }
  body.nav-open .nav-toggle-bars { background: transparent; }
  body.nav-open .nav-toggle-bars::before { top: 0; transform: rotate(45deg); }
  body.nav-open .nav-toggle-bars::after { top: 0; transform: rotate(-45deg); }

  .nav-slot { display: none; }
  .nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: auto;
    bottom: 0;
    z-index: 55;
    height: auto;
    width: min(300px, 86vw);
    margin: 0;
    padding: 14px 14px 24px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    gap: 4px;
    background: #17181c;
    border-right: 1px solid var(--line);
    box-shadow: 12px 0 40px rgba(0, 0, 0, 0.35);
    transform: translateX(-105%);
    transition: transform 0.2s ease;
    overflow-y: auto;
  }
  body.nav-open .nav { transform: none; }
  .nav-drawer-title {
    display: block;
    margin: 0 10px 10px;
    padding: 4px 0 12px;
    border-bottom: 1px solid var(--line);
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 800;
    color: var(--text);
  }
  .nav-link {
    padding: 12px 14px 12px 18px;
    font-size: 16px;
    border-radius: 10px;
  }
  .nav-link.is-active { background: #1f2127; }
  .nav-link.is-active::after {
    left: 6px;
    right: auto;
    top: 10px;
    bottom: 10px;
    width: 3px;
    height: auto;
  }
  .nav-backdrop {
    display: block;
    position: fixed;
    inset: var(--header-h) 0 0 0;
    z-index: 50;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
  }
  body.nav-open .nav-backdrop {
    opacity: 1;
    pointer-events: auto;
  }
  body.nav-open { overflow: hidden; }
}

@media (max-width: 640px) {
  .header-inner { gap: 6px; padding: 0 10px; }
  .header-actions { gap: 6px; }
  .btn-upload { width: 36px; height: 36px; }
  .btn-login { height: 34px; padding: 0 12px; font-size: 13px; }
  /* Sprachwahl auf dem Handy nur als Globus – das Select bleibt über dem Icon bedienbar */
  .lang-pick { width: 36px; height: 36px; padding: 0; justify-content: center; }
  .lang-select { position: absolute; inset: 0; width: 100%; max-width: none; opacity: 0; padding: 0; }
  .lang-banner { font-size: 13px; gap: 8px; padding: 8px 10px; flex-wrap: wrap; }
  .profile-btn { padding: 2px; }
  .profile-btn .chev { display: none; }
  .profile-menu { width: min(250px, calc(100vw - 20px)); }
  .container { padding: 20px 14px 60px; }
  .hero { padding: 28px 0 24px; }
  .search input { height: 52px; padding-right: 14px; font-size: 16px; }
  .search button { display: none; }
  .field-row { grid-template-columns: 1fr; }
  .form-card { padding: 18px; }
  .post-media { object-fit: cover; }
  .post-text { padding: 60px 24px 220px; }
  .post-bar { padding: 100px 72px 26px 16px; flex-direction: column; align-items: stretch; gap: 12px; } /* unten Platz für die Spul-Leiste */
  .post-title { font-size: 20px; }
  .rail { right: 10px; bottom: 96px; gap: 8px; }
  .btn-download { height: 48px; justify-content: center; }
  /* Kauf-Button über die volle Breite: Icon links, Text füllt, Preis rechts */
  .btn-buy { justify-content: flex-start; padding: 0 7px; }
  .btn-buy .buy-text { flex: 1; }
  .buy-icon { width: 34px; height: 34px; }
  .buy-price { height: 34px; padding: 0 12px; font-size: 16px; }
  .tiles { gap: 3px; }
  /* Profil wie in der TikTok-App: alles zentriert, Kennzahlen als gleich breite Spalten über die volle Breite */
  .profile-head { flex-direction: column; align-items: center; text-align: center; padding: 22px 16px; gap: 14px; }
  .profile-head h1 { font-size: 24px; justify-content: center; }
  .profile-head h1 .ubadges { font-size: 18px; }
  .profile-badges { justify-content: center; }
  .profile-main { width: 100%; }
  .profile-badges { justify-content: center; }
  .profile-actions { justify-content: center; margin-top: 16px; }
  .profile-actions .btn { flex: 1 1 auto; justify-content: center; max-width: 100%; }
  .avatar-lg { width: 84px; height: 84px; font-size: 32px; }
  .stats { display: grid; grid-template-columns: repeat(5, 1fr); margin-top: 16px; }
  .stats-wrap { grid-template-columns: repeat(4, 1fr); row-gap: 14px; }
  .stats-wrap .stat-item:nth-child(5) { border-left: 0; }
  .stats-cards { grid-template-columns: repeat(3, 1fr); row-gap: 16px; padding: 16px 6px; }
  .stats-cards .stat-item:nth-child(4) { border-left: 0; }
  .stat-item, .stat-item:first-child, .stats-cards .stat-item:first-child { min-width: 0; padding: 2px 4px; }
  .stat-item strong, .stats-cards .stat-item strong { font-size: 20px; }
  .stat-item span { font-size: 12px; }
  .admin-head { align-items: stretch; text-align: left; }
  .admin-head .stat-item strong { font-size: 18px; }
  .modal { padding: 12px; }
  .modal-card { padding: 22px 18px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  html { scroll-behavior: auto; }
}

/* ---------- Footer & Rechtstexte ---------- */
.site-footer { border-top: 1px solid var(--line); background: var(--bg); }
body.no-scroll .site-footer { display: none; } /* Feed ist Vollbild */
.footer-inner { max-width: 1240px; margin: 0 auto; padding: 22px 24px 28px; display: flex; align-items: center; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; color: var(--muted); font-size: 13px; }
.footer-brand { font-weight: 600; }
.footer-links { display: flex; gap: 6px 18px; flex-wrap: wrap; }
.footer-links a { color: var(--muted); font-weight: 600; }
.footer-links a:hover { color: var(--text); }
.legal-note { margin-top: 16px; color: var(--muted); font-size: 12.5px; line-height: 1.5; text-align: center; }
.legal-note a { color: var(--text); text-decoration: underline; text-underline-offset: 2px; }
.container-narrow { max-width: 820px; }
.legal { user-select: text; -webkit-user-select: text; font-size: 15.5px; line-height: 1.65; color: #d7d9de; }
.legal h2 { margin: 30px 0 10px; font-family: var(--font-display); font-size: 20px; font-weight: 700; color: var(--text); scroll-margin-top: calc(var(--header-h) + 16px); }
.legal h2:first-child { margin-top: 0; }
.legal p { margin: 0 0 12px; }
.legal ul { margin: 0 0 12px; padding-left: 22px; }
.legal li { margin-bottom: 6px; }
.legal a { color: var(--text); text-decoration: underline; text-underline-offset: 2px; }
.legal code { padding: 1px 6px; border-radius: 6px; background: var(--card); border: 1px solid var(--line); font-size: 0.9em; }
.legal-nav { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 34px; padding-top: 20px; border-top: 1px solid var(--line); }

/* ---------- Upload: Rechte-Bestätigung, Hinweis ---------- */
.check-block { align-items: flex-start; font-weight: 500; line-height: 1.45; }
.check-block input { flex: 0 0 auto; margin-top: 2px; }
.check-block a { color: var(--text); text-decoration: underline; text-underline-offset: 2px; }
.form-hint { display: flex; align-items: flex-start; gap: 8px; margin: -4px 0 0; color: var(--muted); font-size: 13px; line-height: 1.45; }
.form-hint svg { flex: 0 0 auto; width: 16px; height: 16px; margin-top: 1px; }
.spinner-sm {
  display: inline-block;
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  margin-right: 8px;
  border-width: 2px;
  border-color: color-mix(in srgb, currentColor 28%, transparent);
  border-top-color: currentColor;
  vertical-align: -3px;
}

/* ---------- Moderationsstatus ---------- */
.pill-review, .pill-rejected, .pill-info, .pill-reason, .pill-kind { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 6px; font-size: 11px; font-weight: 700; white-space: nowrap; }
.pill-review { background: rgba(255, 176, 32, 0.18); color: #ffc45c; }
.pill-rejected { background: rgba(226, 35, 26, 0.18); color: #ff8a84; }
.pill-info { background: rgba(154, 158, 168, 0.18); color: #c3c6ce; }
.pill-reason { background: rgba(96, 165, 250, 0.16); color: #93c5fd; }
.pill-kind { background: var(--bg); border: 1px solid var(--line); color: var(--muted); }
.pill-review svg, .pill-rejected svg { width: 12px; height: 12px; }
.mod-note { margin: 6px 0 0; color: var(--muted); font-size: 13px; line-height: 1.45; }
.mod-note.is-clamped { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mod-desc { margin: 10px 0 0; padding: 10px 12px; border-radius: 8px; background: var(--bg); color: var(--muted); font-size: 13px; white-space: pre-wrap; user-select: text; -webkit-user-select: text; }
.post-info .pill-review, .post-info .pill-rejected { align-self: flex-start; margin: 6px 0 2px; }
.rail-item-minor { opacity: 0.85; }
.rail-btn-minor { width: 40px; height: 40px; }
.rail-btn-minor svg { width: 20px; height: 20px; }

/* ---------- Werkstatt: Moderation ---------- */
.admin-areas { margin-bottom: 14px; }
.admin-areas .tab { display: inline-flex; align-items: center; gap: 8px; }
.tab-badge { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--red); color: #fff; font-size: 11px; font-weight: 800; }
.mod-services { display: flex; gap: 6px; flex-wrap: wrap; margin: 0; }
.svc { padding: 3px 9px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); font-size: 11px; font-weight: 700; }
.svc.is-on { border-color: rgba(46, 204, 113, 0.4); color: #6ee7a1; }
.mod-filter { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; min-height: 34px; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); color: var(--muted); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.chip:hover { color: var(--text); }
.chip.is-active { border-color: var(--red); color: var(--text); background: rgba(226, 35, 26, 0.12); }
.chip button { border: 0; background: none; color: inherit; font-size: 16px; line-height: 1; cursor: pointer; }
.chip-select, .chip-input { height: 34px; padding: 0 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); color: var(--text); font: inherit; font-size: 13px; }
.chip-input { min-width: 220px; }
.chip-select:focus, .chip-input:focus { outline: none; border-color: #4a4d58; }
.mod-row { align-items: start; }
.mod-row .row-title { font-size: 16px; }
.mod-report, .mod-log { grid-template-columns: 36px 1fr auto; }
.mod-icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--bg); color: var(--muted); }
.mod-icon svg { width: 18px; height: 18px; }
.mod-icon.is-rejected { color: #ff8a84; }
.mod-icon.is-flagged, .mod-icon.is-pending { color: #ffc45c; }
.mod-icon.is-approved { color: #6ee7a1; }
.mod-summary { font-family: var(--font-body, inherit); font-size: 14px; font-weight: 600; user-select: text; -webkit-user-select: text; }
.mod-row .row-meta a { color: var(--text); }
.mod-row .row-meta a:hover { text-decoration: underline; }
.checks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.check-line { display: grid; grid-template-columns: 96px 180px 1fr; gap: 10px; align-items: baseline; padding: 6px 10px; border-radius: 8px; background: var(--bg); font-size: 13px; user-select: text; -webkit-user-select: text; }
.check-status { font-weight: 800; text-transform: uppercase; font-size: 11px; letter-spacing: 0.05em; color: var(--muted); }
.check-line.is-review .check-status { color: #ffc45c; }
.check-line.is-violation .check-status { color: #ff8a84; }
.check-line.is-error .check-status { color: #93c5fd; }
.check-line.is-ok .check-status { color: #6ee7a1; }
.check-service { color: var(--muted); }
.check-summary { color: var(--text); overflow-wrap: anywhere; }
.json { margin: 10px 0 0; padding: 10px 12px; border-radius: 8px; background: var(--bg); color: #c3c6ce; font-size: 12px; line-height: 1.5; max-height: 320px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; user-select: text; -webkit-user-select: text; }
.muted { color: var(--muted); }

/* ---------- Name + @Benutzername (wie bei TikTok) ---------- */
/* Dezenter Handle hinter dem Anzeigenamen, wenn beide voneinander abweichen */
.handle, .post-handle { color: var(--muted); font-weight: 500; font-size: 0.86em; }
.post-handle { color: rgba(255, 255, 255, 0.72); }
.urow-name .handle { overflow: hidden; text-overflow: ellipsis; }

/* @Handle-Eingabe mit festem Präfix (Profil bearbeiten) */
.field > .handle-input { display: flex; align-items: stretch; font-size: 15px; font-weight: 500; color: var(--text); }
.handle-at { display: grid; place-items: center; padding: 0 12px; border: 1px solid var(--line); border-right: 0; border-radius: 10px 0 0 10px; background: var(--bg-2); color: var(--muted); font-weight: 700; }
.handle-input input { border-radius: 0 10px 10px 0; }
.handle-input input:disabled { opacity: 0.55; cursor: not-allowed; }
#profile-url { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; }
#profile-url.is-invalid { color: #ff8a84; }

/* Hinweiskasten, z. B. „Benutzername wurde automatisch vergeben“ */
.notice { display: flex; align-items: center; gap: 14px; margin: 18px 0 -6px; padding: 14px 16px; border: 1px solid rgba(226, 35, 26, 0.35); border-radius: var(--radius); background: rgba(226, 35, 26, 0.1); font-size: 14px; line-height: 1.45; color: var(--muted); }
.notice > svg { flex: 0 0 auto; width: 20px; height: 20px; color: var(--red); }
.notice > div { flex: 1; min-width: 0; }
.notice strong { display: block; color: var(--text); }
.notice .btn { flex: 0 0 auto; }
@media (max-width: 600px) {
  .notice { flex-wrap: wrap; }
  .notice .btn { width: 100%; justify-content: center; }
}

@media (max-width: 720px) {
  .footer-inner { flex-direction: column; align-items: flex-start; }
  .mod-row, .mod-report, .mod-log { grid-template-columns: 1fr; }
  .mod-row .thumb, .mod-icon { display: none; }
  .mod-row .row-actions { justify-content: flex-start; }
  .check-line { grid-template-columns: 1fr; gap: 2px; }
  .chip-input { min-width: 0; flex: 1 1 100%; }
}