:root {
    --bg: #f1f5f9;
    --panel: #ffffff;
    --panel-soft: #f8fafc;
    --text: #0f172a;
    --muted: #64748b;
    --border: #d9e2ec;
    --brand: #16a34a;
    --brand-dark: #0f7a39;
    --danger: #dc2626;
    --shadow: 0 18px 45px rgba(15, 23, 42, .10);
    --zoom: 1;
}

* { box-sizing: border-box; }
html { font-size: calc(16px * var(--zoom)); }
body {
    margin: 0;
    min-height: 100vh;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: var(--bg);
    color: var(--text);
}
body.dark {
    --bg: #06111f;
    --panel: #101827;
    --panel-soft: #0b1322;
    --text: #f8fafc;
    --muted: #cbd5e1;
    --border: #26364d;
    --shadow: 0 18px 45px rgba(0, 0, 0, .35);
}

a { color: inherit; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .65; }
img { max-width: 100%; }
.container { width: min(1080px, calc(100% - 28px)); margin: 0 auto; }
.hidden, [hidden] { display: none !important; }

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

.skip-link {
    position: fixed;
    left: 14px;
    top: 14px;
    z-index: 9999;
    padding: 12px 16px;
    border-radius: 14px;
    background: var(--brand);
    color: #fff;
    font-weight: 900;
    text-decoration: none;
    box-shadow: var(--shadow);
    transform: translateY(-160%);
    transition: transform .18s ease;
}
.skip-link:focus,
.skip-link:focus-visible {
    transform: translateY(0);
    outline: 4px solid rgba(250, 204, 21, .9);
    outline-offset: 3px;
}
:where(a, button, input, textarea, select, summary, [role="button"]):focus-visible {
    outline: 3px solid rgba(250, 204, 21, .92);
    outline-offset: 3px;
}
.file-btn[role="button"]:focus-visible {
    outline: 3px solid rgba(250, 204, 21, .92);
    outline-offset: 3px;
}
.panel {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 26px;
    box-shadow: var(--shadow);
}
.muted { color: var(--muted); }
.eyebrow {
    margin: 0 0 8px;
    color: var(--brand);
    text-transform: uppercase;
    letter-spacing: .08em;
    font-weight: 800;
    font-size: .78rem;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, .92);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(14px);
}
body.dark .site-header { background: rgba(6, 17, 31, .92); }
.header-inner {
    min-height: 86px;
    width: min(1200px, calc(100% - 24px));
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 18px;
}
.header-logo img { width: 150px; display: block; }
.header-login-ad {
    display: none;
    min-width: 0;
    max-width: 730px;
}
body.is-logged-in .header-login-ad {
    display: flex;
    align-items: center;
    justify-content: center;
}
.header-login-ad-frame {
    width: 730px;
    height: 140px;
    max-width: 100%;
    overflow: hidden;
    border-radius: 14px;
    flex: 0 0 auto;
}
.header-login-ad iframe {
    display: block;
    border: 0;
    overflow: hidden;
}
.tile-navigation {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}
.tile-row {
    min-width: 0;
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    touch-action: pan-x pan-y;
    cursor: grab;
}
.tile-row.is-dragging {
    cursor: grabbing;
    scroll-behavior: auto;
    user-select: none;
}
.tile-row::-webkit-scrollbar { display: none; }
.tile-scroll-arrow {
    flex: 0 0 42px;
    width: 42px;
    min-width: 42px;
    height: 48px;
    min-height: 48px;
    border: 1px solid rgba(255, 255, 255, .48);
    border-radius: 14px;
    display: inline-grid;
    place-items: center;
    cursor: pointer;
    color: #fff;
    background: linear-gradient(135deg, #0f766e, #2563eb);
    box-shadow: 0 10px 22px rgba(15, 23, 42, .16);
    font-size: 1.65rem;
    line-height: 1;
    font-weight: 900;
    transition: transform .16s ease, opacity .16s ease, box-shadow .16s ease;
}
.tile-scroll-arrow:hover,
.tile-scroll-arrow:focus-visible {
    transform: translateY(-1px);
    box-shadow: 0 14px 28px rgba(15, 23, 42, .22);
}
.tile-scroll-arrow:disabled {
    opacity: .45;
    cursor: default;
    transform: none;
}
.tile-btn, .scroll-arrow {
    border: 1px solid rgba(255, 255, 255, .42);
    background: var(--panel-soft);
    color: var(--text);
    border-radius: 14px;
    min-height: 48px;
}
.tile-btn {
    --tile-accent: #2563eb;
    --tile-accent-2: #14b8a6;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 14px;
    min-width: 96px;
    text-decoration: none;
    font-weight: 800;
    color: #fff;
    background: linear-gradient(135deg, var(--tile-accent), var(--tile-accent-2));
    box-shadow: 0 10px 22px rgba(15, 23, 42, .16);
    transition: transform .16s ease, box-shadow .16s ease, filter .16s ease, outline-color .16s ease;
}
.tile-btn:hover,
.tile-btn:focus-visible {
    transform: translateY(-1px);
    box-shadow: 0 14px 28px rgba(15, 23, 42, .22);
    filter: saturate(1.08);
}
.tile-btn:focus-visible {
    outline: 3px solid rgba(250, 204, 21, .95);
    outline-offset: 3px;
}
.tile-btn span { font-weight: 900; }
.tile-btn strong { font-size: .78rem; letter-spacing: .01em; }
.tile-btn.tile-theme { --tile-accent: #7c3aed; --tile-accent-2: #ec4899; }
.tile-btn.tile-zoom-in { --tile-accent: #0284c7; --tile-accent-2: #06b6d4; }
.tile-btn.tile-zoom-out { --tile-accent: #059669; --tile-accent-2: #84cc16; }
.tile-btn.tile-read { --tile-accent: #f97316; --tile-accent-2: #ef4444; }
.tile-row .tile-link:nth-of-type(5n+1) { --tile-accent: #dc2626; --tile-accent-2: #f97316; }
.tile-row .tile-link:nth-of-type(5n+2) { --tile-accent: #9333ea; --tile-accent-2: #6366f1; }
.tile-row .tile-link:nth-of-type(5n+3) { --tile-accent: #0f766e; --tile-accent-2: #22c55e; }
.tile-row .tile-link:nth-of-type(5n+4) { --tile-accent: #be123c; --tile-accent-2: #f43f5e; }
.tile-row .tile-link:nth-of-type(5n+5) { --tile-accent: #1d4ed8; --tile-accent-2: #06b6d4; }
.tile-btn.is-reading,
.tile-btn[aria-pressed="true"][data-read-page] {
    outline: 4px solid #facc15;
    outline-offset: 3px;
    box-shadow: 0 0 0 6px rgba(250, 204, 21, .22), 0 16px 34px rgba(15, 23, 42, .28);
    animation: onea-reading-pulse 1.15s ease-in-out infinite;
}
.captcha-read-icon.is-reading,
.captcha-read-btn.is-reading {
    outline: 3px solid #facc15;
    outline-offset: 2px;
    box-shadow: 0 0 0 5px rgba(250, 204, 21, .2);
}
@keyframes onea-reading-pulse {
    0%, 100% { transform: translateY(-1px) scale(1); }
    50% { transform: translateY(-1px) scale(1.035); }
}
body.dark .tile-btn,
body.dark .tile-scroll-arrow { box-shadow: 0 10px 24px rgba(0, 0, 0, .35); }
body.no-home-tiles .header-inner,
body.is-logged-in .header-inner {
    justify-content: center;
}
body.is-logged-in .header-inner {
    gap: 16px;
    padding-top: 10px;
    padding-bottom: 10px;
}
body.is-logged-in .tile-navigation {
    display: none !important;
}
.scroll-arrow {
    width: 36px;
    font-size: 1.6rem;
    line-height: 1;
}

.center-logo {
    display: flex;
    justify-content: center;
    padding: 30px 0 10px;
}
.center-logo img { width: min(240px, 70vw); }
.landing-mobile-logo { display: none; }
.top-ad-banner {
    width: min(100%, 980px);
    max-width: 100%;
    margin: 24px auto 20px;
    display: flex;
    justify-content: center;
    overflow: hidden;
}
.start-hero-image {
    flex-direction: column;
    align-items: center;
    gap: 16px;
    overflow: visible;
}
.start-image-title {
    margin: 0;
    text-align: center;
    font-size: clamp(1.65rem, 4.5vw, 3.4rem);
    line-height: 1.08;
    letter-spacing: -0.035em;
    font-weight: 900;
    color: var(--text);
}
.top-ad-banner img {
    display: block;
    width: 100%;
    max-width: 980px;
    height: auto;
    object-fit: contain;
    border-radius: 18px;
}
.compact-logo { padding-top: 22px; }
.app-logo-block {
    min-height: 55vh;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 10px;
}
.app-logo-block h1 { margin: 0; font-size: clamp(2rem, 5vw, 4rem); }

.landing { padding-bottom: 44px; }
.profile-landing { padding-top: 6px; }
.hero-simple {
    text-align: center;
    display: grid;
    justify-items: center;
    gap: 18px;
    margin-bottom: 28px;
}
.hero-simple h1 {
    margin: 0;
    max-width: 980px;
    font-size: clamp(1.65rem, 4.2vw, 3.35rem);
    line-height: 1.08;
    letter-spacing: -0.035em;
}
.hero-simple h1 span {
    display: block;
}
.hero-simple p {
    margin: 0;
    max-width: 760px;
    color: var(--muted);
    font-size: clamp(1.05rem, 2.2vw, 1.45rem);
    font-weight: 800;
}
.hero-devices {
    display: grid;
    justify-items: center;
    gap: 6px;
    line-height: 1.35;
    overflow-wrap: anywhere;
}
.hero-devices span {
    display: block;
}
.app-download {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    color: #fff;
    text-decoration: none;
    background: linear-gradient(135deg, var(--brand), #0f766e);
    border-radius: 22px;
    padding: 16px 24px;
    min-width: min(340px, 100%);
    justify-content: center;
    box-shadow: 0 16px 35px rgba(22, 163, 74, .28);
}
.app-download img { width: 58px; height: 58px; object-fit: contain; background: rgba(255,255,255,.16); border-radius: 16px; padding: 6px; }
.app-download span { display: grid; text-align: left; }
.app-download strong { font-size: 1.2rem; }
.app-download small { opacity: .9; }

.landing-actions {
    display: flex;
    align-items: stretch;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    width: min(760px, 100%);
}
.home-info-button {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--text);
    background: rgba(255, 255, 255, .92);
    border: 1px solid rgba(15, 23, 42, .12);
    border-radius: 22px;
    padding: 16px 22px;
    min-width: min(220px, 100%);
    justify-content: center;
    box-shadow: 0 16px 35px rgba(15, 23, 42, .14);
    cursor: pointer;
    font: inherit;
    font-weight: 900;
}
body.dark .home-info-button {
    color: #f8fafc;
    background: rgba(15, 23, 42, .96);
    border-color: rgba(148, 163, 184, .28);
}
.home-info-button > span:first-child {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: rgba(37, 99, 235, .12);
    font-size: 1.45rem;
}
.home-info-button > span:last-child { display: grid; text-align: left; }
.home-info-button strong { font-size: 1.13rem; }
.home-info-button small { color: var(--muted); font-size: .84rem; }
.home-info-button:focus-visible,
.app-download:focus-visible,
.home-info-close-bottom:focus-visible,
.home-info-x:focus-visible {
    outline: 3px solid rgba(37, 99, 235, .55);
    outline-offset: 4px;
}
.home-info-modal[hidden] { display: none; }
.home-info-modal {
    position: fixed;
    inset: 0;
    z-index: 1500;
    display: grid;
    place-items: center;
    padding: 18px;
    background: rgba(2, 6, 23, .68);
}
.home-info-card {
    width: min(960px, 100%);
    max-height: min(88vh, 820px);
    overflow-y: auto;
    padding: clamp(18px, 3vw, 28px);
    display: grid;
    gap: 18px;
    scroll-behavior: smooth;
}
.home-info-head {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 14px;
}
.home-info-head h2 {
    margin: 2px 0 0;
    font-size: clamp(1.45rem, 3vw, 2.2rem);
    line-height: 1.1;
}
.home-info-x {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: rgba(255,255,255,.9);
    color: var(--text);
    font-size: 1.7rem;
    line-height: 1;
    cursor: pointer;
}
body.dark .home-info-x { background: rgba(15,23,42,.92); color: #f8fafc; }
.home-info-intro {
    margin: 0;
    color: var(--muted);
    font-weight: 750;
    line-height: 1.55;
}
.home-info-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}
.home-info-block {
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 14px 15px;
    background: rgba(255, 255, 255, .62);
}
body.dark .home-info-block { background: rgba(15, 23, 42, .6); }
.home-info-block h3 {
    margin: 0 0 8px;
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 1.05rem;
    line-height: 1.25;
}
.home-info-block h3 span {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 11px;
    background: rgba(34, 197, 94, .12);
}
.home-info-block p {
    margin: 0;
    color: var(--muted);
    line-height: 1.55;
    font-weight: 650;
}
.home-info-final {
    display: grid;
    justify-items: center;
    gap: 12px;
    text-align: center;
    border-top: 1px solid var(--line);
    padding-top: 16px;
}
.home-info-final p { margin: 0; color: var(--muted); font-weight: 750; }
.home-info-close-bottom { min-width: min(320px, 100%); }

.auth-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-areas:
        "login register"
        "auth-banner auth-banner";
    gap: 18px;
    align-items: stretch;
}
.auth-card {
    padding: 24px;
    height: 100%;
}
.auth-card-login {
    grid-area: login;
    display: flex;
    flex-direction: column;
}
.auth-card-register {
    grid-area: register;
}
.login-form {
    flex: 1;
    align-content: stretch;
    grid-template-rows: auto auto auto minmax(84px, 1fr) auto;
}
.login-security-wrap {
    display: grid;
    justify-items: center;
    align-items: center;
    align-self: center;
    gap: 4px;
    margin-top: 0;
}
.login-security-text {
    margin: 0;
    font-weight: 800;
    color: var(--muted);
    font-size: 1rem;
}
.login-systems-logo {
    display: block;
    width: min(100%, 170px);
    height: auto;
}
.auth-banner-under {
    grid-area: auth-banner;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    width: 100%;
    max-width: 100%;
    min-height: 0;
    margin-top: 2px;
    overflow: hidden;
}
.ad-responsive-frame {
    display: block;
    width: 728px;
    height: 92px;
    max-width: 100%;
    flex: 0 0 auto;
    overflow: hidden;
    margin-left: auto;
    margin-right: auto;
}
.auth-banner-under .ad-responsive-frame {
    justify-self: center;
}
.ad-responsive-frame iframe,
.auth-banner-under iframe {
    display: block;
    width: 728px !important;
    height: 92px !important;
    max-width: none !important;
    transform-origin: top left;
}
.auth-card h2 { margin: 0 0 16px; font-size: 1.55rem; }
.auth-form { display: grid; gap: 12px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.wide { grid-column: 1 / -1; }
.password-strength {
    display: grid;
    gap: 7px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--panel-soft);
}
.password-strength[hidden] { display: none; }
.password-strength-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    color: var(--muted);
    font-size: .92rem;
    font-weight: 800;
}
.password-strength-head strong { color: var(--text); }
.password-strength-bar {
    height: 8px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(148, 163, 184, .25);
}
.password-strength-bar span {
    display: block;
    width: 20%;
    height: 100%;
    border-radius: inherit;
    transition: width .2s ease, background-color .2s ease;
}
.password-strength.strength-1 .password-strength-bar span { background: #dc2626; }
.password-strength.strength-2 .password-strength-bar span { background: #f97316; }
.password-strength.strength-3 .password-strength-bar span { background: #eab308; }
.password-strength.strength-4 .password-strength-bar span { background: #16a34a; }
.password-strength.strength-5 .password-strength-bar span { background: #0f766e; }
input, textarea, select {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--panel-soft);
    color: var(--text);
    padding: 14px 15px;
    outline: none;
}
textarea { resize: vertical; }
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
textarea:-webkit-autofill,
textarea:-webkit-autofill:hover,
textarea:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px var(--panel-soft) inset !important;
    -webkit-text-fill-color: var(--text) !important;
    caret-color: var(--text);
    transition: background-color 99999s ease-out 0s;
}
.profile-form input[data-clean-paste],
.profile-form textarea[data-clean-paste] {
    background: var(--panel-soft);
    color: var(--text);
}
input:focus, textarea:focus, select:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(22, 163, 74, .14); }
.auth-form button, .primary-btn, .profile-form button, .composer button, .sidebar-actions button {
    border: 0;
    border-radius: 16px;
    padding: 13px 16px;
    background: var(--brand);
    color: #fff;
    font-weight: 850;
}
.auth-form button.register-submit.is-blocked,
.auth-form button.register-submit:disabled,
.auth-form button.login-submit.is-blocked,
.auth-form button.login-submit:disabled {
    background: var(--danger);
    opacity: 1;
}
.auth-form button.register-submit.is-ready,
.auth-form button.login-submit.is-ready {
    background: var(--brand);
    opacity: 1;
}
.required-note {
    margin: -4px 0 0;
    color: var(--muted);
    font-size: .92rem;
    font-weight: 650;
}
.bot-trap {
    position: absolute !important;
    left: -10000px !important;
    top: auto !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}
.legal-checks {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 18px;
    color: var(--muted);
    font-weight: 650;
}
.legal-checks label { display: inline-flex; gap: 8px; align-items: center; }
.legal-checks a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 3px;
}
.legal-checks input { width: auto; }
.captcha-field {
    display: grid;
    gap: 8px;
}
.captcha-question-row {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    width: max-content;
    max-width: 100%;
    color: var(--muted);
    font-weight: 750;
}
.captcha-question-row strong {
    color: var(--text);
    font-weight: 900;
}
.captcha-read-btn,
.captcha-read-icon {
    border: 0;
    background: transparent;
    color: var(--text);
    width: auto;
    height: auto;
    padding: 0;
    display: inline-block;
    line-height: 1;
    cursor: pointer;
    font-size: .95rem;
    margin-left: 2px;
    box-shadow: none;
    vertical-align: baseline;
    transform: translateY(1px);
}
.captcha-read-btn span,
.captcha-read-icon {
    text-decoration: none;
}
.captcha-read-btn:hover,
.captcha-read-btn:focus,
.captcha-read-icon:hover,
.captcha-read-icon:focus {
    color: var(--brand);
    outline: none;
    background: transparent;
}
.captcha-read-btn:focus-visible,
.captcha-read-icon:focus-visible {
    outline: 1px solid currentColor;
    outline-offset: 2px;
}
.register-info-modal[hidden] { display: none; }
.register-info-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: grid;
    place-items: center;
    padding: 18px;
    background: rgba(2, 6, 23, .56);
}
.register-info-card {
    width: min(460px, 100%);
    padding: 24px;
    text-align: center;
    box-shadow: 0 24px 70px rgba(0,0,0,.38);
}
.register-info-card h2 {
    margin: 0 0 10px;
    color: var(--brand);
}
.register-info-card p {
    margin: 0 0 10px;
    color: var(--muted);
    font-weight: 700;
    line-height: 1.45;
}
.join-request-info-modal[hidden] { display: none; }
.join-request-info-modal {
    position: fixed;
    inset: 0;
    z-index: 1400;
    display: grid;
    place-items: center;
    padding: 18px;
    background: rgba(2, 6, 23, .56);
}
.join-request-info-card {
    width: min(460px, 100%);
    padding: 24px;
    text-align: center;
    box-shadow: 0 24px 70px rgba(0,0,0,.38);
}
.join-request-info-card h2 {
    margin: 0 0 10px;
    color: var(--brand);
}
.join-request-info-card p {
    margin: 0;
    color: var(--muted);
    font-weight: 800;
    line-height: 1.45;
}

.join-confirm-modal[hidden] { display: none; }
.join-confirm-modal {
    position: fixed;
    inset: 0;
    z-index: 2147483003;
    display: grid;
    place-items: center;
    padding: 18px;
    background: rgba(2, 6, 23, .62);
}
.join-confirm-card {
    width: min(430px, 100%);
    padding: 22px;
    text-align: center;
    display: grid;
    gap: 14px;
    box-shadow: 0 24px 70px rgba(0,0,0,.38);
}
.join-confirm-card h2 {
    margin: 0;
    font-size: 1.35rem;
    color: var(--brand);
}
.join-confirm-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.55;
    font-weight: 800;
}
.join-confirm-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}
.join-confirm-actions button {
    min-width: 110px;
}
.form-message, .small-message { min-height: 1.3em; margin: 0; font-weight: 750; color: var(--brand); }
.form-message.is-error, .small-message.is-error { color: var(--danger); }

.public-profile-page { padding-bottom: 24px; }
.public-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 22px;
    padding: 24px;
    align-items: center;
}
.public-card > div { min-width: 0; }
.public-card h1 { margin: 0 0 10px; font-size: clamp(2rem, 5vw, 3.4rem); }
.public-card > div > p:not(.eyebrow) {
    margin: 0 0 12px;
    line-height: 1.5;
}
.public-card > div > p.muted {
    margin-bottom: 14px;
}
.public-card-actions,
.public-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    margin-top: 16px;
}
.public-card-actions .primary-btn,
.public-actions .primary-btn,
.public-join-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    max-width: 100%;
    min-height: 44px;
    line-height: 1.2;
    text-decoration: none;
}
.public-card-actions .small-message,
.public-actions .form-message {
    min-height: 0;
    margin: 0;
    line-height: 1.45;
}
.public-profile-actions {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
}
.public-profile-top-actions {
    margin-top: 6px;
    margin-bottom: 12px;
}
.public-profile-bottom-actions {
    margin-top: 18px;
}
.public-profile-actions .small-message {
    flex-basis: 100%;
}
.public-profile-link-box-top {
    margin-top: 8px;
    margin-bottom: 8px;
}
.public-profile-facts-top {
    margin-top: 8px;
    margin-bottom: 16px;
}
.public-info-block {
    width: 100%;
    max-width: 640px;
    margin: 10px 0;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: rgba(255,255,255,.025);
    text-align: left;
}
.public-info-block h2 {
    margin: 0 0 6px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: .94rem;
    font-weight: 900;
    color: var(--text);
}
.public-profile-status {
    margin: 0;
    text-align: left;
    font-weight: 800;
    color: var(--text);
    overflow-wrap: anywhere;
}
.public-profile-about {
    display: grid;
    gap: 4px;
}
.public-profile-about p {
    margin: 0;
    line-height: 1.45;
    color: var(--text);
    overflow-wrap: anywhere;
    white-space: normal;
}
.public-profile-link {
    color: var(--text);
    font-weight: 750;
    overflow-wrap: anywhere;
    word-break: break-word;
}
.public-profile-link:hover { color: var(--brand); }
.public-profile-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 10px 0;
    max-width: 640px;
}
.public-profile-facts > span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 10px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--panel-soft);
    color: var(--muted);
    font-weight: 750;
}
.business-public { display: grid; gap: 10px; color: var(--muted); }
.business-public-name {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text);
    font-size: 1.02rem;
}
.business-public-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}
.business-public-row {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    min-height: 62px;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--panel-soft);
    color: var(--text);
    line-height: 1.25;
    overflow-wrap: anywhere;
    text-decoration: none;
}
.business-public-row > span:first-child {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: rgba(255,255,255,.06);
    font-weight: 950;
}
.business-public-row strong { display: block; color: var(--text); }
.business-public-row small { display: block; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.business-public a:hover, .business-public a:focus-visible { border-color: var(--brand); color: var(--brand); outline: none; }
.public-join-link { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; margin-top: 6px; }

.messenger-app {
    width: min(1380px, calc(100% - 18px));
    margin: 18px auto 30px;
    min-height: calc(100vh - 132px);
    display: grid;
    grid-template-columns: 340px 1fr 360px;
    gap: 12px;
}
.messenger-sidebar, .chat-window, .profile-panel, .group-create-panel {
    min-height: 0;
    overflow: hidden;
}
.messenger-sidebar {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.user-head {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    align-items: start;
}
.user-main-row {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 12px;
}
.user-head small, .chat-top small { display: block; color: var(--muted); word-break: break-all; }
.my-identity {
    display: grid;
    justify-items: start;
    text-align: left;
    min-width: 0;
}
.my-status {
    margin-top: 3px;
    max-width: 100%;
    color: var(--muted);
    font-size: .82rem;
    font-weight: 750;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.profile-photo {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--panel-soft);
    border: 1px solid var(--border);
}
.profile-photo.large { width: 116px; height: 116px; }
.avatar-button, .icon-btn {
    border: 1px solid var(--border);
    background: var(--panel-soft);
    color: var(--text);
    border-radius: 15px;
    padding: 6px;
}
.icon-btn { padding: 10px 12px; font-weight: 850; }
.symbol-btn { width: 44px; height: 44px; padding: 0; display: inline-grid; place-items: center; font-size: 1.2rem; line-height: 1; }
.group-favorite-btn.is-active { color: var(--brand); border-color: rgba(22, 163, 74, .45); }
.chat-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.chat-window.is-group-active .chat-actions { flex-wrap: nowrap; }
.chat-window.is-group-active .chat-actions > button:not([data-group-favorite-toggle]):not([data-mobile-group-info]):not([data-close-active-conversation]) { display: none !important; }
.chat-window.is-group-active .mobile-group-info-btn:not([hidden]) { display: inline-grid; }
.chat-window.is-group-active .group-favorite-btn:not([hidden]),
.chat-window.is-group-active .close-conversation-btn:not([hidden]) { display: inline-grid; }

.mobile-group-info-btn { display: none; }
.mobile-group-menu {
    display: none;
    position: absolute;
    left: 14px;
    right: 14px;
    top: 76px;
    z-index: 75;
    pointer-events: none;
}
.mobile-group-menu:not([hidden]) { display: block; }
.mobile-group-menu-card {
    width: min(430px, 100%);
    margin-left: auto;
    padding: 14px;
    border-radius: 22px;
    box-shadow: 0 18px 48px rgba(0, 0, 0, .38);
    pointer-events: auto;
}
.mobile-group-menu-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 12px;
    margin-bottom: 12px;
}
.mobile-group-menu-title-block {
    display: grid;
    gap: 4px;
    min-width: 0;
}
.mobile-group-menu-title-block strong,
.mobile-group-menu-title-block small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.mobile-group-menu-title-block strong { font-size: 1.08rem; }
.mobile-group-menu-title-block small { color: var(--muted); font-weight: 800; }
.mobile-group-menu-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
}
.mobile-group-menu-actions button {
    min-height: 74px;
    display: grid;
    justify-items: center;
    align-content: center;
    gap: 6px;
    padding: 10px 8px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--panel-soft);
    color: var(--text);
    font-weight: 900;
    text-align: center;
}
.mobile-group-menu-actions button span {
    font-size: 1.5rem;
    line-height: 1;
}
.mobile-group-menu-actions button strong {
    font-size: .84rem;
    line-height: 1.15;
}
.mobile-group-menu-actions button:hover,
.mobile-group-menu-actions button:focus-visible {
    border-color: rgba(34, 197, 94, .6);
    box-shadow: 0 0 0 3px rgba(34, 197, 94, .13);
}
.poll-options-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}
.group-poll-form .group-type-note { margin: 0; }
.live-camera-card {
    width: min(720px, 94vw);
}
.live-camera-preview-box {
    display: grid;
    gap: 10px;
}
.live-camera-preview-box video {
    width: 100%;
    min-height: 220px;
    max-height: 54vh;
    background: #020617;
    border-radius: 18px;
    object-fit: contain;
}
.live-camera-preview-box p {
    margin: 0;
    padding: 10px 12px;
    border-radius: 14px;
    background: var(--panel-soft);
    color: var(--muted);
    font-weight: 850;
}
.live-camera-preview-box p.is-error {
    background: rgba(239, 68, 68, .13);
    color: #b91c1c;
}
.live-camera-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 12px;
}
.live-camera-actions button:first-child {
    background: var(--brand);
    color: #fff;
    border-color: var(--brand);
}
.live-camera-actions button:last-child {
    background: #ef4444;
    color: #fff;
    border-color: #ef4444;
}
.poll-card {
    display: grid;
    gap: 12px;
    min-width: min(360px, 72vw);
}
.poll-card-title {
    display: block;
    font-size: 1.02rem;
    line-height: 1.3;
}
.poll-vote-options {
    display: grid;
    gap: 8px;
}
.poll-vote-options button {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 9px;
    width: 100%;
    padding: 9px 10px;
    border-radius: 15px;
    border: 1px solid rgba(15, 23, 42, .16);
    background: rgba(255, 255, 255, .35);
    color: inherit;
    font-weight: 850;
    text-align: left;
    cursor: pointer;
}
.poll-vote-options button span {
    display: inline-grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    background: rgba(15, 23, 42, .16);
    font-weight: 950;
}
.local-message.me .poll-vote-options button {
    background: rgba(255, 255, 255, .16);
    border-color: rgba(219, 234, 254, .25);
}
.poll-vote-options button:hover,
.poll-vote-options button:focus-visible,
.poll-vote-options button.is-selected {
    border-color: rgba(22, 163, 74, .78);
    box-shadow: 0 0 0 3px rgba(22, 163, 74, .16);
}
.poll-vote-options button.is-selected span {
    background: #22c55e;
    color: #052e16;
}
.poll-card-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.poll-card-actions button {
    border-radius: 999px;
    padding: 7px 12px;
    font-weight: 900;
}
.poll-card-actions small {
    margin: 0;
    opacity: .85;
    font-weight: 800;
}
.poll-card-actions small.is-error {
    color: #b91c1c;
    opacity: 1;
}
.poll-stats-box {
    display: grid;
    gap: 8px;
    padding: 10px;
    border-radius: 15px;
    background: rgba(255, 255, 255, .28);
    border: 1px solid rgba(15, 23, 42, .12);
}
.local-message.me .poll-stats-box {
    background: rgba(255, 255, 255, .14);
    border-color: rgba(219, 234, 254, .22);
}
.poll-stats-box[hidden] { display: none; }
.poll-stats-total {
    font-weight: 900;
}
.poll-stats-list {
    display: grid;
    gap: 8px;
}
.poll-stats-row {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
    overflow: hidden;
    padding: 8px 9px;
    border-radius: 12px;
    background: rgba(255, 255, 255, .28);
}
.poll-stats-row span,
.poll-stats-row em {
    position: relative;
    z-index: 1;
}
.poll-stats-row span {
    overflow-wrap: anywhere;
    color: var(--poll-text, inherit);
}
.poll-stats-row span strong {
    display: inline-grid;
    place-items: center;
    min-width: 24px;
    height: 24px;
    margin-right: 6px;
    padding: 0 6px;
    border-radius: 999px;
    background: var(--poll-badge, rgba(15, 23, 42, .16));
    color: #fff;
}
.poll-stats-row em {
    font-style: normal;
    font-weight: 900;
    white-space: nowrap;
    color: var(--poll-text, inherit);
}
.poll-stats-row i {
    position: absolute;
    inset: 0 auto 0 0;
    width: var(--poll-percent, 0%);
    background: var(--poll-fill, rgba(34, 197, 94, .22));
}
@media (max-width: 560px) {
    .live-camera-actions {
        grid-template-columns: 1fr;
    }
    .poll-card {
        min-width: 0;
        width: 100%;
    }
}

