        :root {
            --nexus: #1877f2;
            --nexus-soft: rgba(24,119,242,0.12);
            --nexus-deep: #6d28d9;
            --bg: #f0f2f5; --card: rgba(255,255,255,0.97);
            --text: #1c1e21; --sub: #65676b; --border: #dddfe2;
            --header-bg: rgba(255,255,255,0.82);
            --ios-input: #efeff4; --tab-bg: rgba(255,255,255,0.88);
            --danger: #ff3b30;
            --warning: #ff9500; --green: #34c759;
            --radius: 16px; --radius-sm: 10px;
            --shadow: 0 2px 20px rgba(0,0,0,0.07);
        }
        body.dark {
            --bg: #000;
            --card: #1c1c1e; --text: #fff;
            --sub: #8e8e93; --border: #2c2c2e; --header-bg: rgba(18,18,18,0.88);
            --ios-input: #2c2c2e; --tab-bg: rgba(18,18,18,0.92);
            --shadow: 0 2px 20px rgba(0,0,0,0.4);
        }
        body.theme-purple { --nexus: #8b5cf6; --nexus-soft: rgba(139,92,246,0.12); --nexus-deep: #5b21b6;
        }
        body.theme-green  { --nexus: #10b981; --nexus-soft: rgba(16,185,129,0.12); --nexus-deep: #047857;
        }
        body.theme-rose   { --nexus: #f43f5e; --nexus-soft: rgba(244,63,94,0.12); --nexus-deep: #9f1239;
        }
        body.theme-orange { --nexus: #f97316; --nexus-soft: rgba(249,115,22,0.12); --nexus-deep: #c2410c;
        }

        * { box-sizing: border-box;
        }
        body {
            font-family: 'DM Sans', -apple-system, sans-serif;
            background: var(--bg); color: var(--text); margin: 0;
            background-attachment: fixed; /* verankert den Hintergrund am Viewport statt an der (viel höheren) Seite,
                damit der Sticky-Header exakt denselben Ausschnitt zeigt wie der Rest der Seite */
            padding-top: 60px; padding-bottom: 110px;
            transition: background 0.3s, color 0.3s;
            -webkit-tap-highlight-color: transparent;
            min-height: 100vh;
        }

        /* &#9472;&#9472; FEATURE 2: BILDER-DOWNLOAD / POPUP BLOCKIEREN &#9472;&#9472; */
        img {
            -webkit-touch-callout: none;
            -webkit-user-select: none;
            user-select: none;
            -webkit-user-drag: none;
        }

        /* &#9472;&#9472; LOGIN &#9472;&#9472; */
        #login-screen {
            position: fixed; inset: 0; display: flex; justify-content: center;
            background: #0e0a2e; z-index: 1000; overflow: hidden;
        }
        .login-phone {
            position: relative; width: 100%; max-width: 480px; height: 100%;
            background-image: linear-gradient(180deg, rgba(14,10,46,0.15), rgba(14,10,46,0.75) 70%, #0e0a2e 100%),
                url('https://images.unsplash.com/photo-1557683316-973673baf926?q=80&w=1200&auto=format&fit=crop');
            background-size: cover; background-position: center;
            display: flex; flex-direction: column; align-items: center;
            padding: max(6vh, env(safe-area-inset-top)) 24px max(24px, env(safe-area-inset-bottom));
            overflow: hidden;
        }
        @keyframes logoPulse {
            0% { transform: scale(1) translateY(0); }
            50% { transform: scale(1.05) translateY(-5px); box-shadow: 0 12px 40px rgba(0,0,0,0.25); }
            100% { transform: scale(1) translateY(0); }
        }
        .login-logo-container {
            background: linear-gradient(135deg, rgba(255,255,255,0.4), rgba(255,255,255,0.1));
            width: clamp(74px, 20vw, 90px); height: clamp(74px, 20vw, 90px); border-radius: 24px;
            margin-top: 10vh; display: flex; align-items: center; justify-content: center;
            border: 2px solid rgba(255,255,255,0.5);
            box-shadow: 0 8px 32px rgba(0,0,0,0.25);
            animation: logoPulse 4s infinite ease-in-out;
        }
        .login-logo-container img { width: 44px; height: 44px; filter: drop-shadow(0 2px 5px rgba(0,0,0,0.2)); }
        .login-phone h1 {
            color: #fff; font-family: 'Syne', sans-serif; font-weight: 800;
            font-size: clamp(1.9rem, 8vw, 2.5rem); text-align: center; margin-top: 20px; line-height: 1.1;
            text-shadow: 0 2px 10px rgba(0,0,0,0.3);
        }
        .login-subtitle-new {
            color: rgba(255,255,255,0.9); text-align: center; font-size: 1rem;
            margin-top: 16px; font-weight: 500; max-width: 320px; line-height: 1.4;
        }
        .login-spacer { flex: 1; }
        .login-buttons { width: 100%; max-width: 360px; display: flex; flex-direction: column; gap: 14px; }
        #btn-login {
            width: 100%; background: white !important;
            color: #1c1e21 !important; border-radius: 28px; padding: 16px 28px;
            font-weight: 700; box-shadow: 0 4px 15px rgba(0,0,0,0.15); transition: transform 0.2s, box-shadow 0.2s;
            border: none; cursor: pointer; font-size: 1.05rem; font-family: 'DM Sans', sans-serif; display: flex; align-items: center; justify-content: center; gap: 12px;
        }
        #btn-login:hover { transform: translateY(-2px) scale(1.02); box-shadow: 0 6px 20px rgba(0,0,0,0.2); }
        #btn-login:active { transform: scale(0.97); }

        /* Loading dots on the login button */
        .btn-login-label { display: inline-flex; align-items: center; gap: 12px; transition: opacity 0.2s; }
        .btn-login-dots { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 6px; opacity: 0; }
        #btn-login.is-loading { position: relative; }
        #btn-login.is-loading .btn-login-label { opacity: 0; }
        #btn-login.is-loading .btn-login-dots { opacity: 1; }
        .btn-login-dots span { width: 8px; height: 8px; background: #1c1e21; border-radius: 50%; animation: loginDotPulse 1s infinite; }
        .btn-login-dots span:nth-child(2) { animation-delay: 0.2s; }
        .btn-login-dots span:nth-child(3) { animation-delay: 0.4s; }
        @keyframes loginDotPulse { 0%, 100% { transform: scale(0.8); opacity: 0.5; } 50% { transform: scale(1.2); opacity: 1; } }

        .login-screen-stack { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 1001; }
        .login-slide-screen {
            position: absolute; inset: 0; background: #17131f; display: flex; flex-direction: column;
            padding: max(20px, env(safe-area-inset-top)) 24px; transform: translateX(100%);
            transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1); pointer-events: none;
        }
        .login-slide-screen.active { transform: translateX(0); pointer-events: auto; }

        /* &#9472;&#9472; NAV (Topbar: zwei schwebende Pills im Design der unteren Navbar) &#9472;&#9472; */
        nav {
            position: fixed;
            top: 0; left: 0; right: 0; height: 54px;
            display: flex; align-items: center; justify-content: space-between;
            padding: 0 10px; gap: 10px; z-index: 1000;
        }
        .topbar-pill {
            background: rgba(63,63,63,0.82);
            backdrop-filter: blur(30px) saturate(1.6); -webkit-backdrop-filter: blur(30px) saturate(1.6);
            border: 0.5px solid rgba(255,255,255,0.08);
            border-radius: 999px; height: 44px;
            box-shadow: 0 10px 30px rgba(0,0,0,0.22), 0 2px 8px rgba(0,0,0,0.14), inset 0 1px 0 rgba(255,255,255,0.09), inset 0 -1px 0 rgba(0,0,0,0.05);
            display: flex; align-items: center;
        }
        .topbar-logo-pill { padding: 0 16px 0 8px; flex-shrink: 0; }
        .topbar-actions-pill { padding: 0 4px; position: relative; }
        .logo { font-family: 'Syne', sans-serif; font-size: 19px; font-weight: 800; color: var(--nexus);
            letter-spacing: -0.5px; white-space: nowrap; display: flex; align-items: center; gap: 7px;
        }
        .logo-icon { background: var(--nexus); color: white; width: 26px; height: 26px; border-radius: 8px;
            display: flex; align-items: center; justify-content: center; transition: transform 0.3s ease;
        }
        .logo-icon img {
            width: 17px;
            height: 17px;
        }
        .logo:hover .logo-icon { transform: rotate(-10deg) scale(1.1); }
        .nav-btn { background: none; border: none;
            color: rgba(255,255,255,0.75); cursor: pointer; padding: 8px;
            border-radius: 50%; display: flex; align-items: center; justify-content: center; transition: background 0.2s, color 0.2s; position: relative;
        }
        .nav-btn i { transition: transform 0.2s cubic-bezier(0.25, 0.8, 0.25, 1); }
        .nav-btn:hover i { transform: scale(1.15); }
        .nav-btn:hover { background: rgba(255,255,255,0.14); color: #fff; }

        /* &#9472;&#9472; NOTIF BADGE &#9472;&#9472; */
        @keyframes badgePop {
            0% { transform: scale(0); }
            50% { transform: scale(1.4); }
            100% { transform: scale(1); }
        }
        .notif-badge {
            position: absolute;
            top: 2px; right: 2px; background: var(--danger); color: white;
            font-size: 10px; font-weight: 700; min-width: 16px; height: 16px;
            border-radius: 8px; display: flex;
            align-items: center; justify-content: center;
            padding: 0 4px; border: 2px solid rgba(58,58,58,0.9); pointer-events: none;
            animation: badgePop 0.3s ease forwards;
        }

        /* &#9472;&#9472; SUCHBILDSCHIRM &#9472;&#9472; */
        #search-screen {
            position: fixed !important; top: 54px; left: 0; right: 0; bottom: 0;
            max-width: 600px; margin: 0 auto; width: 100%;
            background: var(--bg); z-index: 600;
            display: flex; flex-direction: column; padding: 0;
        }
        #search-screen.hidden { display: none !important; }
        .search-screen-header {
            flex-shrink: 0; display: flex; align-items: center; gap: 8px;
            padding: 12px 14px; border-bottom: 0.5px solid var(--border);
        }
        .search-screen-input-wrap {
            flex: 1; display: flex; align-items: center; gap: 8px; background: var(--ios-input);
            border-radius: 12px; padding: 0 12px; height: 38px;
        }
        .search-screen-input {
            flex: 1; border: none; background: none; outline: none; color: var(--text);
            font-size: 15px; font-family: inherit; height: 100%; min-width: 0;
        }
        .search-screen-input::placeholder { color: var(--sub); }
        .search-screen-clear-btn {
            background: rgba(120,120,128,0.24); border: none; color: var(--sub); width: 18px; height: 18px;
            border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0;
        }
        #search-screen-body {
            flex: 1 1 auto; overflow-y: auto; -webkit-overflow-scrolling: touch; display: flex; flex-direction: column;
            padding: 4px 12px calc(24px + env(safe-area-inset-bottom));
        }

        /* &#9472;&#9472; CONTAINER &#9472;&#9472; */
        .container { max-width: 600px; margin: 0 auto; padding: 0 12px; }

        /* &#9472;&#9472; SCREEN SWIPE TRANSITIONS &#9472;&#9472; */
        .screen-transitioning {
            position: fixed !important; top: 54px; bottom: 0; left: 0; right: 0;
            max-width: 600px; margin: 0 auto; background: var(--bg);
            z-index: 500; overflow-y: auto; -webkit-overflow-scrolling: touch;
            transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.32s ease;
        }
        .screen-slide-in-right { transform: translateX(100%); }
        .screen-slide-in-left { transform: translateX(-100%); }
        .screen-slide-settled { transform: translateX(0); }
        .screen-slide-out-left { transform: translateX(-28%); opacity: 0.5; }
        .screen-slide-out-right { transform: translateX(100%); }

        /* Lightweight swipe for in-flow tab content (e.g. Feed <-> Trending) that must NOT be
           taken out of normal document flow like the full screens above. */
        @keyframes tabSlideInRight { from { transform: translateX(24px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
        @keyframes tabSlideInLeft { from { transform: translateX(-24px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
        .tab-slide-in-right { animation: tabSlideInRight 0.28s cubic-bezier(0.16, 1, 0.3, 1); }
        .tab-slide-in-left { animation: tabSlideInLeft 0.28s cubic-bezier(0.16, 1, 0.3, 1); }

        /* ── STICKY HEADER (Storys + Tabs, oben angeheftet) ── */
        #sticky-header {
            position: fixed; top: 60px; left: 0; right: 0; z-index: 900;
            max-width: 600px; margin: 0 auto; padding: 0 12px;
            background: var(--bg);
            background-attachment: fixed; /* zeigt exakt denselben Ausschnitt wie body, kein Verlauf-Versatz */
            will-change: transform;
        }
        #sticky-header-fade {
            position: absolute; left: 0; right: 0; bottom: -28px; height: 28px;
            background: linear-gradient(to bottom, var(--bg), transparent);
            pointer-events: none;
        }
        #sticky-header-spacer { width: 100%; }
        #sticky-header-spacer-fade-gap { width: 100%; height: 28px; }

        /* ── TABS ── */
        .feed-tabs-row { display: flex; align-items: center; gap: 0; margin-bottom: 10px; }
        .feed-tabs { display: flex; flex: 1; min-width: 0;
            gap: 0; background: var(--card); border-radius: var(--radius); overflow: hidden; border: 0.5px solid var(--border);
        }
        /* Kompakter "Story hinzuf&#252;gen"-Button, der beim Scrollen (per JS anhand des
           Scroll-Fortschritts) links neben die Tabs einblendet, w&#228;hrend der gro&#223;e
           Kreis in der Story-Leiste ausblendet. */
        .tabs-story-add-btn {
            flex-shrink: 0; width: 0; height: 36px; border-radius: 50%; border: none; padding: 0;
            background: var(--nexus); color: #fff; display: flex; align-items: center; justify-content: center;
            cursor: pointer; opacity: 0; transform: scale(0); overflow: hidden; margin-right: 0;
        }
        .feed-tab { flex: 1; padding: 11px; border: none; background: none; color: var(--sub);
            font-size: 14px; font-weight: 600; cursor: pointer; font-family: inherit; transition: all 0.2s; position: relative;
        }
        .feed-tab::after {
            content: '';
            position: absolute; bottom: 0; left: 50%; width: 0; height: 3px; background: var(--nexus);
            transition: width 0.3s ease, left 0.3s ease;
            border-radius: 3px 3px 0 0;
        }
        .feed-tab.active { color: var(--nexus); background: var(--nexus-soft); }
        .feed-tab.active::after { width: 100%; left: 0; }

        /* ── STORIES ── */
        #stories-bar { overflow-x: auto;
            display: flex; gap: 12px; padding: 14px 12px 8px; scrollbar-width: none;
        }
        #stories-bar::-webkit-scrollbar { display: none; }
        .story-item { display: flex; flex-direction: column; align-items: center; gap: 5px; cursor: pointer;
            flex-shrink: 0; transition: transform 0.2s; }
        .story-item:hover { transform: translateY(-2px); }
        .story-ring { width: 58px; height: 58px; border-radius: 50%; padding: 2.5px;
            background: conic-gradient(var(--nexus), #a78bfa, #f43f5e, var(--nexus)); transition: transform 0.3s ease; }
        .story-ring.unseen { background: conic-gradient(var(--nexus), #a78bfa, var(--nexus)); }
        .story-ring.seen { background: var(--border); }
        .story-item:hover .story-ring { transform: scale(1.05); }
        .story-ring-inner { width: 100%; height: 100%; border-radius: 50%; background: var(--card); padding: 2px;
            overflow: hidden; }
        .story-ring-inner img { width: 100%; height: 100%; border-radius: 50%;
            object-fit: cover; transition: transform 0.3s ease; }
        .story-item:hover .story-ring-inner img { transform: scale(1.1); }
        .story-label { font-size: 11px; color: var(--sub); max-width: 60px; text-align: center;
            white-space: nowrap;
            overflow: hidden; text-overflow: ellipsis; }

        /* &#9472;&#9472; CARDS &#9472;&#9472; */
        .card { background: var(--card);
            border-radius: var(--radius); padding: 16px; margin-bottom: 10px; border: 0.5px solid var(--border); box-shadow: var(--shadow); position: relative;
            transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.3s ease;
        }
        .card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,0.12); }

        /* &#9472;&#9472; ALERTS &#9472;&#9472; */
        .alert-banner { display: flex;
            align-items: flex-start; gap: 12px; padding: 13px 14px; border-radius: 13px; margin-bottom: 10px; border: 1.5px solid;
            animation: postSlideIn 0.4s ease;
        }
        .alert-warning { border-color: var(--warning); background: rgba(255,149,0,0.09); color: var(--warning); }
        .alert-info { border-color: #8e8e93; background: rgba(142,142,147,0.09); color: #8e8e93; }
        .alert-success { border-color: var(--green); background: rgba(52,199,89,0.09); color: var(--green); }

        /* &#9472;&#9472; POST CARD &#9472;&#9472; */
        .pinned-label { display: flex;
            align-items: center; gap: 5px; color: var(--nexus); font-size: 12px; font-weight: 600; margin-bottom: 10px; text-transform: uppercase; letter-spacing: 0.5px;
        }
        .repost-label { display: flex; align-items: center; gap: 5px; color: var(--sub); font-size: 12px;
            font-weight: 600; margin-bottom: 10px; }
        .post-header { display: flex; align-items: center; gap: 10px;
            margin-bottom: 12px; position: relative; }
        .user-img { width: 42px; height: 42px; border-radius: 50%;
            object-fit: cover; cursor: pointer; transition: opacity 0.15s, transform 0.2s; }
        .user-img:hover { opacity: 0.85; transform: scale(1.05); }
        .display-name { font-weight: 600; font-size: 15px; display: flex; align-items: center;
            gap: 4px;
            cursor: pointer; }
        .display-name:hover { text-decoration: underline; }
        .verified-badge { width: 16px; height: 16px; flex-shrink: 0; }
        .post-text { font-size: 15.5px; white-space: pre-wrap; line-height: 1.55; }
        .hashtag { color: var(--nexus); cursor: pointer; font-weight: 500; transition: color 0.2s; }
        .hashtag:hover { text-decoration: underline; color: var(--text); }
        .mention { color: var(--nexus); cursor: pointer; font-weight: 500; }

        /* &#9472;&#9472; VIEWS COUNTER &#9472;&#9472; */
        .post-views { font-size: 12px; color: var(--sub); display: flex; align-items: center; gap: 4px; margin-top: 8px; }

        /* &#9472;&#9472; POST IMAGE &#9472;&#9472; */
        .post-img-wrap { width: calc(100% + 32px); position: relative;
            margin: 12px -16px 12px -16px; border-radius: var(--radius); overflow: hidden; border-top: 0.5px solid var(--border);
        }
        .post-img { width: 100%; display: block; cursor: zoom-in; max-height: 500px; object-fit: cover;
            transition: transform 0.3s ease; }
        .post-img:hover { transform: scale(1.02); }
        .post-video { width: 100%; display: block; max-height: 500px; object-fit: cover; background: #000; }

        /* &#9472;&#9472; REACTION BAR &#9472;&#9472; */
        .reaction-bar { display: flex;
            gap: 4px; margin-top: 14px; padding-top: 12px; border-top: 0.5px solid var(--border); align-items: center; flex-wrap: wrap;
        }
        .react-btn { background: none; border: none; color: var(--sub); cursor: pointer; display: flex;
            align-items: center; gap: 5px; font-size: 13.5px; font-weight: 500; padding: 6px 10px; border-radius: 20px; transition: all 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
            font-family: inherit;
            position: relative; }
        .react-btn:hover { background: var(--ios-input); transform: translateY(-1px); }
        .react-btn:active { transform: scale(0.95); }
        .react-btn.active { color: var(--nexus); background: var(--nexus-soft); }
        .react-btn.liked { color: #ff3b30; background: rgba(255,59,48,0.1); }
        .react-btn.bookmarked { color: var(--nexus); background: var(--nexus-soft); }
        
        @keyframes heartBounce {
            0% { transform: scale(1); }
            30% { transform: scale(1.4); }
            50% { transform: scale(0.9); }
            70% { transform: scale(1.15); }
            100% { transform: scale(1); }
        }
        .react-btn.liked i { animation: heartBounce 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); }

        .emoji-reaction-bar { display: flex; gap: 5px; margin-top: 8px; flex-wrap: wrap; }
        .emoji-count { font-size: 13px; display: flex; align-items: center; gap: 3px; background: var(--ios-input);
            padding: 3px 8px; border-radius: 20px; cursor: pointer; user-select: none; transition: transform 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
        }
        .emoji-count:hover { transform: scale(1.15) rotate(5deg); }

        /* &#9472;&#9472; ADMIN MENU &#9472;&#9472; */
        .admin-menu { position: absolute;
            top: 42px; right: 0; background: var(--card); border: 0.5px solid var(--border); border-radius: 14px; box-shadow: 0 12px 40px rgba(0,0,0,0.18); z-index: 1100;
            min-width: 200px; overflow: hidden; transform-origin: top right; animation: scaleIn 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
        }
        @keyframes scaleIn {
            from { opacity: 0; transform: scale(0.9); }
            to { opacity: 1; transform: scale(1); }
        }
        .admin-menu button { width: 100%;
            padding: 13px 16px; text-align: left;
            background: none; border: none; color: var(--text); font-size: 14px; display: flex; align-items: center; gap: 10px;
            cursor: pointer; border-bottom: 0.5px solid var(--border);
            font-family: inherit; transition: background 0.15s, padding-left 0.2s;
        }
        .admin-menu button:last-child { border-bottom: none; }
        .admin-menu button:hover { background: var(--ios-input); padding-left: 20px; }

        /* &#9472;&#9472; EDIT POST INLINE &#9472;&#9472; */
        .edit-post-area { width: 100%;
            padding: 10px 12px; border: 1.5px solid var(--nexus); border-radius: var(--radius-sm); background: var(--ios-input); color: var(--text); font-size: 15px; font-family: inherit; outline: none;
            resize: none; min-height: 80px; margin: 8px 0; transition: box-shadow 0.3s;
        }
        .edit-post-area:focus { box-shadow: 0 0 0 3px var(--nexus-soft); }

        /* &#9472;&#9472; COMMENTS &#9472;&#9472; */
        .comment-card { background: var(--ios-input);
            border-radius: 12px; padding: 10px 12px; margin-bottom: 7px; position: relative; animation: postSlideIn 0.3s ease;
        }
        .comment-header { display: flex; align-items: center; gap: 8px; margin-bottom: 5px; }
        .comment-user-img { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; }
        .comment-display-name { font-weight: 600; font-size: 13px; display: flex; align-items: center; gap: 3px; }
        .comment-text { font-size: 14px; line-height: 1.45; padding-left: 32px; white-space: pre-wrap; }
        .comment-time { font-size: 11px; color: var(--sub); margin-left: auto; margin-right: 44px; }
        .comment-input-area { display: flex; gap: 8px; margin-top: 12px; background: var(--ios-input); border-radius: 22px;
            padding: 8px 12px; align-items: center; transition: box-shadow 0.3s, transform 0.2s;
        }
        .comment-input-area:focus-within { transform: scale(1.01); box-shadow: 0 4px 15px rgba(24, 119, 242, 0.1); }
        .comment-actions { position: absolute; top: 8px; right: 8px; display: flex; gap: 2px; }
        .comment-delete-btn { background: none; border: none;
            color: var(--sub); cursor: pointer; padding: 2px; border-radius: 50%;
            transition: color 0.2s, transform 0.2s;
        }
        .comment-delete-btn:hover { color: var(--danger); transform: scale(1.2); }

        /* &#9472;&#9472; INPUT BAR &#9472;&#9472; */
        .ios-footer { position: fixed;
            bottom: 0; left: 0; right: 0; background: var(--tab-bg); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); border-top: 0.5px solid var(--border);
            padding: 10px 15px calc(10px + env(safe-area-inset-bottom)); z-index: 1000; transition: transform 0.3s ease;
        }
        .ios-post-box { display: flex;
            align-items: flex-end; gap: 10px; max-width: 600px;
            margin: 0 auto; }
        .ios-input-container { flex-grow: 1;
            background: var(--ios-input); border-radius: 22px;
            padding: 9px 16px; color: var(--text); font-size: 15.5px; outline: none; min-height: 22px; max-height: 140px; overflow-y: auto;
            font-family: inherit; line-height: 1.4;
            transition: border-color 0.3s, box-shadow 0.3s, transform 0.2s; }
        .ios-input-container:focus { transform: scale(1.01); box-shadow: 0 4px 15px rgba(24, 119, 242, 0.1); }
        .ios-input-container:empty:before { content: attr(placeholder); color: var(--sub); }
        .send-btn { background: var(--nexus); color: white; border: none; width: 34px;
            height: 34px;
            border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0;
            transition: transform 0.15s, opacity 0.15s, box-shadow 0.2s;
        }
        .send-btn:hover { transform: scale(1.05); box-shadow: 0 4px 10px rgba(24, 119, 242, 0.3); }
        .send-btn:active { transform: scale(0.92) translateY(-2px); }
        .media-btn-group { display: flex; align-items: center; gap: 4px; }

        /* &#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552; NEW BOTTOM NAVBAR &#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552; */
        #bottom-fade {
            position: fixed; left: 0; right: 0; bottom: 0; height: 150px;
            background: linear-gradient(to top, rgba(0,0,0,0.6), rgba(0,0,0,0.25) 45%, rgba(0,0,0,0));
            pointer-events: none; z-index: 998; transition: opacity 0.3s ease;
        }
        body.light #bottom-fade { background: linear-gradient(to top, rgba(0,0,0,0.18), rgba(0,0,0,0.06) 45%, rgba(0,0,0,0)); }

        #bottom-nav {
            position: fixed; left: 0; right: 0; bottom: 0; z-index: 1000;
            padding: 0 12px calc(10px + env(safe-area-inset-bottom));
            display: flex; justify-content: center;
            transition: transform 0.3s ease;
        }
        .bn-shell {
            width: 100%; max-width: 460px;
            background: rgba(63,63,63,0.82);
            backdrop-filter: blur(30px) saturate(1.6); -webkit-backdrop-filter: blur(30px) saturate(1.6);
            border: 0.5px solid rgba(255,255,255,0.08);
            border-radius: 999px;
            box-shadow: 0 14px 44px rgba(0,0,0,0.28), 0 2px 8px rgba(0,0,0,0.15), inset 0 1px 0 rgba(255,255,255,0.09), inset 0 -1px 0 rgba(0,0,0,0.05);
            padding: 7px 6px;
            display: flex; align-items: center; justify-content: space-between;
            position: relative;
            transition: border-radius 0.45s cubic-bezier(0.16, 1, 0.3, 1);
            overflow: visible;
        }
        .bn-shell::after {
            content: none;
        }
        .bn-item {
            background: none; border: none; color: rgba(255,255,255,0.55); cursor: pointer;
            display: flex; flex-direction: column; align-items: center; justify-content: center;
            gap: 3px; padding: 8px 6px; border-radius: 999px; flex: 1;
            font-family: inherit; transition: color 0.25s, background 0.25s, transform 0.15s;
            position: relative; z-index: 1;
        }
        .bn-item i { transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1); }
        .bn-item span { font-size: 10px; font-weight: 600; letter-spacing: 0.1px; transition: opacity 0.2s, transform 0.2s; }
        .bn-item:hover { color: #fff; }
        .bn-item:active i { transform: scale(0.85); }
        .bn-item.active { color: #fff; background: rgba(255,255,255,0.14); }
        .bn-item.active i { transform: translateY(-1px) scale(1.1); }
        .bn-item.active span { transform: translateY(0.5px); }

        .bn-compose-wrap { flex: 1.3; display: flex; justify-content: center; align-items: center; position: relative; top: 0; z-index: 5; }
        @keyframes composePulseRing {
            0% { box-shadow: 0 0 0 0 rgba(24,119,242,0.45); }
            100% { box-shadow: 0 0 0 12px rgba(24,119,242,0); }
        }
        .bn-compose {
            width: 52px; height: 52px; border-radius: 50%; border: 2.5px solid #3f3f3f; cursor: pointer;
            background: linear-gradient(150deg, #2d8bff, var(--nexus) 45%, #8b5cf6);
            box-shadow: 0 8px 20px rgba(24,119,242,0.45), 0 3px 8px rgba(0,0,0,0.3), inset 0 1px 1px rgba(255,255,255,0.35);
            display: flex; align-items: center; justify-content: center; color: white;
            transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease, border-radius 0.35s ease;
            position: relative;
        }
        .bn-compose::before {
            content: ''; position: absolute; inset: -2.5px; border-radius: 50%;
            animation: composePulseRing 2.4s cubic-bezier(0.4,0,0.6,1) infinite; pointer-events: none;
        }
        .bn-compose i { transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1); }
        .bn-compose:hover { transform: scale(1.07) translateY(-1px); }
        .bn-compose:active { transform: scale(0.92); }
        .bn-compose.spin i { transform: rotate(135deg); }
        .bn-compose.spin::before { animation: none; box-shadow: none; }

        /* ── COMPOSE MORPH ── */
        #bottom-nav.composing .bn-shell,
        #bottom-nav.closing-compose .bn-shell { border-radius: 26px; }
        .bn-compose-panel {
            display: none; position: relative;
            flex-direction: column; gap: 10px; width: 100%; padding: 6px 8px 8px;
        }
        #bottom-nav.composing .bn-tabs,
        #bottom-nav.closing-compose .bn-tabs { display: none; }
        #bottom-nav.composing .bn-compose-panel,
        #bottom-nav.closing-compose .bn-compose-panel { display: flex; }
        #bottom-nav.composing .bn-compose-panel {
            animation: composeGrow 0.32s cubic-bezier(0.16, 1, 0.3, 1) forwards;
        }
        #bottom-nav.closing-compose .bn-compose-panel {
            animation: composeShrink 0.22s cubic-bezier(0.4, 0, 0.6, 1) forwards;
        }
        @keyframes composeGrow {
            from { opacity: 0; transform: scale(0.94); }
            to { opacity: 1; transform: scale(1); }
        }
        @keyframes composeShrink {
            from { opacity: 1; transform: scale(1); }
            to { opacity: 0; transform: scale(0.94); }
        }

        .compose-panel-header {
            display: flex; align-items: center; justify-content: space-between;
        }
        .compose-panel-title { color: #fff; font-size: 14.5px; font-weight: 700; letter-spacing: 0.1px; }

        .bn-close-compose {
            background: rgba(255,255,255,0.1); border: none; color: rgba(255,255,255,0.8); width: 28px; height: 28px;
            border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer;
            transition: transform 0.2s, background 0.2s; flex-shrink: 0;
        }
        .bn-close-compose:hover { background: rgba(255,255,255,0.18); transform: rotate(90deg); }

        .compose-textarea {
            background: rgba(255,255,255,0.08); border-radius: 18px;
            padding: 12px 14px; color: #fff; font-size: 15px; outline: none; min-height: 42px; max-height: 130px; overflow-y: auto;
            font-family: inherit; line-height: 1.4; width: 100%; box-sizing: border-box;
            border: 1px solid rgba(255,255,255,0.08);
            transition: border-color 0.25s, box-shadow 0.25s;
        }
        .compose-textarea:focus { border-color: rgba(24,119,242,0.55); box-shadow: 0 0 0 3px rgba(24,119,242,0.16); }
        .compose-textarea:empty:before { content: attr(placeholder); color: rgba(255,255,255,0.4); }

        .compose-format-toolbar {
            display: flex; align-items: center; gap: 2px; padding: 2px 2px 6px 2px;
            overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none;
            position: relative;
        }
        .compose-format-toolbar::-webkit-scrollbar { display: none; }
        .format-toolbar-spacer { flex: 1 1 auto; }
        .format-btn {
            background: none; border: none; color: rgba(255,255,255,0.68); flex-shrink: 0;
            width: 30px; height: 30px; border-radius: 8px; display: flex; align-items: center; justify-content: center;
            cursor: pointer; transition: background 0.2s, color 0.2s;
        }
        .format-btn i { width: 16px; height: 16px; }
        .format-btn:hover { background: rgba(255,255,255,0.12); color: #fff; }
        .format-help-btn { color: var(--nexus); }

        .format-help-popover {
            position: absolute; z-index: 40; top: 40px; right: 8px;
            background: rgba(30,30,32,0.98); border: 1px solid rgba(255,255,255,0.1);
            border-radius: 14px; padding: 10px 12px; width: 230px;
            box-shadow: 0 10px 30px rgba(0,0,0,0.4);
        }
        .format-help-row {
            display: flex; align-items: center; justify-content: space-between; gap: 10px;
            padding: 5px 0; font-size: 12.5px; color: rgba(255,255,255,0.75); border-bottom: 1px solid rgba(255,255,255,0.06);
        }
        .format-help-row:last-child { border-bottom: none; }
        .format-help-row code {
            background: rgba(255,255,255,0.1); color: var(--nexus); padding: 2px 6px; border-radius: 6px;
            font-size: 11.5px; white-space: nowrap;
        }

        /* Zusätzliche Post-Text-Formatierungen (Zitat, Liste, Code, Links) */
        .text-quote {
            margin: 6px 0; padding: 4px 0 4px 12px; border-left: 3px solid var(--nexus);
            color: var(--sub); font-style: italic;
        }
        .text-list { margin: 6px 0; padding-left: 20px; }
        .text-list li { margin: 2px 0; }
        .text-codeblock {
            background: rgba(127,127,127,0.14); border-radius: 10px; padding: 10px 12px; margin: 6px 0;
            overflow-x: auto; font-size: 13px; white-space: pre-wrap; word-break: break-word;
        }
        .text-inline-code {
            background: rgba(127,127,127,0.18); padding: 1px 6px; border-radius: 6px; font-size: 0.92em;
        }
        .text-link {
            color: var(--nexus); font-weight: 500; text-decoration: none;
            display: inline-flex; align-items: center; gap: 2px; word-break: break-all;
        }
        .text-link:hover { text-decoration: underline; }
        .text-link-icon { width: 12px; height: 12px; flex-shrink: 0; vertical-align: -1px; }

        .compose-preview {
            display: flex; align-items: center; gap: 10px; position: relative; width: fit-content;
            background: rgba(255,255,255,0.06); padding: 6px; border-radius: 14px; animation: postSlideIn 0.3s ease;
        }
        .compose-preview-remove {
            position: absolute; top: -6px; right: -6px; background: var(--danger); color: white; border: none;
            border-radius: 50%; cursor: pointer; width: 20px; height: 20px; display: flex; align-items: center; justify-content: center;
            transition: transform 0.2s;
        }
        .compose-preview-remove:hover { transform: scale(1.1); }

        .compose-panel-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
        .compose-icon-btn {
            background: rgba(255,255,255,0.08); border: none; color: rgba(255,255,255,0.85); cursor: pointer;
            width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
            transition: transform 0.2s, background 0.2s, color 0.2s;
        }
        .compose-icon-btn:hover { background: rgba(255,255,255,0.16); color: #fff; transform: scale(1.06); }
        .compose-icon-btn.music-add-btn.has-music { color: #6ea8ff; background: rgba(24,119,242,0.18); }
        .compose-panel-footer .media-btn-group { display: flex; align-items: center; gap: 6px; }
        .compose-panel-footer .char-counter {
            font-size: 11.5px; color: rgba(255,255,255,0.45); margin: 0;
        }
        .compose-send-btn {
            background: linear-gradient(135deg, #2d8bff, var(--nexus) 60%); color: white; border: none;
            height: 36px; padding: 0 16px; border-radius: 999px; display: flex; align-items: center; gap: 6px;
            font-family: inherit; font-size: 14px; font-weight: 700; cursor: pointer; flex-shrink: 0;
            box-shadow: 0 4px 14px rgba(24,119,242,0.35); transition: transform 0.15s, opacity 0.15s, box-shadow 0.2s;
        }
        .compose-send-btn:hover { transform: scale(1.04); box-shadow: 0 6px 18px rgba(24,119,242,0.45); }
        .compose-send-btn:active { transform: scale(0.94); }
        .compose-send-btn:disabled { opacity: 0.45; box-shadow: none; cursor: default; transform: none; }

        .bn-tabs { display: flex; align-items: center; justify-content: space-between; width: 100%; }

        /* &#9472;&#9472; STATUS FEED (TikTok style) &#9472;&#9472; */
        #status-feed-overlay {
            position: fixed; inset: 0; background: #000; z-index: 2500; display: none;
            flex-direction: column;
        }
        #status-feed-overlay.with-nav .sf-slide {
            padding-bottom: calc(104px + env(safe-area-inset-bottom));
            box-sizing: border-box;
        }
        #status-feed-overlay.with-nav .sf-caption {
            bottom: calc(104px + env(safe-area-inset-bottom) + 18px);
        }
        #status-feed-overlay.with-nav .sf-side-actions {
            bottom: calc(104px + env(safe-area-inset-bottom) + 10px);
        }
        #bottom-nav.above-status {
            z-index: 2600;
        }
        #status-feed-scroller {
            flex: 1; overflow-y: scroll; scroll-snap-type: y mandatory; scrollbar-width: none;
        }
        #status-feed-scroller::-webkit-scrollbar { display: none; }
        .sf-slide {
            width: 100%; height: 100dvh; scroll-snap-align: start; position: relative;
            display: flex; align-items: center; justify-content: center; background: #000; overflow: hidden;
        }
        .sf-slide img.sf-media, .sf-slide video.sf-media {
            width: 100%; height: 100%; object-fit: contain; background: #000;
        }
        .sf-top-bar {
            position: absolute; top: 0; left: 0; right: 0; z-index: 5;
            padding: calc(env(safe-area-inset-top,20px) + 10px) 14px 40px;
            background: linear-gradient(to bottom, rgba(0,0,0,0.65), rgba(0,0,0,0));
            display: flex; align-items: center; gap: 10px;
        }
        .sf-top-bar img.sf-avatar { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; border: 1.5px solid rgba(255,255,255,0.6); }
        .sf-top-name { color: #fff; font-weight: 700; font-size: 14px; text-shadow: 0 1px 4px rgba(0,0,0,0.5); }
        .sf-top-time { color: rgba(255,255,255,0.75); font-size: 12px; margin-left: 2px; }
        .sf-kind-badge {
            font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px;
            padding: 3px 8px; border-radius: 20px; margin-left: auto; backdrop-filter: blur(6px);
        }
        .sf-kind-badge.story { background: rgba(139,92,246,0.35); color: #e9d9ff; border: 1px solid rgba(196,168,255,0.5); }
        .sf-kind-badge.post { background: rgba(24,119,242,0.35); color: #d6e8ff; border: 1px solid rgba(150,196,255,0.5); }
        .sf-close-btn {
            background: rgba(255,255,255,0.15); border: none; color: white; width: 32px; height: 32px;
            border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0;
        }
        .sf-caption {
            position: absolute; left: 14px; right: 80px; bottom: calc(env(safe-area-inset-bottom,16px) + 18px);
            color: #fff; font-size: 14px; line-height: 1.4; text-shadow: 0 1px 6px rgba(0,0,0,0.6); z-index: 5;
        }
        .sf-side-actions {
            position: absolute; right: 10px; bottom: calc(env(safe-area-inset-bottom,16px) + 10px);
            display: flex; flex-direction: column; align-items: center; gap: 18px; z-index: 6;
        }
        .sf-react-btn {
            background: rgba(255,255,255,0.12); border: none; color: white; width: 46px; height: 46px;
            border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer;
            backdrop-filter: blur(8px); transition: transform 0.15s;
        }
        .sf-react-btn:active { transform: scale(0.88); }
        .sf-react-count { font-size: 10px; color: rgba(255,255,255,0.85); margin-top: -8px; text-align: center; }
        .sf-emoji-strip {
            position: absolute; right: 66px; bottom: calc(env(safe-area-inset-bottom,16px) + 10px);
            display: none; flex-direction: column; gap: 6px; background: rgba(0,0,0,0.5); backdrop-filter: blur(10px);
            border-radius: 20px; padding: 8px 6px; z-index: 7;
        }
        .sf-emoji-strip.open { display: flex; animation: fadeInEmoji 0.25s ease; }
        .sf-emoji-strip button { background: none; border: none; font-size: 20px; cursor: pointer; padding: 3px; }
        .sf-progress-row { position: absolute; top: env(safe-area-inset-top,10px); left: 10px; right: 10px; display: flex; gap: 4px; z-index: 6; }
        .sf-progress-seg { height: 2.5px; flex: 1; background: rgba(255,255,255,0.3); border-radius: 2px; overflow: hidden; }
        .sf-progress-seg-fill { height: 100%; width: 0%; background: #fff; }
        .sf-progress-seg-fill.filled { width: 100%; }
        .sf-empty-state {
            color: rgba(255,255,255,0.7); text-align: center; padding: 40px; font-size: 14px;
            display: flex; flex-direction: column; align-items: center; gap: 10px; height: 100dvh; justify-content: center;
        }
        .sf-empty-back-btn {
            margin-top: 8px; background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.25); color: #fff;
            padding: 10px 20px; border-radius: 24px; font-size: 14px; font-weight: 600; cursor: pointer; font-family: inherit;
            display: flex; align-items: center; gap: 8px; transition: transform 0.15s, background 0.15s; backdrop-filter: blur(8px);
        }
        .sf-empty-back-btn:hover { background: rgba(255,255,255,0.2); transform: translateY(-1px); }
        .sf-empty-back-btn:active { transform: scale(0.95); }

        /* &#9472;&#9472; PROCESSING GLOW (Siri-style rotating edge light) &#9472;&#9472; */
        @keyframes glowRotate { to { --glow-angle: 360deg; } }
        @property --glow-angle {
            syntax: '<angle>'; initial-value: 0deg; inherits: false;
        }
        .bn-shell.processing {
            position: relative;
        }
        .bn-shell.processing::before {
            content: '';
            position: absolute; inset: -2px; border-radius: 28px; padding: 2px;
            background: conic-gradient(from var(--glow-angle), transparent 0%, #1877f2 12%, #a78bfa 24%, #f43f5e 36%, transparent 48%, transparent 100%);
            -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
            -webkit-mask-composite: xor; mask-composite: exclude;
            animation: glowRotate 1.6s linear infinite;
            pointer-events: none; z-index: -1;
            filter: drop-shadow(0 0 6px rgba(139,92,246,0.55));
        }
        .bn-processing-label {
            position: absolute; top: -26px; left: 50%; transform: translateX(-50%);
            font-size: 11px; font-weight: 600; color: var(--sub); white-space: nowrap;
            display: flex; align-items: center; gap: 6px; animation: fadeIn 0.3s ease;
        }
        .bn-processing-label .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--nexus); animation: badgePop 1s ease-in-out infinite; }

        /* &#9472;&#9472; MUSIC FEATURE &#9472;&#9472; */
        .music-result-item { display: flex; align-items: center; gap: 12px; padding: 9px 8px; border-radius: 12px;
            cursor: pointer; transition: background 0.15s; }
        .music-result-item:hover { background: var(--ios-input); }
        .music-result-item img { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; flex-shrink: 0; background: var(--ios-input); }
        .music-result-info { flex: 1; min-width: 0; }
        .music-result-title { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
        .music-result-artist { font-size: 12.5px; color: var(--sub); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
        .music-preview-btn { background: var(--nexus-soft); border: none; color: var(--nexus); width: 32px; height: 32px;
            border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0; transition: transform 0.15s; }
        .music-preview-btn:active { transform: scale(0.9); }
        .music-loading { text-align: center; padding: 30px 10px; color: var(--sub); font-size: 13px; }

        /* ── GLOBALES LADE-GIF (für Screens wie Nachrichten, Storys, Listen usw. – nicht für Posts) ── */
        .gif-loading-wrap { display: flex; align-items: center; justify-content: center; padding: 30px 10px; }
        .gif-loading-wrap img { width: 64px; height: 64px; object-fit: contain; display: block; }
        .gif-loading-wrap.gif-loading-fullscreen { padding: 0; }
        .gif-loading-wrap.gif-loading-fullscreen img { width: 96px; height: 96px; }

        .composer-music-chip {
            display: flex; align-items: center; gap: 8px; background: var(--nexus-soft); border-radius: 20px;
            padding: 5px 10px 5px 5px; margin: 6px 0 0; animation: postSlideIn 0.3s ease; max-width: fit-content;
        }
        .composer-music-chip img { width: 24px; height: 24px; border-radius: 6px; object-fit: cover; }
        .composer-music-chip span { font-size: 12.5px; font-weight: 600; color: var(--nexus); max-width: 160px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
        .composer-music-chip button { background: none; border: none; color: var(--nexus); cursor: pointer; display: flex; padding: 0; }
        .music-add-btn { background: none; border: none; color: var(--sub); cursor: pointer; display: flex; align-items: center; justify-content: center; transition: transform 0.2s, color 0.2s; }
        .music-add-btn:hover { color: var(--nexus); transform: scale(1.1); }
        .music-add-btn.has-music { color: var(--nexus); }

        .post-music-badge {
            position: absolute; top: 10px; right: 10px; z-index: 3;
            display: flex; align-items: center; gap: 0; background: rgba(0,0,0,0.55); backdrop-filter: blur(8px);
            border-radius: 20px; padding: 3px; cursor: pointer; transition: transform 0.2s; border: 1px solid rgba(255,255,255,0.2);
        }
        .post-music-badge:hover { transform: scale(1.06); }
        .post-music-badge img { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; animation: spinCover 3.5s linear infinite; }
        .post-music-badge i { color: white; width: 12px; margin: 0 4px 0 3px; }
        @keyframes spinCover { to { transform: rotate(360deg); } }
        .post-music-chip {
            display: flex; align-items: center; gap: 8px; background: var(--nexus-soft);
            border-radius: 20px; padding: 6px 12px 6px 6px; margin-top: 10px; cursor: pointer;
            transition: transform 0.15s; max-width: fit-content;
        }
        .post-music-chip:hover { transform: translateX(2px); }
        .post-music-chip img { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; animation: spinCover 3.5s linear infinite; flex-shrink: 0; }
        .post-music-chip-fallback-icon { width: 26px; height: 26px; border-radius: 50%; background: var(--nexus); color: white; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
        .post-music-chip span { font-size: 13px; font-weight: 600; color: var(--nexus); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 220px; }
        .post-music-chip i { color: var(--nexus); }
        .sf-music-badge {
            position: absolute; top: calc(env(safe-area-inset-top,20px) + 56px); right: 12px; z-index: 6;
            display: flex; align-items: center; gap: 2px; background: rgba(0,0,0,0.5); backdrop-filter: blur(8px);
            border-radius: 20px; padding: 4px; border: 1px solid rgba(255,255,255,0.2);
        }
        .sf-music-badge-tap { display: flex; align-items: center; gap: 6px; cursor: pointer; padding: 0 6px 0 0; }
        .sf-music-badge img { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; animation: spinCover 3.5s linear infinite; }
        .sf-music-badge span { color: white; font-size: 11px; font-weight: 600; max-width: 100px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
        .autoplay-toggle-btn {
            background: rgba(255,255,255,0.18); border: none; color: white; width: 24px; height: 24px;
            border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0;
            transition: background 0.15s, transform 0.15s;
        }
        .autoplay-toggle-btn:active { transform: scale(0.88); }
        .autoplay-toggle-btn.on-light { background: var(--nexus); color: white; width: 22px; height: 22px; margin-left: auto; }

        .global-sound-toggle {
            position: fixed; z-index: 997; bottom: calc(96px + env(safe-area-inset-bottom)); right: 16px;
            width: 40px; height: 40px; border-radius: 50%; background: var(--card); border: 0.5px solid var(--border);
            box-shadow: 0 6px 20px rgba(0,0,0,0.18); display: flex; align-items: center; justify-content: center;
            color: var(--sub); cursor: pointer; transition: transform 0.2s, color 0.2s, background 0.2s;
        }
        .global-sound-toggle.on { color: white; background: var(--nexus); }
        .global-sound-toggle:active { transform: scale(0.9); }

        /* &#9472;&#9472; FOLLOW SYSTEM &#9472;&#9472; */
        .follow-btn {
            background: var(--nexus); color: white; border: none; font-size: 12px; font-weight: 700;
            padding: 5px 12px; border-radius: 20px; cursor: pointer; font-family: inherit;
            transition: background 0.2s, color 0.2s, transform 0.15s; flex-shrink: 0; margin-left: 6px;
        }
        .follow-btn:active { transform: scale(0.94); }
        .follow-btn.following { background: var(--ios-input); color: var(--sub); }
        .follow-btn-story { background: rgba(255,255,255,0.9); color: #1c1e21; }
        .follow-btn-story.following { background: rgba(255,255,255,0.25); color: #fff; }
        .red-dot {
            width: 9px; height: 9px; border-radius: 50%; background: var(--danger);
            display: inline-block; box-shadow: 0 0 0 2px var(--card);
        }
        .settings-row-icon-wrap { position: relative; display: inline-flex; }
        .settings-row-icon-wrap .red-dot { position: absolute; top: -1px; right: -1px; }

        #following-screen { padding-top: 16px; animation: fadeIn 0.3s ease; }
        .following-row {
            display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: var(--radius);
            background: var(--card); border: 0.5px solid var(--border); margin-bottom: 8px; cursor: pointer;
            transition: transform 0.2s, box-shadow 0.2s;
        }
        .following-row:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
        .following-row-avatar { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
        .following-row-info { flex: 1; min-width: 0; }
        .following-row-name { font-weight: 600; font-size: 14.5px; display: flex; align-items: center; gap: 4px; }
        .following-row-sub { font-size: 12.5px; color: var(--sub); margin-top: 2px; }

        #search-results-section { padding-top: 16px; animation: fadeIn 0.3s ease; }
        .search-section-title { font-family: 'Syne', sans-serif; font-size: 15px; font-weight: 800; margin: 18px 2px 10px; }
        .search-section-title:first-child { margin-top: 0; }
        .search-more-btn {
            width: 100%; padding: 11px; margin-bottom: 8px; border-radius: var(--radius); border: 0.5px solid var(--border);
            background: var(--card); color: var(--nexus); font-weight: 600; font-size: 13.5px; cursor: pointer;
            font-family: inherit; transition: background 0.2s;
        }
        .search-more-btn:hover { background: var(--ios-input); }

        /* &#9472;&#9472; LIGHTBOX &#9472;&#9472; */
        .lightbox { position: fixed;
            top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.92); z-index: 2000; display: none; align-items: center; justify-content: center; backdrop-filter: blur(18px);
            -webkit-backdrop-filter: blur(18px); animation: fadeIn 0.3s ease; }
        /* Modals that can be opened ON TOP of another already-open lightbox (e.g. music picker
           opened from the story-confirm or compose flow) need a higher stacking level. */
        #music-modal, #music-player-modal { z-index: 2600; }
        #color-picker-modal, #namestyle-modal, #report-modal { z-index: 2300; }
        #share-popup-modal { z-index: 2700; }
        .share-popup-inner { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 28px 22px 22px; }
        .share-popup-avatar { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; margin-bottom: 14px; border: 2px solid var(--border); }
        .share-popup-text { font-size: 15px; line-height: 1.5; color: var(--text); margin-bottom: 20px; }
        .share-popup-text b { font-weight: 700; }
        .share-popup-actions { display: flex; flex-direction: column; gap: 10px; width: 100%; }
        #lightbox-img { max-width: 95%; max-height: 88vh;
            border-radius: 12px; object-fit: contain; animation: modalScale 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
        }
        .close-lightbox-btn { position: absolute; top: env(safe-area-inset-top, 30px); right: 18px; background: rgba(255,255,255,0.18);
            color: white; border: none; width: 38px; height: 38px; border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer;
            transition: transform 0.2s, background 0.2s;
        }
        .close-lightbox-btn:hover { background: rgba(255,255,255,0.3); transform: scale(1.1); }

        /* ── PROMO POPUPS (Social Media / App-Download) ── */
        .promo-popup-inner { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; padding: 30px 24px 26px; }
        .promo-popup-close {
            position: absolute; top: 12px; right: 12px; background: rgba(127,127,127,0.16); border: none;
            color: var(--sub); width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
            cursor: pointer; transition: background 0.2s, color 0.2s;
        }
        .promo-popup-close:hover { background: rgba(127,127,127,0.28); color: var(--text); }
        .promo-popup-icon {
            width: 54px; height: 54px; border-radius: 50%; background: var(--nexus-soft); color: var(--nexus);
            display: flex; align-items: center; justify-content: center; margin-bottom: 14px;
        }
        .promo-popup-icon i { width: 26px; height: 26px; }
        .promo-popup-title { font-family: 'Syne', sans-serif; font-size: 18.5px; font-weight: 800; color: var(--text); margin-bottom: 8px; }
        .promo-popup-text { font-size: 14px; line-height: 1.5; color: var(--sub); margin-bottom: 20px; }
        .promo-popup-links { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
        .promo-popup-download-btn { display: flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; width: 100%; }

        /* ── PROFILE SCREEN (full-screen, slides up from bottom) ── */
        .profile-screen { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: var(--bg);
            z-index: 2200; display: none; flex-direction: column; overflow-y: auto; transform: translateY(100%);
            transition: transform 0.38s cubic-bezier(0.22, 1, 0.36, 1); overscroll-behavior-y: contain;
        }
        .profile-screen.open { transform: translateY(0); }
        .profile-screen-inner { max-width: 600px; width: 100%; margin: 0 auto; padding-bottom: 40px; }
        .profile-banner-wrap { position: relative; width: 100%; height: 190px; background: linear-gradient(135deg, var(--nexus), #6d28d9); overflow: hidden; flex-shrink: 0; }
        .profile-banner-img { width: 100%; height: 100%; object-fit: cover; display: block; }
        /* Sticky-Leiste: X, "Zuletzt online"-Pill, Teilen & Admin-Menü bleiben beim Scrollen oben angeheftet.
           Der Wrapper selbst ist 0px hoch (nimmt keinen Platz in der Doku ein) und positioniert seine Kinder
           absolut relativ zu sich selbst, wodurch sie anfangs genau über dem Banner liegen. */
        .profile-sticky-header { position: sticky; top: 0; z-index: 60; height: 0; overflow: visible; }
        .profile-close-btn { position: absolute; top: calc(env(safe-area-inset-top, 16px) + 10px); left: 14px;
            background: rgba(63,63,63,0.82);
            backdrop-filter: blur(30px) saturate(1.6); -webkit-backdrop-filter: blur(30px) saturate(1.6);
            border: 0.5px solid rgba(255,255,255,0.08);
            box-shadow: 0 10px 30px rgba(0,0,0,0.22), 0 2px 8px rgba(0,0,0,0.14), inset 0 1px 0 rgba(255,255,255,0.09), inset 0 -1px 0 rgba(0,0,0,0.05);
            color: #fff; border-radius: 50%; width: 38px; height: 38px; display: flex; align-items: center; justify-content: center;
            cursor: pointer; transition: transform 0.2s, background 0.2s;
        }
        .profile-close-btn:hover { background: rgba(80,80,80,0.88); transform: scale(1.08); }
        #profile-share-btn { left: auto; right: 60px; transition: transform 0.2s, background 0.2s, right 0.2s; }
        #profile-admin-menu-btn { left: auto; right: 14px; }
        /* Ohne Admin-Menü (nicht-Admin) rückt der Teilen-Button an dessen Stelle, damit keine Lücke entsteht. */
        .profile-sticky-header.no-admin #profile-share-btn { right: 14px; }
        .profile-last-active-label {
            position: absolute; top: calc(env(safe-area-inset-top, 16px) + 10px); left: 60px; right: 106px;
            background: transparent; border: 0.5px solid transparent; color: #fff; font-size: 11.5px; font-weight: 600;
            border-radius: 999px; height: 38px; display: flex; align-items: center; justify-content: center;
            padding: 0 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
            box-shadow: none; text-shadow: 0 1px 4px rgba(0,0,0,0.55);
            transition: background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease, right 0.2s;
        }
        /* Bekommt erst beim Herunterscrollen (siehe attachProfileHeaderScroll) einen Hintergrund. */
        .profile-last-active-label.scrolled {
            background: rgba(63,63,63,0.82);
            backdrop-filter: blur(30px) saturate(1.6); -webkit-backdrop-filter: blur(30px) saturate(1.6);
            border: 0.5px solid rgba(255,255,255,0.08);
            box-shadow: 0 10px 30px rgba(0,0,0,0.22), 0 2px 8px rgba(0,0,0,0.14);
        }
        .profile-sticky-header.no-admin .profile-last-active-label { right: 60px; }
        .profile-banner-edit-btn { position: absolute; top: calc(env(safe-area-inset-top, 16px) + 10px); right: 14px; background: rgba(0,0,0,0.45);
            color: #fff; border: none; width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
            cursor: pointer; backdrop-filter: blur(6px); transition: transform 0.2s, background 0.2s;
        }
        .profile-banner-edit-btn:hover { background: rgba(0,0,0,0.6); transform: scale(1.08); }
        .banner-mode-toggle { position: absolute; top: calc(env(safe-area-inset-top, 16px) + 10px); left: 14px; display: flex; gap: 6px; z-index: 2; }
        .banner-mode-btn { background: rgba(0,0,0,0.45); color: #fff; border: 1px solid rgba(255,255,255,0.25); border-radius: 16px;
            padding: 6px 13px; font-size: 12.5px; font-weight: 700; cursor: pointer; font-family: inherit; backdrop-filter: blur(6px);
            transition: background 0.2s, transform 0.15s;
        }
        .banner-mode-btn.active { background: rgba(255,255,255,0.92); color: #111; }
        .banner-mode-btn:active { transform: scale(0.95); }
        .profile-preview-label { position: absolute; top: env(safe-area-inset-top, 16px); left: 50%; transform: translateX(-50%);
            background: rgba(0,0,0,0.45); color: #fff; font-size: 13px; font-weight: 700; padding: 6px 14px; border-radius: 20px; backdrop-filter: blur(6px);
        }
        .profile-head { display: flex; align-items: flex-start; justify-content: space-between; padding: 0 16px; margin-top: -46px; position: relative; z-index: 2; }
        .profile-avatar-wrap { position: relative; flex-shrink: 0; }
        .profile-screen-avatar { width: 92px; height: 92px; border-radius: 50%; object-fit: cover; border: 4px solid var(--bg); background: var(--card); display: block; }
        .presence-dot { position: absolute; bottom: 6px; right: 6px; width: 16px; height: 16px; border-radius: 50%; border: 3px solid var(--bg);
            background: var(--sub); transition: background 0.3s;
        }
        .presence-dot.online { background: var(--green); }
        .presence-dot.offline { background: var(--danger); }
        .presence-dot-lg { width: 15px; height: 15px; bottom: 2px; right: 2px; border: 2.5px solid var(--card); }
        .profile-head-actions { display: flex; gap: 8px; margin-top: 56px; }
        .profile-head-actions .follow-btn, .profile-head-actions .edit-profile-btn, .profile-head-actions .dm-btn-outline {
            margin: 0; padding: 9px 18px; font-size: 13.5px; border-radius: 20px; font-weight: 700; font-family: inherit; cursor: pointer; border: none; transition: transform 0.15s;
        }
        .edit-profile-btn { background: var(--ios-input); color: var(--text); display: flex; align-items: center; gap: 6px; }
        .dm-btn-outline { background: var(--ios-input); color: var(--text); }
        .profile-head-actions button:active { transform: scale(0.94); }
        .profile-name-block { padding: 14px 16px 0; }
        .profile-screen-name { font-family: 'Syne', sans-serif; font-size: 22px; font-weight: 800; display: flex; align-items: center; gap: 6px; }
        .profile-screen-username { font-size: 14px; color: var(--sub); margin-top: 3px; }
        .profile-tabs { display: flex; gap: 0; margin: 18px 16px 0; border-bottom: 1px solid var(--border); }
        .profile-tab { flex: 1; background: none; border: none; padding: 12px 0; font-size: 14.5px; font-weight: 700; color: var(--sub);
            cursor: pointer; font-family: inherit; border-bottom: 2.5px solid transparent; transition: color 0.2s, border-color 0.2s;
        }
        .profile-tab.active { color: var(--nexus); border-color: var(--nexus); }
        .profile-tab-content { padding: 16px; }
        .profile-info-card { background: var(--card); border: 0.5px solid var(--border); border-radius: var(--radius); padding: 16px; }
        .profile-info-label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: var(--sub); margin-bottom: 6px; }
        .profile-info-bio { font-size: 14.5px; line-height: 1.55; color: var(--text); white-space: pre-wrap; word-break: break-word; }
        .profile-info-divider { height: 1px; background: var(--border); margin: 14px 0; }
        .profile-info-member-since { font-size: 14px; color: var(--text); font-weight: 600; }
        .profile-stats-row { display: flex; gap: 20px; margin-top: 14px; padding: 0 2px; }
        .profile-stats-row span { font-size: 13.5px; color: var(--sub); cursor: pointer; }
        .profile-stats-row b { color: var(--text); font-weight: 700; }
        .profile-links-card { background: var(--card); border: 0.5px solid var(--border); border-radius: var(--radius); padding: 16px; margin-top: 14px; }
        .profile-link-row { display: flex; align-items: center; gap: 12px; padding: 9px 0; color: var(--text); text-decoration: none; cursor: pointer; }
        .profile-link-row:not(:last-child) { border-bottom: 0.5px solid var(--border); }
        .profile-link-icon { width: 34px; height: 34px; border-radius: 50%; background: var(--ios-input); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
        .profile-link-label { flex: 1; font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
        .profile-report-btn { background: none; border: none; color: var(--sub); font-size: 12.5px; font-family: inherit; cursor: pointer;
            flex: 1; text-align: center; padding: 9px 4px; display: flex; align-items: center; justify-content: center; gap: 5px;
            border-radius: 10px; transition: background 0.2s;
        }
        .profile-report-btn:hover { background: var(--ios-input); }
        #profile-block-btn:not(.hidden) { color: var(--danger); }
        .profile-action-row { display: flex; gap: 8px; margin-top: 16px; }
        .profile-blocked-banner { text-align: center; padding: 60px 24px; color: var(--sub); display: flex; flex-direction: column; align-items: center; gap: 10px; }
        #profile-blocked-text { font-size: 14px; max-width: 280px; line-height: 1.5; }
        #profile-unblock-btn { margin-top: 6px; background: var(--ios-input); color: var(--text); border: none; border-radius: 14px;
            padding: 10px 22px; font-size: 13.5px; font-weight: 600; font-family: inherit; cursor: pointer;
        }
        .profile-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; border-radius: 12px; overflow: hidden; }
        .profile-grid-item { aspect-ratio: 1; overflow: hidden; cursor: pointer; background: var(--ios-input); position: relative; }
        .profile-grid-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
        .profile-grid-item:hover img { transform: scale(1.1); }

        /* ── EDIT PROFILE SCREEN ── */
        .edit-profile-header { display: flex; align-items: center; justify-content: space-between; padding: env(safe-area-inset-top, 14px) 16px 14px; background: var(--header-bg); position: sticky; top: 0; z-index: 3; backdrop-filter: blur(10px); }
        .edit-profile-header h2 { font-family: 'Syne', sans-serif; font-size: 17px; font-weight: 800; margin: 0; }
        .edit-profile-save-btn { background: none; border: none; color: var(--nexus); font-size: 15.5px; font-weight: 700; cursor: pointer; font-family: inherit; transition: transform 0.15s; }
        .edit-profile-save-btn:active { transform: scale(0.94); }
        .edit-avatar-row { padding: 0 16px; margin-top: -46px; position: relative; z-index: 2; }
        .profile-avatar-edit-badge { position: absolute; bottom: 2px; right: 2px; background: var(--nexus); color: #fff; border-radius: 50%;
            width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 5px rgba(0,0,0,0.3); border: 2px solid var(--bg);
        }
        .edit-profile-body { padding: 16px; }
        .edit-field-label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: var(--sub); display: block; margin: 16px 0 6px; }
        .edit-field-label:first-child { margin-top: 0; }
        .cooldown-hint { font-size: 11.5px; color: var(--warning); margin-bottom: 4px; display: none; }
        .namestyle-row { display: flex; align-items: center; gap: 12px; background: var(--card); border: 0.5px solid var(--border); border-radius: var(--radius-sm); padding: 10px 12px; cursor: pointer; }
        .namestyle-preview-icon { width: 34px; height: 34px; border-radius: 10px; background: var(--ios-input); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 15px; flex-shrink: 0; }
        .namestyle-row-label { font-size: 14px; font-weight: 600; }
        .namestyle-row-swatch { width: 26px; height: 26px; border-radius: 8px; flex-shrink: 0; border: 1px solid var(--border); }
        .pronouns-row { display: flex; align-items: center; gap: 8px; }
        .pronouns-row input { flex: 1; }
        .pronouns-row button { background: var(--ios-input); border: none; width: 38px; height: 38px; border-radius: 10px; color: var(--sub); cursor: pointer; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
        .add-link-btn { background: none; border: 1px dashed var(--border); border-radius: 10px; padding: 10px; width: 100%; color: var(--nexus);
            font-size: 13.5px; font-weight: 600; cursor: pointer; font-family: inherit; margin-top: 8px; display: flex; align-items: center; justify-content: center; gap: 6px; transition: background 0.2s;
        }
        .edit-link-row { display: flex; gap: 8px; margin-bottom: 8px; }
        .edit-link-row input { flex: 1; }
        .edit-link-row button { background: var(--ios-input); border: none; width: 38px; height: 38px; border-radius: 10px; color: var(--danger); cursor: pointer; flex-shrink: 0; }
        .schema-row { display: flex; gap: 20px; }
        .schema-swatch-wrap { display: flex; flex-direction: column; align-items: center; gap: 6px; }
        .schema-swatch { width: 64px; height: 44px; border-radius: 12px; cursor: pointer; display: flex; align-items: center; justify-content: center; border: 1.5px solid var(--border); transition: transform 0.15s; }
        .schema-swatch:hover { transform: scale(1.05); }
        .schema-swatch-wrap span { font-size: 12.5px; color: var(--sub); font-weight: 600; }

        /* ── NAME STYLE PICKER ── */
        .namestyle-preset-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
        .namestyle-preset-item { display: flex; flex-direction: column; align-items: center; gap: 5px; cursor: pointer; }
        .namestyle-preset-swatch { width: 42px; height: 42px; border-radius: 50%; border: 2.5px solid transparent; transition: border-color 0.2s, transform 0.2s; }
        .namestyle-preset-swatch.selected { border-color: var(--text); transform: scale(1.08); }
        .namestyle-preset-item span { font-size: 10.5px; color: var(--sub); text-align: center; }
        .namestyle-font-row { display: flex; gap: 8px; flex-wrap: wrap; }
        .namestyle-font-btn { background: var(--ios-input); border: 1.5px solid var(--border); border-radius: 10px; padding: 9px 14px; font-size: 13.5px;
            font-weight: 600; cursor: pointer; color: var(--text); transition: all 0.2s;
        }
        .namestyle-font-btn.active { background: var(--nexus); color: #fff; border-color: var(--nexus); }
        .namestyle-live-preview { margin-top: 16px; text-align: center; font-size: 22px; font-weight: 800; padding: 16px; background: var(--ios-input); border-radius: var(--radius-sm); }

        /* ── STYLED DISPLAY NAMES (angewendet ueberall wo Namen erscheinen) ── */
        .styled-name-gradient { background-clip: text; -webkit-background-clip: text; -webkit-text-fill-color: transparent; }


        /* &#9472;&#9472; NOTIFICATIONS PANEL &#9472;&#9472; */
        #notif-panel { position: fixed;
            top: 64px; right: 10px; width: min(380px, calc(100vw - 20px)); max-height: calc(100vh - 84px);
            background: var(--header-bg); backdrop-filter: blur(24px) saturate(1.6); -webkit-backdrop-filter: blur(24px) saturate(1.6);
            border: 0.5px solid var(--border); border-radius: 20px; z-index: 1500; overflow: hidden;
            box-shadow: 0 16px 46px rgba(0,0,0,0.18), 0 2px 10px rgba(0,0,0,0.08);
            transform-origin: top right;
            transform: translateY(-8px) scale(0.96); opacity: 0; pointer-events: none;
            transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.22s ease;
            display: flex; flex-direction: column;
        }
        #notif-panel.open { transform: translateY(0) scale(1); opacity: 1; pointer-events: auto; }
        .notif-panel-header { padding: 14px 16px 12px; border-bottom: 0.5px solid var(--border); display: flex;
            justify-content: space-between; align-items: center; flex-shrink: 0;
        }
        .notif-panel-title { font-family: 'Syne', sans-serif; font-size: 17px; font-weight: 800; }
        #notif-list { overflow-y: auto; -webkit-overflow-scrolling: touch; }
        .notif-item { padding: 12px 16px; display: flex; align-items: flex-start; gap: 12px;
            border-bottom: 0.5px solid var(--border); cursor: pointer; transition: background 0.15s, transform 0.2s;
        }
        .notif-item:last-child { border-bottom: none; }
        .notif-item:hover { background: var(--ios-input); transform: translateX(-5px); }
        .notif-item.unread { background: var(--nexus-soft); }
        .notif-avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
        .notif-icon-badge { position: absolute; bottom: -2px; right: -2px; width: 18px; height: 18px;
            border-radius: 50%; display: flex; align-items: center; justify-content: center; border: 2px solid var(--card); font-size: 9px;
        }
        .notif-text { font-size: 14px; line-height: 1.4; }
        .notif-text strong { font-weight: 600; }
        .notif-time { font-size: 12px; color: var(--sub); margin-top: 3px; }
        .notif-empty { padding: 40px 20px; text-align: center; color: var(--sub); font-size: 15px; }

        /* &#9472;&#9472; BOOKMARKS SCREEN &#9472;&#9472; */
        #bookmarks-screen { padding-top: 16px; animation: fadeIn 0.3s ease; }
        .bookmarks-header { display: flex; align-items: center; gap: 14px; padding: 0 0 20px; }
        .bookmarks-header h2 { font-family: 'Syne', sans-serif; font-size: 24px; font-weight: 800; margin: 0; }

        /* &#9472;&#9472; TRENDING &#9472;&#9472; */
        .trending-card { background: var(--card);
            border-radius: var(--radius); padding: 16px; margin-bottom: 10px; border: 0.5px solid var(--border); box-shadow: var(--shadow);
            animation: postSlideIn 0.4s ease;
        }
        .trending-title { font-family: 'Syne', sans-serif; font-size: 16px; font-weight: 800; margin-bottom: 12px;
            display: flex; align-items: center; gap: 8px; }
        .trending-item { display: flex; align-items: center;
            gap: 10px; padding: 8px 0; border-bottom: 0.5px solid var(--border); cursor: pointer; transition: background 0.15s, transform 0.2s ease;
        }
        .trending-item:last-child { border-bottom: none; }
        .trending-item:hover { background: var(--ios-input); transform: translateX(6px); border-radius: 8px; padding-left: 8px; }
        .trending-item:hover .trending-tag { text-decoration: underline; }
        .trending-tag { font-weight: 700; font-size: 15px; color: var(--nexus); }
        .trending-count { font-size: 12px; color: var(--sub); margin-top: 1px; }

        /* &#9472;&#9472; SETTINGS SCREEN &#9472;&#9472; */
        #settings-screen { padding-top: 16px; animation: fadeIn 0.3s ease; }
        .settings-header { display: flex; align-items: center; gap: 14px; padding: 0 0 20px; }
        .settings-header h2 { font-family: 'Syne', sans-serif; font-size: 24px; font-weight: 800; margin: 0; }
        .settings-back-btn { background: var(--ios-input); border: none; color: var(--text);
            width: 34px; height: 34px;
            border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: transform 0.2s;
        }
        .settings-back-btn:hover { transform: scale(1.1); }
        .settings-section-title { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.8px; color: var(--sub);
            margin: 20px 0 8px 4px; }
        .settings-card { background: var(--card); border-radius: var(--radius);
            border: 0.5px solid var(--border); overflow: hidden; margin-bottom: 4px; }
        .settings-row { display: flex;
            align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 0.5px solid var(--border); cursor: pointer; transition: background 0.15s;
        }
        .settings-row:last-child { border-bottom: none; }
        .settings-row:hover { background: var(--ios-input); }
        .settings-row-icon { width: 32px; height: 32px; border-radius: 8px; display: flex; align-items: center;
            justify-content: center; flex-shrink: 0; transition: transform 0.2s; }
        .settings-row:hover .settings-row-icon { transform: scale(1.1); }
        .settings-row-label { flex-grow: 1; font-size: 15px; font-weight: 500; }
        .settings-row-value { font-size: 14px; color: var(--sub); }
        .settings-row-chevron { color: var(--sub); transition: transform 0.2s; }
        .settings-row:hover .settings-row-chevron { transform: translateX(3px); }
        .settings-toggle { width: 46px; height: 26px; border-radius: 13px; background: #ccc; position: relative;
            cursor: pointer; transition: background 0.25s; border: none; flex-shrink: 0; }
        .settings-toggle.on { background: var(--green); }
        .settings-toggle::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px;
            height: 20px; border-radius: 50%; background: white; transition: left 0.25s cubic-bezier(0.25, 0.8, 0.25, 1); box-shadow: 0 2px 4px rgba(0,0,0,0.2);
        }
        .settings-toggle.on::after { left: 23px; }
        .theme-picker { display: flex; gap: 10px; padding: 14px 16px; }
        .theme-dot { width: 34px; height: 34px; border-radius: 50%; cursor: pointer;
            border: 3px solid transparent; transition: border-color 0.2s, transform 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
        }
        .theme-dot:hover { transform: scale(1.15); }
        .theme-dot.selected { border-color: var(--text); transform: scale(1.1); }
        .theme-dot-custom { width: 34px; height: 34px; border-radius: 50%;
            cursor: pointer; border: 3px solid transparent; padding: 0; background: #1877f2;
            transition: border-color 0.2s, transform 0.2s cubic-bezier(0.25, 0.8, 0.25, 1); flex-shrink: 0;
        }
        .theme-dot-custom:hover { transform: scale(1.15); }
        .theme-dot-custom.selected { border-color: var(--text); transform: scale(1.1); }
        .bg-mode-picker { display: flex; gap: 8px; padding: 4px 16px 14px; width: 100%; }
        .bg-mode-btn { flex: 1; padding: 9px 0; border-radius: 10px; border: 1.5px solid var(--border);
            background: var(--ios-input); color: var(--sub); font-size: 12.5px; font-weight: 600; cursor: pointer;
            transition: all 0.2s; font-family: inherit;
        }
        .bg-mode-btn.active { background: var(--nexus); color: #fff; border-color: var(--nexus); }
        .bg-color-row { display: flex; align-items: center; gap: 14px; padding: 0 16px 14px; width: 100%; }
        .bg-color-row.hidden { display: none; }
        .bg-color-swatch { width: 40px; height: 40px; border-radius: 12px;
            cursor: pointer; border: 1.5px solid var(--border); padding: 0; flex-shrink: 0;
            transition: transform 0.15s;
        }
        .bg-color-swatch:hover { transform: scale(1.06); }
        .bg-gradient-preview { flex: 1; height: 40px; border-radius: 12px; border: 1.5px solid var(--border); }

        /* ── CUSTOM COLOR PICKER ── */
        .cp-modal { width: 100%; max-width: 340px; }
        .cp-sv-area { position: relative; width: 100%; height: 170px; border-radius: 14px; overflow: hidden;
            cursor: crosshair; touch-action: none; margin-bottom: 18px; background: #ff0000;
        }
        .cp-sv-white-overlay { position: absolute; inset: 0; background: linear-gradient(to right, #fff, rgba(255,255,255,0)); pointer-events: none; }
        .cp-sv-black-overlay { position: absolute; inset: 0; background: linear-gradient(to top, #000, rgba(0,0,0,0)); pointer-events: none; }
        .cp-sv-cursor { position: absolute; width: 22px; height: 22px; border-radius: 50%; border: 2.5px solid #fff;
            box-shadow: 0 0 0 1.5px rgba(0,0,0,0.35), 0 2px 8px rgba(0,0,0,0.35); transform: translate(-50%,-50%);
            pointer-events: none; top: 0; left: 0;
        }
        .cp-controls-row { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
        .cp-eyedropper-btn { background: var(--ios-input); border: none; width: 38px; height: 38px; border-radius: 50%;
            display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--text); flex-shrink: 0;
            transition: transform 0.15s, background 0.15s;
        }
        .cp-eyedropper-btn:hover { background: var(--nexus-soft); color: var(--nexus); transform: scale(1.08); }
        .cp-eyedropper-btn.hidden { display: none; }
        .cp-preview { width: 38px; height: 38px; border-radius: 50%; border: 2px solid var(--border); flex-shrink: 0; }
        .cp-hue-slider { position: relative; flex: 1; height: 16px; border-radius: 8px; touch-action: none; cursor: pointer;
            background: linear-gradient(to right, #f00, #ff0, #0f0, #0ff, #00f, #f0f, #f00);
        }
        .cp-hue-cursor { position: absolute; top: 50%; width: 22px; height: 22px; border-radius: 50%; background: #fff;
            border: 2.5px solid #fff; box-shadow: 0 0 0 1.5px rgba(0,0,0,0.3), 0 2px 8px rgba(0,0,0,0.35);
            transform: translate(-50%,-50%); pointer-events: none;
        }
        .cp-rgb-row { display: flex; gap: 10px; }
        .cp-rgb-field { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 5px; }
        .cp-rgb-field input { width: 100%; text-align: center; padding: 9px 4px; border-radius: 10px;
            border: 1.5px solid var(--border); background: var(--ios-input); color: var(--text); font-size: 14px;
            font-family: inherit; font-weight: 600; outline: none;
        }
        .cp-rgb-field input:focus { border-color: var(--nexus); box-shadow: 0 0 0 2px var(--nexus-soft); }
        .cp-rgb-field label { font-size: 11px; color: var(--sub); font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
        .profile-preview { display: flex; flex-direction: column; align-items: center; gap: 10px;
            padding: 24px 16px 20px; }
        .profile-preview-img { width: 80px; height: 80px; border-radius: 50%;
            object-fit: cover; border: 3px solid var(--nexus); transition: transform 0.3s; }
        .profile-preview-img:hover { transform: scale(1.05); }
        .profile-preview-name { font-family: 'Syne', sans-serif; font-size: 18px; font-weight: 700; margin-top: 6px;
            display: flex; align-items: center; justify-content: center; gap: 4px; }
        .profile-preview-username { font-size: 13px; color: var(--sub); }

        /* &#9472;&#9472; MODAL &#9472;&#9472; */
        @keyframes modalScale {
            from { opacity: 0; transform: scale(0.85); }
            to { opacity: 1; transform: scale(1); }
        }
        .modal-inner { background: var(--card);
            border-radius: 20px; padding: 22px; width: 92%; max-width: 420px; border: 0.5px solid var(--border); box-shadow: 0 20px 50px rgba(0,0,0,0.25);
            animation: modalScale 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
        }
        .modal-title { font-family: 'Syne', sans-serif; font-size: 18px; font-weight: 800; margin: 0 0 16px; }
        .modal-input { width: 100%;
            padding: 12px 14px;
            border: none; border-radius: var(--radius-sm); background: var(--ios-input); color: var(--text); font-size: 15px; font-family: inherit; outline: none; margin-bottom: 10px;
            transition: box-shadow 0.3s;
        }
        .modal-input:focus { box-shadow: 0 0 0 2px var(--nexus-soft); }
        select.modal-input { appearance: none; cursor: pointer; }
        .ad-modal-label { display: block; font-size: 12px; font-weight: 600; color: var(--sub); margin: 2px 0 6px; }
        .ad-mode-toggle { display: flex; gap: 6px; margin-bottom: 12px; background: var(--ios-input); border-radius: var(--radius-sm); padding: 4px; }
        .ad-mode-btn {
            flex: 1; border: none; background: transparent; color: var(--sub); font-family: inherit;
            font-size: 13.5px; font-weight: 600; padding: 9px 8px; border-radius: calc(var(--radius-sm) - 2px);
            cursor: pointer; transition: background 0.2s, color 0.2s;
        }
        .ad-mode-btn.active { background: var(--nexus); color: #fff; }

        /* &#9472;&#9472; WERBEANZEIGE IM FEED &#9472;&#9472; */
        .ad-post-pill-row { display: flex; justify-content: flex-end; margin-bottom: 8px; }
        .ad-post-pill {
            display: inline-flex; align-items: center; background: #1877f2; color: #fff;
            font-size: 11px; font-weight: 700; letter-spacing: 0.2px;
            padding: 4px 11px; border-radius: 999px; line-height: 1.3; white-space: nowrap;
        }
        .ad-post-title { font-size: 15.5px; font-weight: 700; margin-bottom: 8px; }
        .ad-post-img-wrap { cursor: default; }
        .ad-post-img-wrap.ad-clickable { cursor: pointer; }
        .ad-post-desc { font-size: 13.5px; color: var(--sub); margin-top: 10px; line-height: 1.45; }

        /* ── SPOTIFY NOW-PLAYING KARTE (Profil) ── */
        .spotify-now-playing-card {
            display: grid;
            grid-template-rows: 1fr;
            opacity: 1;
            transform: translateY(0) scale(1);
            margin: 14px 0;
            transition: grid-template-rows .38s cubic-bezier(.4,0,.2,1),
                        opacity .28s ease,
                        transform .32s cubic-bezier(.4,0,.2,1),
                        margin .38s cubic-bezier(.4,0,.2,1);
        }
        .spotify-now-playing-card.spotify-np-hidden {
            grid-template-rows: 0fr;
            opacity: 0;
            transform: translateY(-8px) scale(.98);
            margin: 0;
            pointer-events: none;
        }
        .spotify-np-inner {
            overflow: hidden;
            min-height: 0;
            background: var(--spotify-np-bg, #181818); border-radius: 16px; padding: 18px;
        }
        .spotify-np-header {
            display: flex; align-items: center; justify-content: space-between;
            color: var(--spotify-np-title-color, #fff); font-size: 15px; font-weight: 600; margin-bottom: 14px;
        }
        .spotify-np-header i { color: var(--spotify-np-accent, currentColor); }
        .spotify-np-body { display: flex; align-items: center; gap: 14px; text-decoration: none; }
        /* Der Akzent-Rahmen wird als echtes Padding auf einem Wrapper gerendert
           (nicht als box-shadow), damit er beim Swipe-Wechsel (overflow:hidden
           auf .spotify-np-body-viewport) nicht abgeschnitten wird. */
        .spotify-np-cover-wrap {
            width: 64px; height: 64px; border-radius: 10px; flex-shrink: 0;
            padding: 2px; box-sizing: border-box;
            background: var(--spotify-np-ring-color, transparent);
            transition: background .2s ease;
        }
        .spotify-np-cover { width: 100%; height: 100%; border-radius: 8px; object-fit: cover; display: block; background: #333; }
        .spotify-np-meta { min-width: 0; }
        .spotify-np-title { color: var(--spotify-np-title-color, #fff); font-size: 16px; font-weight: 600; white-space: nowrap; overflow: hidden; position: relative; }
        .spotify-np-artist { color: var(--spotify-np-artist-color, #b3b3b3); font-size: 13.5px; margin-top: 3px; white-space: nowrap; overflow: hidden; position: relative; }

        /* ── SWIPE-WECHSEL BEI SONGWECHSEL ── */
        .spotify-np-body-viewport { position: relative; overflow: hidden; flex: 1; min-width: 0; }
        .spotify-np-slide {
            display: flex; align-items: center; gap: 14px;
            transition: transform .38s cubic-bezier(.4,0,.2,1), opacity .38s cubic-bezier(.4,0,.2,1);
        }
        .spotify-np-slide.sws-outgoing {
            position: absolute; top: 0; left: 0; width: 100%;
            transform: translateX(-100%); opacity: 0;
            pointer-events: none;
        }
        .spotify-np-slide.sws-incoming-start { transform: translateX(100%); opacity: 0; }
        .spotify-np-slide.sws-incoming-end { transform: translateX(0); opacity: 1; }
        @media (prefers-reduced-motion: reduce) {
            .spotify-np-slide { transition: none; }
        }

        /* ── MARQUEE (nur bei zu langem Titel/Künstler) ── */
        .spotify-np-marquee-track { display: inline-flex; white-space: nowrap; will-change: transform; }
        .spotify-np-marquee-seg { flex: 0 0 auto; padding-right: 32px; }
        .spotify-np-marquee-seg:last-child { display: none; }
        .spotify-np-title.marquee-active,
        .spotify-np-artist.marquee-active {
            -webkit-mask-image: linear-gradient(to right, transparent 0, #000 16px, #000 calc(100% - 16px), transparent 100%);
            mask-image: linear-gradient(to right, transparent 0, #000 16px, #000 calc(100% - 16px), transparent 100%);
        }
        .spotify-np-title.marquee-active .spotify-np-marquee-seg:last-child,
        .spotify-np-artist.marquee-active .spotify-np-marquee-seg:last-child {
            display: inline-block;
        }
        .spotify-np-title.marquee-active .spotify-np-marquee-track,
        .spotify-np-artist.marquee-active .spotify-np-marquee-track {
            animation: spotifyMarqueeScroll var(--marquee-duration, 9s) linear infinite;
        }
        @keyframes spotifyMarqueeScroll {
            from { transform: translateX(0); }
            to   { transform: translateX(-50%); }
        }
        @media (prefers-reduced-motion: reduce) {
            .spotify-np-title.marquee-active .spotify-np-marquee-track,
            .spotify-np-artist.marquee-active .spotify-np-marquee-track { animation: none; }
        }
        @media (prefers-reduced-motion: reduce) {
            .spotify-now-playing-card { transition: none; }
        }

        /* ── WIDGET-DESIGN MODAL (Einstellungen > Verknüpfungen) ── */
        .sws-preset-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
        .sws-preset-swatch {
            border-radius: 12px; padding: 10px 8px; cursor: pointer;
            border: 2px solid transparent; text-align: center;
            font-size: 11.5px; font-weight: 600; color: #fff;
            transition: border-color .15s ease, transform .15s ease;
        }
        .sws-preset-swatch:active { transform: scale(.96); }
        .sws-preset-swatch.selected { border-color: var(--nexus); }
        .sws-preset-swatch-dot { width: 22px; height: 22px; border-radius: 50%; margin: 0 auto 6px; }
        .sws-color-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
        .sws-color-field { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 11px; color: var(--sub); font-weight: 600; }
        .sws-color-swatch {
            width: 40px; height: 40px; border-radius: 50%; cursor: pointer;
            border: 2px solid var(--border); box-shadow: 0 0 0 3px transparent;
            transition: box-shadow .15s ease;
        }
        .sws-color-swatch:active { box-shadow: 0 0 0 3px var(--nexus-soft); }
        .sws-border-row {
            display: flex; align-items: center; justify-content: space-between;
            padding: 12px 0 4px; margin-top: 4px; border-top: 0.5px solid var(--border);
        }
        .sws-border-row span { font-size: 14.5px; font-weight: 600; }
        
        .btn-primary { background: var(--nexus);
            color: white; border: none; padding: 13px; border-radius: var(--radius-sm);
            font-size: 15px; font-weight: 600; cursor: pointer; width: 100%; font-family: inherit;
            transition: opacity 0.15s, transform 0.15s;
            position: relative; overflow: hidden;
        }
        .btn-primary::after {
            content: '';
            position: absolute; top: 50%; left: 50%; width: 300%; height: 300%;
            background: rgba(255,255,255,0.2); transform: translate(-50%, -50%) scale(0); border-radius: 50%;
            transition: transform 0.5s ease-out;
        }
        .btn-primary:active::after { transform: translate(-50%, -50%) scale(1); transition: 0s; }
        .btn-primary:hover { transform: translateY(-1px); box-shadow: 0 4px 10px rgba(24,119,242,0.2); }
        .btn-ghost { background: none; border: none; color: var(--danger); font-size: 15px; font-weight: 600;
            cursor: pointer; width: 100%; padding: 12px; font-family: inherit; transition: transform 0.15s, background 0.15s; border-radius: var(--radius-sm);
        }
        .btn-ghost:hover { background: rgba(255,59,48,0.1); transform: translateY(-1px); }

        /* ── ADMIN: MELDUNGEN & FEEDBACK ── */
        .admin-item-card { background: var(--card); border: 0.5px solid var(--border); border-radius: var(--radius-sm);
            padding: 14px; margin: 0 0 10px; }
        .admin-item-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
        .admin-item-badge { font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 20px; text-transform: uppercase; letter-spacing: 0.3px; }
        .admin-item-badge.pending { background: rgba(255,149,0,0.15); color: var(--warning); }
        .admin-item-badge.resolved { background: rgba(52,199,89,0.15); color: var(--green); }
        .admin-item-time { font-size: 12px; color: var(--sub); }
        .admin-item-title { font-size: 14.5px; font-weight: 600; margin-bottom: 4px; }
        .admin-item-detail { font-size: 13.5px; color: var(--text); background: var(--ios-input); border-radius: 8px; padding: 8px 10px; margin-bottom: 8px; line-height: 1.4; }
        .admin-item-meta { font-size: 12px; color: var(--sub); margin-bottom: 4px; word-break: break-word; }
        .admin-item-actions { display: flex; gap: 8px; margin-top: 10px; }
        .admin-action-btn { flex: 1; background: var(--ios-input); border: none; border-radius: 10px; padding: 9px 0;
            font-size: 13px; font-weight: 600; cursor: pointer; font-family: inherit; transition: transform 0.15s, background 0.15s; }
        .admin-action-btn:hover { transform: translateY(-1px); }
        .admin-action-btn.resolve { color: var(--green); }
        .admin-action-btn.resolve:hover { background: rgba(52,199,89,0.12); }
        .admin-action-btn.delete { color: var(--danger); }
        .admin-action-btn.delete:hover { background: rgba(255,59,48,0.12); }

        /* &#9472;&#9472; AI OVERLAY &#9472;&#9472; */
        @keyframes overlaySlideUp {
            from { opacity: 0; transform: translateY(40px) scale(0.95); }
            to { opacity: 1; transform: translateY(0) scale(1); }
        }
        #ai-overlay-container { width: 96%;
            max-width: 820px; height: 88vh; background: var(--card); border-radius: 20px; position: relative; overflow: hidden; display: flex; flex-direction: column; border: 0.5px solid var(--border);
            box-shadow: 0 20px 50px rgba(0,0,0,0.3); animation: overlaySlideUp 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
        }

        /* &#9472;&#9472; STORY VIEWER &#9472;&#9472; */
        #story-viewer { background: #000;
            border-radius: 0; width: 100%; max-width: 400px; height: 100%; display: flex; flex-direction: column; position: relative; overflow: hidden;
            animation: storySlideUp 0.38s cubic-bezier(0.22, 1, 0.36, 1); touch-action: pan-y;
        }
        @keyframes storySlideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
        #story-progress { position: absolute; top: 10px; left: 10px; right: 10px; display: flex; gap: 4px; z-index: 10; }
        .story-prog-bar { height: 3px; background: rgba(255,255,255,0.4); border-radius: 2px; flex: 1; overflow: hidden; }
        .story-prog-fill { height: 100%; background: white; border-radius: 2px; }
        #story-img { width: 100%; height: 100%; object-fit: contain; background: #000; animation: fadeIn 0.3s ease; }
        #story-header-overlay { position: absolute; top: 22px; left: 10px; right: 10px; display: flex;
            align-items: center; gap: 10px; z-index: 10; pointer-events: none; }
        .story-header-img { width: 36px; height: 36px; border-radius: 50%; border: 2px solid white; object-fit: cover; }
        .story-header-name { color: white; font-weight: 600; font-size: 14px; text-shadow: 0 1px 4px rgba(0,0,0,0.5); }
        .story-header-time { color: rgba(255,255,255,0.8); font-size: 12px;
            font-weight: 500; text-shadow: 0 1px 4px rgba(0,0,0,0.5); margin-left: 4px; }
        .story-action-btns { position: absolute; top: 20px; right: 12px; display: flex; gap: 10px; z-index: 15; }
        .story-action-btn { background: rgba(0,0,0,0.4); border: none; color: white; width: 32px;
            height: 32px;
            border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: transform 0.2s, background 0.2s;
        }
        .story-action-btn:hover { background: rgba(0,0,0,0.7); transform: scale(1.1); }
        #story-time-left { position: absolute; bottom: calc(env(safe-area-inset-bottom, 20px) + 20px); left: 50%;
            transform: translateX(-50%); color: rgba(255,255,255,0.9); font-size: 13px; font-weight: 600; text-shadow: 0 2px 6px rgba(0,0,0,0.8); z-index: 20; background: rgba(0,0,0,0.5); padding: 6px 14px;
            border-radius: 20px; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); pointer-events: none;}

        /* -- Story: Views (Auge unten rechts, nur für den Ersteller) & Viewers-Sheet -- */
        .story-views-btn {
            position: absolute; bottom: calc(env(safe-area-inset-bottom, 20px) + 20px); right: 16px;
            z-index: 20; background: rgba(0,0,0,0.5); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
        }
        .story-viewers-backdrop {
            position: absolute; inset: 0; z-index: 24; background: rgba(0,0,0,0.5); opacity: 0; pointer-events: none;
            transition: opacity 0.25s ease;
        }
        .story-viewers-backdrop.open { opacity: 1; pointer-events: auto; }
        .story-viewers-sheet {
            position: absolute; left: 0; right: 0; bottom: 0; z-index: 25; max-height: 62%; overflow-y: auto;
            background: #1c1c1e; border-radius: 20px 20px 0 0; padding: 10px 16px calc(20px + env(safe-area-inset-bottom, 0px));
            transform: translateY(100%); transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
        }
        .story-viewers-sheet.open { transform: translateY(0); }
        .story-viewers-sheet-handle { width: 36px; height: 4px; border-radius: 2px; background: rgba(255,255,255,0.25); margin: 4px auto 12px; }
        .story-viewers-sheet-title { color: #fff; font-weight: 700; font-size: 14.5px; margin-bottom: 10px; }
        .story-viewers-sheet .following-row { background: rgba(255,255,255,0.06); border: none; }
        .story-viewers-sheet .following-row:hover { background: rgba(255,255,255,0.1); }

        /* &#9472;&#9472; EMOJI PICKER &#9472;&#9472; */
        .emoji-picker-popup {
            position: fixed;
            background: var(--card); border: 0.5px solid var(--border); border-radius: 16px; padding: 12px;
            display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; width: 260px;
            max-height: 200px; overflow-y: auto; box-shadow: 0 10px 40px rgba(0,0,0,0.2); z-index: 3000;
            animation: fadeInEmoji 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
            backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
            transform-origin: bottom center;
        }
        .emoji-picker-popup::-webkit-scrollbar { display: none; }
        @keyframes fadeInEmoji { from { opacity: 0; transform: scale(0.85) translateY(10px); } to { opacity: 1; transform: scale(1) translateY(0); } }
        .emoji-btn-pick { font-size: 24px;
            cursor: pointer; padding: 6px; border-radius: 10px; border: none; background: transparent; transition: transform 0.2s cubic-bezier(0.25, 0.8, 0.25, 1), background 0.15s;
            display: flex; justify-content: center;
            align-items: center; }
        .emoji-btn-pick:hover { transform: scale(1.3) rotate(5deg); background: var(--ios-input); }

        /* &#9472;&#9472; ACTION BUTTON STYLE &#9472;&#9472; */
        .input-action-btn { background: none;
            border: 1px solid var(--border); border-radius: 8px; color: var(--sub); cursor: pointer; padding: 3px 8px; font-size: 12px; font-weight: 700; font-family: inherit;
            transition: all 0.2s; }
        .input-action-btn:hover { color: var(--nexus); border-color: var(--nexus); background: var(--nexus-soft);
            transform: translateY(-1px); }

        /* &#9472;&#9472; TOAST &#9472;&#9472; */
        #toast { position: fixed;
            bottom: 100px; left: 50%; transform: translateX(-50%) translateY(30px) scale(0.9); background: var(--text); color: var(--bg); padding: 10px 20px; border-radius: 20px; font-size: 14px;
            font-weight: 500;
            z-index: 9999; opacity: 0; transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); pointer-events: none; white-space: nowrap;
            box-shadow: 0 10px 30px rgba(0,0,0,0.2);
        }
        #toast.show { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }

        /* -- Badge-System: kleines Icon neben Profilname + Toast bei Klick -- */
        .profile-badge {
            display: inline-flex; align-items: center; justify-content: center;
            width: 19px; height: 19px; border-radius: 50%; background: var(--nexus-soft);
            vertical-align: -4px; margin-left: 2px; cursor: pointer; overflow: hidden;
            transition: transform 0.15s;
        }
        .profile-badge:hover { transform: scale(1.12); }
        .profile-badge img { width: 12px; height: 12px; object-fit: contain; }
        #badge-toast {
            position: fixed; bottom: 100px; left: 50%; z-index: 9999; cursor: pointer;
            display: flex; align-items: center; gap: 12px; max-width: 320px;
            background: var(--text); color: var(--bg); padding: 12px 16px; border-radius: 18px;
            box-shadow: 0 10px 30px rgba(0,0,0,0.25);
            transform: translateX(-50%) translateY(30px) scale(0.9); opacity: 0; pointer-events: none;
            transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
        }
        #badge-toast.show { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); pointer-events: auto; }
        .badge-toast-icon {
            width: 34px; height: 34px; border-radius: 50%; object-fit: contain; background: rgba(127,127,127,0.2);
            padding: 6px; flex-shrink: 0;
        }
        .badge-toast-body { min-width: 0; }
        .badge-toast-name { font-size: 14.5px; font-weight: 700; }
        .badge-toast-desc { font-size: 12.5px; opacity: 0.75; margin-top: 2px; line-height: 1.35; }
        .badge-toast-desc.hidden { display: none; }

        .hidden { display: none !important; }
        .divider { height: 0.5px; background: var(--border); margin: 6px 0; }

        /* &#9472;&#9472; POLL &#9472;&#9472; */
        .poll-container { margin-top: 10px; }
        .poll-option { position: relative; overflow: hidden; border-radius: 10px; margin-bottom: 8px;
            border: 1.5px solid var(--border); cursor: pointer; transition: border-color 0.3s, transform 0.2s;
        }
        .poll-option:hover { border-color: var(--nexus); transform: translateX(4px); }
        .poll-option.voted-this { border-color: var(--nexus); }
        .poll-fill { position: absolute; top: 0; left: 0; height: 100%; background: var(--nexus-soft);
            transition: width 0.6s cubic-bezier(0.25, 0.8, 0.25, 1); z-index: 0; }
        .poll-label { position: relative; z-index: 1;
            padding: 10px 12px; font-size: 14px; font-weight: 500; display: flex; justify-content: space-between; align-items: center;
        }
        .poll-pct { font-size: 13px; font-weight: 700; color: var(--nexus); animation: fadeIn 0.5s; }
        .poll-total { font-size: 12px; color: var(--sub); margin-top: 6px; }

        /* &#9472;&#9472; POLL CREATOR &#9472;&#9472; */
        .poll-option-input { display: flex; gap: 8px; margin-bottom: 8px; align-items: center; animation: postSlideIn 0.3s ease; }
        .poll-option-input input { flex: 1;
            padding: 10px 12px; border: 1px solid var(--border);
            border-radius: 10px; background: var(--ios-input); color: var(--text); font-size: 14px; font-family: inherit; outline: none; transition: border-color 0.3s, box-shadow 0.3s;
        }
        .poll-option-input input:focus { border-color: var(--nexus); box-shadow: 0 0 0 2px var(--nexus-soft); }

        /* &#9472;&#9472; CHAR COUNTER &#9472;&#9472; */
        .char-counter { font-size: 12px; color: var(--sub); text-align: right; margin-top: 4px; transition: color 0.3s; }
        .char-counter.warn { color: var(--warning); animation: modalScale 0.3s ease; }
        .char-counter.limit { color: var(--danger); animation: shake 0.4s ease; }
        @keyframes shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }

        /* &#9472;&#9472; Animated post entry &#9472;&#9472; */
        @keyframes postSlideIn {
            from { opacity: 0; transform: translateY(25px) scale(0.97); }
            to { opacity: 1; transform: translateY(0) scale(1); }
        }
        .post-new-anim { animation: postSlideIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards; }
        /* Geteilten Beitrag beim Öffnen 4x sanft aufblinken lassen, danach normaler Zustand. */
        @keyframes postShareBlink {
            0%, 100% { box-shadow: var(--shadow); background-color: var(--card); }
            50% { box-shadow: 0 0 0 3px var(--nexus-soft); background-color: var(--nexus-soft); }
        }
        .post-share-highlight { animation: postShareBlink 0.6s ease-in-out 4; }

        /* ── SKELETON LOADING ── */
        @keyframes skeletonShimmer { 0% { background-position: -300px 0; } 100% { background-position: 300px 0; } }
        .skeleton-card { background: var(--card); border-radius: var(--radius); padding: 16px; margin-bottom: 10px;
            border: 0.5px solid var(--border); box-shadow: var(--shadow); }
        .skeleton-shimmer {
            background: linear-gradient(90deg, var(--ios-input) 25%, var(--border) 37%, var(--ios-input) 63%);
            background-size: 600px 100%; animation: skeletonShimmer 1.4s ease-in-out infinite; border-radius: 6px;
        }
        .skeleton-header { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
        .skeleton-avatar { width: 42px; height: 42px; border-radius: 50%; flex-shrink: 0; }
        .skeleton-lines { flex: 1; display: flex; flex-direction: column; gap: 6px; }
        .skeleton-line { height: 10px; border-radius: 5px; }
        .skeleton-text-block { display: flex; flex-direction: column; gap: 8px; margin-bottom: 4px; }
        .skeleton-img { width: calc(100% + 32px); margin: 12px -16px -16px -16px; height: 220px; }

        /* ── FEED LOAD-MORE INDICATOR ── */
        .feed-loading-spinner {
            width: 26px; height: 26px; border-radius: 50%; border: 3px solid var(--border);
            border-top-color: var(--nexus); animation: spin 0.7s linear infinite; margin: 18px auto;
        }
        @keyframes spin { to { transform: rotate(360deg); } }
        #feed-load-more-indicator { display: flex; justify-content: center; padding: 4px 0 20px; }
        #feed-load-more-indicator.hidden { display: none; }

        /* ── FEED END MESSAGE ── */
        .feed-end-message {
            display: flex; flex-direction: column; align-items: center; text-align: center;
            padding: 28px 24px calc(40px + env(safe-area-inset-bottom));
            animation: fadeIn 0.4s ease;
        }
        .feed-end-message.hidden { display: none; }
        .feed-end-text { font-size: 15px; font-weight: 700; color: var(--text); margin-bottom: 3px; }
        .feed-end-sub { font-size: 13px; color: var(--sub); margin-bottom: 14px; }
        .feed-end-links { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
        .feed-end-link {
            display: flex; align-items: center; gap: 7px; padding: 9px 16px; border-radius: 999px;
            background: var(--card); border: 0.5px solid var(--border); color: var(--text);
            font-size: 13.5px; font-weight: 600; text-decoration: none; transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
        }
        .feed-end-link:hover { transform: translateY(-1px); box-shadow: var(--shadow); background: var(--nexus-soft); color: var(--nexus); }
        .feed-end-link-icon { width: 17px; height: 17px; flex-shrink: 0; }

        /* ── REPORT MODAL ── */
        .report-reason-btn {
            display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-radius: 12px;
            border: 1.5px solid var(--border); background: var(--ios-input); color: var(--text);
            font-size: 14px; font-weight: 500; font-family: inherit; cursor: pointer; text-align: left;
            transition: border-color 0.15s, background 0.15s;
        }
        .report-reason-btn:hover { background: var(--border); }
        .report-reason-btn.selected { border-color: var(--danger); background: rgba(255,59,48,0.08); color: var(--danger); font-weight: 700; }
        .report-reason-btn .report-check { margin-left: auto; width: 16px; height: 16px; border-radius: 50%;
            border: 1.5px solid var(--border); flex-shrink: 0; }
        .report-reason-btn.selected .report-check { border-color: var(--danger); background: var(--danger); }

        /* ── DIRECT MESSAGES ── */

        /* -- Eigenständige Vollbild-Screens: füllen den Viewport unterhalb der Navbar
           und scrollen nur intern, unabhängig vom normalen Seiten-Scroll. -- */
        #dm-list-screen, #dm-thread-screen {
            position: fixed !important; top: 54px; left: 0; right: 0; bottom: 0;
            max-width: 600px; margin: 0 auto; width: 100%;
            background: var(--bg); z-index: 600;
            display: flex; flex-direction: column; padding: 0;
        }
        #dm-list-screen.hidden, #dm-thread-screen.hidden { display: none !important; }

        /* -- Nachrichtenliste -- */
        .dm-list-header { flex-shrink: 0; padding: 12px 14px 14px; margin: 0; border-bottom: 0.5px solid var(--border); }
        .dm-list-header h2 { letter-spacing: -0.2px; }
        #dm-list { flex: 1 1 auto; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 10px 12px calc(100px + env(safe-area-inset-bottom)); }
        .dm-row {
            display: flex; align-items: center; gap: 13px; padding: 11px 12px; border-radius: var(--radius);
            background: var(--card); border: 0.5px solid var(--border); margin-bottom: 8px; cursor: pointer;
            transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease; position: relative;
        }
        .dm-row:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
        .dm-row:active { transform: scale(0.985); }
        .dm-row.unread { background: linear-gradient(90deg, var(--nexus-soft), var(--card) 65%); border-color: transparent; box-shadow: inset 3px 0 0 var(--nexus); }
        .dm-row-avatar-wrap { position: relative; flex-shrink: 0; }
        .dm-row-avatar { width: 50px; height: 50px; border-radius: 50%; object-fit: cover; display: block; background: var(--ios-input); }
        .dm-row-avatar-wrap .presence-dot { width: 13px; height: 13px; bottom: 0; right: 0; border-width: 2.5px; border-color: var(--card); }
        .dm-row-info { flex: 1; min-width: 0; }
        .dm-row-name { font-weight: 700; font-size: 14.5px; display: flex; align-items: center; gap: 4px; color: var(--text); }
        .dm-row-preview { font-size: 13px; color: var(--sub); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
        .dm-row-preview i { font-style: normal; color: var(--sub); }
        .dm-row-preview.unread { color: var(--text); font-weight: 600; }
        .dm-row-preview.unread i { color: var(--nexus); font-weight: 700; }
        .dm-row-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 7px; flex-shrink: 0; }
        .dm-row-time { font-size: 11px; color: var(--sub); }
        .dm-row.unread .dm-row-time { color: var(--nexus); font-weight: 700; }
        .dm-row-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--nexus); box-shadow: 0 0 0 3px var(--nexus-soft); animation: dmDotPulse 2s ease-in-out infinite; }
        @keyframes dmDotPulse { 0%, 100% { box-shadow: 0 0 0 3px var(--nexus-soft); } 50% { box-shadow: 0 0 0 5px var(--nexus-soft); } }
        .dm-section-label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: var(--sub); margin: 4px 0 8px; padding-left: 2px; }

        /* -- Empty-State (Liste) -- */
        .dm-empty-state { flex: 1 1 auto; text-align: center; padding: 30px; display: flex; flex-direction: column; align-items: center; justify-content: center; }
        .dm-empty-state.hidden { display: none; }
        .dm-empty-icon {
            width: 68px; height: 68px; border-radius: 50%; background: var(--nexus-soft); color: var(--nexus);
            display: flex; align-items: center; justify-content: center; margin-bottom: 16px;
        }
        .dm-empty-title { font-weight: 700; font-size: 16px; color: var(--text); margin-bottom: 6px; }
        .dm-empty-sub { font-size: 13.5px; color: var(--sub); line-height: 1.5; max-width: 260px; }

        /* -- Thread-Header -- */
        .dm-thread-header {
            position: relative; z-index: 5; flex-shrink: 0; background: var(--header-bg); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
            display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-bottom: 0.5px solid var(--border);
            margin: 0;
        }
        .dm-thread-avatar-wrap { position: relative; flex-shrink: 0; cursor: pointer; }
        .dm-thread-avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; display: block; background: var(--ios-input); }
        .dm-thread-avatar-wrap .presence-dot { width: 11px; height: 11px; bottom: -1px; right: -1px; border-width: 2px; border-color: var(--card); }
        .dm-thread-headinfo { flex: 1; min-width: 0; cursor: pointer; }
        .dm-thread-name { font-weight: 700; font-size: 15px; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
        .dm-thread-substatus { font-size: 11.5px; color: var(--sub); font-weight: 500; min-height: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

        /* -- Chatverlauf: einziger scrollender Bereich im Thread-Screen -- */
        #dm-thread-messages {
            flex: 1 1 auto; overflow-y: auto; -webkit-overflow-scrolling: touch;
            display: flex; flex-direction: column; gap: 3px; padding: 10px 14px calc(88px + env(safe-area-inset-bottom));
            background-image: radial-gradient(circle, var(--border) 0.9px, transparent 0.9px);
            background-size: 18px 18px; background-position: -9px -9px;
        }
        body.dark #dm-thread-messages { opacity: 1; }
        .dm-day-divider { display: flex; justify-content: center; margin: 14px 0 10px; }
        .dm-day-divider span {
            font-size: 11.5px; font-weight: 700; color: var(--sub); background: var(--ios-input);
            padding: 5px 13px; border-radius: 20px; letter-spacing: 0.2px;
        }
        .dm-bubble-row { display: flex; margin-top: 8px; }
        .dm-bubble-row.grouped { margin-top: 2px; }
        .dm-bubble-row.mine { justify-content: flex-end; }
        .dm-bubble-wrap { max-width: 76%; display: flex; flex-direction: column; min-width: 0; }
        .dm-bubble-row.mine .dm-bubble-wrap { align-items: flex-end; }
        .dm-bubble {
            width: fit-content; max-width: 100%; padding: 9px 14px; border-radius: 18px; font-size: 14.5px; line-height: 1.42;
            white-space: pre-wrap; word-break: break-word; animation: postSlideIn 0.22s ease; box-shadow: 0 1px 1px rgba(0,0,0,0.04);
        }
        .dm-bubble-row.mine .dm-bubble { background: linear-gradient(135deg, var(--nexus), var(--nexus-deep)); color: #fff; border-bottom-right-radius: 5px; }
        .dm-bubble-row.mine.grouped .dm-bubble { border-top-right-radius: 5px; }
        .dm-bubble-row.mine.grouped:not(.last-in-group) .dm-bubble { border-bottom-right-radius: 5px; }
        .dm-bubble-row:not(.mine) .dm-bubble { background: var(--ios-input); color: var(--text); border-bottom-left-radius: 5px; }
        .dm-bubble-row:not(.mine).grouped .dm-bubble { border-top-left-radius: 5px; }
        .dm-bubble-row.last-in-group .dm-bubble { border-bottom-right-radius: 18px; border-bottom-left-radius: 18px; }
        .dm-bubble-row.mine.last-in-group .dm-bubble { border-bottom-right-radius: 5px; }
        .dm-bubble-row:not(.mine).last-in-group .dm-bubble { border-bottom-left-radius: 5px; }
        .dm-bubble-time { font-size: 10.5px; color: var(--sub); margin-top: 3px; padding: 0 4px; }
        .dm-bubble-row:not(.last-in-group) .dm-bubble-time { display: none; }
        .dm-seen-label { color: var(--nexus); font-weight: 600; }
        .dm-bubble-pending { opacity: 0.6; }
        .dm-empty-thread { text-align: center; color: var(--sub); padding: 44px 30px; font-size: 13.5px; display: flex; flex-direction: column; align-items: center; gap: 8px; margin: auto; }
        .dm-empty-thread i { opacity: 0.5; }

        /* -- Antworten: Zitat in der Bubble -- */
        .dm-bubble-quote {
            display: flex; flex-direction: column; gap: 1px; max-width: 100%;
            background: rgba(127,127,127,0.16); border-left: 3px solid var(--nexus);
            border-radius: 8px; padding: 5px 9px; margin-bottom: 4px; cursor: pointer;
            font-size: 12px; line-height: 1.3;
        }
        .dm-bubble-row.mine .dm-bubble-quote { background: rgba(255,255,255,0.16); border-left-color: rgba(255,255,255,0.7); }
        .dm-bubble-quote-name { font-weight: 700; color: var(--nexus); }
        .dm-bubble-row.mine .dm-bubble-quote-name { color: rgba(255,255,255,0.9); }
        .dm-bubble-quote-text { color: var(--sub); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
        .dm-bubble-row.mine .dm-bubble-quote-text { color: rgba(255,255,255,0.75); }
        .dm-bubble-quote-missing { opacity: 0.6; font-style: italic; }
        .dm-bubble-flash .dm-bubble { animation: dmBubbleFlash 0.9s ease; }
        @keyframes dmBubbleFlash {
            0% { box-shadow: 0 0 0 3px var(--nexus); }
            100% { box-shadow: 0 1px 1px rgba(0,0,0,0.04); }
        }

        /* -- Swipe-to-reply -- */
        .dm-bubble-row { position: relative; transition: transform 0.15s ease; touch-action: pan-y; }
        .dm-bubble-swipe-hint {
            position: absolute; left: -34px; top: 50%; transform: translateY(-50%) scale(0.6);
            width: 26px; height: 26px; border-radius: 50%; background: var(--nexus-soft); color: var(--nexus);
            display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity 0.15s, transform 0.15s;
        }
        .dm-bubble-swipe-hint i { width: 14px; height: 14px; }
        .dm-bubble-row.dm-swipe-active .dm-bubble-swipe-hint { opacity: 1; transform: translateY(-50%) scale(1); }

        /* -- Long-Press-Kontextmenü für Nachrichten -- */
        .dm-bubble-menu {
            position: fixed; z-index: 2000; background: rgba(40,40,42,0.98);
            backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
            border: 0.5px solid rgba(255,255,255,0.1); border-radius: 14px; overflow: hidden;
            min-width: 160px; box-shadow: 0 10px 30px rgba(0,0,0,0.4); animation: dmMenuPop 0.15s ease;
        }
        .dm-bubble-menu.hidden { display: none; }
        @keyframes dmMenuPop { from { opacity: 0; transform: scale(0.9); } to { opacity: 1; transform: scale(1); } }
        .dm-bubble-menu button {
            display: flex; align-items: center; gap: 10px; width: 100%; padding: 11px 14px;
            background: none; border: none; color: #fff; font-size: 14px; text-align: left; cursor: pointer;
            transition: background 0.15s;
        }
        .dm-bubble-menu button:hover { background: rgba(255,255,255,0.1); }
        .dm-bubble-menu button + button { border-top: 0.5px solid rgba(255,255,255,0.08); }
        .dm-bubble-menu-backdrop { position: fixed; inset: 0; z-index: 1999; background: transparent; }
        .dm-bubble-menu-backdrop.hidden { display: none; }

        /* -- Antwort-Vorschau über der Eingabeleiste -- */
        .dm-reply-preview {
            display: flex; align-items: stretch; gap: 8px; background: var(--ios-input);
            border-radius: 12px; padding: 7px 9px; margin: 0 auto 8px; max-width: 600px;
        }
        .dm-reply-preview.hidden { display: none; }
        .dm-reply-preview-bar { width: 3px; border-radius: 2px; background: var(--nexus); flex-shrink: 0; }
        .dm-reply-preview-body { flex: 1; min-width: 0; }
        .dm-reply-preview-label { font-size: 11.5px; font-weight: 700; color: var(--nexus); }
        .dm-reply-preview-text { font-size: 12.5px; color: var(--sub); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
        .dm-reply-preview-close {
            background: none; border: none; color: var(--sub); cursor: pointer; flex-shrink: 0;
            width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; border-radius: 50%;
        }
        .dm-reply-preview-close:hover { background: rgba(127,127,127,0.16); color: var(--text); }

        /* -- Fixierte Chats -- */
        .dm-section-label { display: flex; align-items: center; gap: 5px; }
        .dm-row.pinned { background: linear-gradient(90deg, var(--nexus-soft), var(--card) 75%); }
        .dm-row-pin-icon { width: 12px; height: 12px; color: var(--nexus); }

        /* -- Eingabeleiste -- */
        #dm-input-bar { position: fixed;
            bottom: 0; left: 0; right: 0; background: var(--tab-bg); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); border-top: 0.5px solid var(--border);
            padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); z-index: 1000;
        }
        #dm-input-bar.hidden { display: none; }
        .dm-input-row { display: flex; align-items: flex-end; gap: 8px; max-width: 600px; margin: 0 auto; }
        .dm-input-field {
            flex: 1; background: var(--ios-input); border-radius: 22px; padding: 10px 16px; color: var(--text);
            font-size: 15px; outline: none; min-height: 22px; max-height: 120px; overflow-y: auto; font-family: inherit;
            line-height: 1.4; border: 1.5px solid transparent; transition: border-color 0.2s, box-shadow 0.2s;
        }
        .dm-input-field:focus { border-color: var(--nexus); box-shadow: 0 0 0 3px var(--nexus-soft); }
        .dm-input-field:empty:before { content: attr(placeholder); color: var(--sub); }
        .dm-send-btn {
            background: var(--nexus); color: #fff; border: none; width: 36px; height: 36px; border-radius: 50%;
            display: flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0;
            transition: transform 0.15s, opacity 0.15s, box-shadow 0.2s;
        }
        .dm-send-btn:hover { box-shadow: 0 4px 12px var(--nexus-soft); }
        .dm-send-btn:active { transform: scale(0.9); }
        .dm-send-btn[disabled] { opacity: 0.35; cursor: default; box-shadow: none; transform: none; }

        /* -- Anfrage-Banner -- */
        #dm-request-banner { position: fixed; bottom: 0; left: 0; right: 0; background: var(--tab-bg);
            backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); border-top: 0.5px solid var(--border);
            padding: 14px 18px calc(14px + env(safe-area-inset-bottom)); z-index: 1000; text-align: center;
            animation: dmBannerIn 0.25s ease;
        }
        @keyframes dmBannerIn { from { transform: translateY(12px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
        #dm-request-banner.hidden { display: none; }
        .dm-request-text { font-size: 13.5px; color: var(--sub); display: flex; align-items: center; justify-content: center; gap: 6px; font-weight: 600; }
        .dm-request-btn { flex: 1; border: none; border-radius: 14px; padding: 11px; font-size: 14.5px;
            font-weight: 700; font-family: inherit; cursor: pointer; transition: transform 0.15s, opacity 0.15s; }
        .dm-request-btn:active { transform: scale(0.96); }
        .dm-request-btn.accept { background: var(--nexus); color: #fff; }
        .dm-request-btn.decline { background: var(--ios-input); color: var(--text); }

        /* -- Gruppen-Chats -- */
        .dm-group-avatar-fallback {
            width: 100%; height: 100%; border-radius: 50%; display: flex; align-items: center; justify-content: center;
            background: linear-gradient(135deg, var(--nexus), var(--nexus-deep)); color: #fff;
        }
        .dm-row-avatar-wrap .dm-group-avatar-fallback, .dm-thread-avatar-wrap .dm-group-avatar-fallback { position: absolute; inset: 0; }
        .dm-sender-name { font-size: 11.5px; font-weight: 700; color: var(--nexus); margin: 0 4px 3px; }
        .dm-bubble-row.grouped .dm-sender-name { display: none; }

        /* -- Bild-Nachrichten -- */
        .dm-bubble-image-wrap { border-radius: 16px; overflow: hidden; max-width: 220px; cursor: pointer; }
        .dm-bubble-image-wrap img { display: block; width: 100%; height: auto; max-height: 280px; object-fit: cover; }
        .dm-bubble-row.mine .dm-bubble-image-wrap { border-bottom-right-radius: 5px; }
        .dm-bubble-row:not(.mine) .dm-bubble-image-wrap { border-bottom-left-radius: 5px; }
        .dm-attach-btn {
            background: none; border: none; color: var(--sub); width: 36px; height: 36px; border-radius: 50%;
            display: flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0; transition: background 0.15s, color 0.15s;
        }
        .dm-attach-btn:hover { background: var(--ios-input); color: var(--nexus); }
        .dm-attach-btn:active { transform: scale(0.9); }

        /* -- Gruppe erstellen: Mitglieder-Auswahl -- */
        .group-selected-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
        .group-selected-chips:empty { display: none; }
        .group-member-row { display: flex; align-items: center; gap: 12px; padding: 9px 4px; cursor: pointer; }
        .group-member-checkbox {
            width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--border); flex-shrink: 0;
            display: flex; align-items: center; justify-content: center; transition: background 0.15s, border-color 0.15s;
        }
        .group-member-row.selected .group-member-checkbox { background: var(--nexus); border-color: var(--nexus); color: #fff; }
        .group-member-checkbox i { width: 13px; height: 13px; opacity: 0; transition: opacity 0.1s; }
        .group-member-row.selected .group-member-checkbox i { opacity: 1; }
        .group-chip {
            display: flex; align-items: center; gap: 6px; background: var(--nexus-soft); color: var(--nexus);
            font-size: 12.5px; font-weight: 700; padding: 5px 6px 5px 10px; border-radius: 14px;
        }
        .group-chip button { background: none; border: none; color: var(--nexus); cursor: pointer; display: flex; padding: 2px; }

        /* -- Gruppenfoto-Picker (Erstellen + Verwalten) -- */
        .group-photo-picker { width: 72px; height: 72px; border-radius: 50%; margin: 0 auto 14px; position: relative; cursor: pointer; flex-shrink: 0; }
        .group-photo-picker img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }
        .group-photo-picker .dm-group-avatar-fallback { width: 100%; height: 100%; }
        .group-photo-picker::after {
            content: ''; position: absolute; bottom: -2px; right: -2px; width: 24px; height: 24px; border-radius: 50%;
            background: var(--nexus); border: 2.5px solid var(--card);
            background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E");
            background-size: 12px; background-repeat: no-repeat; background-position: center;
        }

        /* -- Gruppenverwaltung: Mitgliederliste -- */
        .group-manage-member-row { display: flex; align-items: center; gap: 10px; padding: 7px 2px; }
        .group-manage-member-row img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; flex-shrink: 0; background: var(--ios-input); }
        .group-manage-member-name { font-size: 13.5px; font-weight: 600; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
        .group-manage-admin-badge { font-size: 10.5px; font-weight: 700; color: var(--nexus); background: var(--nexus-soft); padding: 2px 7px; border-radius: 8px; margin-right: 4px; }
        .group-manage-remove-btn { background: none; border: none; color: var(--sub); cursor: pointer; padding: 6px; display: flex; flex-shrink: 0; }
        .group-manage-remove-btn:hover { color: #e0245e; }
        .dm-row-mute-icon { width: 12px; height: 12px; vertical-align: -1px; color: var(--sub); margin-left: 2px; }

        /* -- Nachrichten-Reaktionen -- */
        .dm-bubble-reactions { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 3px; }
        .dm-bubble-row.mine .dm-bubble-reactions { justify-content: flex-end; }
        .dm-msg-emoji-count {
            font-size: 11.5px; display: flex; align-items: center; gap: 2px; background: var(--ios-input);
            border-radius: 10px; padding: 1px 6px; cursor: pointer; border: 1.5px solid transparent;
        }
        .dm-bubble-menu-reactrow { display: flex; justify-content: space-between; padding: 8px 10px; gap: 2px; }
        .dm-bubble-menu-reactrow button { background: none; border: none; font-size: 20px; cursor: pointer; padding: 2px; line-height: 1; transition: transform 0.1s; }
        .dm-bubble-menu-reactrow button:hover { transform: scale(1.25); }
        .dm-bubble-deleted { font-style: italic; color: var(--sub) !important; opacity: 0.8; display: inline-flex; align-items: center; gap: 5px; }
        .dm-bubble-edited-label { font-size: 9.5px; opacity: 0.75; }

        /* -- "Tippt gerade..." -- */
        .dm-typing-dots { display: inline-flex; gap: 2px; align-items: center; }
        .dm-typing-dots span { width: 4px; height: 4px; border-radius: 50%; background: var(--nexus); animation: dmTypingBounce 1.2s infinite ease-in-out; }
        .dm-typing-dots span:nth-child(2) { animation-delay: 0.15s; }
        .dm-typing-dots span:nth-child(3) { animation-delay: 0.3s; }
        @keyframes dmTypingBounce { 0%, 60%, 100% { transform: translateY(0); opacity: 0.5; } 30% { transform: translateY(-3px); opacity: 1; } }

        /* -- @Erwähnungen: Autocomplete-Popup -- */
        .mention-autocomplete-popup {
            position: fixed; z-index: 2100; background: var(--card); border-radius: 14px; box-shadow: 0 8px 28px rgba(0,0,0,0.28);
            border: 1px solid var(--border); max-height: 220px; overflow-y: auto; width: 240px;
        }
        .mention-autocomplete-row { display: flex; align-items: center; gap: 9px; padding: 8px 10px; cursor: pointer; }
        .mention-autocomplete-row:hover, .mention-autocomplete-row.active { background: var(--ios-input); }
        .mention-autocomplete-row img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; flex-shrink: 0; background: var(--ios-input); }
        .mention-autocomplete-name { font-size: 12.5px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
        .mention-autocomplete-user { font-size: 11px; color: var(--sub); }
        .mention { color: var(--nexus); font-weight: 600; cursor: pointer; }
