/* Kiez im Stil der Ideenwerft Friedenau: Space Grotesk, Syne, Ideenwerft-Rot */
@font-face { font-family: 'Space Grotesk'; src: url('/fonts/SpaceGrotesk.woff2') format('woff2'); font-weight: 300 700; font-display: swap; }
@font-face { font-family: 'Syne'; src: url('/fonts/Syne.woff2') format('woff2'); font-weight: 600 700; font-display: swap; }

* { box-sizing: border-box; }
:root {
  color-scheme: light;
  --background: hsl(210 30% 97.5%);
  --foreground: hsl(220 15% 16%);
  --card: hsl(0 0% 100%);
  --muted: hsl(210 20% 94%);
  --muted-foreground: hsl(220 12% 40%);
  --border: hsl(210 16% 89%);
  --primary: hsl(0 79% 45%);
  --primary-strong: hsl(0 79% 40%);
  --primary-soft: hsl(0 79% 45% / 0.09);
  --glass: hsl(210 30% 98% / 0.78);
  --shadow-sm: 0 1px 2px hsl(220 30% 20% / 0.05), 0 2px 8px hsl(220 30% 20% / 0.04);
  --shadow-lg: 0 12px 40px hsl(220 30% 15% / 0.16);
  --radius: 20px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --font: 'Space Grotesk', system-ui, sans-serif;
  --font-display: 'Syne', 'Space Grotesk', sans-serif;
  --nav-h: 68px;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --background: hsl(222 22% 8%); --foreground: hsl(210 20% 93%); --card: hsl(222 18% 12%); --muted: hsl(222 15% 17%);
  --muted-foreground: hsl(215 15% 68%); --border: hsl(222 13% 20%); --primary: hsl(0 76% 58%); --primary-strong: hsl(0 76% 52%);
  --primary-soft: hsl(0 76% 58% / 0.15); --glass: hsl(222 22% 8% / 0.72); --shadow-sm: 0 1px 2px hsl(0 0% 0% / 0.3); --shadow-lg: 0 16px 48px hsl(0 0% 0% / 0.5);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --background: hsl(222 22% 8%); --foreground: hsl(210 20% 93%); --card: hsl(222 18% 12%); --muted: hsl(222 15% 17%);
    --muted-foreground: hsl(215 15% 68%); --border: hsl(222 13% 20%); --primary: hsl(0 76% 58%); --primary-strong: hsl(0 76% 52%);
    --primary-soft: hsl(0 76% 58% / 0.15); --glass: hsl(222 22% 8% / 0.72); --shadow-sm: 0 1px 2px hsl(0 0% 0% / 0.3); --shadow-lg: 0 16px 48px hsl(0 0% 0% / 0.5);
  }
}

html, body { margin: 0; background: var(--background); color: var(--foreground); font-family: var(--font);
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
html { scroll-behavior: smooth; }
body { padding-bottom: calc(var(--nav-h) + 28px + env(safe-area-inset-bottom)); overscroll-behavior-y: contain; }
body[data-view="detail"] { padding-bottom: calc(120px + env(safe-area-inset-bottom)); }
button { font: inherit; cursor: pointer; color: inherit; -webkit-user-select: none; user-select: none; }
[hidden] { display: none !important; }
*:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 8px; }
.i { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* Kopfzeile aus Glas */
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 10px;
  height: calc(58px + env(safe-area-inset-top)); padding: env(safe-area-inset-top) 14px 0;
  background: var(--glass); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid color-mix(in srgb, var(--border) 70%, transparent); }
.brand { display: flex; align-items: center; gap: 7px; color: var(--primary); text-decoration: none; }
.brand .i { width: 22px; height: 22px; stroke-width: 2.2; }
.brand span { font-family: var(--font-display); font-weight: 700; letter-spacing: 0.14em; font-size: 17px; }
.place { flex: 1; min-width: 0; display: flex; align-items: center; justify-content: center; gap: 5px; border: 0; background: transparent;
  color: var(--muted-foreground); font-size: 13px; font-weight: 500; padding: 6px; border-radius: 999px; }
.place .i { width: 15px; height: 15px; color: var(--primary); }
.place span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.place:active { background: var(--muted); }
.karma { display: flex; align-items: center; gap: 4px; border: 0; background: var(--primary-soft); color: var(--primary);
  border-radius: 999px; padding: 6px 12px; font-weight: 700; font-size: 14px; transition: transform .2s var(--spring); }