/* Profil-Symbole unter dem Userbild */
.sidebar-symbol-actions,
.sidebar-actions {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    flex-wrap: nowrap;
}
.sidebar-symbol-btn,
.sidebar-actions button {
    width: 42px;
    height: 42px;
    min-width: 42px;
    min-height: 42px;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: linear-gradient(180deg, var(--panel), var(--panel-soft));
    color: var(--text);
    display: inline-grid;
    place-items: center;
    padding: 0;
    line-height: 1;
    font-size: 1.12rem;
    box-shadow: 0 8px 18px rgba(15, 23, 42, .08);
    white-space: nowrap;
}
.sidebar-symbol-btn:hover,
.sidebar-symbol-btn:focus-visible,
.sidebar-actions button:hover,
.sidebar-actions button:focus-visible {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(22, 163, 74, .16);
}
.logout-symbol-btn {
    border-radius: 10px;
}
.search-box {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--panel-soft);
    padding: 0 12px;
}
.search-box input { border: 0; background: transparent; box-shadow: none; padding-left: 0; }
.search-results, .conversation-list {
    display: grid;
    gap: 8px;
    overflow-y: auto;
}
.search-result, .conversation-item {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 10px;
    align-items: center;
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--panel-soft);
    color: var(--text);
    text-align: left;
    text-decoration: none;
}

