/* ==========================================================================
   myco Designsystem
   Ruhig, hell, salbeigrün – mit dezentem Licht. Mobile first, eigene Layouts
   für Tablet (Rail + Spalten) und Desktop (Seitenleiste + Inhalt + Kontextspalte).
   ========================================================================== */

/* ---- 1. Tokens ---------------------------------------------------------- */
:root {
  color-scheme: light;
  --font: "Inter", "SF Pro Text", -apple-system, BlinkMacSystemFont, system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Inter Display", "SF Pro Display", -apple-system, BlinkMacSystemFont, system-ui, "Segoe UI", Roboto, sans-serif;

  /* Zweifarbiges Grün statt Weiß: Salbei trifft Mint */
  --bg: #9fd0b2;
  --bg-grad: linear-gradient(160deg, #bfe3c6 0%, #93caa9 50%, #6db08e 100%);
  --bg-glow-1: rgba(96, 178, 132, .38);
  --bg-glow-2: rgba(200, 242, 150, .45);
  --surface: #cbe9d4;
  --card-grad: linear-gradient(155deg, #d8f0dc 0%, #b4dcc2 100%);
  --surface-glass: rgba(178, 220, 192, .88);
  --surface-2: #c2e4cc;
  --surface-3: #acd6b9;
  --line: rgba(18, 60, 38, .14);
  --line-strong: rgba(18, 60, 38, .24);
  --ink: #0f231a;
  --ink-2: #284034;
  --ink-3: #3f584b;
  --ink-inverse: #f2faf5;

  --accent: #2c7656;
  --accent-hover: #24654a;
  --accent-ink: #ffffff;
  --accent-soft: #a3d6b5;
  --accent-softer: #bfe5cb;
  --sage: #8fbca2;
  --glow: #bff5c9;
  --lime: #d4f48a;
  --danger: #c0443b;
  --danger-soft: #fbe9e7;
  --warn: #a8701c;

  --r-xs: 8px; --r-sm: 12px; --r: 16px; --r-lg: 22px; --r-xl: 28px; --r-full: 999px;
  --shadow-1: 0 1px 2px rgba(15, 40, 28, .05), 0 1px 1px rgba(15, 40, 28, .03);
  --shadow-2: 0 1px 2px rgba(15, 40, 28, .04), 0 10px 30px -14px rgba(15, 50, 34, .22);
  --shadow-3: 0 2px 6px rgba(15, 40, 28, .06), 0 28px 60px -24px rgba(15, 50, 34, .38);
  --ring: 0 0 0 3px color-mix(in srgb, var(--accent) 32%, transparent);

  --ease: cubic-bezier(.2, .7, .2, 1);
  --ease-spring: cubic-bezier(.34, 1.4, .64, 1);
  --t-fast: 140ms; --t: 220ms; --t-slow: 420ms;

  --tap: 44px;
  --topbar-h: 56px;
  --tabbar-h: 64px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
}

/* Farbthemen (frei: sage, forest, mint · Plus: dusk, ocean, clay, aurora) */
[data-theme="forest"] { --accent: #1c5f43; --accent-hover: #164d36; --accent-soft: #d6e9dd; --accent-softer: #ebf4ee; --sage: #7aa58b; }
[data-theme="mint"]   { --accent: #1f8a72; --accent-hover: #18735f; --accent-soft: #d5f0e8; --accent-softer: #eaf8f3; --sage: #84c7b4; }
[data-theme="dusk"]   { --accent: #5e5aa8; --accent-hover: #4d4990; --accent-soft: #e5e4f6; --accent-softer: #f2f1fb; --sage: #a6a3d6; --glow: #d9d5ff; }
[data-theme="ocean"]  { --accent: #1f6f8f; --accent-hover: #195c77; --accent-soft: #d8ecf3; --accent-softer: #ecf6f9; --sage: #8cbfd1; --glow: #c4ecfa; }
[data-theme="clay"]   { --accent: #a65a36; --accent-hover: #8c4a2b; --accent-soft: #f6e4da; --accent-softer: #fbf1eb; --sage: #d2a58c; --glow: #ffe1c9; }
[data-theme="aurora"] { --accent: #2b7f74; --accent-hover: #226a61; --accent-soft: #daf0ec; --accent-softer: #edf8f6; --sage: #9bc8c0; --glow: #d6c8ff; --lime: #b8f5e0; }

@media (prefers-color-scheme: dark) {
  :root:not([data-mode="light"]) {
    color-scheme: dark;
    --bg: #163d2c; --bg-glow-1: rgba(80, 190, 130, .28); --bg-glow-2: rgba(190, 245, 150, .12);
    --bg-grad: linear-gradient(160deg, #24593f 0%, #17402e 50%, #0e2b1f 100%); --card-grad: linear-gradient(155deg, #2b6249 0%, #1d4836 100%); --surface: #1f4a37; --surface-glass: rgba(22, 60, 43, .9); --surface-2: #245340; --surface-3: #2c6049;
    --line: rgba(200, 255, 220, .13); --line-strong: rgba(200, 255, 220, .24);
    --ink: #f0f9f3; --ink-2: #c8e0d1; --ink-3: #9dbdaa; --ink-inverse: #0b1f16;
    --accent: #86e6b0; --accent-hover: #a2f0c4; --accent-ink: #062014; --accent-soft: rgba(134, 230, 176, .2); --accent-softer: rgba(134, 230, 176, .1);
    --danger: #ff8a7f; --danger-soft: rgba(255, 138, 127, .12);
    --shadow-1: 0 1px 2px rgba(0, 0, 0, .3); --shadow-2: 0 12px 30px -16px rgba(0, 0, 0, .7); --shadow-3: 0 30px 70px -24px rgba(0, 0, 0, .85);
  }
}
:root[data-mode="dark"] {
  color-scheme: dark;
  --bg: #163d2c; --bg-glow-1: rgba(80, 190, 130, .28); --bg-glow-2: rgba(190, 245, 150, .12);
  --bg-grad: linear-gradient(160deg, #24593f 0%, #17402e 50%, #0e2b1f 100%); --card-grad: linear-gradient(155deg, #2b6249 0%, #1d4836 100%); --surface: #1f4a37; --surface-glass: rgba(22, 60, 43, .9); --surface-2: #245340; --surface-3: #2c6049;
  --line: rgba(200, 255, 220, .13); --line-strong: rgba(200, 255, 220, .24);
  --ink: #f0f9f3; --ink-2: #c8e0d1; --ink-3: #9dbdaa; --ink-inverse: #0b1f16;
  --accent: #86e6b0; --accent-hover: #a2f0c4; --accent-ink: #062014; --accent-soft: rgba(134, 230, 176, .2); --accent-softer: rgba(134, 230, 176, .1);
  --danger: #ff8a7f; --danger-soft: rgba(255, 138, 127, .12);
  --shadow-1: 0 1px 2px rgba(0, 0, 0, .3); --shadow-2: 0 12px 30px -16px rgba(0, 0, 0, .7); --shadow-3: 0 30px 70px -24px rgba(0, 0, 0, .85);
}

/* Audit H5: Farbthemen wirken auch im Dunkelmodus (hellere Akzentfarbe je Thema, Hintergrund bleibt myco-grün). */
:root[data-mode="dark"][data-theme="forest"] { --accent: #7fd6a6; --accent-hover: #9be3bb; --accent-soft: rgba(127, 214, 166, .2); --accent-softer: rgba(127, 214, 166, .1); }
@media (prefers-color-scheme: dark) { :root:not([data-mode="light"]):not([data-mode="dark"])[data-theme="forest"] { --accent: #7fd6a6; --accent-hover: #9be3bb; --accent-soft: rgba(127, 214, 166, .2); --accent-softer: rgba(127, 214, 166, .1); } }
:root[data-mode="dark"][data-theme="mint"] { --accent: #7ff0d2; --accent-hover: #a1f5df; --accent-soft: rgba(127, 240, 210, .2); --accent-softer: rgba(127, 240, 210, .1); }
@media (prefers-color-scheme: dark) { :root:not([data-mode="light"]):not([data-mode="dark"])[data-theme="mint"] { --accent: #7ff0d2; --accent-hover: #a1f5df; --accent-soft: rgba(127, 240, 210, .2); --accent-softer: rgba(127, 240, 210, .1); } }
:root[data-mode="dark"][data-theme="dusk"] { --accent: #b9b5ff; --accent-hover: #cfccff; --accent-soft: rgba(185, 181, 255, .2); --accent-softer: rgba(185, 181, 255, .1); }
@media (prefers-color-scheme: dark) { :root:not([data-mode="light"]):not([data-mode="dark"])[data-theme="dusk"] { --accent: #b9b5ff; --accent-hover: #cfccff; --accent-soft: rgba(185, 181, 255, .2); --accent-softer: rgba(185, 181, 255, .1); } }
:root[data-mode="dark"][data-theme="ocean"] { --accent: #86d4f2; --accent-hover: #a7e1f7; --accent-soft: rgba(134, 212, 242, .2); --accent-softer: rgba(134, 212, 242, .1); }
@media (prefers-color-scheme: dark) { :root:not([data-mode="light"]):not([data-mode="dark"])[data-theme="ocean"] { --accent: #86d4f2; --accent-hover: #a7e1f7; --accent-soft: rgba(134, 212, 242, .2); --accent-softer: rgba(134, 212, 242, .1); } }
:root[data-mode="dark"][data-theme="clay"] { --accent: #ffb58f; --accent-hover: #ffc9ad; --accent-soft: rgba(255, 181, 143, .2); --accent-softer: rgba(255, 181, 143, .1); }
@media (prefers-color-scheme: dark) { :root:not([data-mode="light"]):not([data-mode="dark"])[data-theme="clay"] { --accent: #ffb58f; --accent-hover: #ffc9ad; --accent-soft: rgba(255, 181, 143, .2); --accent-softer: rgba(255, 181, 143, .1); } }
:root[data-mode="dark"][data-theme="aurora"] { --accent: #9ff0dc; --accent-hover: #d6c8ff; --accent-soft: rgba(159, 240, 220, .2); --accent-softer: rgba(159, 240, 220, .1); }
@media (prefers-color-scheme: dark) { :root:not([data-mode="light"]):not([data-mode="dark"])[data-theme="aurora"] { --accent: #9ff0dc; --accent-hover: #d6c8ff; --accent-soft: rgba(159, 240, 220, .2); --accent-softer: rgba(159, 240, 220, .1); } }

/* ---- 2. Basis ----------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
body {
  margin: 0; min-height: 100dvh; background: var(--bg-grad, var(--bg)) fixed; background-color: var(--bg); color: var(--ink);
  font: 400 15px/1.5 var(--font); letter-spacing: -.006em;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility;
  overflow-x: hidden; font-feature-settings: "cv11", "ss01", "ss03";
}
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(42vmax 34vmax at 85% 0%, var(--bg-glow-2), transparent 70%),
    radial-gradient(48vmax 40vmax at 0% 18%, var(--bg-glow-1), transparent 70%),
    radial-gradient(40vmax 30vmax at 70% 100%, color-mix(in srgb, var(--bg-glow-1) 60%, transparent), transparent 70%);
}
img, video, svg { display: block; max-width: 100%; }
:where(svg) { width: 20px; height: 20px; flex: none; }
.list-item > svg { width: 22px; height: 22px; color: var(--ink-2); }
.row > svg { color: var(--ink-2); }
button, input, textarea, select { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: inherit; text-decoration: none; }
a.link, .prose a { color: var(--accent); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; }
h1, h2, h3, h4 { font-family: var(--font-display); margin: 0; letter-spacing: -.022em; line-height: 1.18; font-weight: 680; }
h1 { font-size: clamp(26px, 4.4vw, 34px); }
h2 { font-size: 21px; }
h3 { font-size: 17px; }
p { margin: 0; }
:focus-visible { outline: none; box-shadow: var(--ring); border-radius: var(--r-xs); }
::selection { background: color-mix(in srgb, var(--accent) 24%, transparent); }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

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

/* ---- 3. App-Gerüst ------------------------------------------------------ */
.shell { min-height: 100dvh; }
.nav, .aside { display: none; }
.main { min-width: 0; padding: calc(var(--topbar-h) + var(--safe-top)) 0 calc(var(--tabbar-h) + var(--safe-bottom) + 16px); }
.page { padding: 12px max(12px, var(--safe-left)) 0 max(12px, var(--safe-right)); max-width: 680px; margin: 0 auto; animation: page-in var(--t-slow) var(--ease) both; }
.page.wide { max-width: 1100px; }
@keyframes page-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* Topbar (Smartphone) */
.topbar {
  position: fixed; inset: 0 0 auto 0; z-index: 30; height: calc(var(--topbar-h) + var(--safe-top));
  padding: var(--safe-top) max(10px, var(--safe-right)) 0 max(14px, var(--safe-left));
  display: flex; align-items: center; gap: 6px;
  background: var(--surface-glass); backdrop-filter: saturate(160%) blur(18px); -webkit-backdrop-filter: saturate(160%) blur(18px);
  border-bottom: 1px solid var(--line);
}
.topbar .brand { margin-right: auto; }
.topbar .title { font-weight: 650; font-size: 17px; margin-right: auto; letter-spacing: -.02em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.brand { display: inline-flex; align-items: center; gap: 9px; font-family: var(--font-display); font-weight: 720; font-size: 21px; letter-spacing: -.045em; color: var(--ink); }
.brand img { width: 30px; height: 30px; border-radius: 9px; box-shadow: 0 6px 16px -6px color-mix(in srgb, var(--accent) 70%, transparent); }
.brand .dot { color: var(--accent); }

/* Tabbar (Smartphone, Daumenzone) */
.tabbar {
  position: fixed; inset: auto 0 0 0; z-index: 30;
  padding: 6px max(8px, var(--safe-left)) calc(6px + var(--safe-bottom)) max(8px, var(--safe-right));
  display: grid; grid-template-columns: repeat(5, 1fr); align-items: center;
  background: var(--surface-glass); backdrop-filter: saturate(160%) blur(18px); -webkit-backdrop-filter: saturate(160%) blur(18px);
  border-top: 1px solid var(--line);
}
.tab { position: relative; height: 52px; display: grid; place-items: center; align-content: center; gap: 2px; color: var(--ink-3); font-size: 10.5px; font-weight: 560; border-radius: var(--r); transition: color var(--t-fast); }
.tab svg { width: 24px; height: 24px; }
.tab[aria-current="page"] { color: var(--accent); }
.tab[aria-current="page"]::after { content: ""; position: absolute; top: 3px; width: 18px; height: 3px; border-radius: 3px; background: var(--accent); }
.tab-create { justify-self: center; width: 52px; height: 52px; border-radius: 18px; display: grid; place-items: center; color: var(--accent-ink);
  background: linear-gradient(145deg, color-mix(in srgb, var(--accent) 80%, white), var(--accent) 55%, var(--accent-hover));
  box-shadow: 0 10px 24px -10px color-mix(in srgb, var(--accent) 85%, transparent), inset 0 1px 0 rgba(255,255,255,.25); transition: transform var(--t) var(--ease-spring); }
.tab-create:active { transform: scale(.92); }
.tab-create svg { width: 26px; height: 26px; }

.badge { position: absolute; top: 6px; left: calc(50% + 6px); min-width: 17px; height: 17px; padding: 0 5px; border-radius: 9px; font-size: 10.5px; font-weight: 700; line-height: 17px; text-align: center; color: #fff; background: var(--danger); box-shadow: 0 0 0 2px var(--surface); }
.badge.dot { min-width: 9px; width: 9px; height: 9px; padding: 0; top: 10px; }

/* Rail / Seitenleiste (Tablet und Desktop) */
@media (min-width: 700px) {
  .topbar, .tabbar { display: none; }
  .shell { display: grid; grid-template-columns: 84px minmax(0, 1fr); }
  .nav {
    background: linear-gradient(180deg, rgba(186,226,198,.85), rgba(140,200,165,.85)) !important;
    display: flex; flex-direction: column; align-items: center; gap: 4px; position: sticky; top: 0; height: 100dvh;
    padding: calc(16px + var(--safe-top)) 10px calc(16px + var(--safe-bottom)) max(10px, var(--safe-left));
    border-right: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 45%, transparent);
  }
  .nav .brand { margin-bottom: 18px; }
  .nav .brand span { display: none; }
  .nav-item { position: relative; width: 60px; min-height: 56px; display: grid; place-items: center; align-content: center; gap: 3px; border-radius: var(--r); color: var(--ink-2); font-size: 10.5px; font-weight: 560; transition: background var(--t-fast), color var(--t-fast); }
  .nav-item svg { width: 24px; height: 24px; }
  .nav-item:hover { background: var(--surface-3); color: var(--ink); }
  .nav-item[aria-current="page"] { color: var(--accent); background: var(--accent-soft); }
  .nav-item .badge { top: 5px; left: calc(50% + 6px); }
  .nav .spacer { flex: 1; }
  .nav .nav-create { width: 52px; height: 52px; border-radius: 18px; display: grid; place-items: center; color: var(--accent-ink); margin: 10px 0;
    background: linear-gradient(145deg, color-mix(in srgb, var(--accent) 80%, white), var(--accent) 55%, var(--accent-hover));
    box-shadow: 0 10px 24px -10px color-mix(in srgb, var(--accent) 85%, transparent); transition: transform var(--t) var(--ease-spring); }
  .nav .nav-create:hover { transform: translateY(-1px) scale(1.03); }
  .nav .nav-create .lbl { display: none; }
  .main { padding: calc(20px + var(--safe-top)) 0 calc(40px + var(--safe-bottom)); }
  .page { padding: 0 max(24px, var(--safe-right)) 0 24px; }
  .page-head { display: flex; }
}
@media (min-width: 1000px) {
  .shell { grid-template-columns: 84px minmax(0, 1fr) 330px; }
  .aside { display: block; position: sticky; top: 0; height: 100dvh; overflow-y: auto; padding: calc(20px + var(--safe-top)) max(20px, var(--safe-right)) 24px 4px; scrollbar-width: none; }
  .aside::-webkit-scrollbar { display: none; }
  [data-view="messages"] .shell, .shell.no-aside { grid-template-columns: 84px minmax(0, 1fr); }
  [data-view="messages"] .aside, .shell.no-aside .aside { display: none; }
}
@media (min-width: 1280px) {
  /* Breite Bildschirme: Navigation am linken Rand, Inhalt füllt die Mitte (Spalte zentriert), Seitenspalte am rechten Rand */
  .shell { grid-template-columns: 252px minmax(0, 1fr) 340px; }
  [data-view="messages"] .shell, .shell.no-aside { grid-template-columns: 252px minmax(0, 1fr); }
  .nav { align-items: stretch; padding-left: 16px; padding-right: 16px; }
  .nav .brand { padding: 4px 12px; }
  .nav .brand span { display: inline; }
  .nav-item { width: auto; min-height: 48px; display: flex; justify-content: flex-start; gap: 14px; padding: 0 14px; font-size: 15px; font-weight: 560; }
  .nav-item .badge { position: static; margin-left: auto; box-shadow: none; }
  .nav-item .badge.dot { margin-right: 4px; }
  .nav .nav-create { width: 100%; height: 48px; border-radius: var(--r); display: flex; justify-content: center; gap: 8px; font-weight: 650; font-size: 15px; }
  .nav .nav-create .lbl { display: inline; }
  .nav .me-chip { display: flex; }
}
@media (min-width: 1600px) {
  .shell { grid-template-columns: 280px minmax(0, 1fr) 380px; }
  [data-view="messages"] .shell, .shell.no-aside { grid-template-columns: 280px minmax(0, 1fr); }
  .page { max-width: 760px; }
  .page.wide { max-width: 1240px; }
}
.me-chip { display: none; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--r); transition: background var(--t-fast); min-width: 0; }
.me-chip:hover { background: var(--surface-3); }
.me-chip .who { min-width: 0; line-height: 1.25; }
.me-chip .who b { display: block; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-chip .who small { color: var(--ink-3); font-size: 12.5px; }

/* Querformat auf dem Smartphone: kompakter */
@media (max-height: 500px) and (orientation: landscape) and (min-width: 700px) {
  .nav { gap: 0; padding-top: calc(8px + var(--safe-top)); }
  .nav .brand { margin-bottom: 6px; }
  .nav-item { min-height: 44px; font-size: 0; gap: 0; }
  .nav .nav-create { margin: 4px 0; width: 44px; height: 44px; }
  .main { padding-top: 12px; }
}

/* ---- 4. Seitenkopf ------------------------------------------------------ */
.page-head { display: none; align-items: center; gap: 12px; margin: 4px 0 18px; }
.page-head h1 { font-size: 26px; margin-right: auto; }
.page-head > div:first-child { margin-right: auto; }
.page-head .sub { color: var(--ink-3); font-size: 14px; margin-top: 2px; }
@media (min-width: 700px) { .page-head { display: flex; } }
.mobile-head { margin: 6px 2px 14px; }
.mobile-head h1 { font-size: 24px; }
.mobile-head .sub { color: var(--ink-3); font-size: 14px; margin-top: 2px; }
@media (min-width: 700px) { .mobile-head { display: none; } }

/* ---- 5. Komponenten ----------------------------------------------------- */
.card { background: var(--card-grad, var(--surface)); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-1); }
.card.pad { padding: 18px; }
.card + .card { margin-top: 12px; }
.section-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 22px 4px 10px; font-size: 13px; font-weight: 650; letter-spacing: .02em; text-transform: uppercase; color: var(--ink-3); }
.section-title a, .section-title button { text-transform: none; letter-spacing: 0; font-size: 13.5px; color: var(--accent); font-weight: 600; }
.muted { color: var(--ink-3); }
.small { font-size: 13px; }
.stack > * + * { margin-top: 12px; }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.divider { height: 1px; background: var(--line); margin: 14px 0; border: 0; }

/* Buttons */
.btn { --h: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: var(--h); padding: 0 18px; border-radius: var(--r-full);
  font-weight: 620; font-size: 14.5px; white-space: nowrap; user-select: none;
  background: var(--surface-3); color: var(--ink); border: 1px solid transparent; transition: background var(--t-fast), transform var(--t-fast) var(--ease), box-shadow var(--t-fast), color var(--t-fast); }
.btn:hover { background: color-mix(in srgb, var(--surface-3) 70%, var(--line-strong)); }
.btn:active { transform: scale(.97); }
.btn svg { width: 19px; height: 19px; flex: none; }
.btn.primary { background: var(--accent); color: var(--accent-ink); box-shadow: 0 8px 20px -10px color-mix(in srgb, var(--accent) 90%, transparent), inset 0 1px 0 rgba(255,255,255,.18); }
.btn.primary:hover { background: var(--accent-hover); }
.btn.soft { background: var(--accent-soft); color: var(--accent); }
.btn.soft:hover { background: color-mix(in srgb, var(--accent-soft) 70%, var(--accent) 12%); }
.btn.ghost { background: transparent; }
.btn.ghost:hover { background: var(--surface-3); }
.btn.outline { background: transparent; border-color: var(--line-strong); }
.btn.danger { background: var(--danger-soft); color: var(--danger); }
.btn.sm { --h: 36px; padding: 0 14px; font-size: 13.5px; }
.btn.block { width: 100%; }
.btn[disabled], .btn.loading { opacity: .55; pointer-events: none; }
.icon-btn { width: var(--tap); height: var(--tap); display: inline-grid; place-items: center; border-radius: var(--r-full); color: var(--ink-2); position: relative; transition: background var(--t-fast), color var(--t-fast), transform var(--t-fast); flex: none; }
.icon-btn:hover { background: var(--surface-3); color: var(--ink); }
.icon-btn:active { transform: scale(.92); }
.icon-btn svg { width: 22px; height: 22px; }
.icon-btn .badge { top: 4px; left: auto; right: 2px; }
.icon-btn.sm { width: 36px; height: 36px; }
.icon-btn.sm svg { width: 19px; height: 19px; }
.icon-btn.on { color: var(--accent); }

/* Formulare */
.field { display: block; margin-bottom: 14px; }
.field > span, .label { display: block; font-size: 13px; font-weight: 600; color: var(--ink-2); margin: 0 2px 6px; }
.field small { display: block; color: var(--ink-3); font-size: 12.5px; margin: 6px 2px 0; }
.input, .textarea, .select {
  width: 100%; min-height: 48px; padding: 12px 14px; font-size: 16px; /* 16px verhindert Auto-Zoom auf iOS */
  background: var(--surface-2); border: 1px solid var(--line-strong); border-radius: var(--r-sm); color: var(--ink);
  transition: border-color var(--t-fast), box-shadow var(--t-fast), background var(--t-fast); appearance: none; -webkit-appearance: none;
}
.input:focus, .textarea:focus, .select:focus { outline: none; border-color: var(--accent); box-shadow: var(--ring); background: var(--surface); }
.textarea { resize: vertical; min-height: 96px; line-height: 1.5; }
.select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='none' stroke='%236b7f75' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 8 4 4 4-4'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 40px; }
.input::placeholder, .textarea::placeholder { color: var(--ink-3); }
.form-error { color: var(--danger); background: var(--danger-soft); border-radius: var(--r-sm); padding: 10px 12px; font-size: 14px; margin-bottom: 14px; }

.switch { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; cursor: pointer; }
.switch + .switch { border-top: 1px solid var(--line); }
.switch .txt b { display: block; font-weight: 600; font-size: 15px; }
.switch .txt small { color: var(--ink-3); font-size: 13px; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch .knob { flex: none; width: 50px; height: 30px; border-radius: 15px; background: var(--surface-3); border: 1px solid var(--line-strong); position: relative; transition: background var(--t) var(--ease); }
.switch .knob::after { content: ""; position: absolute; top: 2px; left: 2px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.2); transition: transform var(--t) var(--ease-spring); }
.switch input:checked + .knob { background: var(--accent); border-color: transparent; }
.switch input:checked + .knob::after { transform: translateX(20px); }
.switch input:focus-visible + .knob { box-shadow: var(--ring); }

.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 0 14px; border-radius: var(--r-full); background: var(--surface-2); border: 1px solid var(--line-strong); font-size: 14px; font-weight: 560; cursor: pointer; transition: all var(--t-fast); }
.seg input:checked + span { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 45%, transparent); color: var(--accent); }
.seg input:focus-visible + span { box-shadow: var(--ring); }

.range { width: 100%; accent-color: var(--accent); height: 28px; }

/* Chips & Tags */
.chip { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: var(--r-full); background: var(--surface-3); color: var(--ink-2); font-size: 13px; font-weight: 560; white-space: nowrap; }
.chip.accent { background: var(--accent-soft); color: var(--accent); }
.chip svg { width: 15px; height: 15px; }
button.chip { transition: background var(--t-fast); }
button.chip:hover { background: color-mix(in srgb, var(--surface-3) 70%, var(--line-strong)); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chips.scroll { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -12px; padding: 2px 12px; scroll-padding: 12px; }
.chips.scroll::-webkit-scrollbar { display: none; }
@media (min-width: 700px) { .chips.scroll { margin: 0; padding: 2px 0; } }

/* Avatare */
.av { --s: 40px; width: var(--s); height: var(--s); border-radius: 50%; flex: none; display: inline-grid; place-items: center; overflow: hidden; position: relative;
  font-weight: 680; font-size: calc(var(--s) * .38); color: #fff; letter-spacing: -.02em; user-select: none;
  background: linear-gradient(145deg, hsl(var(--h, 150) 42% 58%), hsl(calc(var(--h, 150) + 28) 46% 36%)); }
.av img { width: 100%; height: 100%; object-fit: cover; }
.av.xs { --s: 24px; } .av.sm { --s: 32px; } .av.md { --s: 48px; } .av.lg { --s: 64px; } .av.xl { --s: 104px; }
.av.ring { box-shadow: 0 0 0 3px var(--surface); }
.faces { display: inline-flex; align-items: center; }
.faces .av { box-shadow: 0 0 0 2px var(--surface); }
.faces .av + .av { margin-left: -8px; }
.online-dot { position: absolute; right: 0; bottom: 0; width: 28%; height: 28%; border-radius: 50%; background: #35c27a; box-shadow: 0 0 0 2px var(--surface); }
.verified { display: inline-block; width: 16px; height: 16px; vertical-align: -2px; color: var(--verified-blue, #1d8cf0); margin-left: 3px; flex: none; }

.name-line { display: flex; align-items: center; gap: 4px; min-width: 0; }
.name-line b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 640; }

/* Listen */
.list-item { display: flex; align-items: center; gap: 12px; padding: 12px 14px; min-height: 64px; transition: background var(--t-fast); border-radius: var(--r); }
a.list-item:hover, button.list-item:hover { background: var(--surface-2); }
.list-item .meta { flex: 1; min-width: 0; line-height: 1.3; }
.list-item .meta small { display: block; color: var(--ink-3); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list { padding: 6px; }
.list .list-item + .list-item { margin-top: 2px; }
button.list-item { width: 100%; text-align: left; }

/* Leerzustände */
.empty { text-align: center; padding: 40px 24px; color: var(--ink-2); }
.empty .art { width: 84px; height: 84px; margin: 0 auto 16px; border-radius: 28px; display: grid; place-items: center; color: var(--accent);
  background: radial-gradient(circle at 30% 25%, var(--glow), transparent 60%), var(--accent-soft); }
.empty .art svg { width: 38px; height: 38px; }
.empty h3 { margin-bottom: 6px; color: var(--ink); }
.empty p { max-width: 360px; margin: 0 auto 18px; color: var(--ink-3); }

/* Tabs */
.tabs { display: flex; gap: 4px; padding: 4px; background: var(--surface-3); border-radius: var(--r-full); overflow-x: auto; scrollbar-width: none; margin-bottom: 14px; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button, .tabs a { flex: 1 0 auto; min-height: 38px; padding: 0 16px; border-radius: var(--r-full); font-weight: 600; font-size: 14px; color: var(--ink-2); display: inline-flex; align-items: center; justify-content: center; gap: 6px; transition: all var(--t-fast); }
.tabs [aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-1); }

/* Skeletons */
.skeleton { background: linear-gradient(90deg, var(--surface-3) 0%, var(--surface-2) 50%, var(--surface-3) 100%); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; border-radius: var(--r-sm); }
@keyframes shimmer { to { background-position: -200% 0; } }
.skel-card { height: 180px; border-radius: var(--r-lg); margin-bottom: 12px; }

/* Toasts */
.toasts { position: fixed; z-index: 100; left: 50%; transform: translateX(-50%); bottom: calc(var(--tabbar-h) + var(--safe-bottom) + 14px); display: grid; gap: 8px; width: min(92vw, 420px); pointer-events: none; }
@media (min-width: 700px) { .toasts { bottom: calc(24px + var(--safe-bottom)); } }
.toast { pointer-events: auto; padding: 12px 16px; border-radius: var(--r); background: var(--ink); color: var(--ink-inverse); box-shadow: var(--shadow-3); font-size: 14px; font-weight: 520; display: flex; gap: 10px; align-items: center; animation: toast-in var(--t-slow) var(--ease-spring) both; }
.toast.error { background: var(--danger); color: #fff; }
.toast.out { animation: toast-out var(--t) var(--ease) forwards; }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px) scale(.96); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(6px); } }

/* Dialoge: Bottom-Sheet auf dem Smartphone, zentrierter Dialog ab Tablet */
.overlay { position: fixed; inset: 0; z-index: 80; background: rgba(6, 18, 12, .42); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); animation: fade-in var(--t) var(--ease) both; display: flex; align-items: flex-end; justify-content: center; }
.overlay.closing { animation: fade-out var(--t) var(--ease) forwards; }
@keyframes fade-in { from { opacity: 0; } }
@keyframes fade-out { to { opacity: 0; } }
.sheet { background: var(--card-grad, var(--surface)) !important; width: 100%; max-height: calc(100dvh - var(--safe-top) - 24px); overflow: hidden; display: flex; flex-direction: column; background: var(--surface); border-radius: var(--r-xl) var(--r-xl) 0 0; box-shadow: var(--shadow-3); animation: sheet-in var(--t-slow) var(--ease) both; }
.overlay.closing .sheet { animation: sheet-out var(--t) var(--ease) forwards; }
@keyframes sheet-in { from { transform: translateY(100%); } }
@keyframes sheet-out { to { transform: translateY(100%); } }
.sheet-grip { width: 38px; height: 5px; border-radius: 3px; background: var(--line-strong); margin: 8px auto 0; flex: none; }
.sheet-head { display: flex; align-items: center; gap: 8px; padding: 10px 12px 10px 20px; flex: none; }
.sheet-head h2 { font-size: 18px; margin-right: auto; }
.sheet-body { padding: 4px 20px 20px; overflow-y: auto; overscroll-behavior: contain; flex: 1; }
.sheet-foot { padding: 12px 20px calc(12px + var(--safe-bottom)); border-top: 1px solid var(--line); display: flex; gap: 10px; align-items: center; flex: none; background: var(--surface); }
@media (min-width: 700px) {
  .overlay { align-items: center; padding: 24px; }
  .sheet { width: min(560px, 100%); max-height: min(86dvh, 820px); border-radius: var(--r-xl); animation: dialog-in var(--t-slow) var(--ease-spring) both; }
  .sheet.wide { width: min(760px, 100%); }
  .overlay.closing .sheet { animation: fade-out var(--t) var(--ease) forwards; }
  .sheet-grip { display: none; }
  .sheet-head { padding-top: 16px; }
  .sheet-foot { padding-bottom: 14px; }
}
@keyframes dialog-in { from { opacity: 0; transform: translateY(14px) scale(.97); } }

.menu { padding: 6px; }
.menu button, .menu a { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 50px; padding: 0 14px; border-radius: var(--r-sm); font-weight: 560; text-align: left; }
.menu button:hover, .menu a:hover { background: var(--surface-2); }
.menu svg { width: 21px; height: 21px; color: var(--ink-2); }
.menu .danger, .menu .danger svg { color: var(--danger); }

/* ---- 6. Feed & Beiträge ------------------------------------------------- */
.composer-prompt { display: flex; align-items: center; gap: 12px; padding: 12px 14px; cursor: text; }
.composer-prompt .fake { flex: 1; min-height: 44px; display: flex; align-items: center; padding: 0 16px; border-radius: var(--r-full); background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-3); font-size: 15px; transition: border-color var(--t-fast); }
.composer-prompt:hover .fake { border-color: var(--line-strong); }

.now-strip { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; padding: 2px 12px 4px; margin: 0 -12px 14px; scroll-snap-type: x proximity; }
.now-strip::-webkit-scrollbar { display: none; }
@media (min-width: 700px) { .now-strip { margin: 0 0 16px; padding: 2px 0 4px; } }
.now-card { background: var(--card-grad, var(--surface)) !important; scroll-snap-align: start; flex: none; width: 176px; min-height: 112px; padding: 12px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-1); display: flex; flex-direction: column; gap: 8px; text-align: left; position: relative; overflow: hidden; transition: transform var(--t) var(--ease), box-shadow var(--t); }
.now-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); }
.now-card::before { content: ""; position: absolute; inset: -40% -40% auto auto; width: 120px; height: 120px; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--glow) 70%, transparent), transparent 70%); opacity: .7; pointer-events: none; }
.now-card .who { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 620; position: relative; min-width: 0; }
.now-card .who span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.now-card .what { font-size: 14px; line-height: 1.35; color: var(--ink); position: relative; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.now-card .what .em { font-size: 18px; margin-right: 4px; }
.now-card.add { align-items: flex-start; justify-content: center; background: linear-gradient(160deg, var(--accent-softer), var(--surface)); border-style: dashed; border-color: color-mix(in srgb, var(--accent) 35%, transparent); color: var(--accent); }
.now-card.add svg { width: 26px; height: 26px; }
.now-card.add b { font-size: 14px; }
.now-card.add small { color: var(--ink-3); font-size: 12.5px; line-height: 1.3; }

.post { padding: 14px 0 6px; overflow: hidden; margin-bottom: 12px; position: relative; animation: rise var(--t-slow) var(--ease) both; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
.post-head { display: flex; align-items: center; gap: 11px; padding: 0 10px 0 16px; }
.post-head .meta { flex: 1; min-width: 0; line-height: 1.3; }
.post-head .meta small { display: flex; align-items: center; gap: 5px; color: var(--ink-3); font-size: 12.5px; flex-wrap: wrap; }
.post-head .meta small svg { width: 13px; height: 13px; }
.post-head .meta small a { display: inline-flex; align-items: center; gap: 4px; }
.post-head .meta small a:hover { text-decoration: underline; }
.post-head .meta small > span { display: inline-flex; }
.post-kind { display: inline-flex; align-items: center; gap: 6px; margin: 12px 16px 0; padding: 4px 10px 4px 8px; border-radius: var(--r-full); background: linear-gradient(120deg, var(--accent-soft), color-mix(in srgb, var(--lime) 35%, var(--accent-soft))); color: var(--accent); font-size: 12.5px; font-weight: 650; }
.post-kind svg { width: 15px; height: 15px; }
.post-title { margin: 10px 16px 0; font-size: 18px; font-weight: 680; letter-spacing: -.02em; }
.post-text { padding: 10px 16px 0; font-size: 15.5px; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.post-text.clamp { display: -webkit-box; -webkit-line-clamp: 8; -webkit-box-orient: vertical; overflow: hidden; }
.post-place { margin: 8px 16px 0; color: var(--ink-3); font-size: 13px; display: flex; align-items: center; gap: 5px; }
.post-place svg { width: 14px; height: 14px; }
.post .topics { padding: 10px 16px 0; }
.post-actions { display: flex; align-items: center; gap: 2px; padding: 8px 8px 4px; margin-top: 6px; }
.post-actions .spacer { flex: 1; }
.act { display: inline-flex; align-items: center; gap: 7px; min-height: 40px; padding: 0 12px; border-radius: var(--r-full); color: var(--ink-2); font-size: 14px; font-weight: 580; transition: background var(--t-fast), color var(--t-fast); }
.act:hover { background: var(--surface-3); color: var(--ink); }
.act svg { width: 21px; height: 21px; }
.act.on { color: var(--accent); background: var(--accent-softer); }
.act .em { font-size: 18px; line-height: 1; }
.convo-line { display: flex; align-items: center; gap: 10px; padding: 10px 16px 6px; color: var(--ink-2); font-size: 13.5px; }
.convo-line:hover span { text-decoration: underline; }
.why { margin: 0 16px; padding: 8px 0 2px; font-size: 12.5px; color: var(--ink-3); display: flex; gap: 6px; align-items: flex-start; }
.why svg { width: 14px; height: 14px; flex: none; margin-top: 2px; color: var(--sage); }
.removed-note { margin: 12px 16px; padding: 10px 12px; border-radius: var(--r-sm); background: var(--danger-soft); color: var(--danger); font-size: 13.5px; }

.reaction-pop { position: absolute; z-index: 5; display: flex; gap: 2px; padding: 6px; border-radius: var(--r-full); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-3); animation: pop var(--t) var(--ease-spring) both; }
.reaction-pop button { display: grid; place-items: center; gap: 0; width: 52px; height: 52px; border-radius: 50%; font-size: 24px; transition: transform var(--t-fast) var(--ease-spring), background var(--t-fast); }
.reaction-pop button:hover { transform: translateY(-3px) scale(1.12); background: var(--surface-2); }
.reaction-pop button.on { background: var(--accent-soft); }
@keyframes pop { from { opacity: 0; transform: translateY(6px) scale(.9); } }

.resonance { margin: 6px 16px 4px; padding: 10px 12px; border-radius: var(--r); background: var(--accent-softer); display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--ink-2); }
.resonance .lock { width: 15px; height: 15px; color: var(--accent); flex: none; }

/* Medien */
.media-grid { margin-top: 12px; display: grid; gap: 3px; background: var(--surface-3); }
.media-grid.n1 { grid-template-columns: 1fr; }
.media-grid.n2 { grid-template-columns: 1fr 1fr; aspect-ratio: 4 / 3; }
.media-grid.n3 { grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; aspect-ratio: 4 / 3; }
.media-grid.n3 > :first-child { grid-row: span 2; }
.media-grid.n4 { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; aspect-ratio: 1; }
.media-cell { position: relative; overflow: hidden; background: var(--surface-3); min-height: 0; cursor: zoom-in; }
.media-cell img, .media-cell video { width: 100%; height: 100%; object-fit: cover; transition: transform var(--t-slow) var(--ease); }
.media-grid.n1 .media-cell img { height: auto; max-height: min(70vh, 600px); object-fit: cover; }
.media-grid.n1 .media-cell.portrait { aspect-ratio: 4 / 5; }
.media-grid.n1 .media-cell.portrait img { height: 100%; }
.media-cell:hover img { transform: scale(1.015); }
.media-cell .more { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(6, 18, 12, .45); color: #fff; font-size: 26px; font-weight: 700; }
.media-cell .by { position: absolute; left: 8px; bottom: 8px; display: flex; align-items: center; gap: 6px; padding: 3px 9px 3px 3px; border-radius: var(--r-full); background: rgba(6,18,12,.55); color: #fff; font-size: 12px; font-weight: 600; backdrop-filter: blur(8px); }
.video-wrap { position: relative; background: #000; }
.video-wrap video { width: 100%; height: 100%; object-fit: contain; background: #000; }
.media-grid.n1 .video-wrap { aspect-ratio: 16 / 9; }
.media-grid.n1 .video-wrap.vertical { aspect-ratio: 9 / 16; max-height: min(80vh, 760px); width: auto; margin: 0 auto; }
.media-grid.n1:has(.vertical) { background: #000; }
.play-badge { position: absolute; inset: 0; margin: auto; width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.88); color: #0f231a; box-shadow: 0 10px 30px rgba(0,0,0,.35); pointer-events: none; transition: opacity var(--t); }
.play-badge svg { width: 28px; height: 28px; margin-left: 3px; }
.video-wrap.playing .play-badge { opacity: 0; }

/* Gemeinsamer Moment */
.moment-strip { display: flex; align-items: center; gap: 10px; margin: 12px 16px 0; padding: 10px 12px; border-radius: var(--r); border: 1px dashed color-mix(in srgb, var(--accent) 35%, transparent); background: var(--accent-softer); font-size: 13.5px; }
.moment-strip .grow { color: var(--ink-2); }

/* Ende des Feeds */
.feed-end { text-align: center; padding: 36px 20px 30px; border-radius: var(--r-xl); margin: 8px 0 20px; position: relative; overflow: hidden;
  background: radial-gradient(120% 90% at 50% 0%, color-mix(in srgb, var(--glow) 55%, transparent), transparent 65%), var(--card-grad, var(--surface)); border: 1px solid var(--line); }
.feed-end .art { width: 72px; height: 72px; margin: 0 auto 14px; }
.feed-end h3 { font-size: 19px; margin-bottom: 6px; }
.feed-end p { color: var(--ink-3); max-width: 420px; margin: 0 auto 16px; }

/* ---- 7. Composer -------------------------------------------------------- */
.compose-area { width: 100%; min-height: 120px; border: 0; background: transparent; resize: none; font-size: 17px; line-height: 1.5; padding: 4px 0; }
.compose-area:focus { outline: none; box-shadow: none; }
.compose-title { width: 100%; border: 0; background: transparent; font-size: 20px; font-weight: 680; letter-spacing: -.02em; padding: 4px 0; }
.compose-title:focus { outline: none; box-shadow: none; }
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; margin: 10px 0; }
.thumb { position: relative; aspect-ratio: 1; border-radius: var(--r-sm); overflow: hidden; background: var(--surface-3); }
.thumb img, .thumb video { width: 100%; height: 100%; object-fit: cover; }
.thumb .x { position: absolute; top: 5px; right: 5px; width: 28px; height: 28px; border-radius: 50%; background: rgba(6,18,12,.65); color: #fff; display: grid; place-items: center; }
.thumb .x svg { width: 16px; height: 16px; }
.thumb .prog { position: absolute; left: 0; bottom: 0; height: 4px; background: var(--accent); transition: width var(--t); }
.thumb .vid { position: absolute; left: 6px; bottom: 6px; color: #fff; filter: drop-shadow(0 1px 3px rgba(0,0,0,.6)); }
.thumb .vid svg { width: 18px; height: 18px; }
.thumb.uploading img, .thumb.uploading video { opacity: .55; }
.tool-row { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; }
.aud-pill { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 12px; border-radius: var(--r-full); background: var(--accent-soft); color: var(--accent); font-size: 13px; font-weight: 640; }
.aud-pill svg { width: 15px; height: 15px; }
.aud-pill select { border: 0; background: transparent; color: inherit; font-weight: inherit; font-size: 13.5px; padding: 0 2px; appearance: none; -webkit-appearance: none; cursor: pointer; }
.aud-pill select:focus { outline: none; }
.pick-list { max-height: 280px; overflow-y: auto; border: 1px solid var(--line); border-radius: var(--r); padding: 4px; }
.pick { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: var(--r-sm); cursor: pointer; min-height: 52px; }
.pick:hover { background: var(--surface-2); }
.pick input { width: 22px; height: 22px; accent-color: var(--accent); flex: none; }

/* ---- 8. Profile --------------------------------------------------------- */
.profile-cover { position: relative; height: 168px; border-radius: var(--r-xl); overflow: hidden; margin: 0 -2px;
  background: radial-gradient(80% 120% at 85% 0%, color-mix(in srgb, var(--glow) 85%, transparent), transparent 60%),
              radial-gradient(70% 120% at 0% 100%, color-mix(in srgb, var(--sage) 80%, transparent), transparent 60%),
              linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 50%, #0a2a1d)); }
.profile-cover img { width: 100%; height: 100%; object-fit: cover; }
@media (min-width: 700px) { .profile-cover { height: 220px; } }
.profile-card { margin-top: -44px; position: relative; padding: 0 18px 18px; }
.profile-card .av.xl { box-shadow: 0 0 0 5px var(--surface), var(--shadow-2); margin-top: -10px; }
@media (min-width: 700px) { .profile-card { margin: -56px 16px 0; } }
.profile-top { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.profile-top .actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; padding-top: 52px; }
.profile-name { margin-top: 12px; }
.profile-name h1 { font-size: 25px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.profile-name h1 .verified { width: 22px; height: 22px; }
.profile-name .handle { color: var(--ink-3); font-size: 15px; }
.profile-bio { margin-top: 12px; font-size: 15.5px; white-space: pre-wrap; overflow-wrap: anywhere; }
.profile-facts { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 12px; color: var(--ink-3); font-size: 14px; }
.profile-facts span { display: inline-flex; align-items: center; gap: 6px; }
.profile-facts svg { width: 16px; height: 16px; }
.profile-status { margin-top: 14px; padding: 12px 14px; border-radius: var(--r); background: linear-gradient(120deg, var(--accent-softer), color-mix(in srgb, var(--glow) 22%, var(--surface))); border: 1px solid var(--line); display: flex; gap: 10px; align-items: center; }
.profile-status .em { font-size: 22px; }
.connect-line { margin-top: 14px; display: flex; align-items: center; gap: 10px; font-size: 13.5px; color: var(--ink-2); }

.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; border-radius: var(--r-lg); overflow: hidden; }
@media (min-width: 700px) { .gallery { gap: 6px; } }
@media (min-width: 1000px) { .page.wide .gallery { grid-template-columns: repeat(4, 1fr); } }
.gallery a { aspect-ratio: 1; position: relative; overflow: hidden; background: var(--surface-3); }
.gallery img, .gallery video { width: 100%; height: 100%; object-fit: cover; transition: transform var(--t-slow) var(--ease); }
.gallery a:hover img { transform: scale(1.04); }
.gallery .vid { position: absolute; top: 8px; right: 8px; color: #fff; filter: drop-shadow(0 1px 3px rgba(0,0,0,.6)); }
.gallery .vid svg { width: 18px; height: 18px; }

/* ---- 9. Räume (Communities) ---------------------------------------------- */
.room-grid { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 560px) { .room-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1280px) { .page.wide .room-grid { grid-template-columns: repeat(3, 1fr); } }
.room-card { display: flex; flex-direction: column; overflow: hidden; transition: transform var(--t) var(--ease), box-shadow var(--t); }
.room-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); }
.room-art { height: 92px; position: relative; overflow: hidden;
  background: radial-gradient(90% 140% at 100% 0%, hsl(calc(var(--h) + 40) 70% 82% / .9), transparent 60%),
              radial-gradient(80% 140% at 0% 100%, hsl(var(--h) 45% 62% / .9), transparent 65%),
              linear-gradient(135deg, hsl(var(--h) 45% 40%), hsl(calc(var(--h) + 25) 40% 24%)); }
.room-art img { width: 100%; height: 100%; object-fit: cover; }
.room-art .emoji { position: absolute; left: 14px; bottom: -18px; width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; font-size: 26px; background: var(--surface); box-shadow: var(--shadow-2); }
.room-body { padding: 26px 16px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.room-body h3 { font-size: 16.5px; }
.room-body p { color: var(--ink-3); font-size: 13.5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.room-body .foot { margin-top: auto; display: flex; align-items: center; gap: 8px; padding-top: 6px; font-size: 12.5px; color: var(--ink-3); }
.room-hero { border-radius: var(--r-xl); overflow: hidden; }
.room-hero .room-art { height: 150px; }
@media (min-width: 700px) { .room-hero .room-art { height: 190px; } }
.room-hero .room-art .emoji { width: 72px; height: 72px; font-size: 36px; border-radius: 22px; bottom: -26px; left: 20px; }
.room-hero .info { padding: 36px 20px 18px; }
.rules { counter-reset: r; list-style: none; padding: 0; margin: 0; }
.rules li { counter-increment: r; display: flex; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 14.5px; }
.rules li:first-child { border-top: 0; }
.rules li::before { content: counter(r); flex: none; width: 26px; height: 26px; border-radius: 9px; display: grid; place-items: center; font-size: 13px; font-weight: 700; background: var(--accent-soft); color: var(--accent); }

/* ---- 10. Treffen -------------------------------------------------------- */
.event { display: flex; gap: 14px; padding: 14px; transition: background var(--t-fast); border-radius: var(--r-lg); }
a.event:hover { background: var(--surface-2); }
.cal { flex: none; width: 56px; height: 62px; border-radius: 16px; overflow: hidden; text-align: center; background: var(--surface); border: 1px solid var(--line-strong); box-shadow: var(--shadow-1); display: flex; flex-direction: column; }
.cal .m { background: var(--accent); color: var(--accent-ink); font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 3px 0; }
.cal .d { flex: 1; display: grid; place-items: center; font-size: 22px; font-weight: 720; letter-spacing: -.03em; }
.event .meta { flex: 1; min-width: 0; }
.event .meta h3 { font-size: 16px; margin-bottom: 4px; }
.event .meta small { display: flex; align-items: center; gap: 6px; color: var(--ink-3); font-size: 13px; margin-top: 2px; }
.event .meta small svg { width: 14px; height: 14px; flex: none; }
.rsvp { display: flex; gap: 8px; flex-wrap: wrap; }
.event-grid { display: grid; gap: 12px; }
@media (min-width: 900px) { .page.wide .event-grid { grid-template-columns: 1fr 1fr; } }

/* ---- 11. Nachrichten ---------------------------------------------------- */
.chat-layout { display: block; }
.chat-list .list-item { padding: 10px 12px; }
.chat-list .unread-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); flex: none; }
.chat-list .time { font-size: 12px; color: var(--ink-3); flex: none; align-self: flex-start; margin-top: 4px; }
.chat-list a[aria-current="true"] { background: var(--accent-softer); }
.chat-list .meta b { font-weight: 620; }
.chat-list .meta.unread b, .chat-list .meta.unread small { color: var(--ink); font-weight: 680; }

.thread { display: flex; flex-direction: column; height: calc(100dvh - var(--topbar-h) - var(--safe-top)); }
[data-view="thread"] .main { padding-bottom: 0; }
[data-view="thread"] .tabbar { display: none; }
[data-view="thread"] .page { padding: 0; max-width: none; }
.thread-head { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--line); background: var(--surface-glass); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
.thread-head .meta { flex: 1; min-width: 0; line-height: 1.25; }
.thread-head .meta small { color: var(--ink-3); font-size: 12.5px; }
.thread-scroll { flex: 1; overflow-y: auto; padding: 16px max(12px, var(--safe-right)) 10px max(12px, var(--safe-left)); overscroll-behavior: contain; display: flex; flex-direction: column; gap: 3px; }
.day-sep { align-self: center; margin: 14px 0 8px; padding: 4px 12px; border-radius: var(--r-full); background: var(--surface-3); font-size: 12px; font-weight: 600; color: var(--ink-3); }
.sys-msg { align-self: center; max-width: 85%; text-align: center; font-size: 12.5px; color: var(--ink-3); margin: 8px 0; }
.msg-row { display: flex; align-items: flex-end; gap: 8px; max-width: 100%; }
.msg-row.mine { flex-direction: row-reverse; }
.msg-row .av { margin-bottom: 2px; }
.msg-row .spacer-av { width: 28px; flex: none; }
.bubble-wrap { max-width: min(78%, 520px); display: flex; flex-direction: column; align-items: flex-start; position: relative; }
.msg-row.mine .bubble-wrap { align-items: flex-end; }
.bubble { padding: 9px 13px; border-radius: 20px; background: var(--card-grad, var(--surface)); border: 1px solid var(--line); font-size: 15px; line-height: 1.42; white-space: pre-wrap; overflow-wrap: anywhere; box-shadow: var(--shadow-1); position: relative; }
.msg-row.mine .bubble { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.msg-row.mine .bubble a { color: inherit; }
.msg-row:not(.first) .bubble { border-top-left-radius: 8px; }
.msg-row.mine:not(.first) .bubble { border-top-left-radius: 20px; border-top-right-radius: 8px; }
.bubble.media { padding: 4px; overflow: hidden; }
.bubble.media img, .bubble.media video { border-radius: 16px; max-height: 360px; width: auto; max-width: 100%; }
.bubble.deleted { font-style: italic; color: var(--ink-3); background: transparent; box-shadow: none; border-style: dashed; }
.msg-row.mine .bubble.deleted { color: var(--ink-3); background: transparent; border-color: var(--line-strong); }
.bubble .ctx { display: block; margin: -2px -5px 6px; padding: 6px 10px; border-radius: 12px; font-size: 13px; background: color-mix(in srgb, currentColor 10%, transparent); border-left: 3px solid color-mix(in srgb, currentColor 40%, transparent); }
.bubble .who { display: block; font-size: 12px; font-weight: 700; color: var(--accent); margin-bottom: 2px; }
.msg-meta { font-size: 11.5px; color: var(--ink-3); margin: 3px 6px 2px; display: flex; gap: 6px; align-items: center; }
.msg-reacts { display: flex; gap: 3px; margin-top: -8px; position: relative; z-index: 1; padding: 0 6px; }
.msg-reacts button { height: 24px; padding: 0 7px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line-strong); font-size: 13px; display: inline-flex; align-items: center; gap: 3px; box-shadow: var(--shadow-1); }
.msg-reacts button.mine { border-color: var(--accent); background: var(--accent-soft); }
.msg-tools { position: absolute; top: -18px; display: none; gap: 2px; padding: 3px; border-radius: var(--r-full); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-2); z-index: 3; }
.msg-row:not(.mine) .msg-tools { left: 6px; }
.msg-row.mine .msg-tools { right: 6px; }
@media (hover: hover) { .bubble-wrap:hover .msg-tools { display: flex; } }
.msg-tools button { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-size: 16px; color: var(--ink-2); }
.msg-tools button:hover { background: var(--surface-3); }
.msg-tools svg { width: 17px; height: 17px; }
.reply-quote { display: block; font-size: 12.5px; color: var(--ink-3); padding: 4px 10px; border-left: 3px solid var(--sage); margin: 0 6px 3px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.typing-line { color: var(--accent) !important; font-style: italic; }
.typing { font-size: 12.5px; color: var(--ink-3); padding: 0 16px 4px; min-height: 20px; }
.typing i { display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: currentColor; margin-right: 2px; animation: blink 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: .2s; } .typing i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
.chat-compose { display: flex; align-items: flex-end; gap: 6px; padding: 8px max(8px, var(--safe-right)) calc(8px + var(--safe-bottom)) max(8px, var(--safe-left)); border-top: 1px solid var(--line); background: var(--surface-glass); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
.chat-compose .box { flex: 1; min-width: 0; display: flex; flex-direction: column; background: var(--surface-2); border: 1px solid var(--line-strong); border-radius: 24px; transition: border-color var(--t-fast), box-shadow var(--t-fast); }
.chat-compose .box:focus-within { border-color: var(--accent); box-shadow: var(--ring); }
.chat-compose textarea { width: 100%; min-height: 44px; max-height: 160px; resize: none; border: 0; background: transparent; padding: 11px 16px; font-size: 16px; line-height: 1.4; }
.chat-compose textarea:focus { outline: none; box-shadow: none; }
.chat-compose .replying { display: flex; align-items: center; gap: 8px; padding: 8px 8px 0 14px; font-size: 12.5px; color: var(--ink-3); }
.chat-compose .replying span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.send-btn { width: 44px; height: 44px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; flex: none; transition: transform var(--t-fast) var(--ease-spring), opacity var(--t-fast); }
.send-btn:active { transform: scale(.9); }
.send-btn svg { width: 20px; height: 20px; }
.rec { display: flex; align-items: center; gap: 10px; flex: 1; min-height: 44px; padding: 0 14px; border-radius: 24px; background: var(--danger-soft); color: var(--danger); font-weight: 620; font-variant-numeric: tabular-nums; }
.rec .pulse { width: 10px; height: 10px; border-radius: 50%; background: var(--danger); animation: blink 1s infinite; }
audio { width: 240px; max-width: 100%; height: 40px; }

@media (min-width: 700px) {
  [data-view="messages"] .page, [data-view="thread"] .page { max-width: none; padding: 0; }
  [data-view="thread"] .main, [data-view="messages"] .main { padding: 0; }
  .chat-layout { display: grid; grid-template-columns: 300px minmax(0, 1fr); height: 100dvh; border-left: 0; }
  .chat-side { border-right: 1px solid var(--line); overflow-y: auto; padding: calc(20px + var(--safe-top)) 10px 20px; background: color-mix(in srgb, var(--surface) 35%, transparent); }
  .chat-main { min-width: 0; display: flex; flex-direction: column; height: 100dvh; }
  .thread { height: 100%; }
  .thread-head { padding: calc(14px + var(--safe-top)) 20px 14px; }
  .thread-scroll { padding: 20px 24px 12px; }
  .chat-compose { padding: 12px 20px calc(14px + var(--safe-bottom)); }
  .chat-empty { display: grid; place-items: center; height: 100%; }
}
@media (min-width: 1000px) { .chat-layout { grid-template-columns: 340px minmax(0, 1fr); } }
@media (max-width: 699px) {
  .chat-main.hidden-mobile { display: none; }
  [data-view="thread"] .chat-side { display: none; }
  [data-view="thread"] .topbar { display: none; }
  [data-view="thread"] .main { padding-top: var(--safe-top); }
  [data-view="thread"] .thread { height: calc(100dvh - var(--safe-top)); }
}

/* ---- 12. Kontextspalte -------------------------------------------------- */
.aside .card { margin-bottom: 14px; }
.aside h3 { font-size: 15px; padding: 16px 16px 6px; display: flex; align-items: center; justify-content: space-between; }
.aside h3 a { font-size: 13px; color: var(--accent); font-weight: 600; }
.aside .list-item { padding: 10px 12px; min-height: 56px; }
.aside-search { position: relative; margin-bottom: 14px; }
.aside-search svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 19px; height: 19px; color: var(--ink-3); pointer-events: none; }
.aside-search .input { padding-left: 42px; border-radius: var(--r-full); background: var(--card-grad, var(--surface)); min-height: 46px; }
.manifesto { padding: 16px; font-size: 13px; color: var(--ink-3); line-height: 1.55; }
.manifesto b { color: var(--ink-2); }
.foot-links { display: flex; flex-wrap: wrap; gap: 4px 12px; padding: 4px 16px 16px; font-size: 12px; color: var(--ink-3); }
.foot-links a:hover { text-decoration: underline; }

/* ---- 13. Lightbox & Clips ----------------------------------------------- */
.lightbox { position: fixed; inset: 0; z-index: 90; background: rgba(2, 8, 5, .94); display: flex; flex-direction: column; animation: fade-in var(--t) var(--ease) both; touch-action: pan-x pan-y pinch-zoom; }
.lightbox .lb-head { display: flex; align-items: center; justify-content: space-between; padding: calc(8px + var(--safe-top)) max(8px, var(--safe-right)) 8px max(16px, var(--safe-left)); color: #fff; }
.lightbox .icon-btn { color: #fff; }
.lightbox .icon-btn:hover { background: rgba(255,255,255,.12); }
.lb-track { flex: 1; display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.lb-track::-webkit-scrollbar { display: none; }
.lb-slide { flex: 0 0 100%; scroll-snap-align: center; display: grid; place-items: center; padding: 0 max(8px, var(--safe-right)) calc(16px + var(--safe-bottom)) max(8px, var(--safe-left)); position: relative; }
.lb-slide img, .lb-slide video { max-width: 100%; max-height: calc(100dvh - 120px); object-fit: contain; border-radius: 6px; }
.lb-caption { position: absolute; left: 50%; transform: translateX(-50%); bottom: calc(20px + var(--safe-bottom)); max-width: 90%; color: #fff; background: rgba(0,0,0,.5); padding: 6px 12px; border-radius: var(--r-full); font-size: 13px; }
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; width: 48px; height: 48px; border-radius: 50%; background: rgba(255,255,255,.14); color: #fff; display: none; place-items: center; }
.lb-nav svg { width: 24px; height: 24px; }
@media (hover: hover) and (min-width: 700px) { .lb-nav { display: grid; } }
.lb-nav.prev { left: 16px; } .lb-nav.next { right: 16px; }

.clips { height: calc(100dvh - var(--topbar-h) - var(--tabbar-h) - var(--safe-top) - var(--safe-bottom) - 24px); overflow-y: auto; scroll-snap-type: y mandatory; border-radius: var(--r-xl); background: #000; scrollbar-width: none; }
.clips::-webkit-scrollbar { display: none; }
@media (min-width: 700px) { .clips { height: calc(100dvh - 120px); max-width: 460px; margin: 0 auto; } }
.clip { height: 100%; scroll-snap-align: start; scroll-snap-stop: always; position: relative; display: grid; place-items: center; color: #fff; }
.clip video { width: 100%; height: 100%; object-fit: contain; }
.clip .info { position: absolute; left: 0; right: 0; bottom: 0; padding: 60px 16px 18px; background: linear-gradient(transparent, rgba(0,0,0,.7)); }
.clip .info p { margin-top: 8px; font-size: 14.5px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.clip .side { position: absolute; right: 10px; bottom: 90px; display: grid; gap: 10px; }
.clip .side button, .clip .side a { width: 48px; height: 48px; border-radius: 50%; background: rgba(255,255,255,.16); color: #fff; display: grid; place-items: center; backdrop-filter: blur(8px); font-size: 22px; }
.clip .side svg { width: 24px; height: 24px; }
.clip.end { flex-direction: column; text-align: center; padding: 32px; background: radial-gradient(circle at 50% 30%, rgba(111,207,156,.35), transparent 60%), #06110c; }

/* ---- 14. Willkommen & Anmeldung ----------------------------------------- */
.welcome { min-height: 100dvh; display: grid; padding: calc(20px + var(--safe-top)) max(20px, var(--safe-right)) calc(24px + var(--safe-bottom)) max(20px, var(--safe-left)); }
.welcome-inner { width: 100%; max-width: 1180px; margin: 0 auto; display: grid; gap: 28px; align-content: start; }
.welcome-top { display: flex; align-items: center; justify-content: space-between; }
.hero h1 { font-size: clamp(38px, 7.4vw, 72px); line-height: 1.02; letter-spacing: -.045em; font-weight: 740; }
.hero h1 em { font-style: normal; background: linear-gradient(100deg, var(--accent) 10%, color-mix(in srgb, var(--accent) 50%, var(--lime)) 90%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.lead { margin-top: 18px; font-size: clamp(16px, 2vw, 19px); color: var(--ink-2); max-width: 540px; line-height: 1.55; }
.principles { display: grid; gap: 10px; margin-top: 26px; grid-template-columns: 1fr; }
@media (min-width: 560px) { .principles { grid-template-columns: 1fr 1fr; } }
.principle { display: flex; gap: 12px; padding: 14px; border-radius: var(--r-lg); background: var(--card-grad); opacity: .96; border: 1px solid var(--line); backdrop-filter: blur(10px); }
.principle .ic { flex: none; width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; color: var(--accent); background: radial-gradient(circle at 30% 25%, var(--glow), transparent 65%), var(--accent-soft); }
.principle .ic svg { width: 20px; height: 20px; }
.principle b { display: block; font-size: 14.5px; margin-bottom: 2px; }
.principle small { color: var(--ink-3); font-size: 13px; line-height: 1.4; display: block; }
.auth-card { padding: 22px; border-radius: var(--r-xl); background: var(--card-grad, var(--surface)); box-shadow: var(--shadow-3); border: 1px solid var(--line); position: relative; overflow: hidden; }
.auth-card::before { content: ""; position: absolute; inset: -60% -30% auto auto; width: 300px; height: 300px; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--glow) 70%, transparent), transparent 70%); opacity: .6; pointer-events: none; }
.auth-card > * { position: relative; }
.auth-card h2 { font-size: 22px; margin-bottom: 4px; }
.auth-card .sub { color: var(--ink-3); margin-bottom: 18px; font-size: 14.5px; }
.interest-pick { display: flex; flex-wrap: wrap; gap: 8px; }
.demo-hint { margin-top: 14px; font-size: 13px; color: var(--ink-3); text-align: center; }
.demo-hint code { background: var(--surface-3); padding: 2px 6px; border-radius: 6px; font-size: 12.5px; color: var(--ink-2); }
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }
@media (min-width: 900px) {
  .welcome { align-items: center; }
  .welcome-inner { grid-template-columns: minmax(0, 1.15fr) minmax(0, 440px); gap: 56px; align-items: center; }
  .welcome-top { grid-column: 1 / -1; }
  .auth-card { padding: 30px; }
}
@media (min-width: 700px) and (max-width: 899px) { .welcome-inner { max-width: 620px; } }

/* ---- 15. Einstellungen ---------------------------------------------------- */
.settings-nav { display: grid; gap: 2px; }
.settings-group { margin-bottom: 14px; }
.settings-group .card { padding: 4px 18px; }
.setting-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 0; }
.setting-row + .setting-row { border-top: 1px solid var(--line); }
.setting-row .txt b { display: block; font-weight: 600; }
.setting-row .txt small { color: var(--ink-3); font-size: 13px; }
.theme-swatches { display: flex; gap: 10px; flex-wrap: wrap; }
.swatch { position: relative; width: 48px; height: 48px; border-radius: 16px; cursor: pointer; border: 2px solid transparent; transition: transform var(--t-fast) var(--ease-spring); }
.swatch:hover { transform: scale(1.06); }
.swatch input { position: absolute; opacity: 0; }
.swatch.on { border-color: var(--ink); box-shadow: 0 0 0 3px var(--surface) inset; }
.swatch .lock { position: absolute; right: -4px; top: -4px; width: 20px; height: 20px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; box-shadow: var(--shadow-1); }
.swatch .lock svg { width: 12px; height: 12px; }
.weight { padding: 12px 0; }
.weight + .weight { border-top: 1px solid var(--line); }
.weight .row b { font-weight: 600; }
.weight .row output { margin-left: auto; font-variant-numeric: tabular-nums; color: var(--ink-3); font-size: 13px; }
.weight small { display: block; color: var(--ink-3); font-size: 13px; }

.plus-hero { padding: 26px 22px; border-radius: var(--r-xl); color: #f3fbf6; position: relative; overflow: hidden;
  background: radial-gradient(90% 120% at 100% 0%, rgba(212, 244, 138, .5), transparent 55%), radial-gradient(80% 120% at 0% 100%, rgba(143, 188, 162, .55), transparent 60%), linear-gradient(135deg, #1f6248, #0c3022); }
.plus-hero h2 { font-size: 26px; }
.plus-hero p { opacity: .85; margin-top: 8px; max-width: 460px; }
.plus-hero .price { font-size: 34px; font-weight: 740; letter-spacing: -.03em; margin-top: 18px; }
.plus-hero .price small { font-size: 15px; font-weight: 500; opacity: .8; }
.feature-list { display: grid; gap: 10px; }
@media (min-width: 700px) { .feature-list { grid-template-columns: 1fr 1fr; } }

/* ---- 16. Benachrichtigungen ---------------------------------------------- */
.notif { display: flex; gap: 12px; padding: 12px 14px; border-radius: var(--r); align-items: flex-start; transition: background var(--t-fast); }
.notif:hover { background: var(--surface-2); }
.notif.unread { background: var(--accent-softer); }
.notif .meta { flex: 1; min-width: 0; font-size: 14.5px; line-height: 1.4; }
.notif .meta small { display: block; color: var(--ink-3); font-size: 12.5px; margin-top: 2px; }
.notif .ic { position: relative; }
.notif .ic .kind { position: absolute; right: -4px; bottom: -4px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); box-shadow: 0 0 0 2px var(--surface); font-size: 11px; }
.notif .ic .kind svg { width: 12px; height: 12px; }

/* ---- 17. Helfer --------------------------------------------------------- */
.grid-2 { display: grid; gap: 12px; }
@media (min-width: 700px) { .grid-2 { grid-template-columns: 1fr 1fr; } }
.kbd { display: inline-block; padding: 1px 6px; border-radius: 6px; border: 1px solid var(--line-strong); font-size: 12px; color: var(--ink-3); }
.spin { width: 22px; height: 22px; border-radius: 50%; border: 2.5px solid var(--line-strong); border-top-color: var(--accent); animation: spin .7s linear infinite; margin: 24px auto; }
@keyframes spin { to { transform: rotate(360deg); } }
.load-more { display: flex; justify-content: center; padding: 10px 0 20px; }
.notice { display: flex; gap: 10px; padding: 12px 14px; border-radius: var(--r); background: var(--accent-softer); border: 1px solid color-mix(in srgb, var(--accent) 20%, transparent); font-size: 13.5px; color: var(--ink-2); }
.notice svg { width: 18px; height: 18px; flex: none; color: var(--accent); margin-top: 1px; }
.notice.warn { background: color-mix(in srgb, var(--warn) 10%, var(--surface)); border-color: color-mix(in srgb, var(--warn) 30%, transparent); }
.notice.warn svg { color: var(--warn); }
@media (max-width: 699px) { .desktop-only { display: none !important; } }
@media (min-width: 700px) { .mobile-only { display: none !important; } }
@media (pointer: coarse) {
  .act { min-height: 44px; } .btn.sm { --h: 44px; }
  /* Audit N1: Touch-Ziele mindestens 44 px. Kleine Symbole bleiben optisch klein, die Tippfläche wächst. */
  .icon-btn.sm { width: 44px; height: 44px; margin: -4px; }
  .tabs > a, .tabs > button, .tabs [role="tab"] { min-height: 44px; display: inline-flex; align-items: center; }
}

/* Dunkelmodus: Seitenleiste nicht hell färben */
@media (prefers-color-scheme: dark) { :root:not([data-mode="light"]) .nav { background: linear-gradient(180deg, rgba(34,84,61,.75), rgba(16,48,35,.75)) !important; } }
:root[data-mode="dark"] .nav { background: linear-gradient(180deg, rgba(34,84,61,.75), rgba(16,48,35,.75)) !important; }

/* ==== Glas & Schimmer (Dunkelgrün-Design) ==== */
html[data-mode="dark"] body { background: #0f3022; }
html[data-mode="dark"] body::before {
  background:
    radial-gradient(38vmax 30vmax at 82% 8%, rgba(52, 230, 150, .42), transparent 70%),
    radial-gradient(44vmax 36vmax at 6% 30%, rgba(30, 190, 140, .40), transparent 70%),
    radial-gradient(36vmax 28vmax at 70% 92%, rgba(170, 240, 120, .28), transparent 70%),
    radial-gradient(30vmax 24vmax at 25% 85%, rgba(40, 200, 170, .22), transparent 70%),
    linear-gradient(160deg, #1d5039 0%, #12392a 45%, #0a2419 100%);

}
html[data-mode="dark"] body::after {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(115deg, transparent 30%, rgba(190, 255, 220, .07) 45%, rgba(220, 255, 200, .12) 50%, rgba(190, 255, 220, .07) 55%, transparent 70%);
  background-size: 100% 100%;
}
html[data-mode="dark"] .card, html[data-mode="dark"] .sheet, html[data-mode="dark"] .now-card, html[data-mode="dark"] .auth-card, html[data-mode="dark"] .principle, html[data-mode="dark"] .feed-end, html[data-mode="dark"] .bubble:not(.deleted) {
  background:
    linear-gradient(120deg, rgba(255, 255, 255, .13) 0%, rgba(255, 255, 255, 0) 38%),
    linear-gradient(150deg, rgba(64, 170, 120, .34) 0%, rgba(20, 80, 56, .40) 100%) !important;
  backdrop-filter: blur(20px) saturate(170%); -webkit-backdrop-filter: blur(20px) saturate(170%);
  border: 1px solid rgba(190, 255, 220, .16) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16), inset 0 -1px 0 rgba(0, 0, 0, .12), 0 22px 44px -24px rgba(0, 0, 0, .65) !important;
}
html[data-mode="dark"] .sheet { background: linear-gradient(120deg, rgba(255,255,255,.12), rgba(255,255,255,0) 40%), linear-gradient(150deg, rgba(40, 120, 85, .92), rgba(14, 58, 41, .94)) !important; }
html[data-mode="dark"] .room-card:hover, html[data-mode="dark"] .now-card:hover { border-color: rgba(160, 255, 200, .35) !important; }
html[data-mode="dark"] .msg-row.mine .bubble { background: linear-gradient(135deg, #5fe0a0, #2fb383) !important; color: #052516; border-color: rgba(255,255,255,.25) !important; }
html[data-mode="dark"] .topbar, html[data-mode="dark"] .tabbar, html[data-mode="dark"] .thread-head, html[data-mode="dark"] .chat-compose {
  background: linear-gradient(150deg, rgba(40, 120, 86, .55), rgba(12, 54, 38, .65)) !important;
  backdrop-filter: blur(22px) saturate(180%); -webkit-backdrop-filter: blur(22px) saturate(180%);
  border-color: rgba(190, 255, 220, .14) !important;
}
html[data-mode="dark"] .nav { background: linear-gradient(180deg, rgba(46, 130, 92, .38), rgba(10, 46, 33, .45)) !important; backdrop-filter: blur(18px) saturate(160%); -webkit-backdrop-filter: blur(18px) saturate(160%); border-color: rgba(190, 255, 220, .12) !important; }
html[data-mode="dark"] .input, html[data-mode="dark"] .textarea, html[data-mode="dark"] .select, html[data-mode="dark"] .composer-prompt .fake, html[data-mode="dark"] .chat-compose .box { background-color: rgba(10, 40, 28, .45) !important; border-color: rgba(190, 255, 220, .18) !important; }
html[data-mode="dark"] .tabs, html[data-mode="dark"] .chip, html[data-mode="dark"] .btn:not(.primary):not(.danger) { background-color: rgba(120, 230, 170, .12); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
html[data-mode="dark"] .tabs [aria-selected="true"] { background: rgba(150, 245, 190, .22); color: #f0fff5; }
/* Schimmernde Akzente: Knöpfe und Logo */
html[data-mode="dark"] .btn.primary, html[data-mode="dark"] .nav .nav-create, html[data-mode="dark"] .tab-create, html[data-mode="dark"] .send-btn:not([data-voice]) {
  background: linear-gradient(110deg, #3fcf8e 0%, #8ef0b8 35%, #d6ffcf 50%, #8ef0b8 65%, #3fcf8e 100%) !important;
  background-size: 250% 100% !important; animation: btn-shimmer 5s ease-in-out infinite; color: #04281a !important;
  box-shadow: 0 10px 28px -10px rgba(80, 230, 150, .75), inset 0 1px 0 rgba(255, 255, 255, .5) !important;
}
html[data-mode="dark"] .brand img { box-shadow: 0 0 22px rgba(90, 240, 160, .45), 0 6px 16px -6px rgba(0, 0, 0, .5); }
html[data-mode="dark"] .hero h1 em { background: linear-gradient(100deg, #5fe8a2 0%, #c9ff9e 40%, #ffffff 50%, #c9ff9e 60%, #5fe8a2 100%); background-size: 250% 100%; background-position: 30% 0; -webkit-background-clip: text; background-clip: text; color: transparent; }
html[data-mode="dark"] .post-kind { background: linear-gradient(120deg, rgba(95, 232, 162, .25), rgba(200, 255, 150, .22)); color: #b9ffd6; }
@media (prefers-color-scheme: dark) {

/* ==== Glas & Schimmer (Dunkelgrün-Design) ==== */
html:not([data-mode]) body { background: #0f3022; }
html:not([data-mode]) body::before {
  background:
    radial-gradient(38vmax 30vmax at 82% 8%, rgba(52, 230, 150, .42), transparent 70%),
    radial-gradient(44vmax 36vmax at 6% 30%, rgba(30, 190, 140, .40), transparent 70%),
    radial-gradient(36vmax 28vmax at 70% 92%, rgba(170, 240, 120, .28), transparent 70%),
    radial-gradient(30vmax 24vmax at 25% 85%, rgba(40, 200, 170, .22), transparent 70%),
    linear-gradient(160deg, #1d5039 0%, #12392a 45%, #0a2419 100%);

}
html:not([data-mode]) body::after {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(115deg, transparent 30%, rgba(190, 255, 220, .07) 45%, rgba(220, 255, 200, .12) 50%, rgba(190, 255, 220, .07) 55%, transparent 70%);
  background-size: 100% 100%;
}
html:not([data-mode]) .card, html:not([data-mode]) .sheet, html:not([data-mode]) .now-card, html:not([data-mode]) .auth-card, html:not([data-mode]) .principle, html:not([data-mode]) .feed-end, html:not([data-mode]) .bubble:not(.deleted) {
  background:
    linear-gradient(120deg, rgba(255, 255, 255, .13) 0%, rgba(255, 255, 255, 0) 38%),
    linear-gradient(150deg, rgba(64, 170, 120, .34) 0%, rgba(20, 80, 56, .40) 100%) !important;
  backdrop-filter: blur(20px) saturate(170%); -webkit-backdrop-filter: blur(20px) saturate(170%);
  border: 1px solid rgba(190, 255, 220, .16) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16), inset 0 -1px 0 rgba(0, 0, 0, .12), 0 22px 44px -24px rgba(0, 0, 0, .65) !important;
}
html:not([data-mode]) .sheet { background: linear-gradient(120deg, rgba(255,255,255,.12), rgba(255,255,255,0) 40%), linear-gradient(150deg, rgba(40, 120, 85, .92), rgba(14, 58, 41, .94)) !important; }
html:not([data-mode]) .room-card:hover, html:not([data-mode]) .now-card:hover { border-color: rgba(160, 255, 200, .35) !important; }
html:not([data-mode]) .msg-row.mine .bubble { background: linear-gradient(135deg, #5fe0a0, #2fb383) !important; color: #052516; border-color: rgba(255,255,255,.25) !important; }
html:not([data-mode]) .topbar, html:not([data-mode]) .tabbar, html:not([data-mode]) .thread-head, html:not([data-mode]) .chat-compose {
  background: linear-gradient(150deg, rgba(40, 120, 86, .55), rgba(12, 54, 38, .65)) !important;
  backdrop-filter: blur(22px) saturate(180%); -webkit-backdrop-filter: blur(22px) saturate(180%);
  border-color: rgba(190, 255, 220, .14) !important;
}
html:not([data-mode]) .nav { background: linear-gradient(180deg, rgba(46, 130, 92, .38), rgba(10, 46, 33, .45)) !important; backdrop-filter: blur(18px) saturate(160%); -webkit-backdrop-filter: blur(18px) saturate(160%); border-color: rgba(190, 255, 220, .12) !important; }
html:not([data-mode]) .input, html:not([data-mode]) .textarea, html:not([data-mode]) .select, html:not([data-mode]) .composer-prompt .fake, html:not([data-mode]) .chat-compose .box { background-color: rgba(10, 40, 28, .45) !important; border-color: rgba(190, 255, 220, .18) !important; }
html:not([data-mode]) .tabs, html:not([data-mode]) .chip, html:not([data-mode]) .btn:not(.primary):not(.danger) { background-color: rgba(120, 230, 170, .12); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
html:not([data-mode]) .tabs [aria-selected="true"] { background: rgba(150, 245, 190, .22); color: #f0fff5; }
/* Schimmernde Akzente: Knöpfe und Logo */
html:not([data-mode]) .btn.primary, html:not([data-mode]) .nav .nav-create, html:not([data-mode]) .tab-create, html:not([data-mode]) .send-btn:not([data-voice]) {
  background: linear-gradient(110deg, #3fcf8e 0%, #8ef0b8 35%, #d6ffcf 50%, #8ef0b8 65%, #3fcf8e 100%) !important;
  background-size: 250% 100% !important; animation: btn-shimmer 5s ease-in-out infinite; color: #04281a !important;
  box-shadow: 0 10px 28px -10px rgba(80, 230, 150, .75), inset 0 1px 0 rgba(255, 255, 255, .5) !important;
}
html:not([data-mode]) .brand img { box-shadow: 0 0 22px rgba(90, 240, 160, .45), 0 6px 16px -6px rgba(0, 0, 0, .5); }
html:not([data-mode]) .hero h1 em { background: linear-gradient(100deg, #5fe8a2 0%, #c9ff9e 40%, #ffffff 50%, #c9ff9e 60%, #5fe8a2 100%); background-size: 250% 100%; background-position: 30% 0; -webkit-background-clip: text; background-clip: text; color: transparent; }
html:not([data-mode]) .post-kind { background: linear-gradient(120deg, rgba(95, 232, 162, .25), rgba(200, 255, 150, .22)); color: #b9ffd6; }

}

@keyframes aurora { 0% { filter: saturate(1) brightness(.95); } 100% { filter: saturate(1.25) brightness(1.08); } }
@keyframes shimmer-sweep { 0% { background-position: 150% 150%; } 100% { background-position: -50% -50%; } }
@keyframes btn-shimmer { 0%, 100% { background-position: 100% 0; } 50% { background-position: 0% 0; } }
@media (max-width: 699px) {
  html[data-mode="dark"] .card, html[data-mode="dark"] .now-card { backdrop-filter: blur(12px) saturate(150%); -webkit-backdrop-filter: blur(12px) saturate(150%); }
}
@media (prefers-reduced-motion: reduce) { body::before, body::after, .btn.primary, .hero h1 em { animation: none !important; } }

/* Block B: Turnstile-Feld und Text-Schaltflächen in Hinweisen */
.ts-box { min-height: 65px; margin: 4px 0 10px; display: flex; justify-content: center; }
button.link { background: none; border: 0; padding: 0; font: inherit; color: var(--accent); text-decoration: underline; cursor: pointer; }
button.link:disabled { opacity: .6; cursor: default; }

/* Geschlossene Beta: Warteseite */
.beta-card h2 { font-size: 30px; letter-spacing: -.02em; }
.countdown { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 18px 0 12px; }
.countdown span { display: grid; place-items: center; padding: 14px 4px; border-radius: 16px; background: var(--accent-softer); border: 1px solid var(--line); }
.countdown b { font-size: 30px; font-variant-numeric: tabular-nums; line-height: 1.1; }
.countdown small { color: var(--ink-3); font-size: 12px; }
.beta-seats { margin: 6px 0 10px; }
.beta-admin .seg label { flex: 1; }

/* Usernames und offizielles myco-Abzeichen */
.name-line .handle { color: var(--ink-3); font-weight: 450; font-size: .88em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; flex: 0 1 auto; }
.official-badge { display: inline-flex; align-items: center; gap: 3px; flex: none; padding: 1px 7px 1px 4px; border-radius: 999px; font-size: 11px; font-weight: 700; letter-spacing: .01em;
  color: #05301f; background: linear-gradient(135deg, #c9ff9e, #5fe0a0); box-shadow: 0 0 0 1px rgba(255,255,255,.35) inset, 0 0 12px rgba(95,224,160,.35); }
.official-badge svg { width: 14px; height: 14px; color: #0b5a3a; }
.handle-status { font-size: 12.5px; margin-top: 4px; min-height: 18px; }
.handle-status.ok { color: var(--accent); } .handle-status.bad { color: var(--danger); }