.karma:active { transform: scale(.94); }

/* Wischen zum Aktualisieren */
.ptr { position: fixed; top: calc(62px + env(safe-area-inset-top)); left: 50%; z-index: 15; width: 40px; height: 40px; margin-top: -48px;
  display: grid; place-items: center; border-radius: 50%; background: var(--card); color: var(--primary); box-shadow: var(--shadow-lg);
  opacity: 0; transform: translate(-50%, 0); pointer-events: none; transition: opacity .2s; }
.ptr.ready { color: #fff; background: var(--primary); }
.ptr.spin .i { animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

main { max-width: 640px; margin: 0 auto; outline: none; }

/* Überschriften */
.intro { padding: 22px 18px 4px; }
.eyebrow { display: block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.16em; color: var(--primary); }
.eyebrow.light { color: rgb(255 255 255 / .8); }
.intro h1 { margin: 6px 0 0; font-size: clamp(26px, 7vw, 32px); font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; }
.lead { margin: 8px 0 0; color: var(--muted-foreground); line-height: 1.5; }
.controls { position: sticky; top: calc(58px + env(safe-area-inset-top)); z-index: 10; padding: 12px 14px 8px;
  background: var(--glass); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px);
  display: flex; flex-direction: column; gap: 10px; margin-bottom: 6px; }

/* Segment-Schalter mit gleitender Pille */
.segmented { position: relative; display: flex; padding: 4px; background: var(--muted); border-radius: 14px; }
.segmented button { position: relative; z-index: 1; flex: 1; border: 0; background: transparent; padding: 9px 8px; border-radius: 10px;
  font-size: 14px; font-weight: 600; color: var(--muted-foreground); transition: color .25s; white-space: nowrap; }
.segmented button.active { color: var(--foreground); }
.seg-pill { position: absolute; top: 4px; bottom: 4px; left: 4px; border-radius: 10px; background: var(--card); box-shadow: var(--shadow-sm);
  transition: transform .35s var(--spring), width .35s var(--spring); }

/* Hashtag-Leiste */
.tagbar { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 -14px; padding: 0 14px; scroll-snap-type: x proximity; }
.tagbar::-webkit-scrollbar { display: none; }
.tagchip { flex: none; border: 1px solid var(--border); background: var(--card); color: var(--foreground); border-radius: 999px;
  padding: 7px 13px; font-size: 13px; font-weight: 600; scroll-snap-align: start; transition: all .2s var(--ease); }
.tagchip.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.tagchip:active { transform: scale(.95); }

.new-pill { position: sticky; top: calc(150px + env(safe-area-inset-top)); z-index: 11; display: block; margin: 0 auto -38px; border: 0;
  background: var(--primary); color: #fff; font-weight: 700; font-size: 13px; padding: 9px 16px; border-radius: 999px; box-shadow: var(--shadow-lg);
  animation: drop .45s var(--spring); }
@keyframes drop { from { transform: translateY(-20px); opacity: 0; } }

/* Post-Karten */
.list { padding: 4px 0 8px; }
.post { position: relative; display: flex; gap: 6px; margin: 0 14px 12px; padding: 16px 8px 12px 18px; border-radius: var(--radius);
  background: var(--card); border: 1px solid color-mix(in srgb, var(--border) 70%, transparent); box-shadow: var(--shadow-sm);
  overflow: hidden; animation: rise .45s var(--ease) both; transition: transform .2s var(--ease), opacity .25s; isolation: isolate; }
.post::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--accent, var(--primary)); }
.post::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(120% 60% at 0% 0%, color-mix(in srgb, var(--accent, var(--primary)) 9%, transparent), transparent 60%); }
.post.tappable { cursor: pointer; }
.post.tappable:active { transform: scale(.985); }
.post.removing { opacity: 0; transform: scale(.96); }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }
.post .body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.post .meta { font-size: 12px; color: var(--muted-foreground); margin-bottom: 7px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; font-weight: 500; }
.post .dist { display: inline-flex; align-items: center; gap: 3px; }
.post .dist .i { width: 13px; height: 13px; }
.post .text { font-size: 17px; line-height: 1.42; white-space: pre-wrap; overflow-wrap: anywhere; letter-spacing: -0.005em; }
.post.detail:not(.reply) .text { font-size: 19px; }
.hashtag { border: 0; background: none; padding: 0; color: var(--primary); font-weight: 600; }
.post .footer { margin-top: 10px; display: flex; align-items: center; gap: 4px; color: var(--muted-foreground); font-size: 13px; font-weight: 600; }
.post .footer .spacer { flex: 1; }
.comments { display: inline-flex; align-items: center; gap: 5px; }
.comments .i { width: 17px; height: 17px; }
.icon-btn { display: grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 12px; background: transparent; color: var(--muted-foreground); }
.icon-btn.small { width: 34px; height: 34px; }
.icon-btn.small .i { width: 18px; height: 18px; }
.icon-btn:active { background: var(--muted); }
.badge { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: #fff;
  background: var(--accent, var(--primary)); border-radius: 999px; padding: 3px 8px; }