.search-result > span, .conversation-item > span {
    min-width: 0;
}
.favorite-conversation-item {
    cursor: pointer;
}
.favorite-remove-btn {
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--panel);
    color: var(--text);
    width: 34px;
    height: 34px;
    font-weight: 900;
    cursor: pointer;
}
.favorite-remove-btn:hover,
.favorite-remove-btn:focus {
    border-color: var(--danger);
    color: var(--danger);
}
.search-result strong, .conversation-item strong {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.search-result small, .conversation-item small {
    display: block;
    margin-top: 2px;
    color: var(--muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.search-result button, .conversation-item button {
    border: 0;
    border-radius: 12px;
    background: var(--brand);
    color: #fff;
    padding: 8px 10px;
    font-weight: 800;
}
.list-block { min-height: 0; display: grid; gap: 8px; }
.list-block h2 { margin: 0; font-size: 1rem; color: var(--muted); }
.list-toggle {
    width: 100%;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: var(--muted);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
    font-size: 1rem;
    font-weight: 900;
    cursor: pointer;
}
.list-toggle::after {
    content: "▾";
    font-size: .86rem;
}
.list-block:not(.is-open) .list-toggle::after {
    content: "▸";
}
.list-block:not(.is-open) .conversation-list {
    display: none;
}
.empty-list { color: var(--muted); margin: 0; padding: 8px; }

.chat-window {
    position: relative;
    display: flex;
    flex-direction: column;
    background: linear-gradient(180deg, var(--panel), var(--panel-soft));
}
.chat-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 18px;
    border-bottom: 1px solid var(--border);
}

.chat-body {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.open-conversations {
    width: min(728px, calc(100% - 28px));
    margin: 0 auto 10px;
    display: grid;
    grid-template-columns: 1fr;
    align-items: stretch;
    gap: 8px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-top: 0;
    border-radius: 0 0 18px 18px;
    background: rgba(15, 23, 42, .28);
}
.open-conversations[hidden] { display: none; }
.open-conversations > strong {
    font-size: .92rem;
    color: var(--muted);
    white-space: nowrap;
}
.open-conversation-chips {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    max-height: 142px;
    overflow-y: auto;
    overflow-x: hidden;
}
.open-conversation-chip {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--panel-soft);
    color: var(--text);
    padding: 8px 8px 8px 12px;
    font-weight: 850;
}
.open-conversation-chip.is-active {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(22, 163, 74, .16);
}
.open-conversation-chip [data-switch-open-conversation] {
    border: 0;
    background: transparent;
    color: inherit;
    padding: 6px 2px;
    font: inherit;
    text-align: left;
    min-width: 0;
    overflow: hidden;
    cursor: pointer;
}

.open-conversation-chip .open-conversation-switch.with-image {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 8px;
    align-items: center;
}
.open-conversation-chip .open-conversation-switch.with-image .profile-photo.small {
    width: 38px;
    height: 38px;
    min-width: 38px;
}
.open-conversation-chip .open-conversation-text {
    min-width: 0;
}
.open-conversation-chip [data-switch-open-conversation] strong,
.open-conversation-chip [data-switch-open-conversation] small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.open-conversation-chip [data-switch-open-conversation] small {
    color: var(--muted);
    font-size: .78rem;
    font-weight: 750;
    margin-top: 2px;
}
.open-conversation-chip [data-close-open-conversation] {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: rgba(148, 163, 184, .14);
    color: var(--text);
    padding: 0;
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
}
.open-conversation-empty {
    margin: 0;
    color: var(--muted);
    font-size: .92rem;
}
.chat-ad-slot {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 12px 14px 0;
    overflow: hidden;
    background: rgba(2, 6, 23, .18);
}
.chat-ad-frame {
    width: 728px;
    height: 92px;
    max-width: 100%;
    flex: 0 0 auto;
    display: block;
    overflow: hidden;
    margin-left: auto;
    margin-right: auto;
}
.chat-ad-frame iframe {
    display: block;
    width: 728px !important;
    height: 92px !important;
    max-width: none !important;
    transform-origin: top left;
}
.chat-messages {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.local-message {
    position: relative;
    max-width: min(76%, 680px);
    align-self: flex-start;
    background: linear-gradient(180deg, #fde68a 0%, #facc15 100%);
    color: #3f2a00;
    border: 1px solid #eab308;
    border-radius: 22px 22px 22px 8px;
    padding: 11px 13px;
    word-break: break-word;
    box-shadow: 0 8px 18px rgba(15, 23, 42, .08);
}
.local-message::before {
    content: '';
    position: absolute;
    left: -10px;
    bottom: 10px;
    width: 16px;
    height: 16px;
    background: #facc15;
    border-left: 1px solid #eab308;
    border-bottom: 1px solid #eab308;
    border-bottom-left-radius: 5px;
    transform: skewY(28deg) rotate(16deg);
}
.local-message.me {
    align-self: flex-end;
    border-radius: 22px 22px 8px 22px;
    background: linear-gradient(180deg, #60a5fa 0%, #2563eb 100%);
    color: #eff6ff;
    border-color: #1d4ed8;
}
.local-message.me::before {
    display: none;
}
.local-message.me::after {
    content: '';
    position: absolute;
    right: -10px;
    bottom: 10px;
    width: 16px;
    height: 16px;
    background: #2563eb;
    border-right: 1px solid #1d4ed8;
    border-bottom: 1px solid #1d4ed8;
    border-bottom-right-radius: 5px;
    transform: skewY(-28deg) rotate(-16deg);
}
.local-message.system {
    align-self: center;
    text-align: center;
    color: var(--muted);
    background: transparent;
    border: 0;
    max-width: 100%;
    box-shadow: none;
}
.local-message.system::before,
.local-message.system::after {
    content: none;
    display: none;
}
.group-welcome-message {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px 14px;
    border-radius: 999px;
    background: rgba(22, 163, 74, .12);
    border: 1px solid rgba(22, 163, 74, .28);
    color: var(--text);
}
.group-welcome-message strong { font-weight: 900; }
.local-message small { display: block; opacity: .82; margin-bottom: 3px; }
.local-message img, .local-message video { border-radius: 14px; max-height: 330px; object-fit: contain; display: block; max-width: 100%; }
.local-message audio { width: min(340px, 70vw); display: block; margin-top: 6px; }
.local-message .file-message,
.local-message .link-preview {
    background: rgba(255, 255, 255, .32);
    border-color: rgba(15, 23, 42, .12);
}
.local-message.me .file-message,
.local-message.me .link-preview {
    background: rgba(255, 255, 255, .16);
    border-color: rgba(219, 234, 254, .25);
}
.local-message.me .file-message,
.local-message.me .link-preview,
.local-message.me .message-deleted,
.local-message.me .media-label,
.local-message.me a {
    color: inherit;
}
.media-label { display: block; font-weight: 850; margin-bottom: 4px; }
.message-caption { margin-top: 8px; font-weight: 750; line-height: 1.35; }
.message-caption-voice { margin-top: 8px; }
.message-deleted { color: rgba(63, 42, 0, .72); font-weight: 850; }
.local-message.is-deleted { opacity: .78; }
.message-content-row { display: flex; align-items: flex-start; gap: 10px; }
.message-share-button {
    flex: 0 0 auto;
    width: 38px;
    height: 38px;
    margin-top: 2px;
    border-radius: 999px;
    border: 2px solid rgba(15, 23, 42, .22);
    background: linear-gradient(180deg, #fff 0%, #e2e8f0 100%);
    color: #0f172a;
    font-size: 1.3rem;
    font-weight: 900;
    line-height: 1;
    box-shadow: 0 4px 10px rgba(15, 23, 42, .12);
    cursor: pointer;
}
.local-message:not(.me):not(.system) .message-share-button {
    background: linear-gradient(180deg, #fde68a 0%, #f59e0b 100%);
    color: #4a2f00;
    border-color: rgba(161, 98, 7, .45);
}
.local-message.me .message-share-button {
    background: linear-gradient(180deg, #dbeafe 0%, #93c5fd 100%);
    color: #0f172a;
    border-color: rgba(30, 64, 175, .32);
}
.message-share-button:hover, .message-share-button:focus-visible {
    transform: translateY(-1px);
    background: linear-gradient(180deg, #ffffff 0%, #cbd5e1 100%);
    border-color: rgba(22, 163, 74, .45);
}
.message-actions { display: flex; align-items: center; justify-content: flex-end; gap: 6px; margin-top: 8px; }
.message-actions button { border-radius: 999px; border: 1px solid rgba(15, 23, 42, .14); background: rgba(15, 23, 42, .06); color: inherit; font-weight: 850; cursor: pointer; }
.message-actions .message-action-icon { width: 34px; height: 34px; padding: 0; display: inline-grid; place-items: center; font-size: 1rem; line-height: 1; }
.message-actions button:hover, .message-actions button:focus-visible { background: rgba(22, 163, 74, .18); border-color: rgba(22, 163, 74, .45); }
.message-actions small { margin: 0; opacity: .6; font-size: .72rem; }
.file-message {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 14px;
    background: rgba(15, 23, 42, .08);
    color: inherit;
    font-weight: 850;
    text-decoration: none;
    max-width: min(360px, 70vw);
    overflow-wrap: anywhere;
}
.link-preview {
    display: grid;
    grid-template-columns: 78px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    width: min(360px, 72vw);
    margin-top: 9px;
    padding: 8px;
    border: 1px solid rgba(15, 23, 42, .12);
    border-radius: 15px;
    background: rgba(15, 23, 42, .06);
    color: inherit;
    text-decoration: none;
}
.link-preview-thumb {
    width: 78px;
    height: 50px;
    border-radius: 11px;
    object-fit: cover;
    background: rgba(15, 23, 42, .12);
}
.link-preview-thumb-fallback {
    display: inline-grid;
    place-items: center;
    font-size: 1.45rem;
}
.link-preview.has-preview-image .link-preview-thumb { background: rgba(15, 23, 42, .08); }
.link-preview span { min-width: 0; display: grid; gap: 3px; }
.link-preview strong,
.link-preview small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.link-preview strong { font-size: .92rem; }
.link-preview small { color: var(--muted); font-weight: 750; }
.composer {
    flex: 0 0 auto;
    display: grid;
    grid-template-columns: auto auto auto 1fr auto;
    gap: 8px;
    padding: 14px;
    border-top: 1px solid var(--border);
    background: var(--panel);
}
.composer button { padding: 12px 13px; white-space: nowrap; }
.composer button[data-dictate],
.composer button[data-record] {
    min-width: 46px;
    width: 46px;
    height: 46px;
    padding: 0;
    display: inline-grid;
    place-items: center;
    background: #16a34a;
    border-color: #16a34a;
    color: #fff;
    font-size: 1.1rem;
}

.pending-media {
    grid-column: 1 / -1;
}
.pending-media[hidden] { display: none; }
.pending-media-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--panel-soft);
}
.pending-media-card img,
.pending-media-card video {
    width: 58px;
    height: 58px;
    border-radius: 12px;
    object-fit: cover;
    background: rgba(15, 23, 42, .08);
}
.pending-media-icon {
    width: 58px;
    height: 58px;
    display: inline-grid;
    place-items: center;
    border-radius: 12px;
    background: rgba(15, 23, 42, .08);
    font-size: 1.5rem;
}
.pending-media-info {
    min-width: 0;
    display: grid;
    gap: 3px;
}
.pending-media-info span, .pending-media-info small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.pending-media-info small { color: var(--muted); font-weight: 750; }
.pending-media-actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: flex-end;
}
.pending-media-actions button { padding: 8px 10px; border-radius: 12px; }
.pending-media-voice {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px;
    align-items: center;
    margin-top: 4px;
}
.pending-media-voice span { grid-column: 1 / -1; font-weight: 850; }
.pending-media-voice audio { width: min(260px, 58vw); }

.composer input { border-radius: 999px; }

.composer-picker-row {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    position: relative;
    z-index: 20;
}
.composer-picker { min-width: 0; }
.composer-picker summary {
    cursor: pointer;
    list-style: none;
    padding: 9px 12px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--panel-soft);
    color: var(--text);
    font-weight: 900;
    text-align: center;
    user-select: none;
}
.composer-picker summary::-webkit-details-marker { display: none; }
.composer-picker summary > span[aria-hidden="true"] { font-size: 1.22rem; line-height: 1; }
.composer-picker-label { margin-left: 6px; }
.composer-picker[open] summary {
    border-color: rgba(34, 197, 94, .55);
    box-shadow: 0 0 0 3px rgba(34, 197, 94, .12);
}
.composer-picker-panel {
    position: absolute;
    left: 0;
    right: 0;
    bottom: calc(100% + 8px);
    display: grid;
    gap: 8px;
    max-height: min(48vh, 360px);
    overflow: auto;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--panel);
    box-shadow: 0 18px 40px rgba(0, 0, 0, .28);
}
.composer-picker-group {
    display: grid;
    gap: 7px;
    padding: 8px;
    border-radius: 14px;
    background: rgba(148, 163, 184, .08);
}
.composer-picker-group strong {
    font-size: .88rem;
    color: var(--muted);
}
.composer-picker-options {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(40px, 1fr));
    gap: 6px;
}
.composer-smiley-options { grid-template-columns: repeat(auto-fill, minmax(58px, 1fr)); }
.composer-picker-panel button {
    min-height: 40px;
    padding: 7px 8px;
    border-radius: 12px;
    background: rgba(34, 197, 94, .14);
    border-color: rgba(34, 197, 94, .38);
    color: var(--text);
    font-size: 1.08rem;
    line-height: 1;
}
.composer-picker-panel button:hover,
.composer-picker-panel button:focus-visible {
    background: #16a34a;
    border-color: #16a34a;
    color: #fff;
}
.composer-picker-panel-smilies button {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: .95rem;
    font-weight: 900;
}
.composer button.is-recording {
    background: #dc2626;
    border-color: #dc2626;
    color: #fff;
    box-shadow: 0 0 0 4px rgba(220, 38, 38, .18);
    animation: pulseRecord 1s infinite;
}
.composer button.is-dictating {
    background: #dc2626;
    border-color: #dc2626;
    color: #fff;
    box-shadow: 0 0 0 4px rgba(220, 38, 38, .18);
    animation: pulseRecord 1s infinite;
}
.composer-status {
    grid-column: 1 / -1;
    min-height: 20px;
    color: var(--muted);
    font-weight: 850;
    font-size: .92rem;
}
.composer-status[hidden] { display: none; }
.composer-status.is-recording { color: #fecaca; }
.composer-status.is-dictating { color: #bfdbfe; }
@keyframes pulseRecord {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.04); }
}

.profile-panel, .group-create-panel {
    padding: 18px;
    overflow-y: auto;
}
.panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}
.panel-head h2 { margin: 0; }
.panel-head button {
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--panel-soft);
    color: var(--text);
    width: 42px;
    height: 42px;
    font-size: 1.4rem;
}
.profile-form { display: grid; gap: 12px; }
.switch-line { display: flex; gap: 10px; align-items: center; color: var(--muted); font-weight: 700; }
.switch-line input { width: auto; }
.business-fields { display: grid; gap: 10px; }
.group-type-note { margin: -4px 0 0; color: var(--muted); font-size: .9rem; line-height: 1.35; }
.profile-form .danger-btn { background: var(--danger); }
.group-privacy { display: grid; gap: 8px; }
.group-privacy small { display: block; color: var(--muted); font-weight: 600; }

.site-footer {
    border-top: 1px solid var(--border);
    padding: 24px 0;
    color: var(--muted);
    background: var(--panel);
}

.composer.is-disabled {
    opacity: .58;
}
.composer.is-disabled input {
    cursor: not-allowed;
}
.footer-lines {
    display: grid;
    gap: 10px;
    justify-items: center;
    text-align: center;
}
.footer-lines p { margin: 0; }
.footer-nav {
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: center;
    gap: clamp(10px, 2vw, 22px);
    width: 100%;
    font-size: clamp(.85rem, 1.8vw, 1rem);
}
.footer-copy {
    font-size: clamp(.95rem, 1.9vw, 1.08rem);
    font-weight: 700;
}

.impressum-modal[hidden] { display: none; }
.impressum-modal {
    position: fixed;
    inset: 0;
    z-index: 120;
    display: grid;
    place-items: center;
    padding: 18px;
    background: rgba(15, 23, 42, .52);
}
.impressum-modal-card {
    width: min(720px, 100%);
    max-height: min(82vh, 760px);
    overflow-y: auto;
    padding: 26px;
    display: grid;
    gap: 22px;
}
.impressum-modal-content h1 {
    margin: 0 0 14px;
}
.impressum-modal-content h2 {
    margin: 20px 0 8px;
    font-size: 1.12rem;
}
.impressum-modal-content p {
    margin: 0;
    line-height: 1.6;
}
.impressum-close-btn {
    justify-self: start;
    border: 0;
    border-radius: 14px;
    padding: 12px 18px;
    background: var(--brand);
    color: #fff;
    font-weight: 900;
    cursor: pointer;
}

.datenschutz-modal[hidden] { display: none; }
.datenschutz-modal {
    position: fixed;
    inset: 0;
    z-index: 1450;
    display: grid;
    place-items: center;
    padding: 18px;
    background: rgba(15, 23, 42, .58);
}
.datenschutz-modal-card {
    width: min(780px, 100%);
    max-height: min(84vh, 780px);
    overflow-y: auto;
    padding: 26px;
    display: grid;
    gap: 28px;
}
.datenschutz-modal-content h1 {
    margin: 0 0 14px;
}
.datenschutz-modal-content h2 {
    margin: 20px 0 8px;
    font-size: 1.12rem;
}
.datenschutz-modal-content p {
    margin: 0;
    line-height: 1.6;
}
.datenschutz-close-btn {
    justify-self: start;
    margin-top: 8px;
    border: 0;
    border-radius: 14px;
    padding: 12px 18px;
    background: var(--brand);
    color: #fff;
    font-weight: 900;
    cursor: pointer;
}

.agb-modal[hidden] { display: none; }
.agb-modal {
    position: fixed;
    inset: 0;
    z-index: 1450;
    display: grid;
    place-items: center;
    padding: 18px;
    background: rgba(15, 23, 42, .58);
}
.agb-modal-card {
    width: min(780px, 100%);
    max-height: min(84vh, 780px);
    overflow-y: auto;
    padding: 26px;
    display: grid;
    gap: 28px;
}
.agb-modal-content h1 {
    margin: 0 0 14px;
}
.agb-modal-content h2 {
    margin: 20px 0 8px;
    font-size: 1.12rem;
}
.agb-modal-content p {
    margin: 0;
    line-height: 1.6;
}
.agb-close-btn {
    justify-self: start;
    margin-top: 8px;
    border: 0;
    border-radius: 14px;
    padding: 12px 18px;
    background: var(--brand);
    color: #fff;
    font-weight: 900;
    cursor: pointer;
}

.back-link {
    display: inline-block;
    margin: 20px 0;
    color: var(--muted);
    text-decoration: none;
    font-weight: 750;
}

@media (max-width: 1120px) {
    .messenger-app { grid-template-columns: 310px 1fr; }
    .profile-panel, .group-create-panel {
        position: fixed;
        inset: 100px 14px 20px auto;
        width: min(380px, calc(100vw - 28px));
        z-index: 60;
    }
}
@media (max-width: 820px) {
    .header-inner { min-height: 66px; align-items: stretch; padding: 8px 0; }
    .header-logo { display: none; }
    body.no-home-tiles .header-logo { display: flex; }
    body.no-home-tiles .header-inner { justify-content: center; align-items: center; }
    body.no-home-tiles .header-logo img { width: min(180px, 54vw); }
    body.is-logged-in .header-inner {
        width: calc(100% - 12px);
        min-height: 74px;
        gap: 8px;
        padding: 7px 0;
        align-items: center;
    }
    body.is-logged-in .header-logo img { width: clamp(68px, 20vw, 112px); }
    body.is-logged-in .header-login-ad {
        flex: 1 1 auto;
        max-width: calc(100vw - 108px);
    }
    body.is-logged-in .header-login-ad-frame { border-radius: 10px; }
    .tile-navigation { width: 100%; }
    .landing-mobile-logo { display: flex; padding: 18px 0 8px; }
    .landing-mobile-logo img { width: min(210px, 58vw); }
    .top-ad-banner { width: min(100%, 640px); margin: 8px auto 18px; }
    .start-hero-image { gap: 10px; }
    .start-image-title { font-size: clamp(1.45rem, 7vw, 2.2rem); line-height: 1.12; }
    .top-ad-banner img { border-radius: 14px; }
    .auth-grid {
        grid-template-columns: 1fr;
        grid-template-areas:
            "login"
            "register"
            "auth-banner";
    }
    .grid-2 { grid-template-columns: 1fr; }
    .wide { grid-column: auto; }
    .messenger-app { grid-template-columns: 1fr; min-height: auto; }
    .messenger-sidebar { order: 1; }
    .chat-window { order: 2; min-height: 68vh; }

    .chat-window.is-group-active .chat-top {
        align-items: flex-start;
        justify-content: flex-end;
    }
    .chat-window.is-group-active .chat-top > div:first-child {
        display: none;
    }
    .chat-window.is-group-active .chat-actions {
        flex: 0 0 auto;
        flex-wrap: nowrap;
        margin-left: auto;
    }
    .chat-window.is-group-active .chat-actions > button:not([data-group-favorite-toggle]):not([data-mobile-group-info]):not([data-close-active-conversation]) {
        display: none !important;
    }
    .chat-window.is-group-active .mobile-group-info-btn:not([hidden]) {
        display: inline-grid !important;
        width: auto;
        min-width: 58px;
        padding: 0 10px;
        font-size: .82rem;
    }
    .chat-window.is-group-active .close-conversation-btn:not([hidden]) {
        display: inline-grid !important;
    }
    .mobile-group-menu {
        top: 74px;
        left: 10px;
        right: 10px;
    }
    .mobile-group-menu-card {
        width: 100%;
        max-height: min(62vh, 470px);
        overflow-y: auto;
    }

    .open-conversations { width: min(728px, calc(100% - 28px)); }
    .open-conversations > strong { white-space: normal; }
    .profile-panel, .group-create-panel { inset: 88px 10px 16px 10px; width: auto; }
    .composer { grid-template-columns: auto auto auto minmax(0, 1fr) auto; overflow: visible; }
    .composer-picker-panel { max-height: min(46vh, 330px); }
    .composer-status { min-width: 100%; }
    .public-card { grid-template-columns: 1fr; text-align: center; justify-items: center; align-items: start; }
    .public-card-actions,
    .public-actions {
        align-items: center;
        text-align: center;
    }
    .public-card > div,
    .public-info-block,
    .newsletter-public,
    .public-profile-facts { width: 100%; max-width: 640px; }
    .public-profile-facts { justify-content: center; }
}
@media (max-width: 520px) {
    .container { width: min(100% - 18px, 1080px); }
    .hero-simple { gap: 14px; margin-bottom: 22px; }
    .hero-simple h1 { font-size: 1.42rem; letter-spacing: -0.02em; line-height: 1.16; }
    .hero-simple p { font-size: .98rem; max-width: 100%; }
    .hero-devices { gap: 5px; }
    .top-ad-banner { width: 100%; margin: 6px auto 16px; }
    .start-hero-image { gap: 10px; }
    .auth-banner-under { width: 100%; margin-top: 8px; }
    .auth-banner-under { overflow: hidden; }
    .ad-responsive-frame { max-width: calc(100vw - 16px); }
    .auth-card { padding: 18px; border-radius: 20px; }
    .login-systems-logo { width: min(100%, 150px); }
    .footer-nav {
        gap: 8px;
        font-size: .8rem;
    }
    .app-download { padding: 14px 18px; }
    .landing-actions { gap: 10px; }
    .home-info-button, .app-download { min-width: min(320px, 100%); }
    .home-info-grid { grid-template-columns: 1fr; }
    .home-info-modal { padding: 10px; align-items: stretch; }
    .home-info-card { max-height: calc(100vh - 20px); }
    .tile-navigation { gap: 5px; }
    .tile-scroll-arrow {
        flex-basis: 34px;
        width: 34px;
        min-width: 34px;
        height: 44px;
        min-height: 44px;
        border-radius: 12px;
        font-size: 1.45rem;
    }
    .tile-btn { min-width: 52px; padding: 8px 10px; }
    .tile-btn strong { display: none; }
    .tile-btn span { font-size: 1.05rem; }
    .messenger-app { width: calc(100% - 8px); margin-top: 8px; }
    .local-message { max-width: 88%; }
    .composer {
        grid-template-columns: repeat(5, minmax(0, 1fr));
        grid-template-areas:
            "pending pending pending pending pending"
            "message message message message send"
            "attach dictate record emoji smiley"
            "status status status status status";
        align-items: stretch;
        gap: 5px;
        padding: 8px;
        overflow: visible;
        position: relative;
    }

    .chat-window.is-group-active .chat-top {
        padding: 12px 12px;
        gap: 8px;
    }
    .chat-window.is-group-active .chat-actions {
        gap: 6px;
    }
    .chat-window.is-group-active .mobile-group-info-btn:not([hidden]) {
        min-width: 48px;
        height: 44px;
        border-radius: 16px;
        font-size: 1.35rem;
    }
    .chat-window.is-group-active .group-favorite-btn:not([hidden]),
    .chat-window.is-group-active .close-conversation-btn:not([hidden]) {
        width: 44px;
        height: 44px;
        border-radius: 16px;
    }
    .mobile-group-menu {
        top: 64px;
        left: 8px;
        right: 8px;
    }
    .mobile-group-menu-card {
        padding: 12px;
        border-radius: 20px;
    }
    .mobile-group-menu-actions {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }
    .mobile-group-menu-actions button {
        min-height: 68px;
        border-radius: 16px;
    }
    .poll-options-grid {
        grid-template-columns: 1fr;
    }

    .pending-media { grid-area: pending; }
    .pending-media-card { grid-template-columns: auto minmax(0, 1fr); }
    .pending-media-actions { grid-column: 1 / -1; justify-content: stretch; }
    .pending-media-actions button { flex: 1 1 auto; }
    .pending-media-info small { white-space: normal; }
    .composer [data-image-pick] { grid-area: attach; }
    .composer [data-dictate] { grid-area: dictate; }
    .composer [data-record] { grid-area: record; }
    .composer [data-chat-input] { grid-area: message; }

.composer input[data-image-input] {
    position: fixed;
    left: -9999px;
    top: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
    overflow: hidden;
}
    .composer [data-send-message] {
        grid-area: send;
        min-width: 0;
        font-size: .88rem;
        line-height: 1.05;
        padding-inline: 5px;
    }
    .composer input { min-width: 0; padding-inline: 12px; }
    .composer button {
        min-height: 46px;
        padding-inline: 8px;
        width: 100%;
    }
    .composer button[data-dictate],
    .composer button[data-record] {
        width: 100%;
        min-width: 0;
        height: 46px;
    }
    .composer-picker-row { display: contents; }
    .composer-picker-row .composer-picker:first-child { grid-area: emoji; }
    .composer-picker-row .composer-picker:last-child { grid-area: smiley; }
    .composer-picker-label { display: none; }
    .composer-picker summary {
        min-height: 46px;
        padding: 8px 6px;
        display: flex;
        align-items: center;
        justify-content: center;
        line-height: 1.1;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .composer-picker-panel {
        position: fixed;
        left: max(8px, env(safe-area-inset-left));
        right: max(8px, env(safe-area-inset-right));
        bottom: calc(104px + env(safe-area-inset-bottom));
        max-height: min(50vh, 340px);
        padding: 8px;
        z-index: 1000;
    }
    .composer-picker-options { grid-template-columns: repeat(auto-fill, minmax(38px, 1fr)); }
    .composer-smiley-options { grid-template-columns: repeat(auto-fill, minmax(54px, 1fr)); }
    .composer .composer-picker-panel button {
        width: auto;
        min-height: 40px;
        padding: 7px 8px;
    }
    .composer-status { grid-area: status; grid-column: auto; }
}
@media (max-width: 360px) {
    .composer [data-send-message] { font-size: .78rem; }
    .link-preview { grid-template-columns: 62px minmax(0, 1fr); width: min(320px, 76vw); }
    .link-preview-thumb { width: 62px; height: 42px; }
}

.group-privacy {
    display: grid;
    gap: 8px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--panel-soft);
}
.group-privacy .switch-line {
    align-items: flex-start;
}
.group-privacy small {
    display: block;
    font-weight: 600;
    color: var(--muted);
    margin-left: 4px;
}

.group-settings-symbol-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 2px 0;
}
.clean-chat-btn {
    border-color: var(--danger);
}
.clean-chat-btn:hover, .clean-chat-btn:focus-visible {
    background: var(--danger);
    color: #fff;
}

.image-setting {
    display: grid;
    justify-items: center;
    gap: 10px;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--panel-soft);
}
.image-setting-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}
.file-btn, .secondary-btn, .crop-actions button {
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--panel);
    color: var(--text);
    padding: 10px 12px;
    font-weight: 850;
    cursor: pointer;
}
.profile-form .secondary-btn,
.crop-actions .secondary-btn {
    background: var(--panel-soft);
    color: var(--text);
    border: 1px solid var(--border);
}
.profile-form .blocklist-btn {
    background: var(--danger);
    border-color: var(--danger);
    color: #fff;
}
.profile-form .blocklist-btn:hover,
.profile-form .blocklist-btn:focus-visible {
    background: #b91c1c;
    border-color: #b91c1c;
    color: #fff;
}
.crop-modal {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: grid;
    place-items: center;
    padding: 16px;
    background: rgba(2, 6, 23, .72);
    backdrop-filter: blur(8px);
}
.crop-card {
    width: min(430px, 100%);
    padding: 18px;
    display: grid;
    gap: 12px;
}
.crop-canvas {
    width: min(320px, 100%);
    aspect-ratio: 1 / 1;
    margin: 0 auto;
    display: block;
    border-radius: 22px;
    border: 1px solid var(--border);
    cursor: grab;
    touch-action: none;
    background: #0b1322;
}
.crop-canvas:active { cursor: grabbing; }
.zoom-control {
    display: grid;
    gap: 8px;
    font-weight: 800;
    color: var(--muted);
}
.zoom-control input { padding: 0; }
.crop-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.crop-actions button:last-child {
    background: var(--brand);
    color: #fff;
    border-color: var(--brand);
}

/* Aktiver Chat und Offene-Chats-Übersicht getrennt anzeigen */
.chat-messages[hidden] { display: none; }
.composer.is-disabled { display: none; }
[data-open-chat-overview] { font-weight: 900; }

.group-invite-box {
    display: grid;
    gap: 8px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--panel-soft);
}
.group-invite-box label {
    font-weight: 850;
    color: var(--muted);
}
.group-invite-copy {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
}
.group-invite-copy input {
    min-width: 0;
}
.close-conversation-btn {
    font-size: 1.55rem;
    font-weight: 900;
}
@media (max-width: 520px) {
    .group-invite-copy {
        grid-template-columns: 1fr;
    }
}

.search-action-btn {
    border: 0;
    border-radius: 16px;
    padding: 12px 16px;
    background: var(--brand);
    color: #fff;
    font-weight: 850;
    cursor: pointer;
}

