* { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --bg: #000;
  --panel: #161616;
  --panel2: #202020;
  --text: #fff;
  --muted: #9a9a9a;
  --accent: #D6336C;
  --accent2: #54D62C;
  --line: rgba(255,255,255,0.12);
  --success: #3aa06a;      /* CI: Erfolg/Online */
  --gold: #c9993a;         /* CI: Coins/Premium/Streaks */
  --info: #7f9bb3;         /* CI: Info/Verifiziert */
  --purple: #8a6bb0;       /* CI: Spezial/FX */
  --accent-dark: #B62B5C;  /* CI: Hover-Abdunklung des Akzents */
  --error: #E5484D;        /* CI: Fehler/Destruktiv — eigenständig, nicht mehr = Akzent */
  --sidebar-w: 240px;
}
html, body { height: 100%; background: var(--bg); color: var(--text); }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  overflow: hidden;
}
.hidden { display: none !important; }
.muted { color: var(--muted); font-size: 14px; }
.error { color: var(--error); font-size: 13px; min-height: 18px; margin-top: 6px; }
.icon-btn { background: none; border: none; color: var(--text); cursor: pointer; font-size: 20px; }

/* ── Seitenleiste (Desktop) ─────────────────────────────────────────────── */
#sidebar {
  position: fixed; top: 0; left: 0; bottom: 0; width: var(--sidebar-w); z-index: 30;
  display: flex; flex-direction: column; gap: 14px;
  padding: 20px 14px 16px;
  background: rgba(12,12,15,0.92); border-right: 1px solid var(--line);
}
.logo { font-size: 30px; font-weight: 800; letter-spacing: -1px; color: var(--text); text-decoration: none; padding: 0 8px; }
.logo span { color: var(--text); }
.logo::after { content: "."; color: var(--accent); }
.env-badge { display: inline-block; vertical-align: middle; background: transparent; border: 1px solid var(--gold); color: var(--gold); font-size: 10px; font-weight: 700; letter-spacing: 1px; padding: 3px 7px; border-radius: 6px; }

.search-box { display: flex; align-items: center; background: var(--panel2); border-radius: 22px; padding: 4px 6px 4px 14px; }
.search-box input { flex: 1; min-width: 0; background: none; border: none; color: var(--text); font-size: 14px; padding: 7px 0; }
.search-box input:focus { outline: none; }
.search-box button { background: none; border: none; color: var(--muted); cursor: pointer; padding: 6px 8px; }
.search-box button svg { width: 18px; height: 18px; }

#mainNav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.nav-item {
  display: flex; align-items: center; gap: 12px;
  background: none; border: none; color: var(--text); cursor: pointer;
  font-size: 16px; font-weight: 600; padding: 11px 10px; border-radius: 10px; text-align: left;
}
.nav-item svg { width: 24px; height: 24px; flex-shrink: 0; }
.nav-item:hover { background: var(--panel); }
.nav-item.active { color: var(--accent); }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-left: auto; animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.35; } }

.side-foot { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.side-note { width: 100%; font-size: 12px; color: var(--muted); padding: 4px 8px 0; }
.side-note a { color: var(--muted); }

.auth-btn { flex: 1; background: var(--accent); color: #fff; border: none; border-radius: 8px; padding: 10px 18px; font-weight: 700; cursor: pointer; font-size: 15px; }
.auth-btn.me { flex: 0 0 auto; background: var(--panel2); padding: 3px; border-radius: 50%; width: 40px; height: 40px; overflow: hidden; }
.auth-btn.me img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.upload-btn { background: var(--accent); color: #fff; border: none; border-radius: 8px; padding: 10px 14px; font-weight: 700; cursor: pointer; font-size: 14px; }
.upload-btn:hover { background: var(--accent-dark); }

/* ── Mobile Kopf-/Fusszeile ─────────────────────────────────────────────── */
#topbar {
  display: none;
  position: fixed; top: 0; left: 0; right: 0; height: 54px; z-index: 30;
  align-items: center; gap: 8px; padding: 0 14px;
  background: linear-gradient(to bottom, rgba(0,0,0,0.7), rgba(0,0,0,0));
}
.tabs { display: flex; gap: 20px; flex: 1; justify-content: center; }
.tab { background: none; border: none; color: rgba(255,255,255,0.6); font-size: 16px; font-weight: 700; cursor: pointer; position: relative; padding: 6px 0; text-shadow: 0 1px 3px rgba(0,0,0,0.5); }
.tab.active { color: var(--text); }
.tab.active::after { content: ''; position: absolute; bottom: 0; left: 20%; right: 20%; height: 3px; background: var(--text); border-radius: 2px; }

/* „App öffnen"-Pill oben mittig (nur mobil sichtbar, s. Media Query) */
.open-app-btn {
  display: none;
  position: fixed; top: 60px; left: 50%; transform: translateX(-50%); z-index: 31;
  background: var(--accent); color: #fff; text-decoration: none;
  font-size: 13px; font-weight: 700; padding: 8px 18px; border-radius: 20px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.4);
}

#bottomNav {
  display: none;
  position: fixed; bottom: 0; left: 0; right: 0; height: 54px; z-index: 30;
  background: #000; border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}
.bn-item { flex: 1; background: none; border: none; color: var(--muted); font-size: 10px; font-weight: 600; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; }
.bn-item.active { color: var(--text); }
.bn-ico { font-size: 20px; line-height: 1; }
.bn-plus .plus {
  display: flex; align-items: center; justify-content: center;
  width: 44px; height: 28px; border-radius: 8px; font-size: 20px; font-weight: 800; color: #fff;
  background: var(--accent);
}

/* ── Inhalt ─────────────────────────────────────────────────────────────── */
#content { position: fixed; inset: 0 0 0 var(--sidebar-w); }

#feed {
  height: 100%; overflow-y: scroll;
  scroll-snap-type: y mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
#feed::-webkit-scrollbar { display: none; }
.feed-loader { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); color: var(--muted); }

.card {
  position: relative; height: 100%; width: 100%;
  scroll-snap-align: start; scroll-snap-stop: always;
  display: flex; align-items: center; justify-content: center;
}
.card video, .card .media-img {
  height: 100%; max-width: 100%; object-fit: contain; background: #000;
}
@media (min-width: 700px) {
  .card video, .card .media-img { height: calc(100% - 40px); border-radius: 12px; aspect-ratio: 9/16; object-fit: cover; }
}