.votes { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 46px; gap: 2px; }
.vote { display: grid; place-items: center; width: 40px; height: 36px; border: 0; border-radius: 12px; background: transparent;
  color: var(--muted-foreground); transition: transform .25s var(--spring), background .2s, color .2s; }
.vote .i { width: 24px; height: 24px; stroke-width: 2.4; }
.vote:active:not(:disabled) { transform: scale(.85); }
.vote.on { color: #fff; background: var(--primary); box-shadow: 0 4px 12px hsl(0 79% 45% / .3); }
.vote.down.on { background: var(--foreground); color: var(--background); box-shadow: none; }
.vote:disabled { opacity: .28; cursor: default; }
.score { font-weight: 700; font-size: 17px; font-variant-numeric: tabular-nums; }

/* Doppeltipp-Effekt */
.burst { position: absolute; z-index: 5; width: 72px; height: 72px; margin: -36px 0 0 -36px; display: grid; place-items: center;
  border-radius: 50%; background: var(--primary); color: #fff; pointer-events: none; animation: burst .7s var(--ease) forwards; }
.burst .i { width: 40px; height: 40px; stroke-width: 3; }
@keyframes burst { 0% { transform: scale(.2); opacity: 0; } 25% { transform: scale(1.1); opacity: 1; } 60% { transform: scale(1) translateY(-8px); opacity: 1; } 100% { transform: scale(.9) translateY(-40px); opacity: 0; } }

/* Medien */
.media { position: relative; margin: 10px 0 2px; border-radius: 14px; overflow: hidden; background: var(--muted); max-height: 480px; }
.media img, .media video { display: block; width: 100%; height: 100%; max-height: 480px; object-fit: cover; }
.media img { opacity: 0; transition: opacity .35s; cursor: zoom-in; }
.media img.loaded { opacity: 1; }
.media.video { background: #000; }
.media.video video { object-fit: contain; }
.mute-btn { position: absolute; right: 10px; bottom: 10px; width: 34px; height: 34px; display: grid; place-items: center; border: 0; border-radius: 50%;
  background: hsl(0 0% 0% / .55); color: #fff; backdrop-filter: blur(6px); }
.mute-btn .i { width: 17px; height: 17px; }

/* Ladeplatzhalter */
.post.skeleton { min-height: 118px; animation: none; }
.post.skeleton::before { background: var(--muted); }
.skeleton .line { display: block; height: 14px; border-radius: 7px; margin: 8px 0; width: 92%;
  background: linear-gradient(90deg, var(--muted) 25%, color-mix(in srgb, var(--muted) 40%, var(--card)) 50%, var(--muted) 75%);
  background-size: 300% 100%; animation: shimmer 1.3s infinite linear; }
.skeleton .line.short { width: 30%; height: 10px; }
.skeleton .line.mid { width: 60%; }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -50% 0; } }

/* Leerzustände */
.empty { text-align: center; color: var(--muted-foreground); padding: 48px 28px; line-height: 1.5; animation: rise .4s var(--ease); }
.empty h2 { color: var(--foreground); margin: 14px 0 6px; font-size: 20px; }
.empty p { margin: 0 0 18px; }
.empty .small { margin-top: 22px; font-size: 14px; }
.empty-icon { width: 64px; height: 64px; margin: 0 auto; display: grid; place-items: center; border-radius: 20px; background: var(--primary-soft); color: var(--primary); }
.empty-icon .i { width: 30px; height: 30px; }
.city-list { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.hint { text-align: center; color: var(--muted-foreground); font-size: 14px; margin: 18px; }

/* Detailansicht */
.detail-head { position: sticky; top: calc(58px + env(safe-area-inset-top)); z-index: 10; display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px; background: var(--glass); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px); margin-bottom: 6px; }
.back { display: inline-flex; align-items: center; gap: 2px; border: 0; background: transparent; font-weight: 600; padding: 6px 8px 6px 0; color: var(--primary); }
.thread { position: relative; margin-left: 30px; }
.thread::before { content: ""; position: absolute; left: 0; top: -12px; bottom: 12px; width: 2px; background: var(--border); border-radius: 2px; }
.post.reply { margin-left: 14px; padding-top: 12px; }
.post.reply .text { font-size: 16px; }

.reply-form { position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  background: var(--glass); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 8px; }
.reply-extras:not(:has(:not([hidden]))) { display: none; }
.reply-row { display: flex; gap: 6px; align-items: flex-end; max-width: 640px; width: 100%; margin: 0 auto; }
.reply-row textarea { flex: 1; min-width: 0; resize: none; border: 1px solid var(--border); border-radius: 22px; padding: 11px 16px; font: inherit; font-size: 16px;
  line-height: 1.3; background: var(--card); color: var(--foreground); min-height: 44px; max-height: 120px; }
.reply-row textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.send-btn { width: 44px; height: 44px; flex: none; display: grid; place-items: center; border: 0; border-radius: 50%; background: var(--primary); color: #fff;
  transition: transform .2s var(--spring); }
.send-btn:active { transform: scale(.9); }
.send-btn:disabled { opacity: .5; }
.send-btn .i { width: 19px; height: 19px; margin-left: -2px; }

/* Untere Navigation mit schwebendem Plus */
.bottomnav { position: fixed; left: 50%; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 30; transform: translateX(-50%);
  width: min(560px, calc(100% - 24px)); height: var(--nav-h); display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); align-items: center;
  padding: 0 6px; border-radius: 24px; background: var(--glass); backdrop-filter: saturate(180%) blur(22px); -webkit-backdrop-filter: saturate(180%) blur(22px);
  border: 1px solid color-mix(in srgb, var(--border) 80%, transparent); box-shadow: var(--shadow-lg); transition: transform .35s var(--ease), opacity .25s; }
body[data-view="detail"] .bottomnav { transform: translate(-50%, 140%); opacity: 0; pointer-events: none; }
.bottomnav button { display: flex; flex-direction: column; align-items: center; gap: 3px; border: 0; background: transparent; color: var(--muted-foreground);
  font-size: 11px; font-weight: 600; padding: 6px 0; transition: color .2s; }
.bottomnav button .i { width: 23px; height: 23px; transition: transform .3s var(--spring); }
.bottomnav button.active { color: var(--primary); }
.bottomnav button.active .i { transform: translateY(-1px) scale(1.08); stroke-width: 2.3; }
.bottomnav .fab { justify-self: center; width: 54px; height: 54px; border-radius: 18px; display: grid; place-items: center; padding: 0;
  background: linear-gradient(145deg, var(--primary), var(--primary-strong)); color: #fff; box-shadow: 0 8px 20px hsl(0 79% 45% / .4);
  transition: transform .25s var(--spring); }
.bottomnav .fab .i { width: 26px; height: 26px; stroke-width: 2.6; }
.bottomnav .fab:active { transform: scale(.9) rotate(90deg); }

/* Bottom Sheets (Composer und Menüs) */
.sheet { position: fixed; inset: auto 0 0 0; margin: 0 auto; width: 100%; max-width: 560px; max-height: 92vh; padding: 8px 16px calc(16px + env(safe-area-inset-bottom));
  border: 0; border-radius: 26px 26px 0 0; background: var(--card); color: var(--foreground); box-shadow: var(--shadow-lg);
  animation: sheet-in .38s var(--ease); }
.sheet.closing { animation: sheet-out .2s ease-in forwards; }
.sheet::backdrop { background: hsl(222 30% 6% / .5); backdrop-filter: blur(3px); animation: fade .3s; }
.sheet.closing::backdrop { opacity: 0; transition: opacity .2s; }
@keyframes sheet-in { from { transform: translateY(100%); } }
@keyframes sheet-out { to { transform: translateY(100%); } }
@keyframes fade { from { opacity: 0; } }
.sheet-handle { width: 40px; height: 5px; border-radius: 3px; background: var(--border); margin: 4px auto 12px; }
.sheet.menu { display: none; flex-direction: column; gap: 4px; }
.sheet.menu[open] { display: flex; }
.sheet.menu .eyebrow { padding: 0 8px 6px; }
.menu-item { display: flex; align-items: center; gap: 14px; border: 0; background: transparent; text-align: left; padding: 14px 12px; border-radius: 14px;
  font-size: 16px; font-weight: 500; }
.menu-item:active { background: var(--muted); }
.menu-item .i { color: var(--muted-foreground); }
.menu-item.danger, .menu-item.danger .i { color: var(--primary); }
.menu-item.cancel { justify-content: center; margin-top: 6px; background: var(--muted); font-weight: 600; }

.composer-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.composer textarea { width: 100%; min-height: 120px; border: 0; resize: none; background: transparent; color: var(--foreground);
  font: inherit; font-size: 20px; line-height: 1.4; outline: none; padding: 8px 2px; }
.composer textarea::placeholder { color: var(--muted-foreground); }
.tag-suggest { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.tag-suggest .tagchip { padding: 5px 11px; font-size: 12px; }
.composer-foot { display: flex; align-items: center; gap: 8px; padding-top: 10px; border-top: 1px solid var(--border); }
.composer-foot > div { flex: 1; }
.ring { width: 26px; height: 26px; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 3.5; stroke: var(--muted); }
.ring #ringFill { stroke: var(--primary); stroke-linecap: round; transition: stroke-dashoffset .2s; }
.ring #ringFill.warn { stroke: hsl(35 90% 50%); }
.counter { min-width: 28px; text-align: right; font-size: 13px; font-weight: 600; color: var(--muted-foreground); font-variant-numeric: tabular-nums; }
.counter.warn { color: hsl(35 90% 45%); }
.media-buttons { display: flex; gap: 4px; }
.media-buttons .icon-btn { color: var(--primary); background: var(--primary-soft); border-radius: 12px; }
.media-buttons.compact .icon-btn { width: 44px; height: 44px; background: transparent; }
.compose-media { display: flex; flex-direction: column; gap: 10px; margin-bottom: 10px; }
.compose-media:not(:has(:not([hidden]))) { display: none; }
.media-preview { position: relative; align-self: flex-start; }
.media-preview img, .media-preview video { display: block; max-width: 100%; max-height: 220px; border-radius: 14px; background: #000; }
.media-preview .remove { position: absolute; top: 8px; right: 8px; width: 30px; height: 30px; display: grid; place-items: center; border: 0; border-radius: 50%;
  background: hsl(0 0% 0% / .6); color: #fff; backdrop-filter: blur(6px); }
.media-preview .remove .i { width: 16px; height: 16px; }
.progress { position: relative; height: 6px; border-radius: 999px; background: var(--muted); margin-bottom: 16px; }
.progress span { display: block; height: 100%; width: 0; border-radius: 999px; background: linear-gradient(90deg, var(--primary), hsl(25 90% 55%)); transition: width .2s; }
.progress[data-label]::after { content: attr(data-label); position: absolute; top: 10px; left: 0; font-size: 12px; color: var(--muted-foreground); }

/* Buttons */
.primary { border: 0; background: var(--primary); color: #fff; border-radius: 999px; padding: 12px 22px; font-weight: 700; min-height: 46px;
  transition: transform .2s var(--spring), opacity .2s; box-shadow: 0 6px 16px hsl(0 79% 45% / .25); }
.primary.small { min-height: 38px; padding: 8px 18px; font-size: 14px; }
.primary:active { transform: scale(.95); }
.primary:disabled { opacity: .55; }
.ghost { border: 0; background: transparent; color: var(--muted-foreground); padding: 8px 4px; font-weight: 600; }

/* Kanäle */
.channels { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; padding: 16px 14px; }
.channel { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-height: 108px; padding: 16px; border: 0;
  border-radius: var(--radius); text-align: left; color: #fff; overflow: hidden; animation: rise .45s var(--ease) both;
  background: linear-gradient(150deg, hsl(var(--hue) 65% 52%), hsl(calc(var(--hue) + 30) 70% 40%)); box-shadow: var(--shadow-sm); transition: transform .2s var(--spring); }
.channel:active { transform: scale(.96); }
.channel-hash { font-family: var(--font-display); font-size: 40px; line-height: .8; opacity: .35; position: absolute; right: 12px; top: 14px; }
.channel-name { margin-top: auto; font-size: 18px; font-weight: 700; overflow-wrap: anywhere; }
.channel-count { font-size: 12px; opacity: .85; font-weight: 600; }
.channels .skeleton { margin: 0; }

/* Profil */
.karma-card { margin: 16px 14px; padding: 20px; border-radius: 24px; color: #fff; position: relative; overflow: hidden;
  background: radial-gradient(120% 120% at 100% 0%, hsl(25 90% 55%), transparent 55%), linear-gradient(145deg, hsl(0 79% 47%), hsl(350 70% 32%));
  box-shadow: 0 14px 34px hsl(0 79% 40% / .35); animation: rise .45s var(--ease); }
.karma-card::after { content: "⚓"; position: absolute; right: -10px; bottom: -34px; font-size: 140px; opacity: .1; }
.karma-top { display: flex; justify-content: space-between; align-items: flex-start; }
.karma-big { font-family: var(--font-display); font-size: 56px; font-weight: 700; line-height: 1; margin-top: 6px; }
.level { display: flex; align-items: center; gap: 6px; background: rgb(255 255 255 / .18); border-radius: 999px; padding: 6px 12px; font-weight: 700; font-size: 14px; backdrop-filter: blur(6px); }
.level-bar { height: 8px; border-radius: 999px; background: rgb(255 255 255 / .25); margin-top: 20px; overflow: hidden; }
.level-bar span { display: block; height: 100%; border-radius: 999px; background: #fff; animation: grow 1s var(--ease); transform-origin: left; }
@keyframes grow { from { transform: scaleX(0); } }
.level-next { margin: 10px 0 0; font-size: 13px; opacity: .9; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 0 14px; }
.stat { background: var(--card); border: 1px solid var(--border); border-radius: 18px; padding: 14px; display: flex; flex-direction: column; gap: 2px; }
.stat strong { font-size: 24px; font-variant-numeric: tabular-nums; }
.stat span { font-size: 12px; color: var(--muted-foreground); font-weight: 600; }
.settings { margin: 22px 14px; display: flex; flex-direction: column; gap: 8px; }
.settings .eyebrow { margin: 0 4px 4px; }
.setting { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; border: 1px solid var(--border); background: var(--card); border-radius: 18px;
  padding: 12px 14px; text-align: left; font-weight: 600; }
.setting > span { flex: 1; }
.setting small { color: var(--muted-foreground); font-weight: 500; }
.setting .i { color: var(--primary); }
.setting .segmented { flex-basis: 100%; }
.setting.info span { font-weight: 400; font-size: 14px; line-height: 1.5; color: var(--muted-foreground); }

/* Vollbild-Foto, Toast */
.lightbox { width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: hsl(0 0% 0% / .94);
  display: grid; place-items: center; cursor: zoom-out; animation: fade .2s; }
.lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; animation: rise .3s var(--ease); }
.toast { position: fixed; left: 50%; bottom: calc(var(--nav-h) + 26px + env(safe-area-inset-bottom)); z-index: 50; transform: translateX(-50%);
  background: var(--foreground); color: var(--background); padding: 11px 18px; border-radius: 14px; font-size: 14px; font-weight: 600;
  max-width: 88vw; box-shadow: var(--shadow-lg); animation: drop .35s var(--spring); transition: opacity .25s, transform .25s; }
.toast.out { opacity: 0; transform: translate(-50%, 10px); }

/* Seitenwechsel */
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .22s; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
@media (min-width: 700px) { .post { margin-left: 0; margin-right: 0; } .thread .post { margin-left: 14px; } }

.channel-search { padding: 8px 14px; }
.channel-search input { width: 100%; box-sizing: border-box; border: 1px solid var(--border); border-radius: 16px; padding: 16px; background: var(--card); color: var(--foreground); font: inherit; }
.channel-search input:focus { outline: 2px solid var(--primary); outline-offset: 2px; }
.channel-status { margin: 12px 16px 0; color: var(--muted-foreground); font-size: 13px; }
.channel-new { background: var(--card); color: var(--primary); border: 1px dashed var(--primary); }
.suggest-label { flex-basis: 100%; font-size: 12px; color: var(--muted-foreground); }

.apk-banner { display: flex; justify-content: space-between; gap: 12px; padding: 10px 18px; font-size: 13px; background: var(--card); border-bottom: 1px solid var(--border); }
.apk-banner a { color: var(--primary); font-weight: 700; }
.location-sheet { padding: 22px; max-height: 85dvh; overflow-y: auto; box-sizing: border-box; }
.location-sheet h3 { margin: 24px 0 10px; }
.location-sheet select, .location-sheet input { display: block; width: 100%; box-sizing: border-box; padding: 12px; border: 1px solid var(--border); background: var(--card); color: var(--foreground); border-radius: 12px; font: inherit; margin: 8px 0 14px; }
.location-sheet label { display: block; font-size: 13px; }
.location-sheet .city-list { margin-top: 16px; }
.location-sheet .ghost { margin-top: 16px; }
.location-error { color: var(--primary); }

.bottomnav { max-width: 580px; }
.private-reply { display: block; margin: 12px 16px; }
.chat-list { padding: 14px; display: grid; gap: 12px; }
.chat-preview { display: grid; gap: 8px; padding: 18px; text-align: left; border: 1px solid var(--border); border-radius: 18px; background: var(--card); color: var(--foreground); }
.chat-preview span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-preview small { color: var(--primary); }
.chat-heading { padding: 0 16px; }
.chat-heading h2 { font-size: 20px; overflow-wrap: anywhere; }
.chat-messages { display: flex; flex-direction: column; gap: 12px; padding: 12px 16px; }
.chat-bubble { max-width: 85%; border: 1px solid var(--border); border-radius: 18px 18px 18px 4px; padding: 12px 16px; background: var(--card); align-self: flex-start; }
.chat-bubble.mine { background: var(--primary-soft); align-self: flex-end; border-radius: 18px 18px 4px 18px; }
.chat-bubble p { white-space: pre-wrap; overflow-wrap: anywhere; margin: 0 0 8px; }
.chat-bubble small { color: var(--muted-foreground); font-size: 11px; }
.chat-compose { display: flex; align-items: center; gap: 10px; margin: 12px 16px; }
.chat-compose textarea { flex: 1; min-width: 0; border: 1px solid var(--border); border-radius: 14px; padding: 12px; font: inherit; background: var(--card); color: var(--foreground); }

@media (max-width: 400px) { .bottomnav .fab { width: 44px; height: 48px; } .bottomnav button { font-size: 10px; } }

.brand-anchor { width: 26px; height: 32px; object-fit: contain; }

.location-map { display: block; width: 100%; height: 320px; border: 1px solid var(--border); border-radius: 16px; margin: 12px 0 18px; background: #edf0ec; }

.camera-sheet { width: min(540px, calc(100vw - 24px)); padding: 20px; max-height: 90dvh; overflow-y: auto; }
.camera-sheet video { width: 100%; max-height: 48dvh; aspect-ratio: 4 / 3; object-fit: contain; border-radius: 16px; background: #17191c; }
.camera-sheet p { font-size: 14px; line-height: 1.5; }
.camera-controls { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin: 12px 0; }

/* Persönliche Akzentfarbe, unabhängig von den Beitragsfarben. */
:root[data-accent="blue"] { --primary:#2864b4; --primary-strong:#1c4c8e; --primary-soft:#2864b420; }
:root[data-accent="green"] { --primary:#197b53; --primary-strong:#12603f; --primary-soft:#197b5320; }
:root[data-accent="purple"] { --primary:#8843b2; --primary-strong:#6a328d; --primary-soft:#8843b220; }
.social-actions {display:flex;gap:6px;flex-wrap:wrap;margin-top:12px;}
.reaction {border:1px solid #ffffff60;border-radius:14px;background:#00000018;color:inherit;padding:8px 10px;min-height:40px;font:inherit;font-size:14px;cursor:pointer;}
.reaction.selected {background:#fff;color:#242832;border-color:#fff;box-shadow:0 0 0 2px #2225;}
.reply .reaction {border-color:var(--border);background:var(--muted);}
.reply .reaction.selected {background:var(--primary-soft);border-color:var(--primary);color:var(--foreground);}
.color-setting {flex-wrap:wrap;gap:10px;}.invite-note {font-size:13px;color:var(--muted-foreground);padding:0 16px;}