.group-search-modal[hidden] { display: none; }
.group-search-modal {
    position: fixed;
    inset: 0;
    z-index: 1100;
    display: grid;
    place-items: center;
    padding: 18px;
    background: rgba(2, 6, 23, .58);
}
.group-search-card {
    width: min(760px, 100%);
    max-height: min(78vh, 760px);
    overflow-y: auto;
    padding: 20px;
}
.group-search-results {
    display: grid;
    gap: 10px;
    margin-top: 12px;
}
.group-search-result,
.profile-search-result {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--panel-soft);
}
.group-search-result > span,
.profile-search-result > span { min-width: 0; }
.group-search-result strong,
.group-search-result small,
.profile-search-result strong,
.profile-search-result small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.group-search-result small,
.profile-search-result small {
    color: var(--muted);
    margin-top: 3px;
}
.group-search-result button,
.profile-search-result button,
.search-action-btn {
    white-space: nowrap;
}
.group-search-result button:disabled,
.profile-search-result button:disabled {
    background: var(--muted);
    cursor: not-allowed;
}
.join-request-chip {
    grid-template-columns: minmax(0, 1fr) auto auto;
    background: rgba(22, 163, 74, .16);
    border-color: rgba(22, 163, 74, .45);
}
.join-request-chip [data-show-join-request] {
    font-weight: 900;
}
.join-request-approve,
.join-request-decline {
    width: auto !important;
    height: auto !important;
    border-radius: 999px !important;
    padding: 8px 10px !important;
    font-size: .82rem !important;
    color: #fff !important;
}
.join-request-approve { background: var(--brand) !important; }
.join-request-decline { background: var(--danger) !important; }
.group-join-requests {
    display: grid;
    gap: 10px;
    padding: 12px;
    border: 1px solid rgba(22, 163, 74, .42);
    border-radius: 16px;
    background: rgba(22, 163, 74, .10);
}
.group-join-requests[hidden] { display: none; }
.group-join-requests > strong {
    color: var(--brand);
}
.group-join-request-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 8px;
    align-items: center;
    padding: 8px;
    border-radius: 14px;
    background: var(--panel-soft);
}
.group-join-request-item span {
    min-width: 0;
    overflow-wrap: anywhere;
}
.group-join-request-item button {
    padding: 8px 10px;
    border-radius: 12px;
}
.group-join-request-item .danger-btn {
    background: var(--danger);
}

@media (max-width: 620px) {
    .group-search-result,
    .group-join-request-item,
    .join-request-chip {
        grid-template-columns: 1fr;
        justify-items: stretch;
    }
    .group-search-result .profile-photo {
        justify-self: center;
    }
    .join-request-approve,
    .join-request-decline {
        width: 100% !important;
    }
}

.profile-question-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.profile-question-grid label {
    display: grid;
    gap: 6px;
    color: var(--muted);
    font-weight: 800;
}
.plain-avatar-btn,
.profile-name-btn,
.favorite-user-open,
.message-author-name,
.chip-avatar-btn {
    border: 0;
    background: transparent;
    color: inherit;
    padding: 0;
    font: inherit;
    cursor: pointer;
    text-align: left;
}
.plain-avatar-btn,
.chip-avatar-btn {
    display: inline-grid;
    place-items: center;
}
.profile-name-btn strong,
.message-author-name {
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}
.search-result-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}
.favorite-user-item {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
}
.favorite-user-open span,
.favorite-user-open strong,
.favorite-user-open small {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.profile-photo.small { width: 42px; height: 42px; }
.profile-photo.tiny { width: 34px; height: 34px; }
.private-message-chip {
    grid-template-columns: auto minmax(0, 1fr) auto auto;
}
.private-message-chip [data-switch-private-conversation] {
    border: 0;
    background: transparent;
    color: inherit;
    padding: 6px 2px;
    font: inherit;
    text-align: left;
    min-width: 0;
    cursor: pointer;
}
.private-message-chip [data-switch-private-conversation] strong,
.private-message-chip [data-switch-private-conversation] small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.private-message-chip [data-switch-private-conversation] small {
    color: var(--muted);
    font-size: .78rem;
    font-weight: 750;
    margin-top: 2px;
}
.private-message-chip [data-block-user],
.private-message-chip [data-close-private-conversation] {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid var(--border);
    padding: 0;
    cursor: pointer;
    display: inline-grid;
    place-items: center;
    line-height: 1;
}
.private-message-chip [data-block-user] {
    background: rgba(239, 68, 68, .10);
    color: var(--danger);
}
.private-message-chip [data-close-private-conversation] {
    background: rgba(148, 163, 184, .14);
    color: var(--text);
    font-size: 1rem;
}
.message-author {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}
.message-author small {
    margin-left: auto;
    margin-bottom: 0;
}
.message-content { min-width: 0; flex: 1 1 auto; }
.profile-detail-modal[hidden] { display: none; }
.profile-detail-modal {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: grid;
    place-items: center;
    padding: 18px;
    background: rgba(2, 6, 23, .58);
}

[data-group-poll-modal] {
    z-index: 2147483002 !important;
}
.profile-detail-card {
    width: min(640px, 100%);
    max-height: min(82vh, 780px);
    overflow-y: auto;
    padding: 20px;
}
.profile-detail-content,
.blocklist-results {
    display: grid;
    gap: 12px;
}
.profile-detail-head {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 14px;
    align-items: center;
}
.profile-detail-head h3 { margin: 0; }
.profile-detail-name {
    display: grid;
    justify-items: center;
    text-align: center;
}
.profile-detail-name p { margin: 4px 0 0; color: var(--muted); }
.profile-current-status {
    display: block;
    margin-top: 6px;
    color: var(--text);
    font-weight: 750;
    white-space: normal;
    text-align: center;
}
.search-profile-status {
    display: block;
    margin-top: 3px;
    color: var(--text);
    font-weight: 650;
    white-space: normal;
    overflow: hidden;
    text-overflow: ellipsis;
}
.profile-detail-section {
    display: grid;
    gap: 6px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--panel-soft);
}
.profile-detail-section span { display: block; }
.profile-detail-business-card {
    gap: 10px;
}
.profile-detail-business-card .business-public-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
.profile-detail-business-card .business-public-row {
    background: var(--panel);
}
.profile-detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.profile-detail-actions button,
.blocklist-item button {
    border: 0;
    border-radius: 14px;
    padding: 10px 14px;
    font-weight: 850;
    cursor: pointer;
    background: var(--brand);
    color: #fff;
}
.profile-detail-actions .danger-btn,
.blocklist-item button {
    background: var(--danger);
}
.blocklist-item {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--panel-soft);
}
.blocklist-item strong,
.blocklist-item small { display: block; }
.blocklist-item small { color: var(--muted); }
@media (max-width: 520px) {
    .profile-question-grid { grid-template-columns: 1fr; }
    .group-search-result,
.profile-search-result { grid-template-columns: auto minmax(0, 1fr); }
    .search-result-actions { grid-column: 1 / -1; justify-content: stretch; }
    .search-result-actions button { flex: 1; }
    .blocklist-item { grid-template-columns: auto minmax(0, 1fr); }
    .blocklist-item button { grid-column: 1 / -1; }
}

@media (display-mode: standalone) {
    .tile-navigation { gap: 5px; }
    .tile-scroll-arrow {
        flex-basis: 34px;
        width: 34px;
        min-width: 34px;
        height: 44px;
        min-height: 44px;
        border-radius: 12px;
        font-size: 1.45rem;
    }
    .tile-btn { min-width: 52px; padding: 8px 10px; }
    .tile-btn strong { display: none; }
    .tile-btn span { font-size: 1.05rem; }
}

/* Mini-Fix: Suchergebnisse/Freunde sauber und kompakt, ohne Layout-Verschiebung */
.search-result-actions {
    display: inline-flex;
    flex-wrap: nowrap;
    gap: 6px;
    justify-content: flex-end;
    align-items: center;
}
.search-result-actions button,
.favorite-user-actions button {
    padding: 7px 9px;
    border-radius: 10px;
    font-size: .82rem;
    line-height: 1.05;
    white-space: nowrap;
}
.favorite-user-item {
    grid-template-columns: auto minmax(0, 1fr) auto;
}
.favorite-user-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.favorite-user-actions {
    display: inline-flex;
    gap: 5px;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: nowrap;
}
.captcha-read-icon {
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    padding: 0 !important;
    width: auto !important;
    height: auto !important;
    min-width: 0 !important;
    min-height: 0 !important;
    font-size: .95rem;
    line-height: 1;
}
@media (max-width: 520px) {
    .search-result-actions,
    .favorite-user-actions {
        gap: 4px;
    }
    .search-result-actions button,
    .favorite-user-actions button {
        padding: 6px 7px;
        font-size: .78rem;
    }
}

/* Mini-Fix v6: linke Profil-/Freundekarten kompakt halten, Buttons unter dem Namen */
.search-result:has(> .search-result-actions) {
    grid-template-columns: auto minmax(0, 1fr);
    column-gap: 8px;
    row-gap: 2px;
    align-items: center;
}
.search-result:has(> .search-result-actions) > .plain-avatar-btn {
    grid-column: 1;
    grid-row: 1 / 3;
    align-self: center;
}
.search-result:has(> .search-result-actions) > span {
    grid-column: 2;
    grid-row: 1;
    min-width: 0;
    align-self: end;
}
.search-result:has(> .search-result-actions) > .search-result-actions {
    grid-column: 2;
    grid-row: 2;
    justify-content: flex-start;
    align-self: start;
    margin-top: 0;
}
.search-result-actions {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 5px;
    align-items: center;
}
.search-result-actions button,
.favorite-user-actions button {
    padding: 6px 8px;
    border-radius: 10px;
    font-size: .8rem;
    line-height: 1.05;
    white-space: nowrap;
}
.favorite-user-item {
    grid-template-columns: auto minmax(0, 1fr);
    column-gap: 8px;
    row-gap: 2px;
    align-items: center;
}
.favorite-user-item > .plain-avatar-btn {
    grid-column: 1;
    grid-row: 1 / 3;
    align-self: center;
}
.favorite-user-name {
    grid-column: 2;
    grid-row: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    align-self: end;
}
.favorite-user-actions {
    grid-column: 2;
    grid-row: 2;
    display: inline-flex;
    gap: 5px;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: wrap;
    align-self: start;
    margin-top: 0;
}

/* Profilfenster: Name und Status direkt neben dem Bild */
.profile-detail-head {
    grid-template-columns: auto minmax(0, max-content);
    justify-content: start;
    gap: 12px;
}
.profile-detail-name {
    justify-items: start;
    text-align: left;
    align-content: center;
}
.profile-current-status {
    text-align: left;
    margin-top: 4px;
}

.group-members-panel-content,
.group-members-list {
    display: grid;
    gap: 10px;
}
.group-member-item {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--panel-soft);
    cursor: pointer;
}
.group-member-item.is-selected {
    border-color: var(--brand);
    box-shadow: 0 0 0 2px rgba(32, 201, 95, .22);
}
.group-member-item:focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 2px;
}
.group-member-name {
    min-width: 0;
}
.group-member-name strong,
.group-member-name small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.group-member-name small {
    margin-top: 2px;
    color: var(--muted);
}
.group-member-actions {
    grid-column: 2;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}
.group-member-actions button,
.group-member-role-select,
.group-member-mute-select,
.group-member-role-badge {
    width: auto;
    border-radius: 12px;
    padding: 8px 10px;
    font-weight: 800;
    font-size: .88rem;
}
.group-member-actions button {
    border: 0;
    background: var(--brand);
    color: #fff;
}
.group-member-actions .danger-btn {
    background: var(--danger);
}
.group-member-actions .secondary-btn,
.group-member-role-badge {
    border: 1px solid var(--border);
    background: var(--panel);
    color: var(--text);
}
.group-member-role-select,
.group-member-mute-select {
    min-width: 118px;
    max-width: 160px;
}
.group-member-muted {
    color: var(--danger) !important;
    font-weight: 800;
}
.group-member-bottom-actions {
    display: grid;
    gap: 8px;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--panel);
}
.group-member-bottom-actions[hidden] {
    display: none;
}
.group-member-bottom-actions small {
    color: var(--muted);
    font-weight: 800;
}
.group-member-action-buttons {
    display: flex;
    gap: 8px;
    align-items: center;
}
.group-member-action-buttons button {
    flex: 1;
    min-height: 40px;
    border: 0;
    border-radius: 14px;
    color: #fff;
    font-size: 1.05rem;
    font-weight: 900;
}
.group-member-action-buttons .secondary-btn {
    background: var(--panel-soft);
    border: 1px solid var(--border);
    color: var(--text);
}
.group-member-action-buttons .danger-btn {
    background: var(--danger);
}
.group-member-action-buttons button:disabled {
    opacity: .45;
    cursor: not-allowed;
}
@media (max-width: 620px) {
    .group-member-item {
        grid-template-columns: auto minmax(0, 1fr);
    }
    .group-member-actions {
        grid-column: 1 / -1;
    }
}
.newsletter-public {
    margin: 14px 0;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--panel-soft);
    display: grid;
    gap: 10px;
    max-width: 640px;
}
.newsletter-public h2 {
    margin: 0;
    font-size: 1.05rem;
}
.newsletter-public p {
    margin: 0;
    color: var(--muted);
    font-weight: 650;
    line-height: 1.35;
}
.newsletter-public-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
}
.newsletter-public-form button {
    border: 0;
    border-radius: 16px;
    padding: 13px 16px;
    background: var(--danger);
    color: #fff;
    font-weight: 850;
    cursor: not-allowed;
}
.newsletter-public-form button.is-ready {
    background: var(--brand);
    cursor: pointer;
}
.newsletter-public-form button:disabled {
    opacity: 1;
}

.newsletter-public-fields {
    display: grid;
    gap: 8px;
    min-width: 0;
}
.newsletter-public-check {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 10px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: rgba(255,255,255,.04);
    font-weight: 750;
    line-height: 1.3;
}
.newsletter-public-check input {
    width: 20px;
    height: 20px;
    flex: 0 0 auto;
}
.newsletter-public-check a {
    color: var(--brand-strong);
    text-decoration: underline;
}
.public-profile-memberships {
    display: grid;
    gap: 10px;
}
.public-memberships-note {
    margin: 0;
    color: var(--muted);
    font-weight: 700;
}
.public-membership-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 10px;
}
.public-membership-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: rgba(255,255,255,.045);
}
.public-membership-icon {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: var(--panel-soft);
    font-size: 1.35rem;
    flex: 0 0 auto;
}
.public-membership-text {
    min-width: 0;
    display: grid;
    gap: 2px;
}
.public-membership-text strong,
.public-membership-text small {
    overflow-wrap: anywhere;
}
.public-membership-text small {
    color: var(--muted);
    font-weight: 700;
}
.newsletter-info-modal[hidden] { display: none; }
.newsletter-info-modal {
    position: fixed;
    inset: 0;
    z-index: 1300;
    display: grid;
    place-items: center;
    padding: 18px;
    background: rgba(2, 6, 23, .58);
}
.newsletter-info-card {
    width: min(460px, 100%);
    padding: 24px;
    text-align: center;
    box-shadow: 0 24px 70px rgba(0,0,0,.38);
}
.newsletter-info-card h2 {
    margin: 0 0 10px;
    color: var(--brand);
}
.newsletter-info-card p {
    margin: 0 0 10px;
    color: var(--muted);
    font-weight: 700;
    line-height: 1.45;
}
@media (max-width: 620px) {
    .newsletter-public-form { grid-template-columns: 1fr; }
    .public-info-block,
    .newsletter-public { padding: 12px; border-radius: 16px; }
    .public-profile-facts { justify-content: stretch; }
    .public-profile-facts > span { width: 100%; justify-content: center; }
}

/* Kontaktformular 1A-Life */
.contact-modal[hidden],
.contact-info-modal[hidden] { display: none; }
.contact-modal,
.contact-info-modal {
    position: fixed;
    inset: 0;
    z-index: 1400;
    display: grid;
    place-items: center;
    padding: 18px;
    background: rgba(2, 6, 23, .62);
}
.contact-card {
    width: min(640px, 100%);
    max-height: min(86vh, 780px);
    overflow-y: auto;
    padding: 18px;
}
.contact-head { margin-bottom: 10px; }
.contact-logo-row {
    text-align: center;
    margin: 2px 0 12px;
}
.contact-logo {
    max-width: 220px;
    width: 100%;
    height: auto;
}
.contact-intro {
    text-align: center;
    color: var(--muted);
    font-weight: 700;
    line-height: 1.45;
    margin-bottom: 14px;
}
.contact-intro p { margin: 0 0 8px; }
.contact-whatsapp {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}
.contact-whatsapp img {
    width: 28px;
    height: 28px;
    object-fit: contain;
}
.contact-form {
    display: grid;
    gap: 10px;
}
.contact-form textarea { min-height: 120px; }
.contact-privacy {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-weight: 750;
}
.contact-privacy input { width: auto; }
.contact-privacy a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 3px;
}
.contact-submit {
    border: 0;
    border-radius: 16px;
    padding: 13px 16px;
    background: var(--danger);
    color: #fff;
    font-weight: 850;
    cursor: not-allowed;
}
.contact-submit.is-ready {
    background: var(--brand);
    cursor: pointer;
}
.contact-submit:disabled { opacity: 1; }
.contact-info-card {
    width: min(440px, 100%);
    padding: 24px;
    text-align: center;
    box-shadow: 0 24px 70px rgba(0,0,0,.38);
}
.contact-info-card h2 {
    margin: 0 0 10px;
    color: var(--brand);
}
.contact-info-card p {
    margin: 0;
    color: var(--muted);
    font-weight: 750;
    line-height: 1.45;
}

/* Kontaktfenster: nur als mittiges Overlay, keine riesige Seitenansicht */
[data-contact-modal][hidden],
[data-contact-info-modal][hidden] { display: none !important; }
[data-contact-modal],
[data-contact-info-modal] {
    position: fixed;
    inset: 0;
    z-index: 1400;
    display: grid;
    place-items: center;
    padding: 18px;
    background: rgba(2, 6, 23, .62);
}
[data-contact-modal] .contact-card {
    width: min(640px, calc(100vw - 36px));
    max-height: min(86vh, 780px);
    overflow-y: auto;
    padding: 18px;
}
[data-contact-modal] .contact-logo-row {
    text-align: center;
    margin: 2px 0 12px;
}
[data-contact-modal] .contact-logo {
    display: inline-block;
    max-width: 220px;
    width: 100%;
    height: auto;
}
[data-contact-modal] .contact-whatsapp img {
    width: 28px;
    height: 28px;
    object-fit: contain;
}
[data-contact-modal] .contact-form {
    display: grid;
    gap: 10px;
}
[data-contact-modal] .contact-submit {
    border: 0;
    border-radius: 16px;
    padding: 13px 16px;
    background: var(--danger);
    color: #fff;
    font-weight: 850;
    cursor: not-allowed;
}
[data-contact-modal] .contact-submit.is-ready {
    background: var(--brand);
    cursor: pointer;
}
[data-contact-modal] .contact-submit:disabled { opacity: 1; }
[data-contact-info-modal] .contact-info-card {
    width: min(440px, calc(100vw - 36px));
    padding: 24px;
    text-align: center;
}

/* Rechtliche Cookies: fest unten rechts, ohne Layout zu verschieben */
.cookie-consent[hidden] { display: none !important; }
.cookie-consent {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 1500;
    width: min(360px, calc(100vw - 36px));
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--panel);
    color: var(--text);
    box-shadow: 0 20px 55px rgba(0, 0, 0, .35);
}
.cookie-consent__text {
    display: grid;
    gap: 5px;
    margin-bottom: 12px;
}
.cookie-consent__text strong {
    font-size: 1rem;
    color: var(--text);
}
.cookie-consent__text span {
    color: var(--muted);
    font-size: .92rem;
    line-height: 1.4;
    font-weight: 650;
}
.cookie-consent button {
    width: 100%;
    border: 0;
    border-radius: 14px;
    padding: 11px 14px;
    background: var(--brand);
    color: #fff;
    font-weight: 850;
    cursor: pointer;
}
body:not(.dark) .cookie-consent {
    background: #fff;
    color: #0f172a;
    border-color: #d7dee8;
    box-shadow: 0 18px 45px rgba(15, 23, 42, .18);
}
body:not(.dark) .cookie-consent__text strong { color: #0f172a; }
body:not(.dark) .cookie-consent__text span { color: #475569; }
@media (max-width: 520px) {
    .cookie-consent {
        right: 12px;
        bottom: 12px;
        width: calc(100vw - 24px);
    }
}

/* PWA Installationsseite */
.app-page {
    padding-top: 34px;
    padding-bottom: 42px;
}
.app-install-card {
    display: grid;
    gap: 18px;
    padding: 28px;
    max-width: 920px;
    margin: 0 auto;
}
.app-install-head {
    display: grid;
    grid-template-columns: 160px minmax(0, 1fr);
    gap: 22px;
    align-items: center;
}
.app-install-head img {
    width: 160px;
    max-width: 100%;
    height: auto;
    object-fit: contain;
}
.app-install-head h1 {
    margin: 4px 0 8px;
    font-size: clamp(1.8rem, 4vw, 3rem);
    line-height: 1.05;
}
.app-install-head p {
    margin: 0;
    color: var(--muted);
    font-weight: 800;
}
.pwa-install-btn {
    width: fit-content;
    min-width: min(100%, 260px);
}
.pwa-info-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}
.pwa-info-grid article {
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--panel-soft);
}
.pwa-info-grid strong {
    display: block;
    margin-bottom: 6px;
}
.pwa-info-grid p {
    margin: 0;
    color: var(--muted);
    font-weight: 700;
    line-height: 1.45;
}