/* Foto-Modus (TikTok): horizontales Scroll-Snap-Karussell in der Feed-Karte */
.card .photo-strip {
  height: 100%; width: 100%; display: flex; overflow-x: auto; overflow-y: hidden;
  scroll-snap-type: x mandatory; scrollbar-width: none; background: #000;
}
.card .photo-strip::-webkit-scrollbar { display: none; }
.ps-slide {
  flex: 0 0 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  scroll-snap-align: start; scroll-snap-stop: always;
}
.ps-slide img { max-width: 100%; max-height: 100%; object-fit: contain; }
.ps-ind {
  position: absolute; top: calc(env(safe-area-inset-top, 0px) + 64px); left: 50%;
  transform: translateX(-50%); display: flex; align-items: center; gap: 6px; z-index: 5;
}
.ps-dot { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,0.4); }
.ps-dot.on { width: 8px; height: 8px; background: #fff; }
.ps-count {
  margin-left: 4px; background: rgba(0,0,0,0.45); color: #fff;
  font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 10px;
}
@media (min-width: 700px) {
  .card .photo-strip { height: calc(100% - 40px); width: auto; aspect-ratio: 9/16; border-radius: 12px; }
}

.play-overlay {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  pointer-events: none; opacity: 0; transition: opacity 0.15s;
}
.play-overlay.show { opacity: 1; }
.play-overlay svg { width: 70px; height: 70px; filter: drop-shadow(0 2px 8px rgba(0,0,0,0.6)); }

.progress { position: absolute; bottom: 0; left: 0; height: 3px; background: var(--accent); width: 0; z-index: 5; }

/* Feed-Hinweis (z.B. „Folge ich" ohne Login) */
.feed-hint {
  height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  text-align: center; padding: 24px; color: var(--muted);
}
.feed-hint h2 { color: var(--text); font-size: 22px; }
.feed-hint button { background: var(--accent); color: #fff; border: none; border-radius: 8px; padding: 12px 34px; font-weight: 700; font-size: 15px; cursor: pointer; }

/* Caption unten links */
.caption {
  position: absolute; left: 0; bottom: 0; padding: 18px 90px 28px 18px;
  max-width: 70%; z-index: 6;
  background: linear-gradient(to top, rgba(0,0,0,0.6), rgba(0,0,0,0));
  text-shadow: 0 1px 3px rgba(0,0,0,0.6);
}
.caption .uname { font-weight: 700; font-size: 17px; }
/* Verifiziert-Badge: blaue Plakette mit weissem Haken (Twitter-Stil); das ✔ im Span wird transparent versteckt */
.verified {
  display: inline-block; width: 1.15em; height: 1.15em; vertical-align: -0.18em;
  color: transparent; overflow: hidden;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%231d9bf0' d='M22.25 12c0-1.43-.88-2.67-2.19-3.34.46-1.39.2-2.9-.81-3.91s-2.52-1.27-3.91-.81c-.66-1.31-1.91-2.19-3.34-2.19s-2.67.88-3.33 2.19c-1.4-.46-2.91-.2-3.92.81s-1.26 2.52-.8 3.91c-1.31.67-2.2 1.91-2.2 3.34s.89 2.67 2.2 3.34c-.46 1.39-.21 2.9.8 3.91s2.52 1.26 3.91.81c.67 1.31 1.91 2.19 3.34 2.19s2.68-.88 3.34-2.19c1.39.45 2.9.2 3.91-.81s1.27-2.52.81-3.91c1.31-.67 2.19-1.91 2.19-3.34z'/%3E%3Cpath fill='%23fff' d='M10.54 16.6l-3.8-3.8 1.48-1.48 2.32 2.32 5.24-5.24 1.48 1.48-6.72 6.72z'/%3E%3C/svg%3E") no-repeat center / contain;
}
.caption .uname .verified { font-size: 14px; }
.caption .desc { font-size: 15px; margin-top: 6px; line-height: 1.35; }
.caption .desc .tag { color: #fff; font-weight: 700; cursor: pointer; }
.caption .sound { font-size: 13px; margin-top: 8px; display: flex; align-items: center; gap: 6px; color: #eee; }
.caption .sound .disc { animation: spin 4s linear infinite; flex-shrink: 0; }
@keyframes spin { to { transform: rotate(360deg); } }
/* Music-Strip-Marquee (lange Sound-Titel laufen durch wie in der App) */
.caption .sound-t { display: inline-block; max-width: 230px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; vertical-align: bottom; }
.caption .sound-t .sq { display: inline-block; animation: marq 9s linear infinite; }
@keyframes marq { to { transform: translateX(-50%); } }
.caption .uname .modshield { color: var(--info); font-size: 14px; }
.caption .badge-sponsored { display: inline-flex; align-items: center; gap: 4px; background: rgba(255,255,255,0.18); border-radius: 4px; padding: 3px 8px; font-size: 11px; font-weight: 500; margin-top: 4px; }
.caption .cap-loc { font-size: 12px; color: rgba(255,255,255,0.75); margin-top: 2px; }
.caption .cap-duet { font-size: 12px; color: var(--info); margin-top: 6px; }
.caption .cap-time { font-size: 11px; color: rgba(255,255,255,0.45); margin-top: 4px; }
.mention { color: #fff; font-weight: 700; cursor: pointer; }
.tag { cursor: pointer; }

/* Hashtag-Chips (Suche/Trends): IMMER ohne # angezeigt, Zähler klein daneben. */
.tag-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 14px; }
.tag-chip {
  display: inline-flex; align-items: baseline; gap: 5px;
  background: var(--panel2); border: 1px solid var(--line); border-radius: 16px;
  padding: 6px 12px; font-size: 13px; font-weight: 600; color: var(--text);
  cursor: pointer;
}
.tag-chip:hover { border-color: var(--text); }
.tag-chip-n { font-size: 11px; font-weight: 400; color: rgba(255,255,255,0.5); }

/* Meistgesuchte Begriffe: echte Suchtrends, getrennt von Hashtags. */
.search-trends { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 18px; }
.search-trend-chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 12px; color: var(--text); cursor: pointer;
  background: linear-gradient(135deg, rgba(214,51,108,.16), rgba(255,255,255,.05));
  border: 1px solid rgba(214,51,108,.28); border-radius: 16px;
  font-size: 13px; font-weight: 650;
}
.search-trend-chip:hover { border-color: rgba(214,51,108,.62); transform: translateY(-1px); }
.st-rank {
  display: grid; place-items: center; width: 20px; height: 20px; border-radius: 7px;
  color: #fff; background: var(--accent); font-size: 10px; font-weight: 800;
}
.st-count { color: var(--muted); font-size: 11px; font-weight: 500; }

/* Name-Effekte (name_fx): Marquee-Fenster in eigener Namensbreite */
.fxm { position: relative; display: inline-block; overflow: hidden; vertical-align: bottom; max-width: 100%; }
.fxm-ghost { visibility: hidden; white-space: nowrap; display: inline-block; }
.fxm-scroll { position: absolute; left: 0; top: 0; white-space: nowrap; animation: fxmarq linear infinite; }
.fxm-scroll > span { display: inline-block; padding-right: 40px; }
@keyframes fxmarq { to { transform: translateX(-50%); } }

/* Aktions-Leiste rechts */
.rail {
  position: absolute; right: 10px; bottom: 28px; z-index: 6;
  display: flex; flex-direction: column; align-items: center; gap: 18px;
}
.rail .avatar { width: 48px; height: 48px; border-radius: 50%; border: 2px solid #fff; object-fit: cover; background: var(--panel2); cursor: pointer; }
.rail .act { display: flex; flex-direction: column; align-items: center; gap: 4px; cursor: pointer; }
.rail .act .bubble { width: 48px; height: 48px; border-radius: 50%; background: rgba(255,255,255,0.12); display: flex; align-items: center; justify-content: center; font-size: 24px; }
.rail .act .cnt { font-size: 13px; font-weight: 600; }
.rail .act.liked .bubble { color: var(--accent); }
.rail .avatar-ph { display: flex; align-items: center; justify-content: center; background: var(--accent); color: #fff; font-weight: 800; font-size: 18px; }
.rail .act.save.saved .bubble { background: rgba(255,184,0,0.3); }

/* ── Unterseiten (LIVE, Suche) ──────────────────────────────────────────── */
.subpage { height: 100%; overflow-y: auto; padding: 28px 32px 90px; }
.subpage h2 { font-size: 22px; margin-bottom: 18px; }
.subpage h3 { font-size: 17px; margin: 26px 0 12px; }

/* Aktivität / Benachrichtigungen */
.notif-row { display: flex; align-items: center; gap: 12px; padding: 10px 6px; border-bottom: 1px solid var(--border, rgba(255,255,255,0.08)); }
.notif-row:last-child { border-bottom: none; }
.notif-section { font-size: 15px; font-weight: 700; padding: 14px 6px 6px; }
.notif-av { flex-shrink: 0; cursor: pointer; }
.notif-avimg { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; display: block; }
.notif-av .avatar-ph { width: 46px; height: 46px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--panel2); color: var(--text); font-weight: 700; }
.notif-body { flex: 1; min-width: 0; font-size: 14px; line-height: 1.4; }
.notif-name { font-weight: 700; cursor: pointer; margin-right: 5px; }
.notif-text { color: var(--muted); word-break: break-word; }
.notif-time { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.notif-thumb { width: 46px; height: 60px; border-radius: 6px; object-fit: cover; flex-shrink: 0; cursor: pointer; }

/* Event-Kalender (LIVE-Tab): horizontale Karten-Reihe, live=rot hervorgehoben. */
.events-row { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 4px; margin: 4px 0 20px; }
.event-card {
  flex: 0 0 160px; background: var(--panel2); border: 1px solid var(--line); border-radius: 12px;
  padding: 14px 12px; text-align: center;
}
.event-card.event-live { border-color: var(--accent); cursor: pointer; }
.event-card .ev-av { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; margin: 0 auto 8px; background: var(--panel); }
.event-card .ev-title { font-weight: 700; font-size: 13px; margin-bottom: 4px; }
.event-card .ev-host { font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.event-card .ev-when { font-size: 11px; font-weight: 600; color: var(--accent2); }
.event-card.event-live .ev-when { color: var(--accent); }

.live-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.live-card { position: relative; aspect-ratio: 3/4; border-radius: 12px; overflow: hidden; background: var(--panel); cursor: pointer; }
.live-card .lc-avatar { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: brightness(0.75); }
.live-card .lc-fallback { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 56px; background: linear-gradient(135deg, #1c1c1c, #121212); }
.live-card .lc-badge { position: absolute; top: 10px; left: 10px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 800; padding: 3px 8px; border-radius: 5px; letter-spacing: 0.5px; }
.live-card .lc-viewers { position: absolute; top: 10px; right: 10px; background: rgba(0,0,0,0.55); font-size: 12px; font-weight: 700; padding: 3px 8px; border-radius: 5px; }
.live-card .lc-info { position: absolute; left: 0; right: 0; bottom: 0; padding: 24px 12px 10px; background: linear-gradient(to top, rgba(0,0,0,0.85), rgba(0,0,0,0)); }
.live-card .lc-title { font-size: 14px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.live-card .lc-user { font-size: 12px; color: #ccc; }
.live-empty { color: var(--muted); padding: 40px 0; text-align: center; grid-column: 1 / -1; }

/* Live-Stream-Karte im Für-dich-Feed (wie StreamItem in der App) */
.live-feed { cursor: pointer; }
.live-feed video { pointer-events: none; } /* Tap öffnet den Live-Player statt Play/Pause */
.lf-badge {
  position: absolute; top: 14px; left: 14px; z-index: 3;
  background: var(--accent); color: #fff; font-size: 12px; font-weight: 800;
  padding: 3px 9px; border-radius: 5px; letter-spacing: 0.5px;
  animation: pulse 1.6s ease-in-out infinite;
}

/* Suchergebnisse */
.sv-search { max-width: 420px; margin-bottom: 18px; }
.user-row { display: flex; align-items: center; gap: 14px; padding: 10px 8px; border-radius: 12px; cursor: pointer; }
.user-row:hover { background: var(--panel); }
.user-row img, .user-row .ur-av { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; background: var(--panel2); flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 700; }
.user-row .ur-info { flex: 1; min-width: 0; }
.user-row .ur-name { font-weight: 700; font-size: 16px; }
.user-row .ur-sub { font-size: 13px; color: var(--muted); }
.ur-follow-btn {
  flex-shrink: 0; padding: 7px 16px; border-radius: 8px; font-size: 13px; font-weight: 700;
  background: var(--accent); color: #fff; border: none; cursor: pointer;
}
.ur-follow-btn:hover { background: var(--accent-dark); }
.ur-follow-btn.following { background: var(--panel2); color: var(--text); border: 1px solid var(--line); }
.ur-msg-btn {
  flex-shrink: 0; padding: 7px 14px; border-radius: 8px; font-size: 13px; font-weight: 600;
  background: transparent; color: var(--text); border: 1px solid var(--line); cursor: pointer;
}
.ur-msg-btn:hover { border-color: var(--text); }
.search-grid { margin: 0 !important; max-width: none !important; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)) !important; }

/* ── Coins ──────────────────────────────────────────────────────── */
.coin-btn { white-space: nowrap; }
.coin-panel { width: 460px; }
.coin-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 14px; }
.coin-pkg { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; background: var(--panel2); border: 1px solid var(--line); border-radius: 12px; padding: 16px 8px 12px; cursor: pointer; color: var(--text); }
.coin-pkg:hover { border-color: var(--accent); }
.coin-pkg.popular { border-color: var(--accent); }
.pk-pop { position: absolute; top: -9px; background: var(--accent); color: #fff; font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 8px; }
.pk-coins { font-size: 16px; font-weight: 800; }
.pk-old { font-size: 11px; color: var(--muted); text-decoration: line-through; }
.pk-price { font-size: 13px; color: #ddd; }
#payElement { margin: 14px 0 4px; min-height: 60px; }
#lnInvoice { width: 100%; margin-top: 10px; background: var(--panel2); border: 1px solid var(--line); border-radius: 8px; color: #fff; font-size: 11px; padding: 8px; font-family: monospace; word-break: break-all; resize: none; }

/* ── DMs: Posteingang + Chat ────────────────────────────────────────────── */
.dm-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; margin-left: auto; }
#mTopDm { position: relative; }
#mTopDm .dm-badge { position: absolute; top: -2px; right: -6px; }

.dm-view { position: absolute; inset: 0; display: grid; grid-template-columns: 340px 1fr; grid-template-rows: 100%; }
.dm-list { grid-column: 1; grid-row: 1; border-right: 1px solid var(--line); display: flex; flex-direction: column; overflow: hidden; }
.dm-list-head { display: flex; align-items: center; padding: 20px 18px 12px; }
.dm-list-head h2 { flex: 1; font-size: 20px; }
#dmConvs { flex: 1; overflow-y: auto; padding: 4px 8px 80px; }

/* Push-Aktivierungs-Banner (Posteingang + Aktivität) */
.push-banner { display: flex; align-items: center; gap: 10px; margin: 4px 12px 10px; padding: 10px 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; }
.push-banner.hidden { display: none; }
.pb-icon { font-size: 22px; flex-shrink: 0; }
.pb-text { flex: 1; min-width: 0; font-size: 12px; color: var(--muted); line-height: 1.35; }
.pb-text strong { display: block; color: var(--text); font-size: 13px; margin-bottom: 1px; }
.pb-enable { flex-shrink: 0; background: var(--accent); color: #fff; border: none; border-radius: 8px; padding: 8px 14px; font-size: 13px; font-weight: 600; cursor: pointer; }
.pb-enable:hover { background: var(--accent-dark); }
.pb-close { flex-shrink: 0; color: var(--muted); font-size: 15px; }
#notifView .push-banner { margin: 0 0 14px; }
.dm-conv { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 12px; cursor: pointer; }
.dm-conv:hover { background: var(--panel); }
.dm-av-wrap { position: relative; flex-shrink: 0; }
img.dm-av, .dm-av.avatar-ph { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; background: var(--panel2); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 20px; }
.dm-dot { position: absolute; right: 1px; bottom: 1px; width: 12px; height: 12px; border-radius: 50%; background: var(--success); border: 2px solid var(--bg); }
.dm-conv-mid { flex: 1; min-width: 0; }
.dm-conv-name { font-weight: 700; font-size: 15px; display: flex; align-items: center; gap: 5px; }
.dm-conv-prev { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dm-conv.unread .dm-conv-prev { color: var(--text); font-weight: 600; }
.dm-conv-right { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; flex-shrink: 0; }
.dm-conv-time { font-size: 11px; color: var(--muted); }
.dm-unread { background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; min-width: 18px; height: 18px; border-radius: 9px; display: flex; align-items: center; justify-content: center; padding: 0 5px; }
.dm-streak-s { font-size: 12px; color: var(--gold); font-weight: 600; }
.dm-group-badge { position: absolute; right: -3px; bottom: -3px; font-size: 13px; background: var(--bg); border-radius: 50%; padding: 1px; }
.dm-sender { font-size: 11px; color: #9e9e9e; font-weight: 600; margin-bottom: 2px; }
.dm-system { font-size: 12px; color: var(--muted); font-style: italic; text-align: center; }

.dm-chat { grid-column: 2; grid-row: 1; display: flex; flex-direction: column; overflow: hidden; min-width: 0; }
.dm-empty { grid-column: 2; grid-row: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--muted); font-size: 15px; text-align: center; line-height: 2; }
#dmChat:not(.hidden) ~ .dm-empty { display: none; }
.prof-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.msg-btn { background: #fff !important; color: #000 !important; padding: 9px 18px !important; }
.dm-chat-head { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.dm-head-av { cursor: pointer; }
.dm-head-av img.dm-av, .dm-head-av .dm-av.avatar-ph { width: 42px; height: 42px; font-size: 16px; }
.dm-chat-info { flex: 1; min-width: 0; }
#dmChatName { font-weight: 700; font-size: 15px; }
#dmChatStatus { font-size: 12px; }
.dm-streak { font-size: 15px; font-weight: 600; color: var(--gold); }
/* overflow: horizontal HART begrenzen — sonst macht overflow-y:auto das
   overflow-x automatisch scrollbar und eine zu breite Bubble schiebt die
   eingehenden Nachrichten links aus dem Bild. min-width:0 lässt die Flex-
   Kinder unter ihre Inhaltsbreite schrumpfen, damit lange Wörter umbrechen. */
.dm-msgs { flex: 1; overflow-x: hidden; overflow-y: auto; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.dm-msg { max-width: 75%; min-width: 0; align-self: flex-start; }
.dm-msg.own { align-self: flex-end; text-align: right; }
.dm-bubble { display: inline-block; background: var(--panel2); border-radius: 16px 16px 16px 4px; padding: 9px 13px; font-size: 15px; text-align: left; overflow-wrap: anywhere; word-break: break-word; max-width: 100%; }
.dm-msg.own .dm-bubble { background: var(--accent); border-radius: 16px 16px 4px 16px; }

/* Sprachnachricht-Player (eigener, kompakter Player in der Bubble) */
.dm-voice { display: inline-flex; align-items: center; gap: 10px; width: min(230px, 56vw); padding: 2px 0; vertical-align: middle; }
.dm-voice .dv-btn { width: 34px; height: 34px; border-radius: 50%; border: none; cursor: pointer; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 13px; background: var(--accent); color: #fff; }
.dm-msg.own .dm-voice .dv-btn { background: rgba(255,255,255,0.25); }
.dm-voice .dv-track { flex: 1; padding: 9px 0; cursor: pointer; }
.dm-voice .dv-rail { display: block; height: 4px; border-radius: 2px; background: rgba(255,255,255,0.28); position: relative; }
.dm-voice .dv-fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: 2px; background: var(--accent); }
.dm-msg.own .dm-voice .dv-fill { background: #fff; }
.dm-voice .dv-time { font-size: 12px; opacity: 0.9; min-width: 34px; text-align: right; font-variant-numeric: tabular-nums; }
.dm-meta { font-size: 10px; color: var(--muted); margin-top: 3px; }
.dm-pin { font-size: 11px; color: var(--gold); margin-bottom: 2px; }
.dm-reply { font-size: 12px; color: var(--muted); border-left: 2px solid var(--line); padding-left: 8px; margin-bottom: 3px; text-align: left; overflow-wrap: anywhere; word-break: break-word; }
.dm-deleted { font-style: italic; color: rgba(255,255,255,0.55); }
.dm-img { max-width: 220px; max-height: 280px; border-radius: 10px; display: block; cursor: pointer; }
.dm-sticker { font-size: 40px; line-height: 1.2; }
/* Sticker ohne Sprechblase (wie Android: großes Emoji freistehend) */
.dm-bubble.dm-bubble-sticker, .dm-msg.own .dm-bubble.dm-bubble-sticker { background: none; padding: 0; }
.dm-vidshare { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.dm-vidshare img { width: 64px; height: 84px; object-fit: cover; border-radius: 8px; }
.dm-reacts { margin-top: 3px; display: flex; gap: 4px; justify-content: flex-start; }
.dm-msg.own .dm-reacts { justify-content: flex-end; }
.dm-react { background: var(--panel2); border-radius: 10px; padding: 2px 7px; font-size: 12px; }
.dm-react.mine { outline: 1px solid var(--muted); }
.dm-typing { padding: 2px 18px 6px; font-size: 12px; color: var(--muted); }
.dm-form { border-top: 1px solid var(--line); }
/* Sticker-Auswahl + Schnellreaktions-Zeile über dem Eingabefeld (wie Android) */
.dm-stickers { display: flex; gap: 8px; padding: 8px 12px; overflow-x: auto; border-top: 1px solid var(--line); background: rgba(38,38,46,0.4); }
.dm-stickers button { flex: 0 0 auto; width: 52px; height: 52px; font-size: 30px; line-height: 1; background: var(--panel); border: none; border-radius: 12px; cursor: pointer; }
.dm-quickrow { display: flex; gap: 10px; padding: 6px 12px; overflow-x: auto; }
.dm-quickrow button { flex: 0 0 auto; width: 44px; height: 44px; font-size: 20px; line-height: 1; background: var(--panel2); border: none; border-radius: 50%; cursor: pointer; }
.dm-react-row { display: flex; justify-content: space-evenly; padding: 12px 16px 6px; }
.dm-react-btn { background: none; border: none; font-size: 28px; cursor: pointer; }

/* ── LIVE-Player — Layout wie in der App: Video fullscreen, alles Overlay ── */
.live-stage { position: absolute; inset: 0; background: #000; overflow: hidden; }
#liveVideo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; }

/* Oben: Gradient-Header mit Streamer-Pill, Folgen, Zuschauer-Chip, X */
.live-top {
  position: absolute; top: 0; left: 0; right: 0; z-index: 4;
  padding: calc(8px + env(safe-area-inset-top)) 10px 22px;
  background: linear-gradient(to bottom, rgba(0,0,0,0.65), rgba(0,0,0,0));
}
.lt-row { display: flex; align-items: center; gap: 6px; }
.lt-pill { display: flex; align-items: center; gap: 8px; background: rgba(0,0,0,0.45); border-radius: 20px; padding: 3px 12px 3px 3px; min-width: 0; }
.lt-pill img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; background: var(--panel2); flex-shrink: 0; }
.lt-info { min-width: 0; }
.lt-name { font-size: 13px; font-weight: 600; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lt-sub { display: flex; align-items: center; gap: 5px; font-size: 10px; color: rgba(255,255,255,0.75); }
.lt-badge { background: var(--accent); color: #fff; font-weight: 800; font-size: 9px; padding: 1px 4px; border-radius: 4px; letter-spacing: 0.3px; }
.lt-likes { display: inline-flex; align-items: center; gap: 2px; color: rgba(255,255,255,0.85); }
.lt-likes .fico { width: 10px; height: 10px; color: var(--accent); }
.lt-likes b { font-weight: 700; }
.lt-follow { background: var(--accent); color: #fff; border: 0; border-radius: 20px; font-size: 11px; font-weight: 700; padding: 7px 12px; cursor: pointer; flex-shrink: 0; }
.lt-chip { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; background: rgba(0,0,0,0.45); border-radius: 16px; padding: 7px 10px; font-size: 12px; font-weight: 700; color: #fff; flex-shrink: 0; }
.lt-chip .fico { width: 13px; height: 13px; }
.lt-x { width: 32px; height: 32px; border-radius: 50%; background: rgba(0,0,0,0.45); color: #fff; border: 0; font-size: 14px; cursor: pointer; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.lt-title { margin-top: 6px; padding-left: 4px; font-size: 12px; color: rgba(255,255,255,0.8); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Unten: Chat-Overlay links + Eingabe-Pill mit Aktions-Kreisen (wie App) */
.live-bottom {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 4;
  padding: 10px 10px calc(12px + env(safe-area-inset-bottom));
  background: linear-gradient(to top, rgba(0,0,0,0.55), rgba(0,0,0,0));
}
.lc-msgs {
  max-height: 250px; width: min(420px, 78%); overflow-y: auto;
  display: flex; flex-direction: column; gap: 3px; margin-bottom: 8px;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 24px);
  mask-image: linear-gradient(to bottom, transparent, #000 24px);
  scrollbar-width: none;
}
.lc-msgs::-webkit-scrollbar { display: none; }
.lcm { display: flex; gap: 6px; font-size: 13px; align-items: flex-start; }
img.lcm-av, .lcm-av.avatar-ph { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; background: rgba(255,255,255,0.15); display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; flex-shrink: 0; }
.lcm-body { background: rgba(0,0,0,0.35); border-radius: 12px; padding: 4px 10px; line-height: 1.35; overflow-wrap: anywhere; color: #fff; }
.lcm-body b { color: #ffb800; font-weight: 600; margin-right: 4px; }
.lcm-join { color: rgba(255,255,255,0.6); font-style: italic; font-size: 12px; align-self: flex-start; background: rgba(0,0,0,0.25); border-radius: 12px; padding: 3px 10px; }
.lb-row { display: flex; align-items: center; gap: 6px; }
.lb-row input {
  flex: 1; min-width: 0; background: rgba(255,255,255,0.18); border: 0; border-radius: 22px;
  color: #fff; padding: 11px 16px; font-size: 14px; outline: none;
}
.lb-row input::placeholder { color: rgba(255,255,255,0.6); }
.lb-circle {
  width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,0.15);
  border: 0; color: #fff; font-size: 18px; display: flex; align-items: center; justify-content: center;
  cursor: pointer; flex-shrink: 0; padding: 0;
}
.lb-circle .fico { width: 18px; height: 18px; }
.lb-send { background: var(--accent); }
/* Senden-Kreis nur zeigen, wenn etwas getippt wurde (TikTok-Style) */
.lb-row:has(input:not(:placeholder-shown)) .lb-send { display: flex; }
.lb-row:has(input:not(:placeholder-shown)) #liveEmojiBtn { display: none; }

/* Herzen: steigen von der Tipp-Position auf (Tap aufs Video = Like) */
.live-hearts { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 3; }
.live-heart { position: absolute; animation: heartup 1.8s ease-out forwards; will-change: transform, opacity; }
.live-heart .fico { width: 28px; height: 28px; color: var(--accent); }
@keyframes heartup {
  0%   { transform: translate(0, 0) scale(0.5); opacity: 0; }
  12%  { transform: translate(0, -14px) scale(1.15); opacity: 1; }
  100% { transform: translate(var(--dx, 0px), -280px) scale(1) rotate(var(--rot, 0deg)); opacity: 0; }
}

.live-unmute {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); z-index: 5;
  background: rgba(0,0,0,0.65); color: #fff; border: 1px solid rgba(255,255,255,0.35);
  border-radius: 22px; padding: 10px 18px; font-size: 14px; font-weight: 700; cursor: pointer;
}
.live-error { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); color: var(--muted); z-index: 5; }

/* Lautstärke: vertikaler Regler + Stummschalten rechts (wie TikTok-Web) */
.live-volume {
  position: absolute; right: 12px; bottom: 92px; z-index: 5;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.live-volume .lv-slider-wrap {
  width: 40px; height: 110px; display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.45); border-radius: 20px;
}
.live-volume input[type="range"] {
  -webkit-appearance: none; appearance: none; cursor: pointer;
  width: 90px; height: 4px; border-radius: 2px;
  background: rgba(255,255,255,0.35); accent-color: #fff;
  transform: rotate(-90deg);
}
.live-volume input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 0;
}
.live-volume input[type="range"]::-moz-range-thumb {
  width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 0;
}
.live-volume .lb-circle { background: rgba(0,0,0,0.45); }
/* Touch-Geräte: Lautstärke regelt die Hardware — nur Stummschalten zeigen */
@media (pointer: coarse) { .live-volume .lv-slider-wrap { display: none; } }

/* ── Live-Map ───────────────────────────────────────────────────────────── */
.map-subpage { padding: 28px 32px 32px; display: flex; flex-direction: column; }
.map-container { flex: 1; min-height: 420px; border-radius: 12px; overflow: hidden; background: var(--panel2); }
.leaflet-container { background: #17171a; font-family: inherit; }
.leaflet-control-zoom a { background: var(--panel2) !important; color: #fff !important; border-color: var(--line) !important; }
.leaflet-control-attribution { background: rgba(0,0,0,0.6) !important; color: #999 !important; }
.leaflet-control-attribution a { color: #ccc !important; }
.leaflet-tooltip { background: var(--panel) !important; color: #fff !important; border: 1px solid var(--line) !important; box-shadow: none !important; }
.leaflet-tooltip-top::before { border-top-color: var(--panel) !important; }

.map-zone-panel {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(380px, 100%); z-index: 55;
  background: var(--panel); border-left: 1px solid var(--line);
  display: flex; flex-direction: column; padding-bottom: 16px; overflow-y: auto;
}
.mz-tabs { display: flex; gap: 8px; padding: 12px 16px 4px; }
.mz-tab { flex: 1; padding: 8px 4px; background: var(--panel2); border: none; border-radius: 8px; color: var(--muted); font-size: 12px; font-weight: 600; cursor: pointer; }
.mz-tab.active { background: var(--accent); color: #fff; }
#mapZoneList { padding: 8px 16px 0; }

.map-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.map-head h2 { margin: 0; }
.map-heat-toggle { background: var(--panel2); border: 1px solid var(--line); border-radius: 8px; color: var(--text); font-size: 13px; font-weight: 600; padding: 8px 14px; cursor: pointer; white-space: nowrap; }
.map-heat-toggle:hover { border-color: var(--accent); }
.map-heat-blob path { filter: blur(8px); }

.map-live-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: rgba(214,51,108,0.14); border: 1px solid rgba(214,51,108,0.4); color: #E88FAE;
  border-radius: 10px; padding: 10px 14px; font-size: 13px; font-weight: 600; margin-bottom: 12px;
}
.map-live-banner button { background: rgba(214,51,108,0.25); border: none; color: #fff; border-radius: 6px; padding: 6px 12px; font-size: 12px; font-weight: 700; cursor: pointer; }

.map-my-icon { display: flex; flex-direction: column; align-items: center; }
.map-my-dot { width: 14px; height: 14px; border-radius: 50%; background: #4fc3f7; border: 2px solid #fff; box-shadow: 0 0 0 4px rgba(79,195,247,0.35); }
.map-my-label { font-size: 10px; font-weight: 700; color: #4fc3f7; text-shadow: 0 1px 2px rgba(0,0,0,0.8); margin-top: 2px; }
.map-live-av { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; border: 2px solid #D6336C; box-shadow: 0 0 0 2px rgba(0,0,0,0.5); display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 700; background: var(--panel2); }
.leaflet-popup-content-wrapper { background: var(--panel) !important; color: #fff !important; }
.leaflet-popup-tip { background: var(--panel) !important; }

.priv-live-block { margin-top: 4px; padding-top: 14px; border-top: 1px solid var(--line); }
.priv-live-block .priv-select + .priv-select { margin-top: 8px; }
.priv-live-warn { margin-top: 10px; padding: 12px; background: rgba(255,159,10,0.12); border: 1px solid rgba(255,159,10,0.4); border-radius: 10px; }
.priv-live-warn p { margin: 0 0 10px; font-size: 13px; color: #ffb84d; line-height: 1.4; }
.priv-live-warn button { width: auto !important; margin-top: 0 !important; margin-right: 8px; }

@media (max-width: 700px) {
  .map-container { min-height: calc(100vh - 200px); }
  .map-live-banner { flex-wrap: wrap; }
}

/* ── Kommentar-Panel ────────────────────────────────────────────────────── */
.comment-panel {
  /* z-index über .screen (45) — sonst landet das Panel unsichtbar HINTER dem
     Video-Viewer/Profil-Overlay, wenn Kommentare von dort geöffnet werden. */
  position: fixed; top: 0; right: 0; bottom: 0; width: min(400px, 100%); z-index: 48;
  background: var(--panel); border-left: 1px solid var(--line);
  display: flex; flex-direction: column;
}
.cp-head { display: flex; align-items: center; gap: 10px; padding: 16px; border-bottom: 1px solid var(--line); }
.cp-head span { flex: 1; font-weight: 700; }
.cp-search { padding: 10px 16px 12px; border-bottom: 1px solid var(--line); }
.cp-search input { width: 100%; background: var(--panel2); border: 1px solid #3a3a3a; border-radius: 10px; padding: 9px 12px; color: #fff; font-size: 13px; }
.cp-search input:focus { outline: none; border-color: var(--accent); }
.cp-list { flex: 1; overflow-y: auto; padding: 12px 16px; }
.cp-item { display: flex; gap: 10px; margin-bottom: 20px; align-items: flex-start; }
.cp-item.reply { margin-left: 40px; }
.cp-item img.cp-av { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; background: #3a3a3a; flex-shrink: 0; }
.cp-item .cp-av.avatar-ph { width: 42px; height: 42px; border-radius: 50%; background: #3a3a3a; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 16px; flex-shrink: 0; }
.cp-item .cp-body { flex: 1; min-width: 0; }
.cp-item .cp-user { display: flex; align-items: center; gap: 5px; font-size: 12px; color: #9e9e9e; font-weight: 600; flex-wrap: wrap; }
.cp-item .cp-name { cursor: pointer; }
.cp-item .cp-user .verified { font-size: 12px; }
.cp-item .cp-user .modshield { color: var(--info); font-size: 12px; }
.first-badge { background: rgba(255,184,0,.15); color: var(--gold); font-size: 10px; font-weight: 600; padding: 1px 5px; border-radius: 4px; }
.cp-item .cp-text { font-size: 15px; margin: 3px 0; overflow-wrap: break-word; }
.cp-item .cp-meta { font-size: 12px; color: var(--muted); display: flex; gap: 14px; margin-top: 6px; }
.cp-meta .cp-act { cursor: pointer; font-weight: 600; }
.cp-meta .cp-del { color: var(--accent); }
.cp-votes { display: flex; flex-direction: column; align-items: center; gap: 8px; padding-top: 4px; flex-shrink: 0; }
.cp-like { cursor: pointer; font-size: 15px; text-align: center; }
.cp-lc { font-size: 11px; color: var(--muted); }
.cp-dislike { cursor: pointer; font-size: 13px; filter: grayscale(1); opacity: 0.65; }
.cp-dislike.on { filter: none; opacity: 1; }
.cp-empty { color: var(--muted); text-align: center; margin-top: 40px; font-size: 14px; line-height: 1.8; }
.cp-empty .cp-sub { color: #4a4a4a; font-size: 12px; }
.cp-egg { background: #2c2c2c; color: var(--muted); text-align: center; font-size: 14px; font-weight: 600; padding: 10px 16px; }
.cp-replybar { display: flex; align-items: center; gap: 6px; background: #222; padding: 6px 16px; font-size: 12px; color: #9e9e9e; }
.cp-replybar span { flex: 1; }
.cp-replybar .icon-btn { font-size: 14px; }
.cp-emojis { display: flex; justify-content: space-evenly; padding: 6px 8px; border-top: 1px solid var(--line); }
.cp-emojis button { background: none; border: none; font-size: 24px; cursor: pointer; padding: 4px; }
/* @Mention-Autocomplete */
.cp-mentions { max-height: 180px; overflow-y: auto; border-top: 1px solid var(--line); }
.cp-mrow { display: flex; align-items: center; gap: 10px; padding: 8px 16px; cursor: pointer; }
.cp-mrow:hover { background: var(--panel2); }
.cp-mrow img.cp-mav, .cp-mrow .cp-mav.avatar-ph { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; background: var(--panel2); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; flex-shrink: 0; }
.cp-mname { font-size: 14px; font-weight: 600; }
.cp-msub { font-size: 12px; color: var(--muted); }
/* Sticker-Picker (5 pro Zeile wie Android) */
.cp-stickers { display: grid; grid-template-columns: repeat(5, 1fr); border-top: 1px solid var(--line); padding: 6px 8px; max-height: 180px; overflow-y: auto; }
.cp-stickers button { background: none; border: none; font-size: 26px; padding: 6px; cursor: pointer; }

/* Long-Press-Schnellmenü (Bottom-Sheet wie Android) */
.qm-overlay { align-items: flex-end; justify-content: center; padding: 0; }
.qm-panel { background: #1a1a1a; width: min(420px, 100%); border-radius: 16px 16px 0 0; padding: 14px 0 26px; max-height: 78vh; overflow-y: auto; }
.qm-row { display: flex; align-items: center; gap: 12px; padding: 13px 20px; font-size: 16px; cursor: pointer; }
.qm-row:hover { background: rgba(255,255,255,0.06); }
.qm-red { color: var(--accent); }
.qm-div { height: 1px; background: rgba(255,255,255,0.1); margin: 6px 0; }
.qm-label { padding: 12px 20px 6px; font-size: 16px; }
.qm-speeds { display: flex; gap: 8px; padding: 0 20px 10px; }
.qm-speed { flex: 1; background: rgba(255,255,255,0.1); border: none; color: #fff; border-radius: 8px; padding: 9px 0; font-size: 14px; cursor: pointer; }
.qm-speed.on { background: #fff; color: #000; font-weight: 700; }
.qm-toggle { margin-left: auto; width: 40px; height: 22px; border-radius: 11px; background: #3a3a3a; position: relative; flex-shrink: 0; }
.qm-toggle::after { content: ''; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: left 0.15s; }
.qm-toggle.on { background: var(--accent); }
.qm-toggle.on::after { left: 20px; }
/* Clean-Mode: Overlays ausblenden, bis erneut getippt wird */
.card.clean .caption, .card.clean .rail, .card.clean .progress { display: none; }

/* Gründe-für-Beitrag-Liste */
.why-list { margin: 10px 0 4px 2px; list-style: none; color: #ddd; font-size: 14px; line-height: 1.9; }

/* Registrierung: Verifizierungs-Methode */
.verify-choice { display: flex; gap: 16px; margin-top: 12px; }

/* Duet-/Stitch-Leiste im Upload-Modal */
.up-duet { display: flex; align-items: center; gap: 6px; background: var(--panel2); border-radius: 8px; padding: 8px 12px; margin: 4px 0 8px; font-size: 13px; font-weight: 600; color: var(--info); }
.up-duet span { flex: 1; }
.up-row input[type="number"] { width: 70px; background: var(--panel2); border: 1px solid var(--line); border-radius: 6px; color: #fff; padding: 5px 8px; margin-left: 6px; }
.cp-form { display: flex; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--line); align-items: stretch; min-width: 0; }
/* min-width:0 lässt das Eingabefeld unter seine intrinsische Breite (~180px)
   schrumpfen — sonst sprengt die Zeile (Icons + Input + „Senden") schmale
   Screens und der horizontale Überlauf schiebt die ganze Chat-Spalte raus. */
.cp-form input { flex: 1; min-width: 0; background: var(--panel2); border: none; border-radius: 20px; padding: 10px 14px; color: #fff; font-size: 14px; }
.cp-form input:focus { outline: 1px solid var(--accent); }
/* eigenes vertikales Padding → „Senden" ist eine saubere Pille in Eingabefeld-Höhe,
   unabhängig von der Flex-Ausrichtung; flex-shrink:0, damit es nie zerdrückt wird. */
.cp-form button { flex-shrink: 0; background: var(--accent); color: #fff; border: none; border-radius: 20px; padding: 10px 18px; font-weight: 700; font-size: 14px; cursor: pointer; white-space: nowrap; }
.cp-form .icon-btn { flex-shrink: 0; display: flex; align-items: center; }

/* ── Modals ─────────────────────────────────────────────────────────────── */
.overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.75); display: flex; align-items: center; justify-content: center; z-index: 60; padding: 16px; }
.panel { position: relative; background: var(--panel); border-radius: 14px; padding: 28px; width: 380px; max-width: 100%; max-height: calc(100vh - 32px); overflow-y: auto; }
.panel h1 { font-size: 22px; margin-bottom: 12px; }
.close-x { position: absolute; top: 14px; right: 16px; }
.panel input { width: 100%; padding: 12px 14px; margin-top: 10px; background: var(--panel2); border: 1px solid var(--line); border-radius: 8px; color: #fff; font-size: 15px; }
.panel input:focus { outline: none; border-color: var(--accent); }
.panel button.primary { width: 100%; margin-top: 14px; background: var(--accent); color: #fff; border: none; border-radius: 8px; padding: 12px; font-weight: 700; font-size: 15px; cursor: pointer; }
.panel button.ghost { width: 100%; margin-top: 8px; background: none; border: none; color: var(--muted); cursor: pointer; font-size: 14px; }
.panel button.ghost b { color: var(--text); }
.panel textarea { width: 100%; padding: 12px 14px; margin-top: 10px; background: var(--panel2); border: 1px solid var(--line); border-radius: 8px; color: #fff; font-size: 15px; resize: vertical; font-family: inherit; }
/* Checkout-Schrittanzeige (1/2, 2/2) + optionales Rechnungsformular */
.pay-steps { margin: 14px 0 4px; font-size: 13px; font-weight: 600; letter-spacing: .3px; color: var(--muted); }
.pay-steps b { color: var(--accent); }
.bill-form { margin-top: 4px; }
.bill-row { display: flex; gap: 10px; }
.bill-row .bill-zip { flex: 0 0 34%; width: auto; }
.bill-row .bill-city { flex: 1 1 auto; width: auto; }
.coupon-row { display: flex; gap: 10px; align-items: stretch; }
.coupon-row #couponCode { flex: 1 1 auto; width: auto; }
.coupon-row .coupon-btn { flex: 0 0 auto; width: auto; margin-top: 10px; padding: 0 16px; border: 1px solid var(--line); border-radius: 8px; }
.coupon-msg { font-size: 13px; margin-top: 8px; min-height: 1px; }
.coupon-msg.ok  { color: var(--success); }
.coupon-msg.err { color: var(--error); }
.panel textarea:focus { outline: none; border-color: var(--accent); }

/* Profil bearbeiten */
.edit-avatar { position: relative; display: block; width: 96px; height: 96px; margin: 12px auto 14px; cursor: pointer; }
.edit-avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; background: var(--panel2); }
.edit-avatar-hint { position: absolute; bottom: -6px; left: 50%; transform: translateX(-50%); background: var(--panel2); border: 1px solid var(--line); border-radius: 8px; font-size: 11px; padding: 2px 8px; white-space: nowrap; }

/* Sprachaufnahme-Button */
#dmVoiceBtn.rec { color: var(--accent); animation: pulse 1s ease-in-out infinite; }

.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: var(--panel2); padding: 12px 20px; border-radius: 24px; z-index: 70; font-size: 14px; font-weight: 600; }

/* ── Vollbild-Screens (Profil, Viewer, LIVE-Player) ─────────────────────── */
.screen { position: fixed; inset: 0; z-index: 45; background: var(--bg); overflow-y: auto; }
.screen-head { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 14px; padding: 14px 18px; background: rgba(0,0,0,0.85); backdrop-filter: blur(8px); font-weight: 700; font-size: 17px; }
.overlay-head { background: transparent; position: absolute; }

/* Profil */
.prof-top { display: flex; gap: 22px; padding: 24px 24px 12px; align-items: center; max-width: 700px; margin: 0 auto; }
.prof-avatar { width: 110px; height: 110px; border-radius: 50%; object-fit: cover; background: var(--panel2); flex-shrink: 0; }
.prof-info h2 { font-size: 24px; }
.prof-stats { display: flex; gap: 22px; margin: 12px 0; font-size: 15px; }
.prof-stats b { font-size: 17px; }
.prof-stat-clickable { cursor: pointer; }
.prof-stat-clickable:hover { text-decoration: underline; }
.prof-bio { font-size: 14px; color: #ddd; margin-bottom: 12px; white-space: pre-wrap; }
.follow-btn { width: auto !important; padding: 9px 32px !important; margin: 0 !important; }
.follow-btn.following { background: #fff !important; color: #000 !important; }
.prof-tabs { display: flex; max-width: 700px; margin: 14px auto 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.prof-tabs .pt { flex: 1; background: none; border: none; color: var(--muted); font-size: 18px; padding: 10px 0; cursor: pointer; position: relative; filter: grayscale(1); opacity: 0.7; }
.prof-tabs .pt.active { color: var(--text); filter: none; opacity: 1; }
.prof-tabs .pt.active::after { content: ''; position: absolute; bottom: -1px; left: 25%; right: 25%; height: 2px; background: var(--text); }
.prof-empty .pe-ico { font-size: 42px; line-height: 2; filter: grayscale(1); opacity: 0.7; }
.shop-cell { aspect-ratio: auto !important; display: flex; flex-direction: column; }
.shop-cell img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.shop-ph { width: 100%; aspect-ratio: 1; display: flex; align-items: center; justify-content: center; font-size: 40px; background: var(--panel2); }
.shop-info { padding: 8px 9px 10px; }
.shop-title { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shop-price { font-size: 12px; color: var(--gold); margin-top: 2px; }
.prof-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; max-width: 700px; margin: 16px auto 60px; padding: 0 4px; }
@media (min-width: 700px) { .prof-grid { grid-template-columns: repeat(4, 1fr); } }
.grid-cell { position: relative; aspect-ratio: 9/16; background: var(--panel2); cursor: pointer; overflow: hidden; border-radius: 4px; }
.grid-cell video, .grid-cell img { width: 100%; height: 100%; object-fit: cover; }
.grid-cell .gv-views { position: absolute; bottom: 6px; left: 8px; font-size: 13px; font-weight: 700; text-shadow: 0 1px 3px #000; }
.grid-cell .gv-del { position: absolute; top: 6px; right: 6px; width: 28px; height: 28px; border: 0; border-radius: 50%;
  background: rgba(0,0,0,.55); color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0; }
.grid-cell .gv-del .fico { width: 15px; height: 15px; }
.grid-cell .gv-del:hover { background: rgba(220,40,60,.85); }
.prof-empty { grid-column: 1 / -1; text-align: center; color: var(--muted); padding: 50px 0; }

/* Viewer */
.viewer-feed { height: 100%; overflow-y: scroll; scroll-snap-type: y mandatory; scrollbar-width: none; }
.viewer-feed::-webkit-scrollbar { display: none; }
/* .screen setzt overflow-y:auto für Profil/Follower-Liste (normaler Dokument-
   Scroll) — beim Video-Viewer läuft das Scrollen ausschliesslich in
   .viewer-feed (Scroll-Snap). Zwei verschachtelte, unabhängig scrollende
   Container verwirren Touch-Swipe/Wheel (Browser weiss nicht, wen er
   scrollen soll) → äusseren Scroll hier explizit abschalten. */
#viewer { overflow: hidden; }

/* Upload */
.upload-panel { width: 440px; }
.drop-zone { display: flex; align-items: center; justify-content: center; min-height: 200px; border: 2px dashed var(--line); border-radius: 12px; margin: 6px 0 12px; cursor: pointer; text-align: center; overflow: hidden; }
.drop-zone:hover { border-color: var(--accent); }
.upload-preview { max-height: 320px; max-width: 100%; border-radius: 8px; }
.up-row { display: flex; gap: 18px; margin-top: 10px; }
.chk { display: flex; align-items: center; gap: 6px; font-size: 14px; color: #ddd; cursor: pointer; }
.up-progress { height: 6px; background: var(--panel2); border-radius: 3px; margin-top: 12px; overflow: hidden; }
.up-progress #upBar { height: 100%; width: 0; background: var(--accent); transition: width 0.2s; }

/* ── Mobile ─────────────────────────────────────────────────────────────── */
@media (max-width: 699px) {
  #sidebar { display: none; }
  #topbar { display: flex; }
  #bottomNav { display: flex; }
  .open-app-btn:not(.hidden) { display: block; }
  #content { inset: 0; }
  #feed .card, .subpage { padding-bottom: 54px; }
  .card { height: 100%; }
  .subpage { padding: 66px 16px 90px; }
  .caption { padding-bottom: 70px; }
  .rail { bottom: 70px; }
  /* LIVE-Badge der Feed-Karte unter die mobile Topbar schieben */
  .lf-badge { top: 58px; }
  /* Profil: gestapelt + zentriert wie in der App */
  .prof-top { flex-direction: column; text-align: center; gap: 12px; padding-top: 18px; }
  .prof-stats, .prof-actions { justify-content: center; }
  .follow-btn { padding: 9px 20px !important; }
  /* Live-Übersicht: Überschrift unter die fixe „App öffnen"-Pille schieben */
  .subpage > h2:first-child { margin-top: 48px; }
  /* Live-Player mobil: Chat-Overlay schmaler, Eingabe über der Bottom-Nav */
  .lc-msgs { width: 82%; max-height: 34vh; }
  /* DMs: eine Spalte — Liste ODER Chat füllt den Screen */
  /* --kb = sichtbare Tastaturhöhe (JS via visualViewport). Die DM-Ansicht endet
     oberhalb der Tastatur, damit das Eingabefeld nie dahinter verschwindet. */
  .dm-view { grid-template-columns: 1fr; padding-top: 54px; bottom: var(--kb, 0px); }
  .dm-list, .dm-chat, .dm-empty { grid-column: 1; grid-row: 1; }
  .dm-list { border-right: none; }
  .dm-empty { display: none !important; }
  .dm-form { margin-bottom: 54px; }
  /* Tastatur offen → Bottom-Nav ist verdeckt, also kein 54px-Abstand mehr. */
  body.kb-open .dm-form { margin-bottom: 0; }
  body.kb-open #bottomNav { display: none; }
}

/* CI: Flat Icons statt Emojis (Chrome). Größe folgt der Schriftgröße. */
svg.fico { width: 1.1em; height: 1.1em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -0.15em; }
svg.fico.fill { fill: var(--accent); stroke: var(--accent); }
.bn-ico svg.fico { width: 22px; height: 22px; }
.icon-btn svg.fico { width: 20px; height: 20px; }

/* ── Launch-Countdown-Lockdown ──────────────────────────────────────────── */
body.launch-locked { overflow: hidden; }
body.launch-locked > :not(#launchLock) { filter: grayscale(1) brightness(0.5); pointer-events: none; user-select: none; }
#launchLock { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,0.5); backdrop-filter: blur(6px); }
#launchLock video#llBg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: brightness(0.55) saturate(1.1); }
.ll-mute { position: absolute; top: 24px; right: 24px; z-index: 20; width: 48px; height: 48px; border-radius: 50%; background: rgba(0,0,0,0.5); border: 1px solid rgba(255,255,255,0.2); color: #fff; font-size: 22px; display: flex; align-items: center; justify-content: center; cursor: pointer; }
#launchLock canvas { position: absolute; inset: 0; pointer-events: none; }
.ll-panel { position: relative; text-align: center; padding: 36px 30px; background: rgba(16,16,20,0.92); border: 1px solid rgba(255,255,255,0.1); border-radius: 20px; max-width: min(480px, 92vw); box-shadow: 0 18px 60px rgba(0,0,0,0.6); }
.ll-logo { font-size: 30px; font-weight: 800; margin-bottom: 8px; color: #fff; }
.ll-logo span { color: var(--accent); }
.ll-title { font-size: 17px; font-weight: 700; margin-bottom: 20px; color: #fff; }
.ll-count { display: flex; gap: 10px; justify-content: center; }
.ll-seg { display: flex; flex-direction: column; align-items: center; background: rgba(255,255,255,0.07); border-radius: 12px; padding: 12px 0; width: 76px; }
.ll-seg b { font-size: 30px; color: #fff; font-variant-numeric: tabular-nums; }
.ll-seg i { font-style: normal; font-size: 11px; color: var(--muted); margin-top: 4px; }
.ll-emoji { font-size: 52px; margin-bottom: 8px; }
#llRegister { display: block; width: 100%; margin-top: 8px; background: var(--accent); color: #fff; border: 0; border-radius: 24px; padding: 13px; font-size: 15px; font-weight: 800; cursor: pointer; }
.ll-ghost { display: block; width: 100%; margin-top: 10px; background: none; border: 0; color: var(--muted); font-size: 13px; cursor: pointer; text-decoration: underline; }
.ll-beta { margin-top: 18px; text-align: left; }
.ll-input { display: block; width: 100%; margin-top: 8px; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.15); border-radius: 10px; padding: 10px 12px; font-size: 13px; color: #fff; }
.ll-input::placeholder { color: var(--muted); }
.ll-cta { display: block; width: 100%; margin-top: 10px; background: var(--accent); color: #fff; border: 0; border-radius: 20px; padding: 11px; font-size: 13px; font-weight: 700; cursor: pointer; }
.ll-error { color: #ff5c5c; font-size: 11px; margin-top: 6px; }
.ll-reserve { margin-top: 18px; text-align: left; }
.ll-res-hint { color: var(--muted); font-size: 12px; margin-top: 8px; line-height: 1.45; }
.ll-ok { color: #4ade80; font-size: 13px; margin-top: 8px; line-height: 1.45; }

/* ── Privatsphäre-Modal (Profil-Sichtbarkeit + Follow-Policy + Anfragen) ────── */
.priv-label { display: block; margin: 14px 0 0; font-size: 13px; color: var(--muted); }
.priv-select { width: 100%; padding: 12px 14px; margin-top: 8px; background: var(--panel2); border: 1px solid var(--line); border-radius: 8px; color: #fff; font-size: 15px; }
.priv-select:focus { outline: none; border-color: var(--accent); }
.priv-req-title { font-size: 15px; margin: 18px 0 4px; }
.priv-req-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); }
.priv-req-ava { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; background: var(--panel2); flex: none; }
.priv-req-name { flex: 1; min-width: 0; display: flex; flex-direction: column; cursor: pointer; }
.priv-req-name b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.priv-req-name .muted { font-size: 12px; }
.priv-req-row button.primary.priv-req-ok { width: auto; margin: 0; padding: 7px 12px; font-size: 13px; flex: none; }
.priv-req-no { background: none; border: 1px solid var(--line); color: var(--text); border-radius: 8px; padding: 7px 12px; font-size: 13px; cursor: pointer; flex: none; }

/* LIVE-Ziel-Fortschritt (Gold = Coins-Bedeutung, CI) */
.live-goal{position:absolute;top:96px;left:10px;z-index:4;width:min(46vw,230px);background:rgba(0,0,0,0.45);border:1px solid var(--line);border-radius:10px;padding:6px 8px;backdrop-filter:blur(4px)}
.lg-head{display:flex;justify-content:space-between;gap:8px;font-size:11px;color:var(--text);margin-bottom:4px;white-space:nowrap;overflow:hidden}
.lg-head span:first-child{overflow:hidden;text-overflow:ellipsis}
.lg-head span:last-child{color:var(--muted);flex:none}
.lg-track{height:6px;border-radius:3px;background:rgba(255,255,255,0.15);overflow:hidden}
.lg-fill{height:100%;width:0;border-radius:3px;background:linear-gradient(90deg,var(--gold),#e8c268);transition:width .4s ease}
.live-goal.reached .lg-fill{background:var(--success)}
#liveClipBtn:disabled{opacity:.5}