.pwa-install-notice[hidden] { display: none; }
.pwa-install-notice {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: grid;
    place-items: center;
    padding: 18px;
    background: rgba(0, 8, 18, .45);
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease;
}
.pwa-install-notice.is-visible {
    opacity: 1;
}
.pwa-install-notice-card {
    width: min(520px, 100%);
    border: 1px solid var(--border);
    border-radius: 22px;
    background: var(--panel);
    color: var(--text);
    box-shadow: 0 26px 70px rgba(0,0,0,.35);
    padding: 22px;
    text-align: center;
}
.pwa-install-notice-card strong {
    display: block;
    margin-bottom: 8px;
    font-size: 1.25rem;
}
.pwa-install-notice-card p {
    margin: 0;
    color: var(--muted);
    font-weight: 800;
    line-height: 1.45;
}

@media (max-width: 720px) {
    .app-install-head {
        grid-template-columns: 1fr;
        text-align: center;
        justify-items: center;
    }
    .pwa-install-btn {
        width: 100%;
    }
    .pwa-info-grid {
        grid-template-columns: 1fr;
    }
}

/* Composer-UI: kompaktere Symbolleiste, saubere Medienvorschau */
.composer {
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-areas:
        "pending pending pending"
        "tools message send"
        "pickers pickers pickers"
        "status status status";
    align-items: center;
    gap: 8px;
}
.composer-tools {
    grid-area: tools;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 4px;
    min-width: max-content;
}
.composer [data-chat-input] { grid-area: message; }

.composer input[data-image-input] {
    position: fixed;
    left: -9999px;
    top: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
    overflow: hidden;
}
.composer [data-send-message] { grid-area: send; min-height: 46px; }
.composer button[data-image-pick],
.composer button[data-dictate],
.composer button[data-record] {
    flex: 0 0 46px;
    width: 46px;
    min-width: 46px;
    height: 46px;
    min-height: 46px;
    padding: 0;
    display: inline-grid;
    place-items: center;
    border-radius: 16px;
    font-size: 1.08rem;
    line-height: 1;
}
.pending-media {
    grid-area: pending;
    grid-column: auto;
}
.pending-media-card {
    grid-template-columns: 54px minmax(0, 1fr) auto;
    gap: 9px;
    padding: 9px;
    align-items: center;
}
.pending-media-card img,
.pending-media-card video,
.pending-media-icon {
    width: 54px;
    height: 54px;
}
.pending-media-info { gap: 2px; }
.pending-media-info strong { font-size: .94rem; }
.pending-media-info small { font-size: .76rem; }
.pending-media-actions {
    align-items: center;
    justify-content: flex-end;
    gap: 5px;
    flex-wrap: nowrap;
}
.pending-media-actions button { min-height: 38px; }
.pending-media-actions [data-clear-pending-media] {
    width: 38px;
    min-width: 38px;
    padding: 0;
    font-size: 1.15rem;
}
.pending-media-recording { color: #fecaca; }
.composer-picker-row {
    grid-area: pickers;
    grid-column: auto;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 6px;
    width: 100%;
}
.composer-picker { flex: 0 0 auto; }
.composer-picker summary {
    min-width: 128px;
    min-height: 42px;
    padding: 8px 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}
.composer-status {
    grid-area: status;
    grid-column: auto;
}

@media (max-width: 520px) {
    .composer {
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-areas:
            "pending pending"
            "message send"
            "tools tools"
            "pickers pickers"
            "status status";
        gap: 6px;
    }
    .composer-tools {
        justify-content: flex-start;
        gap: 4px;
        width: 100%;
        min-width: 0;
    }
    .composer button[data-image-pick],
    .composer button[data-dictate],
    .composer button[data-record] {
        flex: 0 0 46px;
        width: 46px;
        min-width: 46px;
        height: 46px;
        min-height: 46px;
        padding: 0;
    }
    .composer [data-send-message] {
        min-width: 72px;
        width: auto;
        padding-inline: 10px;
    }
    .composer-picker-row {
        display: flex;
        justify-content: flex-start;
        gap: 4px;
    }
    .composer-picker { flex: 0 0 46px; }
    .composer-picker summary {
        min-width: 46px;
        width: 46px;
        min-height: 46px;
        padding: 0;
        border-radius: 16px;
    }
    .composer-picker-label { display: none; }
    .pending-media-card {
        grid-template-columns: 46px minmax(0, 1fr) auto;
        gap: 8px;
        padding: 8px;
    }
    .pending-media-card img,
    .pending-media-card video,
    .pending-media-icon {
        width: 46px;
        height: 46px;
        border-radius: 12px;
    }
    .pending-media-actions {
        grid-column: auto;
        justify-content: flex-end;
        flex-wrap: nowrap;
    }
    .pending-media-actions button {
        flex: 0 0 auto;
        min-height: 36px;
        padding-inline: 9px;
    }
    .pending-media-actions [data-clear-pending-media] {
        width: 36px;
        min-width: 36px;
    }
    .pending-media-info small { white-space: normal; }
}

/* Composer compact/accessibility patch: one send button, one icon row, clear media preview */
.composer {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
        "pending pending"
        "message send"
        "tools tools"
        "status status";
    gap: 7px;
    padding: 10px 12px;
    align-items: center;
}
.composer-tools {
    grid-area: tools;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: 5px;
    min-width: 0;
    width: 100%;
}
.composer [data-chat-input] {
    grid-area: message;
    min-height: 44px;
    width: 100%;
}
.composer [data-send-message] {
    grid-area: send;
    min-height: 44px;
    min-width: 82px;
    padding-inline: 14px;
}
.composer button[data-image-pick],
.composer button[data-dictate],
.composer button[data-record],
.composer-picker summary {
    flex: 0 0 44px;
    width: 44px;
    min-width: 44px;
    height: 44px;
    min-height: 44px;
    padding: 0;
    display: inline-grid;
    place-items: center;
    border-radius: 15px;
    font-size: 1.08rem;
    line-height: 1;
}
.composer-picker-row {
    grid-area: auto;
    grid-column: auto;
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: flex-start;
    gap: 5px;
    width: auto;
    position: relative;
    z-index: 30;
}
.composer-picker { flex: 0 0 auto; min-width: 0; }
.composer-picker-label { display: none !important; }
.composer-picker summary { text-align: center; }
.composer-picker-panel {
    left: 0;
    right: auto;
    bottom: calc(100% + 8px);
    width: min(520px, calc(100vw - 28px));
    max-height: min(44vh, 340px);
}
.pending-media {
    grid-area: pending;
    grid-column: auto;
}
.pending-media-card {
    display: grid;
    grid-template-columns: 1fr;
    gap: 7px;
    padding: 8px;
    border-radius: 15px;
}
.pending-media-head {
    display: grid;
    gap: 2px;
    min-width: 0;
}
.pending-media-head strong { font-size: .94rem; }
.pending-media-head small {
    color: var(--muted);
    font-weight: 800;
    line-height: 1.3;
}
.pending-media-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(176px, 1fr));
    gap: 6px;
}
.pending-media-item {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) 34px;
    gap: 7px;
    align-items: center;
    padding: 6px;
    border: 1px solid var(--border);
    border-radius: 13px;
    background: rgba(148, 163, 184, .08);
    min-width: 0;
}
.pending-media-item img,
.pending-media-item video,
.pending-media-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    object-fit: cover;
}
.pending-media-item-text {
    min-width: 0;
    display: grid;
    gap: 1px;
}
.pending-media-item-text strong,
.pending-media-item-text span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.pending-media-item-text strong { font-size: .88rem; }
.pending-media-item-text span {
    color: var(--text);
    font-size: .82rem;
    font-weight: 800;
}
.pending-media-badge {
    display: inline-block;
    width: fit-content;
    max-width: 100%;
    padding: 2px 6px;
    border-radius: 999px;
    background: rgba(34, 197, 94, .16);
    color: var(--text);
    font-size: .74rem;
    font-weight: 900;
}
.pending-media-item button[data-remove-pending-media] {
    width: 34px;
    min-width: 34px;
    height: 34px;
    min-height: 34px;
    padding: 0;
    border-radius: 12px;
}
.pending-media-actions { display: none; }
.pending-media-voice {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px;
    align-items: center;
    margin-top: 0;
}
.pending-media-voice span { grid-column: 1 / -1; font-weight: 900; }
.pending-media-voice audio { width: 100%; min-width: 0; }
.pending-media-voice button { min-height: 36px; padding: 7px 10px; }
.pending-media-recording {
    color: #fecaca;
    font-weight: 900;
}
.composer-status {
    grid-area: status;
    grid-column: auto;
    min-height: 18px;
    font-size: .86rem;
}
@media (min-width: 721px) {
    .composer {
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-areas:
            "pending pending"
            "message send"
            "tools tools"
            "status status";
    }
}
@media (max-width: 520px) {
    .composer {
        padding: 9px;
        gap: 6px;
    }
    .composer-tools { gap: 4px; }
    .composer button[data-image-pick],
    .composer button[data-dictate],
    .composer button[data-record],
    .composer-picker summary {
        flex-basis: 42px;
        width: 42px;
        min-width: 42px;
        height: 42px;
        min-height: 42px;
        border-radius: 14px;
    }
    .composer [data-send-message] {
        min-width: 74px;
        padding-inline: 10px;
    }
    .pending-media-list {
        grid-template-columns: 1fr;
    }
    .pending-media-head small {
        font-size: .78rem;
    }
    .composer-picker-panel {
        width: min(430px, calc(100vw - 22px));
    }
}

/* Rechtstexte & Mobile-Fix: AGB, Datenschutz, Impressum bleiben im Display */
.legal-text,
.impressum-modal-content,
.datenschutz-modal-content,
.agb-modal-content,
.impressum-full-card {
    max-width: 100%;
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: normal;
    hyphens: auto;
}
.legal-text h1,
.legal-text h2,
.legal-text p,
.legal-text a,
.impressum-modal-content h1,
.impressum-modal-content h2,
.impressum-modal-content p,
.datenschutz-modal-content h1,
.datenschutz-modal-content h2,
.datenschutz-modal-content p,
.agb-modal-content h1,
.agb-modal-content h2,
.agb-modal-content p {
    max-width: 100%;
    overflow-wrap: anywhere;
}
.legal-text h1,
.impressum-modal-content h1,
.datenschutz-modal-content h1,
.agb-modal-content h1 {
    font-size: clamp(1.55rem, 6vw, 2.35rem);
    line-height: 1.12;
}
.legal-text h2,
.impressum-modal-content h2,
.datenschutz-modal-content h2,
.agb-modal-content h2 {
    font-size: clamp(1rem, 4.2vw, 1.16rem);
    line-height: 1.25;
}
.legal-text p,
.impressum-modal-content p,
.datenschutz-modal-content p,
.agb-modal-content p {
    font-size: clamp(.94rem, 3.6vw, 1rem);
}
.impressum-modal,
.datenschutz-modal,
.agb-modal {
    overflow-x: hidden;
    padding-left: max(12px, env(safe-area-inset-left));
    padding-right: max(12px, env(safe-area-inset-right));
    padding-top: max(12px, env(safe-area-inset-top));
    padding-bottom: max(12px, env(safe-area-inset-bottom));
}
.impressum-modal-card,
.datenschutz-modal-card,
.agb-modal-card {
    width: min(780px, calc(100vw - 24px));
    max-width: calc(100vw - 24px);
    max-height: min(84dvh, 780px);
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
}
.impressum-modal-card *,
.datenschutz-modal-card *,
.agb-modal-card *,
.app-page *,
.messenger-app * {
    min-width: 0;
}
.app-page,
.messenger-app,
.chat-window,
.messenger-sidebar,
.profile-panel,
.group-create-panel,
.home-info-card,
.contact-card,
.cookie-consent {
    max-width: 100%;
    overflow-x: hidden;
}
.chat-top,
.chat-actions,
.sidebar-actions,
.footer-nav,
.mobile-group-menu-actions,
.pwa-info-grid {
    min-width: 0;
}
.chat-top strong,
.chat-top small,
.user-head strong,
.user-head small,
.sidebar-actions button,
.mobile-group-menu-actions button,
.footer-nav a {
    overflow-wrap: anywhere;
}

@media (max-width: 520px) {
    body {
        overflow-x: hidden;
    }
    .impressum-modal,
    .datenschutz-modal,
    .agb-modal {
        align-items: stretch;
        place-items: stretch;
        padding: max(8px, env(safe-area-inset-top)) max(8px, env(safe-area-inset-right)) max(8px, env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left));
    }
    .impressum-modal-card,
    .datenschutz-modal-card,
    .agb-modal-card {
        width: 100%;
        max-width: 100%;
        max-height: calc(100dvh - 16px);
        border-radius: 20px;
        padding: 18px;
        gap: 18px;
    }
    .impressum-full-card,
    .app-install-card {
        padding: 18px;
        border-radius: 20px;
    }
    .footer-nav {
        flex-wrap: wrap;
        row-gap: 6px;
    }
    .messenger-app {
        width: calc(100vw - 8px);
        max-width: calc(100vw - 8px);
        overflow-x: hidden;
    }
    .chat-window,
    .messenger-sidebar,
    .profile-panel,
    .group-create-panel {
        border-radius: 20px;
    }
}

@media (max-width: 380px) {
    .impressum-modal-card,
    .datenschutz-modal-card,
    .agb-modal-card,
    .impressum-full-card {
        padding: 14px;
        border-radius: 18px;
    }

    .hero-simple h1 {
        font-size: 1.28rem;
    }
    .hero-simple p {
        font-size: .93rem;
    }
    .legal-text h2,
    .impressum-modal-content h2,
    .datenschutz-modal-content h2,
    .agb-modal-content h2 {
        font-size: .98rem;
    }
}

/* Mini-Fix v2: Fenster oben sauber schließen und mobil einpassen */
.chat-body,
.open-conversations,
.open-conversation-chips,
.open-conversation-chip {
    box-sizing: border-box;
    max-width: 100%;
}

.chat-body {
    overflow-x: hidden;
}

.open-conversations {
    width: min(680px, calc(100% - 36px));
    max-width: calc(100% - 36px);
    margin-left: auto;
    margin-right: auto;
    border-top: 1px solid var(--border);
    border-radius: 18px;
    overflow: hidden;
}

@media (max-width: 820px) {
    .chat-ad-slot {
        padding-left: 12px;
        padding-right: 12px;
    }

    .chat-ad-frame {
        max-width: calc(100vw - 32px);
    }

    .chat-ad-slot + .open-conversations {
        margin-top: 12px;
    }

    .open-conversations {
        width: calc(100% - 32px);
        max-width: calc(100% - 32px);
        margin-bottom: 12px;
        padding: 12px 10px;
        border-top: 1px solid var(--border);
        border-radius: 18px;
    }

    .open-conversation-chip {
        min-width: 0;
        gap: 7px;
        padding: 8px;
    }

    .open-conversation-chip [data-switch-open-conversation],
    .open-conversation-chip [data-switch-private-conversation],
    .open-conversation-chip [data-show-join-request] {
        min-width: 0;
        max-width: 100%;
    }
}

@media (max-width: 520px) {
    .chat-ad-slot {
        padding: 10px 10px 0;
    }

    .chat-ad-frame,
    .ad-responsive-frame {
        max-width: calc(100vw - 28px);
    }

    .open-conversations {
        width: calc(100% - 28px);
        max-width: calc(100% - 28px);
        padding: 12px 8px;
        border-top: 1px solid var(--border);
        border-radius: 16px;
    }

    .private-message-chip {
        grid-template-columns: 38px minmax(0, 1fr) 34px 34px;
    }

    .private-message-chip .profile-photo.small {
        width: 36px;
        height: 36px;
    }

    .private-message-chip [data-block-user],
    .private-message-chip [data-close-private-conversation],
    .open-conversation-chip [data-close-open-conversation] {
        width: 32px;
        height: 32px;
        min-width: 32px;
    }
}

@media (max-width: 380px) {
    .open-conversations {
        width: calc(100% - 22px);
        max-width: calc(100% - 22px);
    }

    .private-message-chip {
        grid-template-columns: 34px minmax(0, 1fr) 30px 30px;
        gap: 5px;
    }

    .private-message-chip .profile-photo.small {
        width: 32px;
        height: 32px;
    }

    .private-message-chip [data-block-user],
    .private-message-chip [data-close-private-conversation],
    .open-conversation-chip [data-close-open-conversation] {
        width: 30px;
        height: 30px;
        min-width: 30px;
    }
}

/* Chat-Untertitel sauber umbrechen */
.chat-top [data-chat-subtitle] {
    display: block;
    max-width: 100%;
    white-space: normal;
    word-break: normal;
    overflow-wrap: normal;
    line-height: 1.2;
}

.chat-top [data-chat-subtitle] span {
    display: block;
    white-space: nowrap;
    word-break: normal;
    overflow-wrap: normal;
}

@media (max-width: 520px) {
    .chat-window:not(.is-group-active) .chat-top {
        align-items: flex-start;
    }

    .chat-window:not(.is-group-active) .chat-top > div:first-child {
        max-width: calc(100% - 64px);
        min-width: 0;
    }

    .chat-top [data-chat-subtitle] {
        font-size: .9rem;
    }
}

@media (max-width: 380px) {
    .chat-top [data-chat-subtitle] {
        font-size: .84rem;
    }
}

/* Smartphone/App: Suchfeld vollständig lesbar */
.search-box,
.search-box input {
    max-width: 100%;
    min-width: 0;
}
.search-box input {
    width: 100%;
}
@media (max-width: 520px) {
    .search-box {
        width: 100%;
        grid-template-columns: minmax(0, 1fr);
        gap: 0;
        padding: 0 10px;
        overflow: hidden;
    }
    .search-box > span {
        display: none;
    }
    .search-box input {
        width: 100%;
        font-size: clamp(.84rem, 3.55vw, .95rem);
        letter-spacing: -0.01em;
        white-space: nowrap;
        text-overflow: clip;
    }
}

/* PN-Freund-Anfrage nach Registrierung über ein öffentliches Profil */
.friend-request-box {
    display: grid;
    gap: 10px;
}

.friend-request-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.friend-request-actions button,
.friend-request-profile {
    border: 0;
    border-radius: 12px;
    padding: 9px 13px;
    font-weight: 900;
    cursor: pointer;
}

.friend-request-yes {
    background: #16a34a;
    color: #fff;
}

.friend-request-no {
    background: #dc2626;
    color: #fff;
}

.friend-request-profile {
    background: rgba(148, 163, 184, .18);
    color: var(--text, #f8fafc);
}

.friend-request-status {
    display: inline-flex;
    align-items: center;
    border-radius: 12px;
    padding: 9px 12px;
    margin-top: 8px;
    background: rgba(148, 163, 184, .16);
    font-weight: 800;
}

/* Karten und Live-Beiträge im Gruppenchat */
.location-card,
.live-camera-chat-card {
    display: grid;
    gap: 8px;
    min-width: min(360px, 72vw);
    overflow: hidden;
}
.location-card strong,
.live-camera-chat-card strong {
    font-size: 1.02rem;
    line-height: 1.25;
}
.location-card small,
.location-card span,
.live-camera-chat-card span {
    margin: 0;
    opacity: .86;
    font-weight: 800;
}
.location-card iframe {
    width: 100%;
    height: 190px;
    border: 0;
    border-radius: 16px;
    background: rgba(15, 23, 42, .12);
}
.location-card a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-height: 38px;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .32);
    color: inherit;
    font-weight: 900;
    text-decoration: none;
}
.local-message.me .location-card a {
    background: rgba(255, 255, 255, .18);
}
.live-camera-chat-card {
    padding: 12px;
    border-radius: 16px;
    background: rgba(255, 255, 255, .28);
    border: 1px solid rgba(15, 23, 42, .12);
}
.local-message.me .live-camera-chat-card {
    background: rgba(255, 255, 255, .14);
    border-color: rgba(219, 234, 254, .22);
}
.live-camera-chat-card.is-running strong {
    color: #16a34a;
}
.live-camera-chat-card.is-ended strong {
    color: #64748b;
}
@media (max-width: 560px) {
    .location-card,
    .live-camera-chat-card {
        min-width: 0;
        width: 100%;
    }
    .location-card iframe {
        height: 170px;
    }
}

.attachment-sheet[hidden] {
    display: none !important;
}

.attachment-sheet {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.attachment-sheet-backdrop {
    position: absolute;
    inset: 0;
    border: 0;
    background: rgba(5, 10, 20, 0.62);
    padding: 0;
    margin: 0;
}

.attachment-sheet-card {
    position: relative;
    width: min(100%, 32rem);
    max-width: 32rem;
    max-height: min(85vh, 42rem);
    overflow: auto;
    border-radius: 1.2rem;
    margin: 0 auto;
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.35);
}

.attachment-sheet-card .panel-head {
    position: sticky;
    top: 0;
    z-index: 1;
    background: inherit;
    padding-bottom: 0.75rem;
}

.attachment-sheet-card .panel-head h2 {
    font-size: 1.2rem;
}

.attachment-sheet-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.9rem;
    padding: 1rem;
}

.attachment-sheet-actions button {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    min-height: 7.25rem;
    border-radius: 1.1rem;
    border: 1px solid rgba(110, 140, 200, 0.28);
    background: rgba(255, 255, 255, 0.98);
    color: #16325c;
    font: inherit;
    text-align: center;
    padding: 1rem 0.85rem;
    cursor: pointer;
    touch-action: manipulation;
    transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
}

.attachment-sheet-actions button:hover,
.attachment-sheet-actions button:focus-visible {
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(30, 70, 150, 0.16);
    border-color: rgba(70, 120, 220, 0.5);
    outline: none;
}

body.dark-mode .attachment-sheet-actions button {
    background: rgba(22, 31, 49, 0.98);
    color: #eef3ff;
    border-color: rgba(160, 190, 255, 0.24);
}

body.dark-mode .attachment-sheet-actions button:hover,
body.dark-mode .attachment-sheet-actions button:focus-visible {
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.34);
    border-color: rgba(160, 190, 255, 0.46);
}

.attachment-sheet-actions button strong {
    font-size: 1.03rem;
    line-height: 1.2;
}

.attachment-sheet-actions button small {
    font-size: 0.82rem;
    line-height: 1.25;
    opacity: 0.84;
}

.attachment-sheet-icon {
    font-size: 1.9rem;
    line-height: 1;
}

@media (max-width: 900px) {
    .attachment-sheet {
        padding: 1rem;
    }

    .attachment-sheet-card {
        width: min(92vw, 28rem);
        max-width: 28rem;
    }

    .attachment-sheet-card .panel-head {
        padding: 0.95rem 1rem 0.8rem;
    }

    .attachment-sheet-card .panel-head h2 {
        font-size: 1.25rem;
    }

    .attachment-sheet-actions {
        gap: 1rem;
        padding: 0 1rem 1rem;
    }

    .attachment-sheet-actions button {
        min-height: 8.4rem;
        padding: 1.1rem 0.9rem;
    }

    .attachment-sheet-icon {
        font-size: 2.15rem;
    }

    .attachment-sheet-actions button strong {
        font-size: 1.08rem;
    }

    .attachment-sheet-actions button small {
        font-size: 0.84rem;
    }
}

@media (max-width: 480px) {
    .attachment-sheet {
        padding: 0.75rem;
    }

    .attachment-sheet-card {
        width: min(94vw, 26rem);
        max-width: 26rem;
        border-radius: 1.15rem;
    }

    .attachment-sheet-actions {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.85rem;
        padding: 0 0.9rem 0.95rem;
    }

    .attachment-sheet-actions button {
        min-height: 7.8rem;
        padding: 1rem 0.65rem;
    }

    .attachment-sheet-icon {
        font-size: 2rem;
    }

    .attachment-sheet-actions button strong {
        font-size: 1rem;
    }

    .attachment-sheet-actions button small {
        font-size: 0.8rem;
    }
}

/* v23: echte Datei-Inputs bleiben unsichtbar; sichtbar ist nur die eigene Büroklammer-Auswahl. */
.chat-media-input,
.composer .chat-media-input,
input.chat-media-input[type="file"] {
    position: fixed !important;
    left: -10000px !important;
    top: 0 !important;
    width: 1px !important;
    height: 1px !important;
    min-width: 1px !important;
    max-width: 1px !important;
    min-height: 1px !important;
    max-height: 1px !important;
    opacity: 0 !important;
    overflow: hidden !important;
    pointer-events: none !important;
    border: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    appearance: none !important;
    -webkit-appearance: none !important;
}

/* v22: schlichte Ton-Schalter ohne Hervorhebung. */
.sound-toggle-line {
    margin: 0.35rem 0 0.65rem;
    padding: 0.25rem 0;
    gap: 0.55rem;
    align-items: center;
}

.sound-toggle-line input[type="checkbox"] {
    width: 1.1rem;
    height: 1.1rem;
    flex: 0 0 auto;
}

.group-sound-setting {
    margin-bottom: 0.35rem;
}

/* v23: Mobile Anhang-Auswahl wirklich als mittiges Fenster über der Seite. */
body.attachment-sheet-open {
    overflow: hidden;
}

body > .attachment-sheet {
    position: fixed !important;
    inset: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 99999 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 16px !important;
}

body > .attachment-sheet[hidden] {
    display: none !important;
}

body > .attachment-sheet .attachment-sheet-backdrop {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(4, 9, 20, 0.72) !important;
}

body > .attachment-sheet .attachment-sheet-card {
    position: relative !important;
    width: min(92vw, 430px) !important;
    max-width: 430px !important;
    max-height: min(86vh, 620px) !important;
    overflow: auto !important;
    border-radius: 22px !important;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.48) !important;
}

body > .attachment-sheet .attachment-sheet-actions {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 14px !important;
    padding: 0 16px 18px !important;
}

body > .attachment-sheet .attachment-sheet-actions button {
    min-height: 126px !important;
    border-radius: 20px !important;
    padding: 16px 10px !important;
    gap: 8px !important;
    font-size: 1rem !important;
    touch-action: manipulation !important;
}

body > .attachment-sheet .attachment-sheet-icon {
    font-size: 2.25rem !important;
}

body > .attachment-sheet .attachment-sheet-actions button strong {
    font-size: 1.05rem !important;
    line-height: 1.15 !important;
}

body > .attachment-sheet .attachment-sheet-actions button small {
    font-size: 0.84rem !important;
    line-height: 1.25 !important;
}

.composer button[data-take-photo],
.composer button[data-take-video] {
    min-width: 46px;
    width: 46px;
    height: 46px;
    min-height: 46px;
    padding: 0;
    display: inline-grid;
    place-items: center;
    border-radius: 16px;
    background: #16a34a;
    border-color: #16a34a;
    color: #fff;
    font-size: 1.08rem;
    line-height: 1;
}

.composer button[data-take-photo]:hover,
.composer button[data-take-photo]:focus-visible,
.composer button[data-take-video]:hover,
.composer button[data-take-video]:focus-visible {
    transform: translateY(-1px);
    filter: brightness(1.05);
}

@media (max-width: 520px) {
    body > .attachment-sheet {
        padding: 12px !important;
    }

    body > .attachment-sheet .attachment-sheet-card {
        width: min(94vw, 390px) !important;
        max-width: 390px !important;
    }

    body > .attachment-sheet .attachment-sheet-actions {
        gap: 12px !important;
        padding: 0 14px 16px !important;
    }

    body > .attachment-sheet .attachment-sheet-actions button {
        min-height: 118px !important;
        padding: 14px 8px !important;
    }

    .composer button[data-take-photo],
    .composer button[data-take-video] {
        flex: 0 0 42px;
        width: 42px;
        min-width: 42px;
        height: 42px;
        min-height: 42px;
        border-radius: 14px;
    }
}

/* v25: App-/Smartphone-Anhang-Auswahl mittig mit Symbol + Beschreibung; Foto/Video als reine Symbole in der Gruppenleiste. */
body.attachment-sheet-open {
    overflow: hidden !important;
}

body > .attachment-sheet {
    position: fixed !important;
    inset: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 99999 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 16px !important;
}

body > .attachment-sheet[hidden] {
    display: none !important;
}

body > .attachment-sheet .attachment-sheet-backdrop {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(4, 9, 20, 0.72) !important;
}

body > .attachment-sheet .attachment-sheet-card {
    position: relative !important;
    width: min(94vw, 470px) !important;
    max-width: 470px !important;
    max-height: min(88vh, 660px) !important;
    overflow: auto !important;
    border-radius: 22px !important;
    padding: 0 !important;
    margin: 0 auto !important;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.48) !important;
}

body > .attachment-sheet .attachment-sheet-card .panel-head {
    padding: 16px 16px 10px !important;
    margin: 0 !important;
}

body > .attachment-sheet .attachment-sheet-card .panel-head h2 {
    margin: 0 !important;
    font-size: 1.18rem !important;
}

body > .attachment-sheet .attachment-sheet-card .panel-head button {
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    min-height: 44px !important;
    padding: 0 !important;
    border-radius: 15px !important;
}

body > .attachment-sheet .attachment-sheet-actions {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 13px !important;
    padding: 0 16px 18px !important;
}

body > .attachment-sheet .attachment-sheet-actions button {
    min-height: 124px !important;
    border-radius: 20px !important;
    padding: 15px 10px !important;
    gap: 8px !important;
    font-size: 1rem !important;
    touch-action: manipulation !important;
    -webkit-tap-highlight-color: transparent !important;
}

body > .attachment-sheet .attachment-sheet-icon {
    font-size: 2.28rem !important;
    line-height: 1 !important;
}

body > .attachment-sheet .attachment-sheet-actions button strong {
    font-size: 1.04rem !important;
    line-height: 1.15 !important;
}

body > .attachment-sheet .attachment-sheet-actions button small {
    font-size: 0.84rem !important;
    line-height: 1.25 !important;
    max-width: 15ch !important;
}

.composer button[data-take-photo],
.composer button[data-take-video] {
    flex: 0 0 44px !important;
    width: 44px !important;
    min-width: 44px !important;
    height: 44px !important;
    min-height: 44px !important;
    padding: 0 !important;
    display: inline-grid !important;
    place-items: center !important;
    border-radius: 15px !important;
    background: #16a34a !important;
    border-color: #16a34a !important;
    color: #fff !important;
    font-size: 1.08rem !important;
    line-height: 1 !important;
    overflow: hidden !important;
}

@media (max-width: 520px) {
    body > .attachment-sheet {
        padding: 10px !important;
    }

    body > .attachment-sheet .attachment-sheet-card {
        width: min(96vw, 410px) !important;
        max-width: 410px !important;
        max-height: min(90vh, 650px) !important;
    }

    body > .attachment-sheet .attachment-sheet-actions {
        gap: 10px !important;
        padding: 0 12px 14px !important;
    }

    body > .attachment-sheet .attachment-sheet-actions button {
        min-height: 112px !important;
        padding: 12px 7px !important;
    }

    body > .attachment-sheet .attachment-sheet-icon {
        font-size: 2.05rem !important;
    }

    body > .attachment-sheet .attachment-sheet-actions button strong {
        font-size: 0.98rem !important;
    }

    body > .attachment-sheet .attachment-sheet-actions button small {
        font-size: 0.78rem !important;
        max-width: 14ch !important;
    }

    .composer button[data-take-photo],
    .composer button[data-take-video] {
        flex-basis: 42px !important;
        width: 42px !important;
        min-width: 42px !important;
        height: 42px !important;
        min-height: 42px !important;
        border-radius: 14px !important;
    }
}

/* v26: Büroklammer-Menü nur für Uploads; Foto aufnehmen und Video aufnehmen bleiben eigene Symbole. */
body > .attachment-sheet .attachment-sheet-actions-upload-only {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

body > .attachment-sheet .attachment-sheet-actions-upload-only button {
    min-height: 132px !important;
}

body > .attachment-sheet .attachment-sheet-actions-upload-only button small {
    max-width: 18ch !important;
}

@media (max-width: 380px) {
    body > .attachment-sheet .attachment-sheet-actions-upload-only {
        grid-template-columns: 1fr !important;
    }

    body > .attachment-sheet .attachment-sheet-actions-upload-only button {
        min-height: 96px !important;
        display: grid !important;
        grid-template-columns: auto 1fr !important;
        align-items: center !important;
        text-align: left !important;
        column-gap: 12px !important;
    }

    body > .attachment-sheet .attachment-sheet-actions-upload-only button small {
        grid-column: 2 !important;
        max-width: none !important;
    }
}

/* v27: App-Gruppenleiste sauber als eine Symbol-Reihe; kein Vollbreiten-Button für Foto/Video. */
.composer .composer-tools {
    grid-area: tools !important;
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 6px !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    overflow-x: auto !important;
    overflow-y: visible !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
}
.composer .composer-tools::-webkit-scrollbar { display: none !important; }
.composer .composer-tools > button,
.composer .composer-tools .composer-picker summary {
    flex: 0 0 44px !important;
    width: 44px !important;
    min-width: 44px !important;
    max-width: 44px !important;
    height: 44px !important;
    min-height: 44px !important;
    max-height: 44px !important;
    padding: 0 !important;
    display: inline-grid !important;
    place-items: center !important;
    border-radius: 15px !important;
    font-size: 1.1rem !important;
    line-height: 1 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-align: center !important;
}
.composer .composer-tools > button[data-image-pick],
.composer .composer-tools > button[data-dictate],
.composer .composer-tools > button[data-record],
.composer .composer-tools > button[data-take-photo],
.composer .composer-tools > button[data-take-video] {
    background: #16a34a !important;
    border-color: #16a34a !important;
    color: #fff !important;
}
.composer .composer-tools .composer-picker-row {
    display: flex !important;
    flex: 0 0 auto !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 6px !important;
    width: auto !important;
    max-width: none !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}
.composer .composer-tools .composer-picker {
    flex: 0 0 44px !important;
    width: 44px !important;
    min-width: 44px !important;
}
.composer .composer-tools .composer-picker-label { display: none !important; }

/* v27: Büroklammer-Auswahl als echtes mittiges Fenster über der App, nicht unten im Chat. */
body.attachment-sheet-open {
    overflow: hidden !important;
    overscroll-behavior: contain !important;
}
.attachment-sheet,
body > .attachment-sheet {
    position: fixed !important;
    inset: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    height: 100dvh !important;
    min-height: 100vh !important;
    min-height: 100dvh !important;
    z-index: 2147483000 !important;
    display: grid !important;
    place-items: center !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 14px !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    transform: none !important;
}
.attachment-sheet[hidden],
body > .attachment-sheet[hidden] {
    display: none !important;
}
.attachment-sheet .attachment-sheet-backdrop,
body > .attachment-sheet .attachment-sheet-backdrop {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    border: 0 !important;
    background: rgba(3, 7, 18, 0.76) !important;
}
.attachment-sheet .attachment-sheet-card,
body > .attachment-sheet .attachment-sheet-card {
    position: relative !important;
    width: min(92vw, 420px) !important;
    max-width: 420px !important;
    max-height: calc(100dvh - 34px) !important;
    overflow: auto !important;
    margin: auto !important;
    border-radius: 22px !important;
    box-shadow: 0 26px 76px rgba(0, 0, 0, .58) !important;
    transform: none !important;
}
.attachment-sheet .attachment-sheet-card .panel-head,
body > .attachment-sheet .attachment-sheet-card .panel-head {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 10px !important;
    padding: 14px 14px 10px !important;
}
.attachment-sheet .attachment-sheet-card .panel-head h2,
body > .attachment-sheet .attachment-sheet-card .panel-head h2 {
    margin: 0 !important;
    font-size: 1.12rem !important;
    line-height: 1.2 !important;
}
.attachment-sheet .attachment-sheet-actions-upload-only,
body > .attachment-sheet .attachment-sheet-actions-upload-only {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 12px !important;
    padding: 0 14px 16px !important;
}
.attachment-sheet .attachment-sheet-actions-upload-only button,
body > .attachment-sheet .attachment-sheet-actions-upload-only button {
    min-height: 116px !important;
    border-radius: 18px !important;
    padding: 14px 8px !important;
    display: grid !important;
    grid-template-columns: 1fr !important;
    place-items: center !important;
    text-align: center !important;
    gap: 7px !important;
    background: rgba(255, 255, 255, .98) !important;
    color: #10213d !important;
    border: 1px solid rgba(148, 163, 184, .36) !important;
}
body.dark-mode .attachment-sheet .attachment-sheet-actions-upload-only button,
body.dark-mode > .attachment-sheet .attachment-sheet-actions-upload-only button {
    background: rgba(15, 23, 42, .98) !important;
    color: #f8fafc !important;
    border-color: rgba(148, 163, 184, .32) !important;
}
.attachment-sheet .attachment-sheet-icon,
body > .attachment-sheet .attachment-sheet-icon {
    font-size: 2.05rem !important;
    line-height: 1 !important;
}
.attachment-sheet .attachment-sheet-actions-upload-only button strong,
body > .attachment-sheet .attachment-sheet-actions-upload-only button strong {
    font-size: 1rem !important;
    line-height: 1.16 !important;
}
.attachment-sheet .attachment-sheet-actions-upload-only button small,
body > .attachment-sheet .attachment-sheet-actions-upload-only button small {
    max-width: 18ch !important;
    font-size: .8rem !important;
    line-height: 1.25 !important;
}
@media (max-width: 520px) {
    .composer .composer-tools { gap: 5px !important; }
    .composer .composer-tools > button,
    .composer .composer-tools .composer-picker summary,
    .composer .composer-tools .composer-picker {
        flex-basis: 42px !important;
        width: 42px !important;
        min-width: 42px !important;
        max-width: 42px !important;
        height: 42px !important;
        min-height: 42px !important;
        max-height: 42px !important;
        border-radius: 14px !important;
    }
    .attachment-sheet,
    body > .attachment-sheet { padding: 12px !important; }
    .attachment-sheet .attachment-sheet-card,
    body > .attachment-sheet .attachment-sheet-card {
        width: min(92vw, 390px) !important;
        max-width: 390px !important;
    }
    .attachment-sheet .attachment-sheet-actions-upload-only,
    body > .attachment-sheet .attachment-sheet-actions-upload-only {
        grid-template-columns: 1fr !important;
        gap: 10px !important;
    }
    .attachment-sheet .attachment-sheet-actions-upload-only button,
    body > .attachment-sheet .attachment-sheet-actions-upload-only button {
        min-height: 78px !important;
        grid-template-columns: auto 1fr !important;
        justify-items: start !important;
        align-items: center !important;
        text-align: left !important;
        column-gap: 12px !important;
        padding: 12px 14px !important;
    }
    .attachment-sheet .attachment-sheet-actions-upload-only button small,
    body > .attachment-sheet .attachment-sheet-actions-upload-only button small {
        grid-column: 2 !important;
        max-width: none !important;
    }
}

/* Community-Verwaltung */
.sidebar-actions .community-action-btn {
    grid-column: auto;
}
.community-group-picker {
    display: grid;
    gap: 8px;
}
.community-group-list {
    display: grid;
    gap: 8px;
    max-height: 260px;
    overflow-y: auto;
}
.community-group-choice {
    display: grid;
    grid-template-columns: auto auto 1fr;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--panel-soft);
    cursor: pointer;
}
.community-group-choice input {
    width: auto;
}
.community-group-choice span {
    min-width: 0;
}
.community-group-choice strong,
.community-group-choice small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.community-group-choice small {
    color: var(--muted);
}
.community-public-groups,
.community-public-group-list {
    display: grid;
    gap: 10px;
}
.search-open-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 12px;
    background: var(--brand);
    color: #fff;
    padding: 8px 10px;
    font-weight: 800;
    text-decoration: none;
}
@media (max-width: 520px) {
    .sidebar-actions .community-action-btn {
        grid-column: auto;
    }
    .community-group-list {
        max-height: 220px;
    }
}

/* Communitys in der linken Liste: Klick auf Community öffnet die dazugehörigen Gruppen,
   Bearbeiten bleibt separat. */
.my-community-item {
    grid-template-columns: auto 1fr auto;
}
.my-community-open {
    display: block;
    min-width: 0;
    border: 0 !important;
    background: transparent !important;
    color: var(--text) !important;
    padding: 0 !important;
    text-align: left;
    cursor: pointer;
}
.my-community-open strong,
.my-community-open small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.community-edit-btn {
    white-space: nowrap;
}
@media (max-width: 520px) {
    .community-edit-btn {
        padding: 8px 9px !important;
        font-size: .82rem;
    }
}

/* Meine Communitys: Aktionen als Symbole statt breitem Bearbeiten-Button */
.my-community-item {
    grid-template-columns: auto minmax(0, 1fr) auto;
}
.my-community-actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    flex-wrap: nowrap;
}
.my-community-actions .community-icon-btn,
.conversation-item .my-community-actions .community-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    min-width: 36px;
    padding: 0 !important;
    border: 1px solid var(--border) !important;
    border-radius: 999px !important;
    background: var(--panel) !important;
    color: var(--text) !important;
    font-size: 1rem;
    line-height: 1;
    box-shadow: none;
}
.my-community-actions .community-icon-btn:hover,
.my-community-actions .community-icon-btn:focus {
    border-color: var(--brand) !important;
    transform: translateY(-1px);
}
.my-community-actions .community-favorite-btn.is-active {
    color: #f5a400 !important;
    border-color: rgba(245, 164, 0, .55) !important;
}
@media (max-width: 520px) {
    .my-community-item {
        gap: 8px;
    }
    .my-community-actions {
        gap: 4px;
    }
    .my-community-actions .community-icon-btn,
    .conversation-item .my-community-actions .community-icon-btn {
        width: 34px;
        height: 34px;
        min-width: 34px;
        font-size: .95rem;
    }
}

/* Community-Symbole oben im Chatbereich */
.chat-window.is-community-overview .community-top-favorite-btn:not([hidden]),
.chat-window.is-community-overview .community-top-settings-btn:not([hidden]) {
    display: inline-grid;
}
.community-top-favorite-btn.is-active {
    color: #f5a400;
    border-color: rgba(245, 164, 0, .55);
}
.my-community-item {
    grid-template-columns: auto minmax(0, 1fr) auto;
    width: 100%;
    text-align: left;
}
.my-community-item .my-community-open {
    display: block;
    min-width: 0;
}
.my-community-actions {
    display: none !important;
}
@media (max-width: 520px) {
    .chat-window.is-community-overview .chat-actions {
        gap: 6px;
        flex-wrap: nowrap;
    }
    .chat-window.is-community-overview .chat-top > div:first-child {
        max-width: calc(100% - 190px);
    }
}

/* Community-Gruppen sauber untereinander ohne inneren Scrollbalken */
.open-conversations.is-community-groups,
.chat-window.is-community-overview:not(.is-group-active) .open-conversations {
    overflow: visible;
}

.open-conversations.is-community-groups .open-conversation-chips,
.chat-window.is-community-overview:not(.is-group-active) .open-conversation-chips {
    max-height: none;
    overflow: visible;
}

.chat-window.is-community-overview:not(.is-group-active),
.chat-window.is-community-overview:not(.is-group-active) .chat-body {
    overflow: visible;
}

@media (max-width: 820px) {
    .chat-window.is-community-overview:not(.is-group-active) {
        min-height: auto;
    }

    .chat-window.is-community-overview:not(.is-group-active) .chat-body {
        -webkit-overflow-scrolling: touch;
    }
}

/* v68: keine sichtbaren Scrollbuttons/Scrollleisten in 1A-Life; Wischen/Touch-Scroll bleibt aktiv */
.scroll-arrow {
    display: none !important;
}
.tile-row {
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    touch-action: pan-x pan-y;
}
.open-conversation-chips {
    max-height: none !important;
    overflow: visible !important;
    scrollbar-width: none !important;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
}
.open-conversation-chips::-webkit-scrollbar,
.community-group-list::-webkit-scrollbar,
.mobile-group-menu-card::-webkit-scrollbar,
.chat-messages::-webkit-scrollbar,
.messenger-sidebar::-webkit-scrollbar,
.profile-panel::-webkit-scrollbar,
.group-create-panel::-webkit-scrollbar {
    width: 0 !important;
    height: 0 !important;
    display: none !important;
}
.community-group-list,
.mobile-group-menu-card,
.chat-messages,
.messenger-sidebar,
.profile-panel,
.group-create-panel {
    scrollbar-width: none !important;
    -webkit-overflow-scrolling: touch;
}
@media (max-width: 820px) {
    .messenger-app,
    .chat-window,
    .chat-body,
    .messenger-sidebar,
    .profile-panel,
    .group-create-panel {
        -webkit-overflow-scrolling: touch;
        touch-action: pan-y;
    }
    .chat-window:not(.is-group-active) .chat-body {
        overflow: visible;
    }
    .chat-window.is-group-active .chat-messages {
        overflow-y: auto;
        overscroll-behavior-y: contain;
    }
}

@media (max-width: 760px) { .business-public-grid, .profile-detail-business-card .business-public-grid { grid-template-columns: 1fr; } }

/* Profil speichern: kleines mittiges Hinweisfenster ohne Layout-Verschiebung */
.profile-saved-notice[hidden] { display: none !important; }
.profile-saved-notice {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    pointer-events: none;
}
.profile-saved-notice-card {
    max-width: min(92vw, 430px);
    padding: 18px 24px;
    border-radius: 18px;
    border: 1px solid rgba(90, 255, 146, 0.55);
    background: rgba(8, 19, 35, 0.96);
    color: #f4fff8;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45), 0 0 22px rgba(20, 185, 80, 0.22);
    text-align: center;
    font-weight: 800;
    line-height: 1.4;
}
.profile-saved-notice-card strong {
    display: block;
    font-size: 1.05rem;
}
body.light .profile-saved-notice-card {
    background: rgba(255, 255, 255, 0.98);
    color: #102216;
    border-color: rgba(22, 163, 74, 0.45);
}

/* PN-Beitrittsanfrage für Gruppen und Communitys */
.join-request-summary {
    border-radius: 12px;
    padding: 10px 12px;
    background: rgba(15, 23, 42, .22);
    border: 1px solid rgba(148, 163, 184, .28);
    line-height: 1.4;
}

/* Leere Offene-Chats-Anzeige ausblenden */
.open-conversations:has(.open-conversation-empty) {
    display: none !important;
}

/* Offene Chats und Smartphone-/App-Vollbild-Chat */
.open-conversations-title {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--text);
    font-weight: 950;
}
.open-conversations-title span {
    display: inline-grid;
    place-items: center;
    width: 26px;
    height: 26px;
    border-radius: 999px;
    background: rgba(22, 163, 74, .16);
    border: 1px solid rgba(22, 163, 74, .28);
    font-size: .95rem;
}

@media (max-width: 820px), (display-mode: standalone) {
    body.onea-mobile-chat-active {
        overflow: hidden !important;
    }
    body.onea-mobile-chat-active .site-header,
    body.onea-mobile-chat-active [data-landing],
    body.onea-mobile-chat-active .site-footer,
    body.onea-mobile-chat-active .messenger-sidebar,
    body.onea-mobile-chat-active .profile-panel,
    body.onea-mobile-chat-active .group-create-panel {
        display: none !important;
    }
    body.onea-mobile-chat-active .messenger-app {
        position: fixed;
        inset: 0;
        z-index: 1400;
        display: block !important;
        width: 100vw !important;
        max-width: 100vw !important;
        min-height: 100dvh;
        height: 100dvh;
        margin: 0 !important;
        padding: 0 !important;
        overflow: hidden !important;
        background: var(--bg);
    }
    body.onea-mobile-chat-active .chat-window {
        position: fixed;
        inset: 0;
        z-index: 1401;
        display: flex !important;
        width: 100vw !important;
        max-width: 100vw !important;
        height: 100dvh !important;
        max-height: 100dvh !important;
        min-height: 100dvh !important;
        margin: 0 !important;
        border: 0 !important;
        border-radius: 0 !important;
        box-shadow: none !important;
    }
    body.onea-mobile-chat-active .chat-window .chat-top {
        flex: 0 0 auto;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 8px;
        padding: max(8px, env(safe-area-inset-top)) 10px 8px;
    }
    body.onea-mobile-chat-active .chat-window .chat-top > div:first-child {
        display: block !important;
        min-width: 0;
    }
    body.onea-mobile-chat-active .chat-window .chat-top strong {
        font-size: .98rem;
        line-height: 1.15;
    }
    body.onea-mobile-chat-active .chat-window .chat-top small {
        font-size: .74rem;
        line-height: 1.18;
    }
    body.onea-mobile-chat-active .chat-actions {
        flex: 0 0 auto;
        gap: 5px;
        flex-wrap: nowrap;
    }
    body.onea-mobile-chat-active .chat-window .chat-actions > button:not([data-group-favorite-toggle]):not([data-mobile-group-info]):not([data-close-active-conversation]):not([data-block-active-user]) {
        display: none !important;
    }
    body.onea-mobile-chat-active .chat-body {
        flex: 1 1 auto;
        min-height: 0;
        overflow: hidden !important;
    }
    body.onea-mobile-chat-active .chat-ad-slot,
    body.onea-mobile-chat-active .open-conversations {
        display: none !important;
    }
    body.onea-mobile-chat-active .chat-messages {
        flex: 1 1 auto;
        min-height: 0;
        overflow-y: auto !important;
        overscroll-behavior-y: contain;
        padding: 12px 12px 10px;
    }
    body.onea-mobile-chat-active .composer {
        flex: 0 0 auto;
        padding: 8px 8px max(8px, env(safe-area-inset-bottom));
        border-radius: 0;
    }
    body.onea-mobile-chat-active .composer-tools {
        overflow-x: auto;
        scrollbar-width: none;
    }
    body.onea-mobile-chat-active .composer-tools::-webkit-scrollbar {
        display: none;
    }
}

/* v100: neue Chat-Eingabe mit rundem Senden-Button in der Mitte */
.composer {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-areas:
        "pending"
        "message"
        "actions"
        "status" !important;
    gap: 8px !important;
    align-items: stretch !important;
    overflow: visible !important;
}
.composer .pending-media {
    grid-area: pending !important;
    grid-column: auto !important;
}
.composer [data-chat-input] {
    grid-area: message !important;
    width: 100% !important;
    min-width: 0 !important;
    height: 46px !important;
    border-radius: 999px !important;
    padding-inline: 16px !important;
}
.composer-main-actions {
    grid-area: actions;
    position: relative;
    min-height: 72px;
    width: 100%;
    max-width: 100%;
    overflow: visible;
}
.composer-send-btn,
.composer-action-btn,
.composer-emo-picker > summary {
    display: inline-grid !important;
    place-items: center !important;
    padding: 0 !important;
    line-height: 1 !important;
    white-space: nowrap !important;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}
.composer-main-actions .composer-action-btn,
.composer-main-actions .composer-emo-picker > summary {
    box-sizing: border-box !important;
    flex: 0 0 44px !important;
}
.composer-send-btn {
    position: absolute !important;
    left: 50% !important;
    top: 50% !important;
    transform: translate(-50%, -50%) !important;
    width: 64px !important;
    min-width: 64px !important;
    height: 64px !important;
    min-height: 64px !important;
    border-radius: 999px !important;
    font-size: 1.75rem !important;
    background: #16a34a !important;
    border-color: #16a34a !important;
    color: #fff !important;
    box-shadow: 0 10px 26px rgba(22, 163, 74, .30) !important;
    z-index: 3;
}
.composer-send-btn.is-recording {
    background: #dc2626 !important;
    border-color: #dc2626 !important;
    box-shadow: 0 0 0 6px rgba(220, 38, 38, .20), 0 10px 26px rgba(220, 38, 38, .28) !important;
    animation: pulseRecord 1s infinite;
}
.composer-action-btn,
.composer-emo-picker > summary {
    position: absolute !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: 44px !important;
    min-width: 44px !important;
    max-width: 44px !important;
    height: 44px !important;
    min-height: 44px !important;
    max-height: 44px !important;
    border-radius: 15px !important;
    background: #16a34a !important;
    border: 1px solid #16a34a !important;
    color: #fff !important;
    font-size: 1.08rem !important;
    overflow: hidden !important;
    z-index: 2;
}
.composer [data-image-pick] { left: calc(50% - 138px) !important; }
.composer [data-take-photo] { left: calc(50% - 88px) !important; }
.composer [data-dictate] { left: calc(50% + 44px) !important; }
.composer-emo-picker { position: static !important; min-width: 0 !important; }
.composer-emo-picker > summary { left: calc(50% + 94px) !important; cursor: pointer; list-style: none; }
.composer-emo-picker > summary::-webkit-details-marker { display: none; }
.composer-emo-picker .composer-picker-label { display: none !important; }
.composer-emo-picker .composer-picker-panel {
    position: fixed !important;
    left: 50vw !important;
    right: auto !important;
    bottom: calc(92px + env(safe-area-inset-bottom)) !important;
    transform: translateX(-50%) !important;
    width: min(92vw, 560px) !important;
    max-height: min(54vh, 430px) !important;
    z-index: 2147483001 !important;
}
.composer-status {
    grid-area: status !important;
    grid-column: auto !important;
    min-height: 20px;
}
.composer-hidden-record[hidden] {
    display: none !important;
}
.composer .composer-tools,
.composer-picker-row {
    display: none !important;
}
body > .attachment-sheet .attachment-sheet-actions-upload-only {
    grid-template-columns: repeat(auto-fit, minmax(138px, 1fr)) !important;
}
body > .attachment-sheet .attachment-sheet-actions-upload-only button {
    min-height: 124px !important;
}
@media (max-width: 430px) {
    .composer-main-actions { min-height: 64px; }
    .composer-send-btn {
        width: 56px !important;
        min-width: 56px !important;
        height: 56px !important;
        min-height: 56px !important;
        font-size: 1.48rem !important;
    }
    .composer-action-btn,
    .composer-emo-picker > summary {
        width: 34px !important;
        min-width: 34px !important;
        max-width: 34px !important;
        height: 34px !important;
        min-height: 34px !important;
        max-height: 34px !important;
        border-radius: 12px !important;
        font-size: .94rem !important;
    }
    .composer [data-image-pick] { left: calc(50% - 106px) !important; }
    .composer [data-take-photo] { left: calc(50% - 68px) !important; }
    .composer [data-dictate] { left: calc(50% + 34px) !important; }
    .composer-emo-picker > summary { left: calc(50% + 72px) !important; }
    .composer-emo-picker .composer-picker-panel {
        bottom: calc(84px + env(safe-area-inset-bottom)) !important;
        max-height: min(56vh, 390px) !important;
    }
}
@media (max-width: 360px) {
    .composer-action-btn,
    .composer-emo-picker > summary {
        width: 30px !important;
        min-width: 30px !important;
        max-width: 30px !important;
        height: 30px !important;
        min-height: 30px !important;
        max-height: 30px !important;
        border-radius: 10px !important;
        font-size: .84rem !important;
    }
    .composer [data-image-pick] { left: calc(50% - 94px) !important; }
    .composer [data-take-photo] { left: calc(50% - 60px) !important; }
    .composer [data-dictate] { left: calc(50% + 30px) !important; }
    .composer-emo-picker > summary { left: calc(50% + 64px) !important; }
}

/* Eigenständige Registrieren-Seite */
.register-page-body {
    background:
        radial-gradient(circle at top left, rgba(34, 197, 94, .18), transparent 34%),
        radial-gradient(circle at bottom right, rgba(37, 99, 235, .12), transparent 32%),
        var(--bg);
}
.register-standalone-page {
    padding: clamp(18px, 4vw, 44px) 0 52px;
}
.register-back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 14px;
    text-decoration: none;
    color: var(--muted);
    font-weight: 850;
}
.register-back-link:hover,
.register-back-link:focus-visible {
    color: var(--brand);
}
.register-standalone-shell {
    display: grid;
    grid-template-columns: minmax(260px, .82fr) minmax(360px, 1.18fr);
    gap: clamp(18px, 3vw, 34px);
    align-items: stretch;
    padding: clamp(18px, 3.4vw, 34px);
    overflow: hidden;
}
.register-standalone-intro {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 16px;
    min-height: 100%;
    border-radius: 24px;
    padding: clamp(20px, 3vw, 30px);
    background: linear-gradient(145deg, rgba(22, 163, 74, .14), rgba(37, 99, 235, .08));
    border: 1px solid rgba(22, 163, 74, .18);
}
body.dark .register-standalone-intro {
    background: linear-gradient(145deg, rgba(22, 163, 74, .16), rgba(37, 99, 235, .12));
    border-color: rgba(148, 163, 184, .22);
}
.register-standalone-logo {
    width: min(220px, 62vw);
    height: auto;
    object-fit: contain;
    align-self: flex-start;
}
.register-standalone-intro h1 {
    margin: 0;
    font-size: clamp(2rem, 4.2vw, 3.55rem);
    line-height: 1.03;
    letter-spacing: -.045em;
}
.register-standalone-intro p {
    margin: 0;
    color: var(--muted);
    font-size: clamp(1rem, 1.7vw, 1.2rem);
    line-height: 1.55;
    font-weight: 750;
}
.register-benefits {
    display: grid;
    gap: 10px;
    margin-top: 4px;
}
.register-benefits span {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 13px;
    border-radius: 16px;
    background: rgba(255, 255, 255, .72);
    border: 1px solid rgba(15, 23, 42, .08);
    color: var(--text);
    font-weight: 850;
}
body.dark .register-benefits span {
    background: rgba(15, 23, 42, .56);
    border-color: rgba(148, 163, 184, .18);
}
.register-benefits strong {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 12px;
    background: rgba(22, 163, 74, .14);
}
.register-login-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: flex-start;
    margin-top: 6px;
    min-height: 44px;
    padding: 11px 16px;
    border-radius: 999px;
    color: #fff;
    background: var(--brand);
    text-decoration: none;
    font-weight: 900;
}
.register-standalone-card {
    height: auto;
    align-self: stretch;
    box-shadow: none;
    border: 1px solid var(--border);
    border-radius: 24px;
    background: rgba(255, 255, 255, .82);
}
body.dark .register-standalone-card {
    background: rgba(16, 24, 39, .88);
}
.register-standalone-card .auth-form {
    gap: 13px;
}
.register-standalone-card .register-submit {
    min-height: 52px;
    font-size: 1.08rem;
}

@media (max-width: 900px) {
    .register-standalone-shell {
        grid-template-columns: 1fr;
    }
    .register-standalone-intro {
        text-align: center;
        align-items: center;
    }
    .register-standalone-logo,
    .register-login-link {
        align-self: center;
    }
}

@media (max-width: 520px) {
    .register-standalone-page {
        width: min(100% - 14px, 1080px);
        padding: 10px 0 26px;
    }
    .register-back-link {
        width: 100%;
        justify-content: center;
        margin-bottom: 10px;
        min-height: 42px;
    }
    .register-standalone-shell {
        padding: 10px;
        border-radius: 22px;
        gap: 10px;
    }
    .register-standalone-intro {
        padding: 15px 13px;
        border-radius: 18px;
        gap: 10px;
    }
    .register-standalone-logo {
        width: min(178px, 56vw);
    }
    .register-standalone-intro h1 {
        font-size: 1.7rem;
        letter-spacing: -.025em;
    }
    .register-standalone-intro p {
        font-size: .94rem;
        line-height: 1.45;
    }
    .register-benefits {
        width: 100%;
        gap: 7px;
    }
    .register-benefits span {
        justify-content: flex-start;
        text-align: left;
        padding: 9px 10px;
        font-size: .9rem;
    }
    .register-benefits strong {
        width: 30px;
        height: 30px;
        border-radius: 10px;
    }
    .register-login-link {
        width: 100%;
    }
    .register-standalone-card {
        padding: 15px;
        border-radius: 18px;
    }
    .register-standalone-card h2 {
        text-align: center;
        font-size: 1.35rem;
        margin-bottom: 10px;
    }
    .register-standalone-card .auth-form {
        gap: 10px;
    }
    .register-standalone-card input {
        min-height: 46px;
        padding: 12px 13px;
        border-radius: 14px;
    }
    .register-standalone-card .legal-checks {
        display: grid;
        gap: 9px;
    }
    .register-standalone-card .register-submit {
        min-height: 50px;
        border-radius: 16px;
    }
}

/* v108: Anmelden vor Starttext in einer Zeile + alte Starttexte entfernt */
.start-hero-image {
    gap: 14px;
}
.start-hero-head {
    width: min(100%, 980px);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    flex-wrap: nowrap;
    margin-inline: auto;
}
.start-login-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    border: 0;
    border-radius: 999px;
    padding: 10px 18px;
    min-width: 0;
    width: auto;
    white-space: nowrap;
    color: #fff;
    background: linear-gradient(135deg, #16a34a, #0f766e);
    box-shadow: 0 12px 26px rgba(22, 163, 74, .24);
    font: inherit;
    font-weight: 950;
    font-size: clamp(.96rem, 1.55vw, 1.1rem);
    line-height: 1.1;
    cursor: pointer;
}
.start-login-button:focus-visible {
    outline: 3px solid rgba(37, 99, 235, .55);
    outline-offset: 4px;
}
.start-image-title {
    margin: 0;
    flex: 0 1 auto;
    min-width: 0;
    font-size: clamp(1.12rem, 3.1vw, 2.05rem);
    line-height: 1.08;
    letter-spacing: -0.025em;
    white-space: nowrap;
    max-width: none;
}
.auth-grid-register-only {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
        "register"
        "auth-banner";
    width: min(760px, 100%);
    margin-inline: auto;
}
.auth-grid-register-only .auth-card-register {
    grid-area: register;
}
.login-modal[hidden] { display: none; }
.login-modal {
    position: fixed;
    inset: 0;
    z-index: 1800;
    display: grid;
    place-items: center;
    padding: 18px;
    background: rgba(2, 6, 23, .72);
}
.login-modal-card {
    position: relative;
    width: min(520px, 100%);
    max-height: min(92vh, 760px);
    overflow-y: auto;
    padding: clamp(18px, 3vw, 28px);
    display: grid;
    gap: 18px;
    border-radius: 26px;
}
.login-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: rgba(255,255,255,.9);
    color: var(--text);
    font-size: 1.7rem;
    line-height: 1;
    cursor: pointer;
}
body.dark .login-modal-close {
    background: rgba(15,23,42,.94);
    color: #f8fafc;
}
.login-modal-head {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    align-items: center;
    gap: 14px;
    padding-right: 44px;
}
.login-modal-head img {
    width: 72px;
    height: 72px;
    object-fit: contain;
}
.login-modal-head h2,
.forgot-modal-panel h3 {
    margin: 0;
    font-size: clamp(1.55rem, 4vw, 2.15rem);
    line-height: 1.1;
}
.login-modal-head p:not(.eyebrow),
.forgot-modal-panel p {
    margin: 6px 0 0;
    color: var(--muted);
    font-weight: 750;
    line-height: 1.45;
}
.login-modal-form,
.forgot-password-form {
    display: grid;
    gap: 14px;
}
.login-modal-form label,
.forgot-password-form label {
    display: grid;
    gap: 7px;
    font-weight: 850;
}
.login-modal-form label span,
.forgot-password-form label span {
    color: var(--muted);
    font-size: .94rem;
}
.login-modal-form input,
.forgot-password-form input {
    width: 100%;
}
.forgot-password-link {
    appearance: none;
    border: 0;
    background: transparent;
    color: var(--brand);
    font: inherit;
    font-weight: 900;
    text-decoration: underline;
    cursor: pointer;
    justify-self: center;
    padding: 4px 8px;
}
.forgot-password-link:focus-visible,
.login-modal-close:focus-visible {
    outline: 3px solid rgba(37, 99, 235, .55);
    outline-offset: 3px;
}
.forgot-password-form .form-message,
.login-modal-form .form-message {
    text-align: center;
    line-height: 1.45;
}

.reset-password-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 22px;
}
.reset-password-card {
    width: min(560px, 100%);
    padding: clamp(20px, 4vw, 32px);
    display: grid;
    gap: 16px;
}
.reset-password-head {
    display: flex;
    align-items: center;
    gap: 14px;
}
.reset-password-head img {
    width: 74px;
    height: 74px;
    object-fit: contain;
}
.reset-password-head h1 {
    margin: 0;
    font-size: clamp(1.6rem, 5vw, 2.35rem);
    line-height: 1.08;
}
.reset-password-card p {
    margin: 0;
    color: var(--muted);
    font-weight: 750;
    line-height: 1.5;
}
.reset-password-form {
    display: grid;
    gap: 14px;
}
.reset-password-form label {
    display: grid;
    gap: 7px;
    font-weight: 850;
}
.reset-password-form input {
    width: 100%;
}
.reset-password-actions {
    display: grid;
    gap: 10px;
}
.reset-password-back {
    text-align: center;
    color: var(--brand);
    font-weight: 900;
}

@media (max-width: 820px) {
    .start-hero-head {
        gap: 7px;
        width: 100%;
        padding-inline: 2px;
    }
    .start-login-button {
        padding: 8px 11px;
        font-size: clamp(.76rem, 3.1vw, .94rem);
    }
    .start-image-title {
        font-size: clamp(.82rem, 4.25vw, 1.45rem);
        line-height: 1.08;
        letter-spacing: -0.055em;
    }
    .login-modal {
        padding: 10px;
        align-items: start;
        overflow-y: auto;
    }
    .login-modal-card {
        width: 100%;
        max-height: none;
        margin: 10px 0;
        border-radius: 22px;
    }
    .login-modal-head {
        grid-template-columns: 58px minmax(0, 1fr);
        gap: 12px;
        padding-right: 38px;
    }
    .login-modal-head img {
        width: 58px;
        height: 58px;
    }
    .login-submit,
    .forgot-password-form button[type="submit"] {
        min-height: 48px;
    }
    .auth-grid-register-only {
        width: 100%;
    }
    @media (max-width: 380px) {
        .start-hero-head { gap: 5px; }
        .start-login-button { padding: 7px 9px; font-size: .72rem; }
        .start-image-title { font-size: .78rem; letter-spacing: -0.06em; }
    }
    .reset-password-page {
        padding: 12px;
        align-items: start;
    }
    .reset-password-card {
        margin-top: 12px;
        border-radius: 22px;
    }
    .reset-password-head {
        align-items: flex-start;
    }
    .reset-password-head img {
        width: 58px;
        height: 58px;
    }
}

/* v109: Registrierung sauber geordnet, Pflichtfelder, Alterskontrolle und kompaktes Captcha */
.register-fields {
    display: grid;
    gap: 12px;
}
.register-field-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}
.register-field-full {
    width: 100%;
}
.register-age-check {
    display: grid;
    gap: 9px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--panel-soft);
}
.register-age-check p {
    margin: 0;
    display: grid;
    gap: 4px;
    color: var(--muted);
    font-size: .94rem;
    line-height: 1.35;
    font-weight: 700;
}
.register-age-check p strong {
    color: var(--text);
    font-size: 1rem;
}
.register-age-check input[type="date"] {
    max-width: 210px;
}
.register-legal-checks {
    align-items: center;
    gap: 10px 16px;
}
.register-legal-checks label {
    min-height: 34px;
    padding: 6px 0;
}
.register-captcha-field {
    align-items: start;
    justify-items: start;
    width: max-content;
    max-width: 100%;
}
.register-captcha-field .captcha-question-row {
    gap: 6px;
}
.captcha-answer-input {
    width: 112px;
    max-width: 112px;
    min-width: 0;
    text-align: center;
    font-weight: 900;
    letter-spacing: .02em;
}
.auth-form button.register-submit {
    justify-self: start;
    align-self: start;
    width: auto;
    min-width: 0;
    padding-left: 18px;
    padding-right: 18px;
}
.register-standalone-card .register-submit {
    width: auto;
}

@media (max-width: 620px) {
    .register-field-row {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    .register-age-check {
        padding: 10px;
        border-radius: 15px;
    }
    .register-age-check input[type="date"] {
        max-width: 100%;
    }
    .register-legal-checks {
        display: grid;
        grid-template-columns: 1fr;
        gap: 7px;
    }
    .register-captcha-field {
        width: 100%;
    }
    .captcha-answer-input {
        width: 104px;
        max-width: 104px;
    }
    .auth-form button.register-submit {
        justify-self: start;
        min-height: 48px;
    }
}
.register-age-date-label {
    display: grid;
    gap: 6px;
    color: var(--muted);
    font-weight: 850;
    font-size: .92rem;
    width: max-content;
    max-width: 100%;
}

/* v109: Anmeldefenster bereinigt, ohne sichtbaren Scrollbalken */
.login-modal,
.login-modal-card {
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.login-modal::-webkit-scrollbar,
.login-modal-card::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}
.login-modal-form.login-form {
    flex: initial;
    align-content: start;
    grid-template-rows: none;
}
.login-modal-form,
.forgot-password-form {
    align-items: start;
}
.login-modal-form .login-submit,
.forgot-password-form .login-submit {
    justify-self: start;
    width: auto;
    min-width: 0;
    padding-inline: 18px;
}
.login-modal-form .forgot-password-link,
.forgot-password-form .forgot-password-link {
    justify-self: start;
    padding-left: 0;
    padding-right: 0;
    text-align: left;
}
.login-modal-form .form-message,
.forgot-password-form .form-message {
    text-align: left;
}
@media (max-width: 640px) {
    .login-modal-card {
        overflow-y: auto;
    }
    .login-modal-form .login-submit,
    .forgot-password-form .login-submit {
        min-height: 44px;
        padding-inline: 16px;
    }
}

/* v111: Passwort vergessen ist reiner Text-Link direkt neben dem Anmelden-Button */
.login-modal-actions {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    flex-wrap: wrap;
}
.login-modal-form .login-modal-actions .login-submit {
    justify-self: auto;
    width: auto;
    min-width: 0;
    padding-inline: 18px;
}
.auth-form .login-modal-actions button.forgot-password-link,
.login-modal-form .login-modal-actions .forgot-password-link {
    appearance: none;
    border: 0;
    border-radius: 0;
    background: transparent !important;
    color: var(--brand) !important;
    box-shadow: none;
    padding: 0;
    min-height: 0;
    width: auto;
    min-width: 0;
    font: inherit;
    font-size: .94rem;
    font-weight: 850;
    line-height: 1.2;
    text-decoration: underline;
    cursor: pointer;
    justify-self: auto;
}
.auth-form .login-modal-actions button.forgot-password-link:hover,
.auth-form .login-modal-actions button.forgot-password-link:focus-visible {
    background: transparent !important;
    color: var(--brand-2) !important;
}
@media (max-width: 640px) {
    .login-modal-actions {
        gap: 10px;
    }
    .auth-form .login-modal-actions button.forgot-password-link,
    .login-modal-form .login-modal-actions .forgot-password-link {
        font-size: .92rem;
    }
}

/* v112: Passwort-zuruecksetzen Fenster mit sauberen Abstaenden und reinem Text-Link */
.forgot-modal-panel {
    display: grid;
    gap: 12px;
}
.forgot-modal-panel[hidden] {
    display: none !important;
}
.forgot-modal-panel .forgot-help-text {
    margin: 0 0 4px;
    max-width: 42rem;
    color: var(--muted);
    font-weight: 750;
    line-height: 1.45;
}
.forgot-password-form {
    gap: 10px;
}
.forgot-password-form .forgot-email-field {
    gap: 5px;
}
.forgot-password-form .forgot-email-field span {
    margin: 0;
}
.forgot-password-form .forgot-email-field input {
    margin: 0;
}
.forgot-password-actions {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 2px;
}
.forgot-password-actions .login-submit {
    justify-self: auto;
    width: auto;
    min-width: 0;
    padding-inline: 18px;
}
.auth-form .forgot-password-actions button.forgot-password-link,
.forgot-password-form .forgot-password-actions .forgot-password-link {
    appearance: none;
    border: 0;
    border-radius: 0;
    background: transparent !important;
    color: var(--brand) !important;
    box-shadow: none !important;
    padding: 0;
    min-height: 0;
    width: auto;
    min-width: 0;
    font: inherit;
    font-size: .94rem;
    font-weight: 850;
    line-height: 1.25;
    text-decoration: underline;
    cursor: pointer;
    justify-self: auto;
}
.auth-form .forgot-password-actions button.forgot-password-link:hover,
.auth-form .forgot-password-actions button.forgot-password-link:focus-visible {
    background: transparent !important;
    color: var(--brand-dark) !important;
}
.forgot-spam-note {
    margin: 8px 0 0;
    color: var(--muted);
    font-weight: 750;
    line-height: 1.4;
    text-align: left;
}
.forgot-password-form .form-message {
    margin-top: 2px;
}
@media (max-width: 640px) {
    .forgot-modal-panel {
        gap: 10px;
    }
    .forgot-password-actions {
        gap: 10px;
    }
    .auth-form .forgot-password-actions button.forgot-password-link,
    .forgot-password-form .forgot-password-actions .forgot-password-link {
        font-size: .92rem;
    }
    .forgot-spam-note {
        margin-top: 7px;
    }
}

/* Header-Werbebanner nach der Anmeldung: Logo + Banner bleiben oben gemeinsam mittig. */
@media (max-width: 480px) {
    body.is-logged-in .header-inner {
        width: calc(100% - 8px);
        gap: 6px;
    }
    body.is-logged-in .header-logo img { width: clamp(58px, 18vw, 84px); }
    body.is-logged-in .header-login-ad { max-width: calc(100vw - 78px); }
}

/* Offene Chats ohne Banner und User-Symbole sauber angeordnet */
.chat-body > .open-conversations:first-child {
    margin-top: 12px;
}
.chat-window .chat-ad-slot {
    display: none !important;
}
.user-head .avatar-button,
.user-head .sidebar-symbol-btn {
    position: relative;
}
.user-head .avatar-button[title],
.user-head .sidebar-symbol-btn[title] {
    -webkit-tap-highlight-color: rgba(22, 163, 74, .18);
}
body.is-logged-in .site-header {
    border-bottom-color: var(--border);
}
@media (max-width: 820px) {
    body.is-logged-in .header-inner {
        padding-top: 8px;
        padding-bottom: 12px;
    }
    .sidebar-symbol-actions {
        gap: 7px;
    }
    .sidebar-symbol-btn,
    .sidebar-actions button {
        width: 40px;
        height: 40px;
        min-width: 40px;
        min-height: 40px;
    }
}

/* v122: Chat-Buttons sauber angeordnet und Such-Beitritt als Symbol */
.composer-main-actions .composer-action-btn,
.composer-main-actions .composer-emo-picker > summary {
    width: 44px !important;
    min-width: 44px !important;
    max-width: 44px !important;
    height: 44px !important;
    min-height: 44px !important;
    max-height: 44px !important;
}
.composer-main-actions .composer-send-btn {
    width: 64px !important;
    min-width: 64px !important;
    height: 64px !important;
    min-height: 64px !important;
}
.composer [data-image-pick] { left: calc(50% - 138px) !important; }
.composer [data-take-photo] { left: calc(50% - 88px) !important; }
.composer [data-dictate] { left: calc(50% + 44px) !important; }
.composer-emo-picker > summary { left: calc(50% + 94px) !important; }
.search-join-icon-btn,
.search-open-icon-btn {
    width: 40px !important;
    min-width: 40px !important;
    height: 40px !important;
    min-height: 40px !important;
    padding: 0 !important;
    display: inline-grid !important;
    place-items: center !important;
    border-radius: 13px !important;
    font-size: 1.15rem !important;
    line-height: 1 !important;
    text-align: center !important;
}
.search-join-icon-btn {
    background: #16a34a !important;
    border: 1px solid #16a34a !important;
    color: #fff !important;
}
.search-open-icon-btn {
    background: #e5e7eb !important;
    border: 1px solid #cbd5e1 !important;
    color: #0f172a !important;
}
.search-join-icon-btn:disabled,
.search-open-icon-btn:disabled {
    opacity: .55 !important;
    cursor: default !important;
}
.group-search-result .search-join-icon-btn,
.group-search-result .search-open-icon-btn,
.search-result .search-join-icon-btn,
.search-result .search-open-icon-btn {
    justify-self: end;
}
@media (max-width: 430px) {
    .composer-main-actions .composer-action-btn,
    .composer-main-actions .composer-emo-picker > summary {
        width: 34px !important;
        min-width: 34px !important;
        max-width: 34px !important;
        height: 34px !important;
        min-height: 34px !important;
        max-height: 34px !important;
    }
    .composer-main-actions .composer-send-btn {
        width: 56px !important;
        min-width: 56px !important;
        height: 56px !important;
        min-height: 56px !important;
    }
    .composer [data-image-pick] { left: calc(50% - 106px) !important; }
    .composer [data-take-photo] { left: calc(50% - 68px) !important; }
    .composer [data-dictate] { left: calc(50% + 34px) !important; }
    .composer-emo-picker > summary { left: calc(50% + 72px) !important; }
}
@media (max-width: 360px) {
    .composer-main-actions .composer-action-btn,
    .composer-main-actions .composer-emo-picker > summary {
        width: 30px !important;
        min-width: 30px !important;
        max-width: 30px !important;
        height: 30px !important;
        min-height: 30px !important;
        max-height: 30px !important;
    }
    .composer-main-actions .composer-send-btn {
        width: 52px !important;
        min-width: 52px !important;
        height: 52px !important;
        min-height: 52px !important;
    }
    .composer [data-image-pick] { left: calc(50% - 94px) !important; }
    .composer [data-take-photo] { left: calc(50% - 60px) !important; }
    .composer [data-dictate] { left: calc(50% + 30px) !important; }
    .composer-emo-picker > summary { left: calc(50% + 64px) !important; }
}

/* v23: Suche nur im Suchfenster, nicht zusätzlich links unter dem Suchbutton */
.search-action-btn {
    width: fit-content !important;
    min-width: 0 !important;
    max-width: max-content !important;
    justify-self: start !important;
    align-self: start !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}
.messenger-sidebar > .search-results[data-search-results] {
    display: none !important;
}
@media (max-width: 520px) {
    .search-action-btn {
        width: fit-content !important;
        max-width: max-content !important;
        padding-left: 16px !important;
        padding-right: 16px !important;
    }
}

/* Composer nur bei ausgewähltem Chat anzeigen */
.chat-window.is-open-chat-overview .chat-top [data-chat-title] {
    font-size: clamp(1.35rem, 2.2vw, 1.8rem) !important;
    line-height: 1.15;
    letter-spacing: .01em;
}
.chat-window.is-open-chat-overview .chat-top [data-chat-subtitle]:empty {
    display: none !important;
}
.chat-window .chat-actions [data-share-profile] {
    display: none !important;
}
.composer.is-hidden,
.composer[hidden] {
    display: none !important;
}
@media (max-width: 520px) {
    .chat-window.is-open-chat-overview .chat-top [data-chat-title] {
        font-size: 1.35rem !important;
    }
}

/* v25: Sprachnachricht nur mit Abspielen/Pause und mobile Composer-Abstände */
.simple-voice-player {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.simple-voice-player audio {
    display: none;
}
.voice-player-btn {
    width: 42px;
    height: 42px;
    min-width: 42px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--panel);
    color: var(--text);
    font-size: 1.15rem;
    line-height: 1;
}
@media (max-width: 430px) {
    .composer-main-actions .composer-action-btn,
    .composer-main-actions .composer-emo-picker > summary {
        width: 40px !important;
        min-width: 40px !important;
        max-width: 40px !important;
        height: 40px !important;
        min-height: 40px !important;
        max-height: 40px !important;
    }
    .composer-main-actions .composer-send-btn {
        width: 64px !important;
        min-width: 64px !important;
        height: 64px !important;
        min-height: 64px !important;
    }
    .composer [data-image-pick] { left: calc(50% - 118px) !important; }
    .composer [data-take-photo] { left: calc(50% - 74px) !important; }
    .composer [data-dictate] { left: calc(50% + 44px) !important; }
    .composer-emo-picker > summary { left: calc(50% + 88px) !important; }
}
@media (max-width: 360px) {
    .composer [data-image-pick] { left: calc(50% - 106px) !important; }
    .composer [data-take-photo] { left: calc(50% - 62px) !important; }
    .composer [data-dictate] { left: calc(50% + 40px) !important; }
    .composer-emo-picker > summary { left: calc(50% + 80px) !important; }
}

/* v26: Smartphone/App Abstand links neben Senden-Button vergrößert */
@media (max-width: 430px) {
    .composer [data-image-pick] { left: calc(50% - 140px) !important; }
    .composer [data-take-photo] { left: calc(50% - 90px) !important; }
}
@media (max-width: 360px) {
    .composer [data-image-pick] { left: calc(50% - 132px) !important; }
    .composer [data-take-photo] { left: calc(50% - 84px) !important; }
}

/* v27: Smartphone/App-Kommunikationsbereich rechts sauberer Abstand. */
@media (max-width: 520px), (display-mode: standalone) {
    .composer-main-actions {
        min-height: 66px !important;
    }
    .composer [data-image-pick] { left: calc(50% - 160px) !important; }
    .composer [data-take-photo] { left: calc(50% - 104px) !important; }
    .composer [data-dictate] { left: calc(50% + 58px) !important; }
    .composer-emo-picker > summary { left: calc(50% + 116px) !important; }
}

@media (max-width: 430px) {
    .composer [data-image-pick] { left: calc(50% - 130px) !important; }
    .composer [data-take-photo] { left: calc(50% - 86px) !important; }
    .composer [data-dictate] { left: calc(50% + 50px) !important; }
    .composer-emo-picker > summary { left: calc(50% + 96px) !important; }
}

@media (max-width: 360px) {
    .composer [data-image-pick] { left: calc(50% - 122px) !important; }
    .composer [data-take-photo] { left: calc(50% - 80px) !important; }
    .composer [data-dictate] { left: calc(50% + 50px) !important; }
    .composer-emo-picker > summary { left: calc(50% + 94px) !important; }
}

/* v28: Nach Login scrollt die ganze Seite; Smartphone/App blendet Logo neben Banner aus. */
body.is-logged-in .site-header {
    position: static !important;
    top: auto !important;
}
body.is-logged-in .messenger-app {
    margin-top: 18px;
}
@media (max-width: 820px), (display-mode: standalone) {
    body.is-logged-in .header-logo {
        display: none !important;
    }
    body.is-logged-in .header-inner {
        justify-content: center !important;
        gap: 0 !important;
        width: calc(100% - 8px) !important;
    }
    body.is-logged-in .header-login-ad {
        flex: 1 1 100% !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    body.is-logged-in .header-login-ad-frame {
        max-width: 100% !important;
    }
}

/* v29: Beitritts-PN als sauberes Prüf-Fenster */
.join-request-detail-modal[hidden] { display: none; }
.join-request-detail-modal {
    position: fixed;
    inset: 0;
    z-index: 2147483004;
    display: grid;
    place-items: center;
    padding: 18px;
    background: rgba(2, 6, 23, .66);
}
.join-request-detail-card {
    position: relative;
    width: min(520px, 100%);
    max-height: min(86vh, 680px);
    overflow: auto;
    padding: 24px;
    border-radius: 22px;
    box-shadow: 0 24px 70px rgba(0,0,0,.48);
}
.join-request-detail-card h2 {
    margin: 0 34px 18px 0;
    font-size: clamp(1.35rem, 3vw, 1.8rem);
}
.join-request-detail-user {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
    padding: 12px;
    border-radius: 16px;
    border: 1px solid rgba(148, 163, 184, .22);
    background: rgba(15, 23, 42, .22);
}
.join-request-detail-user strong,
.join-request-detail-user small {
    display: block;
}
.join-request-detail-user small {
    margin-top: 3px;
    color: var(--muted);
    font-weight: 800;
}
.join-request-detail-list {
    display: grid;
    gap: 10px;
    margin: 0 0 16px;
}
.join-request-detail-list div {
    display: grid;
    gap: 4px;
    padding: 10px 12px;
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, .2);
}
.join-request-detail-list dt,
.join-request-detail-memberships strong {
    color: var(--brand);
    font-weight: 950;
}
.join-request-detail-list dd {
    margin: 0;
    font-weight: 850;
}
.join-request-detail-memberships {
    margin: 0 0 18px;
    padding: 12px;
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, .2);
}
.join-request-detail-memberships ul {
    margin: 8px 0 0;
    padding-left: 20px;
    color: var(--muted);
    font-weight: 800;
    line-height: 1.45;
}
.join-request-detail-actions,
.join-request-box .friend-request-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}
.join-request-open-card {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 16px;
    border: 1px solid rgba(148, 163, 184, .24);
    background: rgba(15, 23, 42, .18);
    color: inherit;
    text-align: left;
    cursor: pointer;
}
.join-request-open-card:hover,
.join-request-open-card:focus-visible {
    border-color: rgba(22, 163, 74, .55);
    outline: none;
}
.join-request-open-card span span,
.join-request-open-card small {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    font-weight: 800;
    line-height: 1.35;
}
.join-request-body-text {
    margin-bottom: 10px;
}
@media (max-width: 680px) {
    .join-request-detail-modal {
        padding: 12px;
        align-items: end;
    }
    .join-request-detail-card {
        width: 100%;
        max-height: 88vh;
        padding: 18px;
        border-radius: 20px 20px 0 0;
    }
}

/* Gruppenlink in Gruppen-Aktionen und Barrierefreiheit */
.chat-window .chat-actions .group-share-source-btn {
    display: none !important;
}
.mobile-group-menu-actions button[title] {
    touch-action: manipulation;
}

/* Offene Chats nur einmal anzeigen und alle offenen Chats schließen */
.close-all-open-chats-btn {
    font-size: 1.35rem !important;
    font-weight: 950;
    line-height: 1;
}
.chat-window.is-open-chat-overview .chat-actions {
    margin-left: auto;
}
.chat-window.is-open-chat-overview [data-chat-title] {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
}
.open-conversations .open-conversation-chips {
    margin-top: 0;
}
