/* ft-kopf.css — aus includes/header.php ausgelagert (Premium-Header-Styles); Profilbild kommt per --ft-profile-pic */
    /* (W5221) Kopfleisten-Ausklappfenster (Glocke, Nachrichten, Freunde, Profil) DECKEND — alle Kopf-Varianten.
       Ursache: Kopfleiste UND Ausklappfenster hatten backdrop-filter; verschachtelt rendert Chrome/Android das
       Fenster durchscheinend (Feed sichtbar). Fenster jetzt volle Farbe ohne Unschaerfe; solange ein Fenster
       offen ist, ruht die Unschaerfe der Kopfleiste. Hoher Kontrast (a11y) bleibt unberuehrt. */
    html:not(.a11y-contrast-high) { --ft-hdd-bg: #ffffff; --ft-hdd-bd: rgba(0,0,0,.08); }
    html:not(.a11y-contrast-high) body.dark-mode, html[data-theme="dark"]:not(.a11y-contrast-high) body { --ft-hdd-bg: #1c1e20; --ft-hdd-bd: rgba(255,255,255,.10); }
    html:not(.a11y-contrast-high) body nav.navbar-custom .dropdown-menu {
      background: var(--ft-hdd-bg) !important; background-image: none !important;
      -webkit-backdrop-filter: none !important; backdrop-filter: none !important;
      border-color: var(--ft-hdd-bd) !important; opacity: 1;
    }
    html:not(.a11y-contrast-high) body nav.navbar-custom:has(.dropdown-menu.show) { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
    /* === Glassmorphism Navbar === */
    .navbar-custom {
        background: rgba(255, 255, 255, 0.85) !important;
        backdrop-filter: blur(14px) saturate(180%);
        -webkit-backdrop-filter: blur(14px) saturate(180%);
        border-bottom: 1px solid rgba(0, 0, 0, 0.06);
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 4px 24px rgba(0, 0, 0, 0.04);
        transition: background 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
        padding-top: 0.55rem;
        padding-bottom: 0.55rem;
    }
    body.dark-mode .navbar-custom {
        background: rgba(24, 26, 27, 0.78) !important;
        backdrop-filter: blur(14px) saturate(180%);
        -webkit-backdrop-filter: blur(14px) saturate(180%);
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4), 0 4px 24px rgba(0, 0, 0, 0.3);
    }

    /* === Logo === */
    .navbar-custom .navbar-brand {
        font-weight: 700;
        letter-spacing: -0.02em;
        transition: transform 0.2s ease;
        padding: 0.4rem 0.6rem;
        border-radius: 10px;
    }
    .navbar-custom .navbar-brand:hover {
        transform: translateY(-1px);
    }
    .navbar-custom .navbar-brand img {
        transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.2s;
    }
    .navbar-custom .navbar-brand:hover img {
        transform: rotate(-8deg) scale(1.08);
        filter: drop-shadow(0 4px 8px rgba(0, 160, 198, 0.35));
    }

    /* === Nav-Links — Pill-Style mit Hover === */
    .navbar-custom .nav-link {
        position: relative;
        color: #4b5563;
        border-radius: 12px;
        padding: 0.55rem 0.85rem !important;
        margin: 0 1px;
        transition: all 0.18s ease;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    .navbar-custom .nav-link:hover {
        background: rgba(0, 0, 0, 0.05);
        color: #1f2937;
        transform: translateY(-1px);
    }
    .navbar-custom .nav-link:active {
        transform: translateY(0);
    }
    body.dark-mode .navbar-custom .nav-link {
        color: #d4d6d8;
    }
    body.dark-mode .navbar-custom .nav-link:hover {
        background: rgba(255, 255, 255, 0.08);
        color: #fff;
    }

    /* === Notification & Message Badges (red dots) === */
    .navbar-custom .badge {
        font-size: 0.6rem;
        font-weight: 700;
        min-width: 18px;
        height: 18px;
        padding: 0 5px;
        line-height: 18px;
        box-shadow: 0 0 0 2px rgba(255,255,255,0.95);
        animation: ft-badge-pop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    }
    body.dark-mode .navbar-custom .badge {
        box-shadow: 0 0 0 2px rgba(24, 26, 27, 0.95);
    }
    @keyframes ft-badge-pop {
        0% { transform: scale(0); }
        70% { transform: scale(1.15); }
        100% { transform: scale(1); }
    }

    /* === Profile Avatar — Gradient-Border === */
    .navbar-custom #profileDropdown img {
        border: 2px solid transparent;
        background: linear-gradient(135deg, #00A0C6, #0082a3) border-box;
        background-clip: padding-box, border-box;
        background-origin: border-box;
        transition: all 0.2s ease;
        box-shadow: 0 2px 8px rgba(0, 160, 198, 0.18);
    }
    .navbar-custom #profileDropdown:hover img {
        transform: scale(1.05);
        box-shadow: 0 4px 14px rgba(0, 160, 198, 0.32);
    }
    .navbar-custom #profileDropdown::after {
        margin-left: 0.4rem;
        opacity: 0.55;
    }

    /* === Search-Input — Modern, smooth === */
    .navbar-custom #search_input {
        background: rgba(0, 0, 0, 0.05);
        border: 1.5px solid rgba(0, 0, 0, 0.15); /* Wave 767: sichtbarer Rahmen (war transparent -> Suchfeld "unsichtbar") */
        color: #1f2937;                          /* explizite dunkle Textfarbe im Light-Mode */
        font-size: 0.92rem;
        padding: 0.5rem 1rem 0.5rem 2.4rem !important;
        transition: all 0.18s ease;
    }
    .navbar-custom #search_input::placeholder { color: #6b7280; }
    .navbar-custom #search_input:focus {
        background: #fff;
        border-color: rgba(0, 160, 198, 0.35);
        box-shadow: 0 0 0 4px rgba(0, 160, 198, 0.10);
    }
    body.dark-mode .navbar-custom #search_input {
        background: rgba(255, 255, 255, 0.08);
        border-color: rgba(255, 255, 255, 0.20); /* Wave 767: sichtbarer Rahmen auch im Dark-Mode */
        color: #e5e7eb;
    }
    body.dark-mode .navbar-custom #search_input:focus {
        background: rgba(255, 255, 255, 0.10);
        border-color: rgba(0, 160, 198, 0.55);
    }
    body.dark-mode .navbar-custom #search_input::placeholder { color: #9ca3af; }
    .ft-search-wrap { position: relative; }
    .ft-search-wrap::before {
        content: "\f002"; /* fa-magnifying-glass */
        font-family: "Font Awesome 6 Free"; font-weight: 900;
        position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
        color: #9ca3af; font-size: 0.85rem; pointer-events: none; z-index: 2;
    }

    /* === Dropdown-Menu Polish === */
    .navbar-custom .dropdown-menu {
        border: 1px solid rgba(0,0,0,0.06);
        border-radius: 14px;
        box-shadow: 0 12px 32px rgba(0,0,0,0.10), 0 4px 8px rgba(0,0,0,0.04);
        padding: 0.5rem;
        min-width: 230px;
        animation: ft-drop-fade 0.15s ease;
        margin-top: 0 !important; /* Wave 27.4: kein Gap zw Toggle und Menu (sonst Hover-bridge bricht) */
    }
    /* Wave 27.7: Navbar-Hoehe FIX — niemals durch Dropdowns expandieren */
    .navbar-custom {
        height: 60px;
        min-height: 60px;
        max-height: 60px;
        overflow: visible !important; /* Dropdowns ragen NACH UNTEN raus, nicht ueberdeckt */
    }
    .navbar-custom .container-fluid { height: 100%; padding-top: 0 !important; padding-bottom: 0 !important; }
    .navbar-custom .ft-iconbar { height: 100%; }

    /* Dropdown-Menus floaten ABSOLUT unter der Navbar — niemals im Flow */
    .navbar-custom .dropdown-menu {
        position: absolute !important;
        top: calc(100% + 4px) !important;
        z-index: 1050;
    }

    /* Bridge-Pseudo-Elements NUR am Menu (nicht am Toggle) — vermeidet Layout-Inflation */
    .navbar-custom .nav-item.dropdown.show > .dropdown-menu::before {
        content: ''; position: absolute; top: -16px; left: 0; right: 0; height: 18px; background: transparent;
    }
    .navbar-custom .nav-item.dropdown.show > .dropdown-menu::after {
        content: ''; position: absolute; bottom: -16px; left: 0; right: 0; height: 18px; background: transparent;
    }

    /* Toggle-Hot-Zone: vergroessern via padding statt Pseudo-Element (vermeidet Layout-Bug) */
    .navbar-custom .ft-iconbar .nav-item.dropdown { position: relative; }
    .navbar-custom .ft-iconbar .nav-item.dropdown > .nav-link {
        /* Mehr Hover-Flaeche aber innerhalb der Navbar-Hoehe */
        padding-top: 0.7rem !important;
        padding-bottom: 0.7rem !important;
    }
    body.dark-mode .navbar-custom .dropdown-menu {
        background: rgba(28, 30, 32, 0.96);
        backdrop-filter: blur(12px);
        border-color: rgba(255,255,255,0.08);
        box-shadow: 0 12px 32px rgba(0,0,0,0.4);
    }
    @keyframes ft-drop-fade {
        from { opacity: 0; transform: translateY(-6px); }
        to   { opacity: 1; transform: translateY(0); }
    }
    .navbar-custom .dropdown-item {
        border-radius: 10px;
        padding: 0.55rem 0.85rem;
        font-size: 0.92rem;
        transition: all 0.12s ease;
    }
    .navbar-custom .dropdown-item:hover {
        background: rgba(0, 160, 198, 0.08);
        color: #00A0C6;
        transform: translateX(2px);
    }
    body.dark-mode .navbar-custom .dropdown-item:hover {
        background: rgba(0, 160, 198, 0.16);
    }
    .navbar-custom .dropdown-item i { width: 18px; opacity: 0.75; }
    .navbar-custom .dropdown-item.text-danger:hover {
        background: rgba(220, 53, 69, 0.10);
        color: #dc3545;
    }

    /* === Weicher Hell/Dunkel-Wechsel (2026-07-25) ===
       Gilt NUR waehrend des Umschaltens (Klasse wird nach ~340ms wieder entfernt),
       damit Hover-Effekte und Listen-Updates im Alltag nicht traege werden.
       Bilder/Videos sind ausgenommen — dort wuerde ein Farbuebergang nur flimmern. */
    html.ft-theme-anim,
    html.ft-theme-anim body,
    html.ft-theme-anim *:not(img):not(video):not(canvas):not(svg):not(svg *) {
        transition: background-color .3s cubic-bezier(.2,.8,.2,1),
                    color .3s cubic-bezier(.2,.8,.2,1),
                    border-color .3s cubic-bezier(.2,.8,.2,1),
                    fill .3s ease,
                    box-shadow .3s ease !important;
    }
    /* Der Umschalter selbst bekommt beim Antippen ein kurzes Aufleuchten. */
    #darkModeToggle, #darkModeTogglePublic { position: relative; }
    #darkModeToggle:active i, #darkModeTogglePublic:active i { transform: scale(.9); }
    @media (prefers-reduced-motion: reduce) {
        html.ft-theme-anim,
        html.ft-theme-anim body,
        html.ft-theme-anim * { transition: none !important; }
    }

    /* === Dark-Mode Toggle Sweetness === */
    .navbar-custom #darkModeToggle i,
    .navbar-custom #darkModeTogglePublic i {
        transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    }
    .navbar-custom #darkModeToggle:hover i,
    .navbar-custom #darkModeTogglePublic:hover i {
        transform: rotate(360deg) scale(1.15);
    }

    /* === Mobile Toggler === */
    .navbar-custom .navbar-toggler {
        border: none;
        padding: 0.45rem 0.7rem;
        border-radius: 10px;
        transition: background 0.15s ease;
    }
    .navbar-custom .navbar-toggler:hover {
        background: rgba(0, 0, 0, 0.05);
    }
    .navbar-custom .navbar-toggler:focus { box-shadow: none; }
    body.dark-mode .navbar-custom .navbar-toggler:hover { background: rgba(255,255,255,0.08); }

    /* === Wave 27.3: Mobile-First Layout === */
    .ft-iconbar { gap: 0; }
    .ft-iconbar .nav-link { padding: 0.5rem 0.55rem !important; }

    /* Preview-Dropdowns responsive */
    .ft-preview-menu {
        width: 380px;
    }
    @media (max-width: 575px) {
        .ft-preview-menu {
            width: calc(100vw - 16px) !important;
            max-width: 380px;
        }
    }

    /* Search-Bar Mobile als zweite Zeile */
    .ft-search-wrap-mobile {
        padding: 0 6px;
    }
    .ft-search-wrap-mobile .ft-search-wrap::before {
        left: 12px; font-size: 0.78rem;
    }
    .ft-search-wrap-mobile #search_input_mobile {
        padding: 0.4rem 0.85rem 0.4rem 2.2rem !important;
        background: rgba(0, 0, 0, 0.04);
        border: 1.5px solid transparent;
        font-size: 0.88rem;
    }
    .ft-search-wrap-mobile #search_input_mobile:focus {
        background: #fff;
        border-color: rgba(0, 160, 198, 0.35);
        box-shadow: 0 0 0 3px rgba(0, 160, 198, 0.10);
    }
    body.dark-mode .ft-search-wrap-mobile #search_input_mobile {
        background: rgba(255, 255, 255, 0.06);
        color: #e5e7eb;
    }
    body.dark-mode .ft-search-wrap-mobile #search_input_mobile:focus {
        background: rgba(255, 255, 255, 0.10);
        border-color: rgba(0, 160, 198, 0.55);
    }

    /* Mobile Profile-Toggle: Avatar + Hamburger nebeneinander */
    #mobileProfileToggle {
        border-radius: 999px;
        background: rgba(0, 0, 0, 0.04);
        transition: background 0.15s ease;
    }
    #mobileProfileToggle:hover { background: rgba(0, 0, 0, 0.08); }
    body.dark-mode #mobileProfileToggle { background: rgba(255, 255, 255, 0.06); }
    body.dark-mode #mobileProfileToggle:hover { background: rgba(255, 255, 255, 0.12); }
    #mobileProfileToggle img {
        border: 2px solid #fff;
        box-shadow: 0 1px 3px rgba(0,0,0,0.10);
    }
    body.dark-mode #mobileProfileToggle img { border-color: #2a2c2e; }
    #mobileProfileToggle i { color: #4b5563; font-size: 1rem; }
    body.dark-mode #mobileProfileToggle i { color: #d4d6d8; }

    /* Mobile: Logo etwas kleiner */
    @media (max-width: 575px) {
        .navbar-custom .navbar-brand img { height: 26px !important; }
        .navbar-custom .navbar-brand .logo-friends,
        .navbar-custom .navbar-brand .logo-time { font-size: 0.95rem; }
        .ft-iconbar .nav-link { padding: 0.4rem 0.4rem !important; }
        .ft-iconbar .nav-link i { font-size: 1.05rem; }
    }

    /* Wave 27.5: navbar bleibt 1 Zeile auf Desktop. Auf Mobile wraps wenn Search-Bar offen */
    .ft-navbar-row {
        flex-wrap: nowrap !important;
        row-gap: 0;
    }
    .ft-navbar-row .ft-iconbar { flex-wrap: nowrap !important; flex-shrink: 0; }
    /* Auf Mobile mit offener Search: wrap erlauben damit Search-Bar in zweite Zeile geht */
    @media (max-width: 991.98px) {
        body.ft-search-open .ft-navbar-row { flex-wrap: wrap !important; }
        .ft-search-wrap-mobile { flex-basis: 100%; width: 100%; }
    }

    /* Body-Padding-Top wurde konsolidiert in ft-mobile.css (125px Total) — diese Section ENTFERNT */

    /* Mobile-Icons: enger zusammenruecken damit Lupe + andere reinpassen */
    @media (max-width: 991.98px) {
        .ft-iconbar { gap: 0 !important; }
        .ft-iconbar .nav-link { padding: 0.45rem 0.35rem !important; }
        .ft-iconbar .nav-link i.fa-lg { font-size: 1.05rem !important; }
        #mobileProfileToggle { padding: 0.3rem 0.5rem !important; }
        #mobileProfileToggle img { width: 28px !important; height: 28px !important; }
        #mobileProfileToggle i { font-size: 0.95rem !important; }
    }
    @media (max-width: 410px) {
        /* Sehr kleine Phones: enger, aber Logo-Text "Friendstime" KOMPLETT sichtbar */
        .ft-iconbar .nav-link { padding: 0.4rem 0.25rem !important; }
        .ft-iconbar .nav-link i.fa-lg { font-size: 1rem !important; }
        .navbar-custom .navbar-brand img {
            height: 22px !important;
            margin-right: 4px !important;
        }
        .navbar-custom .navbar-brand .logo-friends,
        .navbar-custom .navbar-brand .logo-time {
            font-size: 0.92rem !important;
            letter-spacing: -0.02em;
        }
        .ft-feed-burger { padding: 0.35rem 0.45rem !important; }
        .ft-feed-burger i.fa-lg { font-size: 1rem !important; }
        #mobileProfileToggle { padding: 0.25rem 0.4rem !important; }
        #mobileProfileToggle img { width: 26px !important; height: 26px !important; }
    }
    @media (max-width: 360px) {
        /* iPhone SE und kleinere */
        .navbar-custom .navbar-brand img { height: 20px !important; margin-right: 3px !important; }
        .navbar-custom .navbar-brand .logo-friends,
        .navbar-custom .navbar-brand .logo-time { font-size: 0.85rem !important; }
        .navbar-custom .navbar-brand { padding: 0.25rem 0.4rem !important; }
        .ft-iconbar .nav-link { padding: 0.35rem 0.2rem !important; }
        .ft-iconbar .nav-link i.fa-lg { font-size: 0.95rem !important; }
    }

    /* Mobile-only: Notification-Icons sollen nicht quetschen */
    @media (max-width: 991.98px) {
        .navbar-custom .navbar-nav .nav-link { padding: 0.5rem 0.55rem !important; }
        .navbar-custom #search_input { font-size: 0.85rem; }
    }

    /* === Wave 27: Generic Header-Preview-Dropdown Polish === */
    /* Greift auf Notifications, Friends UND Messages */
    #notificationsDropdown + .dropdown-menu,
    #friendsDropdown + .dropdown-menu,
    #messagesDropdown + .dropdown-menu {
        max-height: 480px;
        overflow-y: auto;
        scrollbar-width: thin;
        scrollbar-color: rgba(0,0,0,0.18) transparent;
        padding: 0.4rem 0.4rem 0.6rem !important;
    }
    #notificationsDropdown + .dropdown-menu::-webkit-scrollbar,
    #friendsDropdown + .dropdown-menu::-webkit-scrollbar,
    #messagesDropdown + .dropdown-menu::-webkit-scrollbar { width: 6px; }
    #notificationsDropdown + .dropdown-menu::-webkit-scrollbar-thumb,
    #friendsDropdown + .dropdown-menu::-webkit-scrollbar-thumb,
    #messagesDropdown + .dropdown-menu::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.18); border-radius: 6px; }
    body.dark-mode #notificationsDropdown + .dropdown-menu::-webkit-scrollbar-thumb,
    body.dark-mode #friendsDropdown + .dropdown-menu::-webkit-scrollbar-thumb,
    body.dark-mode #messagesDropdown + .dropdown-menu::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.18); }

    #notifications-preview-list .notification-item,
    #friends-preview-list .friend-item,
    #messages-preview-list .message-item {
        list-style: none;
        margin: 2px 0;
        border-radius: 10px;
        transition: background 0.15s ease;
    }
    #notifications-preview-list .notification-item:hover,
    #friends-preview-list .friend-item:hover,
    #messages-preview-list .message-item:hover {
        background: rgba(0, 160, 198, 0.06);
    }
    body.dark-mode #notifications-preview-list .notification-item:hover,
    body.dark-mode #friends-preview-list .friend-item:hover,
    body.dark-mode #messages-preview-list .message-item:hover {
        background: rgba(0, 160, 198, 0.12);
    }

    /* Unread-Highlight */
    #notifications-preview-list .notification-item.unread,
    #messages-preview-list .message-item.unread-message-preview,
    #friends-preview-list .friend-item.friend-pending {
        background: linear-gradient(90deg, rgba(0,160,198,0.07) 0%, transparent 100%);
        border-left: 3px solid #00A0C6;
        padding-left: 4px;
    }
    body.dark-mode #notifications-preview-list .notification-item.unread,
    body.dark-mode #messages-preview-list .message-item.unread-message-preview,
    body.dark-mode #friends-preview-list .friend-item.friend-pending {
        background: linear-gradient(90deg, rgba(0,160,198,0.16) 0%, transparent 100%);
    }
    /* Pending-Friend-Anfragen: Warm-Orange-Highlight statt Cyan */
    #friends-preview-list .friend-item.friend-pending {
        background: linear-gradient(90deg, rgba(245,158,11,0.10) 0%, transparent 100%);
        border-left-color: #f59e0b;
    }
    body.dark-mode #friends-preview-list .friend-item.friend-pending {
        background: linear-gradient(90deg, rgba(245,158,11,0.18) 0%, transparent 100%);
    }

    /* Item-Inhalt */
    #notifications-preview-list .dropdown-item,
    #friends-preview-list .dropdown-item,
    #messages-preview-list .dropdown-item {
        white-space: normal;
        border-radius: 10px;
    }
    #notifications-preview-list .dropdown-item:hover,
    #friends-preview-list .dropdown-item:hover,
    #messages-preview-list .dropdown-item:hover {
        background: transparent;
        transform: none;
    }
    #notifications-preview-list .dropdown-item img,
    #friends-preview-list .dropdown-item img,
    #messages-preview-list .dropdown-item img {
        border: 2px solid #fff;
        box-shadow: 0 1px 4px rgba(0,0,0,0.10);
    }
    body.dark-mode #notifications-preview-list .dropdown-item img,
    body.dark-mode #friends-preview-list .dropdown-item img,
    body.dark-mode #messages-preview-list .dropdown-item img {
        border-color: #2a2c2e;
    }
    #notifications-preview-list .dropdown-item strong,
    #friends-preview-list .dropdown-item strong,
    #messages-preview-list .dropdown-item strong {
        color: #1f2937;
        font-size: 0.92rem;
    }
    body.dark-mode #notifications-preview-list .dropdown-item strong,
    body.dark-mode #friends-preview-list .dropdown-item strong,
    body.dark-mode #messages-preview-list .dropdown-item strong {
        color: #f3f4f6;
    }
    #notifications-preview-list .dropdown-item .small,
    #friends-preview-list .dropdown-item .small,
    #messages-preview-list .dropdown-item .small {
        color: #4b5563;
        font-size: 0.85rem;
    }
    body.dark-mode #notifications-preview-list .dropdown-item .small,
    body.dark-mode #friends-preview-list .dropdown-item .small,
    body.dark-mode #messages-preview-list .dropdown-item .small {
        color: #d1d5db;
    }

    /* Header-Row aller drei Dropdowns */
    #notificationsDropdown + .dropdown-menu > li:first-child h6,
    #friendsDropdown + .dropdown-menu > li:first-child h6,
    #messagesDropdown + .dropdown-menu > li:first-child h6 {
        font-weight: 700;
        letter-spacing: -0.01em;
        color: #1f2937;
    }
    body.dark-mode #notificationsDropdown + .dropdown-menu > li:first-child h6,
    body.dark-mode #friendsDropdown + .dropdown-menu > li:first-child h6,
    body.dark-mode #messagesDropdown + .dropdown-menu > li:first-child h6 { color: #f3f4f6; }

    /* Alle Regeln der unteren Navigation (.ft-bottom-nav / .ft-bottom-item) stehen jetzt
       in includes/ft_bottom_nav.php — EINZIGE Quelle, geteilt mit den Saison-Headern.
       Ausgegeben werden sie direkt hinter dem schliessenden style-Tag dieses Blocks
       (ft_bottom_nav_css(), weiter unten). Bitte hier NICHTS davon zurueckkopieren.

       ACHTUNG: In diesem Kommentar darf das schliessende style-Tag NIEMALS ausgeschrieben
       werden. Der HTML-Parser kennt keine CSS-Kommentare — er beendet das style-Element
       beim ersten woertlichen Vorkommen. Genau das ist hier einmal passiert: der Block
       endete mitten im Kommentar, die restlichen rund 44 KB CSS landeten als sichtbarer
       Text im body und griffen nirgends mehr. Immer umschreiben. */

    /* Body-Padding-Bottom wurde konsolidiert in ft-mobile.css — diese Section ENTFERNT */

    /* === Wave 27.12: Mobile-Header — Notifications + Messages bleiben sichtbar
       Friends-Icon und DarkMode-Icon auf Mobile verstecken (Friends in Bottom-Nav,
       DarkMode im Profile-Hamburger-Menu) */
    @media (max-width: 991.98px) {
        #friendsDropdown,
        #darkModeToggle {
            display: none !important;
        }
        .ft-iconbar .nav-item.dropdown.has-friends-toggle { display: none !important; }
    }

    /* === Wave 27.11: Mobile-Polish — Touch-Targets, Tab-Bars, Spacing === */


    /* === Wave 27.10: Mobile-Dropdowns als Floating-Centered-Overlay ===
       Auf <576px werden alle Header-Dropdowns als zentriertes Overlay angezeigt
       statt rechts/links abgeschnitten. Verhindert dass Inhalt aus Viewport ragt. */
    @media (max-width: 575px) {
        .navbar-custom #profileDropdown + .dropdown-menu,
        .navbar-custom #mobileProfileToggle + .dropdown-menu,
        .navbar-custom #notificationsDropdown + .dropdown-menu,
        .navbar-custom #friendsDropdown + .dropdown-menu,
        .navbar-custom #messagesDropdown + .dropdown-menu {
            position: fixed !important;
            top: 64px !important;
            left: 8px !important;
            right: 8px !important;
            transform: none !important;
            width: auto !important;
            max-width: none !important;
            min-width: 0 !important;
            margin: 0 auto !important;
            max-height: calc(100vh - 80px - 64px); /* viewport - top - bottom-nav */
            overflow-y: auto;
            border-radius: 14px;
            box-shadow: 0 12px 32px rgba(0,0,0,0.18), 0 4px 12px rgba(0,0,0,0.10);
        }
    }

    /* === Wave 27.12: Mobile-Header-Polish ohne Drawer ===
       Profile-Hamburger Mobile zeigt jetzt auch DarkMode-Toggle als Item */
    .ft-offcanvas-feed .offcanvas-header {
        background: linear-gradient(135deg, rgba(0,160,198,0.06) 0%, transparent 100%);
        border-bottom: 1px solid rgba(0,0,0,0.06);
    }
    body.dark-mode .ft-offcanvas-feed { background: #1c1e1f; color: #e5e7eb; }
    body.dark-mode .ft-offcanvas-feed .offcanvas-header { border-bottom-color: rgba(255,255,255,0.10); }
    body.dark-mode .ft-offcanvas-feed .btn-close { filter: invert(1); }
    .ft-drawer-tabs .nav-link {
        font-size: 0.85rem; font-weight: 600; padding: 0.4rem 0.5rem;
        color: #6b7280; background: transparent; border-radius: 10px;
    }
    .ft-drawer-tabs .nav-link.active {
        color: #fff;
        background: linear-gradient(135deg, #00A0C6 0%, #0082a3 100%);
    }
    /* ====================================================================
       === Wave 27.14: PREMIUM MOBILE POLISH ===============================
       Touch-Feedback, smooth Animationen, Premium-Shadows, iOS-Style
       ==================================================================== */

    /* === HEADER MOBILE: Premium Glassmorphism === */
    @media (max-width: 991.98px) {
        .navbar-custom {
            background: rgba(255,255,255,0.88) !important;
            backdrop-filter: blur(20px) saturate(200%);
            -webkit-backdrop-filter: blur(20px) saturate(200%);
            border-bottom: 1px solid rgba(0,0,0,0.04);
            box-shadow: 0 1px 0 rgba(0,0,0,0.02), 0 4px 20px rgba(0,0,0,0.04);
        }
        body.dark-mode .navbar-custom {
            background: rgba(20,22,23,0.86) !important;
            border-bottom-color: rgba(255,255,255,0.06);
        }

        /* Logo mit subtilem Shadow auf Mobile */
        .navbar-custom .navbar-brand img {
            filter: drop-shadow(0 1px 2px rgba(0,0,0,0.08));
        }
        .navbar-custom .logo-friends,
        .navbar-custom .logo-time {
            text-shadow: 0 1px 0 rgba(255,255,255,0.4);
        }
        body.dark-mode .navbar-custom .logo-friends,
        body.dark-mode .navbar-custom .logo-time {
            text-shadow: 0 1px 2px rgba(0,0,0,0.4);
        }

        /* Header-Icons: groesser Touch-Area + smooth tap-feedback */
        .ft-iconbar .nav-link {
            min-width: 40px;
            min-height: 40px;
            border-radius: 12px;
            transition: background 0.15s ease, transform 0.12s ease;
            -webkit-tap-highlight-color: transparent;
        }
        .ft-iconbar .nav-link:active {
            transform: scale(0.92);
            background: rgba(0,0,0,0.06);
        }
        body.dark-mode .ft-iconbar .nav-link:active { background: rgba(255,255,255,0.10); }

        /* Notification-Badges: schoenerer Pulse */
        .ft-iconbar .badge {
            font-size: 0.62rem;
            padding: 1px 5px;
            border-radius: 10px;
            box-shadow: 0 0 0 2px rgba(255,255,255,0.95), 0 1px 3px rgba(220,53,69,0.4);
            animation: ft-badge-pop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
        }
        body.dark-mode .ft-iconbar .badge {
            box-shadow: 0 0 0 2px rgba(20,22,23,0.95), 0 1px 3px rgba(220,53,69,0.5);
        }
    }

    /* === MOBILE-PROFILE-TOGGLE: Premium-Style === */
    @media (max-width: 991.98px) {
        #mobileProfileToggle {
            background: rgba(0,0,0,0.04);
            border: 1px solid rgba(0,0,0,0.04);
            border-radius: 999px !important;
            padding: 0.25rem 0.5rem 0.25rem 0.3rem !important;
            transition: all 0.18s ease;
            -webkit-tap-highlight-color: transparent;
        }
        #mobileProfileToggle:hover,
        #mobileProfileToggle:active {
            background: rgba(0,160,198,0.08);
            border-color: rgba(0,160,198,0.18);
            transform: scale(0.98);
        }
        body.dark-mode #mobileProfileToggle {
            background: rgba(255,255,255,0.06);
            border-color: rgba(255,255,255,0.06);
        }
        body.dark-mode #mobileProfileToggle:hover,
        body.dark-mode #mobileProfileToggle:active {
            background: rgba(86,204,242,0.14);
            border-color: rgba(86,204,242,0.20);
        }
        #mobileProfileToggle img {
            border: 2px solid rgba(255,255,255,0.95);
            box-shadow: 0 2px 6px rgba(0,0,0,0.10);
        }
        body.dark-mode #mobileProfileToggle img {
            border-color: rgba(0,0,0,0.6);
        }
    }

    /* === MOBILE DROPDOWNS: Premium Floating Card === */
    @media (max-width: 575px) {
        .navbar-custom #profileDropdown + .dropdown-menu,
        .navbar-custom #mobileProfileToggle + .dropdown-menu,
        .navbar-custom #notificationsDropdown + .dropdown-menu,
        .navbar-custom #messagesDropdown + .dropdown-menu {
            position: fixed !important;
            top: 68px !important;
            left: 12px !important;
            right: 12px !important;
            border: 1px solid rgba(0,0,0,0.04);
            border-radius: 18px !important;
            background: rgba(255,255,255,0.98);
            backdrop-filter: blur(24px) saturate(200%);
            -webkit-backdrop-filter: blur(24px) saturate(200%);
            box-shadow:
                0 1px 0 rgba(255,255,255,0.6) inset,
                0 16px 36px rgba(0,0,0,0.16),
                0 4px 12px rgba(0,0,0,0.08);
            padding: 0.6rem !important;
            animation: ft-mobile-dd-slide 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
        }
        body.dark-mode .navbar-custom .dropdown-menu {
            background: rgba(28,30,32,0.96) !important;
            border-color: rgba(255,255,255,0.06) !important;
        }
        @keyframes ft-mobile-dd-slide {
            from { opacity: 0; transform: translateY(-8px) scale(0.97); }
            to   { opacity: 1; transform: translateY(0) scale(1); }
        }

        /* Profile-Dropdown Mobile: schoenes User-Banner oben */
        #mobileProfileToggle + .dropdown-menu > li:first-child {
            background: linear-gradient(135deg, rgba(0,160,198,0.10) 0%, rgba(0,130,163,0.05) 100%);
            border-radius: 12px;
            margin-bottom: 0.4rem;
            padding: 0.85rem 1rem !important;
        }
        #mobileProfileToggle + .dropdown-menu > li:first-child strong {
            color: #1f2937;
            font-size: 1rem;
            letter-spacing: -0.01em;
        }
        body.dark-mode #mobileProfileToggle + .dropdown-menu > li:first-child {
            background: linear-gradient(135deg, rgba(86,204,242,0.14) 0%, rgba(56,182,212,0.06) 100%);
        }
        body.dark-mode #mobileProfileToggle + .dropdown-menu > li:first-child strong { color: #f3f4f6; }

        /* Dropdown-Items Mobile: groesser, Touch-Friendly */
        .navbar-custom .dropdown-menu .dropdown-item {
            padding: 0.7rem 0.85rem !important;
            font-size: 0.95rem;
            border-radius: 10px;
            margin-bottom: 2px;
            transition: background 0.12s ease, transform 0.1s ease;
            -webkit-tap-highlight-color: transparent;
        }
        .navbar-custom .dropdown-menu .dropdown-item:active {
            transform: scale(0.97);
            background: rgba(0,160,198,0.12);
        }
        .navbar-custom .dropdown-menu .dropdown-item i {
            font-size: 1rem;
            color: #6b7280;
            transition: color 0.12s;
        }
        body.dark-mode .navbar-custom .dropdown-menu .dropdown-item i { color: #9ca3af; }
        .navbar-custom .dropdown-menu .dropdown-item:hover i,
        .navbar-custom .dropdown-menu .dropdown-item:active i {
            color: #00A0C6;
        }
        .navbar-custom .dropdown-menu .dropdown-item.text-danger:active {
            background: rgba(220,53,69,0.10);
        }
        .navbar-custom .dropdown-menu .dropdown-divider {
            border-top-color: rgba(0,0,0,0.06);
            margin: 0.4rem 0;
        }
        body.dark-mode .navbar-custom .dropdown-menu .dropdown-divider {
            border-top-color: rgba(255,255,255,0.08);
        }
    }

    /* === MOBILE-SEARCH: Premium Slide-In === */
    @media (max-width: 991.98px) {
        .ft-search-wrap-mobile {
            animation: ft-search-slide 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
        }
        @keyframes ft-search-slide {
            from { opacity: 0; transform: translateY(-12px); }
            to   { opacity: 1; transform: translateY(0); }
        }
        .ft-search-wrap-mobile #search_input_mobile {
            font-size: 0.95rem;
            padding: 0.55rem 2.2rem 0.55rem 2.4rem !important;
            background: rgba(0,0,0,0.04);
            border: 1.5px solid transparent;
            box-shadow: 0 1px 3px rgba(0,0,0,0.04);
        }
        .ft-search-wrap-mobile #search_input_mobile:focus {
            background: #fff;
            border-color: rgba(0,160,198,0.4);
            box-shadow: 0 0 0 4px rgba(0,160,198,0.12), 0 4px 12px rgba(0,0,0,0.06);
        }
        body.dark-mode .ft-search-wrap-mobile #search_input_mobile {
            background: rgba(255,255,255,0.06);
        }
        body.dark-mode .ft-search-wrap-mobile #search_input_mobile:focus {
            background: rgba(255,255,255,0.10);
            box-shadow: 0 0 0 4px rgba(86,204,242,0.16);
        }
    }

    /* === MOBILE TYPOGRAPHY POLISH === */
    @media (max-width: 575px) {
        .navbar-custom .navbar-brand {
            font-feature-settings: "ss01", "cv11"; /* Modern font features falls Font sie unterstuetzt */
        }
        .navbar-custom .logo-friends {
            font-weight: 700;
            letter-spacing: -0.025em;
        }
        .navbar-custom .logo-time {
            font-weight: 600;
            letter-spacing: -0.015em;
        }
    }

    /* ====================================================================
       === Wave 27.15: PREMIUM POST-CARD + ACTION-BUTTONS DESIGN ==========
       ==================================================================== */

    /* Post-Card komplett: Premium-Look */
    .card-custom {
        border-radius: 16px !important;
        border: 1px solid rgba(0,0,0,0.04) !important;
        box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 4px 16px rgba(0,0,0,0.05);
        overflow: hidden;
        transition: box-shadow 0.25s ease, transform 0.25s ease;
        margin-bottom: 1rem;
    }
    .card-custom:hover {
        box-shadow: 0 2px 6px rgba(0,0,0,0.05), 0 8px 24px rgba(0,0,0,0.08);
    }
    body.dark-mode .card-custom {
        background-color: #242526 !important;
        border-color: #3a3c3e !important;
        box-shadow: 0 1px 3px rgba(0,0,0,0.2), 0 4px 16px rgba(0,0,0,0.3);
    }
    body.dark-mode .card-custom:hover {
        box-shadow: 0 2px 6px rgba(0,0,0,0.3), 0 8px 24px rgba(0,0,0,0.5);
    }

    /* Post-Header (Avatar + Name + Time) Polish */
    .card-custom .card-header,
    .card-custom > .d-flex:first-child {
        padding: 0.85rem 1rem !important;
    }
    .post-author-link {
        font-weight: 600 !important;
        letter-spacing: -0.01em;
        transition: color 0.15s;
    }
    .post-author-link:hover { color: #00A0C6 !important; }

    /* Post-Body / Text */
    .card-custom .post-text-content {
        line-height: 1.55;
        color: #1f2937;
        font-size: 0.98rem !important;
    }
    body.dark-mode .card-custom .post-text-content { color: #e5e7eb; }

    /* === ACTION-BUTTONS: Premium Pill-Style ====================== */
    .card-custom-footer {
        background: transparent;
        padding: 0.6rem 0.85rem 0.85rem !important;
    }
    .card-custom-footer .small.text-muted {
        font-size: 0.82rem;
        padding: 0.2rem 0.4rem 0.5rem;
    }
    .card-custom-footer .small.text-muted i.fa-thumbs-up {
        background: #00A0C6;
        color: #fff !important;
        border-radius: 50%;
        padding: 4px;
        width: 22px; height: 22px;
        display: inline-flex; align-items: center; justify-content: center;
        font-size: 0.72rem;
        margin-right: 4px;
        box-shadow: 0 2px 4px rgba(0,160,198,0.25);
    }
    .card-custom-footer hr { display: none; }

    .action-btn {
        position: relative;
        font-weight: 600 !important;
        font-size: 0.92rem !important;
        padding: 0.6rem 0.5rem !important;
        border-radius: 12px !important;
        margin: 0 2px !important;
        color: #6b7280 !important;
        transition: all 0.18s ease !important;
        -webkit-tap-highlight-color: transparent;
    }
    .action-btn i {
        font-size: 1.05rem;
        margin-right: 0.4rem !important;
        transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
        vertical-align: -2px;
    }
    .action-btn:hover {
        background: rgba(0,160,198,0.06) !important;
        color: #00A0C6 !important;
    }
    .action-btn:hover i { transform: scale(1.15); }
    .action-btn:active {
        transform: scale(0.96);
        background: rgba(0,160,198,0.10) !important;
    }
    body.dark-mode .action-btn { color: #b0b3b8 !important; }
    body.dark-mode .action-btn:hover {
        background: rgba(0,160,198,0.16) !important;
        color: #56ccf2 !important;
    }

    /* Like-Button Active-State: Heart-Beat */
    .action-btn.text-primary {
        color: #00A0C6 !important;
        background: rgba(0,160,198,0.08) !important;
    }
    .action-btn.text-primary i.fa-thumbs-up {
        animation: ft-like-bounce 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
        color: #00A0C6;
    }
    @keyframes ft-like-bounce {
        0% { transform: scale(1); }
        40% { transform: scale(1.4) rotate(-12deg); }
        60% { transform: scale(0.95) rotate(8deg); }
        100% { transform: scale(1.1) rotate(0); }
    }

    /* Mobile-Optimierung: Action-Buttons (Wave 27.16: Overflow-Fix) */
    @media (max-width: 575px) {
        /* WICHTIG: overflow-x nur auf body, NICHT auf html (sonst Scroll-Probleme) */
        body { overflow-x: hidden; max-width: 100vw; }

        .card-custom { border-radius: 14px !important; margin-left: 0; margin-right: 0; }
        .card-custom-footer { padding: 0.5rem 0.4rem 0.6rem !important; }
        .card-custom-footer > .d-flex { gap: 2px; }

        .action-btn {
            font-size: 0.78rem !important;
            padding: 0.5rem 0.2rem !important;
            min-width: 0 !important;          /* erlaubt flex-shrink unter content-width */
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            margin: 0 1px !important;
        }
        .action-btn i {
            margin-right: 0.25rem !important;
            font-size: 0.95rem;
        }
        .card-custom .post-text-content { font-size: 0.95rem !important; }

        /* Composer Mobile */
        .composer-trigger-card .btn-link {
            font-size: 0.78rem !important;
            padding: 0.45rem 0.4rem !important;
        }
        .composer-trigger-card .btn-link i { margin-right: 0.25rem !important; }

        /* Container: kein extra Padding auf Mobile */
        #mainContainer { padding-left: 8px !important; padding-right: 8px !important; }
        #mainContainer .row { margin-left: -4px !important; margin-right: -4px !important; }
        #mainContainer .row > [class*="col-"] { padding-left: 4px !important; padding-right: 4px !important; }
    }
    @media (max-width: 360px) {
        /* Sehr enge Phones: nur Icons, keine Labels */
        .action-btn {
            font-size: 0 !important;          /* Label hide */
            padding: 0.55rem 0.2rem !important;
        }
        .action-btn i {
            font-size: 1.15rem !important;
            margin-right: 0 !important;
        }
        /* Trick: Show label NUR auf hover/active als Tooltip-style */
        .action-btn::after {
            content: attr(data-label);
            font-size: 0.7rem;
            margin-left: 0.3rem;
        }
    }

    /* === COMPOSER CARD: Premium Look ============================ */
    .composer-trigger-card {
        border-radius: 16px !important;
        border: 1px solid rgba(0,0,0,0.04) !important;
        box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 4px 16px rgba(0,0,0,0.05);
        transition: box-shadow 0.25s ease;
    }
    .composer-trigger-card:hover {
        box-shadow: 0 2px 6px rgba(0,0,0,0.05), 0 8px 24px rgba(0,0,0,0.08);
    }
    body.dark-mode .composer-trigger-card {
        background-color: #242526 !important;
        border-color: #3a3c3e !important;
    }
    .composer-trigger-card .form-control {
        background: rgba(0,0,0,0.04);
        font-size: 0.95rem;
        padding: 0.7rem 1rem !important;
        transition: background 0.15s;
    }
    .composer-trigger-card .form-control:hover {
        background: rgba(0,0,0,0.06);
    }
    body.dark-mode .composer-trigger-card .form-control {
        background: rgba(255,255,255,0.06);
        color: #e5e7eb;
    }
    body.dark-mode .composer-trigger-card .form-control:hover {
        background: rgba(255,255,255,0.10);
    }
    .composer-trigger-card .btn-link {
        font-weight: 600;
        font-size: 0.88rem;
        padding: 0.55rem 0.85rem !important;
        border-radius: 10px;
        transition: background 0.15s, transform 0.12s;
    }
    .composer-trigger-card .btn-link:hover {
        background: rgba(0,0,0,0.04);
    }
    body.dark-mode .composer-trigger-card .btn-link:hover {
        background: rgba(255,255,255,0.06);
    }
    .composer-trigger-card .btn-link:active { transform: scale(0.96); }

    /* === COMMENTS-SECTION: Premium ============================== */
    #comments-section [id^="comments-list-"] {
        max-height: 480px; overflow-y: auto;
        scrollbar-width: thin;
    }
    .comment-input-container {
        background: rgba(255,255,255,0.6) !important;
        backdrop-filter: blur(8px);
        border-top: 1px solid rgba(0,0,0,0.05) !important;
    }
    body.dark-mode .comment-input-container {
        background: rgba(36,37,38,0.6) !important;
        border-top-color: rgba(255,255,255,0.06) !important;
    }
    .comment-textarea {
        border-radius: 14px !important;
        border: 1px solid rgba(0,0,0,0.08) !important;
        background: rgba(0,0,0,0.03) !important;
        padding: 0.6rem 0.85rem !important;
        font-size: 0.92rem;
        resize: none;
        transition: all 0.15s;
    }
    .comment-textarea:focus {
        background: #fff !important;
        border-color: rgba(0,160,198,0.4) !important;
        box-shadow: 0 0 0 3px rgba(0,160,198,0.10) !important;
    }
    body.dark-mode .comment-textarea {
        background: rgba(255,255,255,0.06) !important;
        border-color: rgba(255,255,255,0.10) !important;
        color: #e5e7eb;
    }
    body.dark-mode .comment-textarea:focus {
        background: rgba(255,255,255,0.12) !important;
        border-color: rgba(86,204,242,0.5) !important;
    }
    .comment-actions .btn-light {
        background: rgba(0,0,0,0.04) !important;
        border: none !important;
        font-size: 0.78rem;
        padding: 0.35rem 0.7rem !important;
        transition: all 0.15s;
    }
    .comment-actions .btn-light:hover {
        background: rgba(0,160,198,0.08) !important;
        transform: translateY(-1px);
    }
    .comment-actions .btn-light:active { transform: scale(0.96); }
    body.dark-mode .comment-actions .btn-light {
        background: rgba(255,255,255,0.06) !important;
        color: #d4d6d8;
    }
    body.dark-mode .comment-actions .btn-light:hover {
        background: rgba(86,204,242,0.16) !important;
    }

    /* === RIGHT-SIDEBAR (Trending + Online) Polish =============== */
    .col-right .card,
    .col-right .list-group {
        border-radius: 16px !important;
        border: 1px solid rgba(0,0,0,0.04) !important;
        box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 4px 12px rgba(0,0,0,0.04);
    }
    body.dark-mode .col-right .card,
    body.dark-mode .col-right .list-group {
        background-color: #242526 !important;
        border-color: #3a3c3e !important;
    }

    /* === LEFT-SIDEBAR (col-left) Items Polish =================== */
    .col-left .list-group-item-action {
        border-radius: 10px !important;
        margin: 2px 4px !important;
        border: none !important;
        padding: 0.55rem 0.85rem !important;
        font-size: 0.92rem;
        font-weight: 500;
        transition: all 0.15s;
    }
    .col-left .list-group-item-action:hover {
        background: rgba(0,160,198,0.06) !important;
        color: #00A0C6 !important;
        transform: translateX(2px);
    }
    .col-left .list-group-item-action.bg-light {
        background: linear-gradient(90deg, rgba(0,160,198,0.10) 0%, rgba(0,160,198,0.04) 100%) !important;
        color: #00A0C6 !important;
        border-left: 3px solid #00A0C6 !important;
        padding-left: calc(0.85rem - 3px) !important;
    }
    body.dark-mode .col-left .list-group-item-action {
        color: #d4d6d8 !important;
    }
    body.dark-mode .col-left .list-group-item-action:hover {
        background: rgba(0,160,198,0.16) !important;
        color: #56ccf2 !important;
    }
    body.dark-mode .col-left .list-group-item-action.bg-light {
        background: linear-gradient(90deg, rgba(0,160,198,0.20) 0%, rgba(0,160,198,0.08) 100%) !important;
        color: #56ccf2 !important;
        border-left-color: #56ccf2 !important;
    }

    /* Profile-Card in Sidebar */
    .col-left .card.hover-shadow {
        border-radius: 14px !important;
        border: 1px solid rgba(0,0,0,0.04) !important;
        transition: all 0.2s;
    }
    .col-left .card.hover-shadow:hover {
        box-shadow: 0 6px 20px rgba(0,160,198,0.12) !important;
        border-color: rgba(0,160,198,0.20) !important;
        transform: translateY(-2px);
    }

    /* ====================================================================
       === Wave 27.17: PREMIUM POLISH — NUR MOBILE (Desktop unangetastet) =
       ==================================================================== */

    /* Sticky Header z-index garantiert oben (greift auch Desktop, nur z-index, kein visual-impact) */
    .navbar-custom.fixed-top {
        z-index: 1030 !important;
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
    }

    /* Wave 27.23: SCROLL-BUG-FIX — overscroll-behavior und overflow-Konflikte entfernt!
       Mobile MUSS scrollen koennen, daher KEINE blockierenden Properties */
    @media (max-width: 991.98px) {
        html, body {
            overflow-x: hidden;          /* NUR X-Overflow blocken, NIEMALS Y */
            -webkit-overflow-scrolling: touch;  /* Native Smooth-Scrolling */
            overflow-y: auto !important; /* Vertical-Scroll IMMER erlaubt */
        }
        .navbar-custom.fixed-top {
            transform: translateZ(0);  /* GPU-Compositing fuer stabile Position */
        }
    }

    /* === ALLE folgenden Polish-Regeln NUR auf Mobile (<=991.98px) === */
    @media (max-width: 991.98px) {
        /* Body-Padding-Top: etwas mehr Luft damit Composer nicht direkt am Header klebt */
        body:not(.page-landing-non-fixed-navbar) {
            padding-top: 125px !important;
        }

        /* Composer Mobile - Premium-Look */
        .composer-trigger-card {
            margin-top: 0.85rem !important;
            border-radius: 18px !important;
            transition: all 0.25s ease;
        }
        .composer-trigger-card .card-body { padding: 1rem 1.1rem !important; }
        .composer-trigger-card .form-control {
            border-radius: 999px !important;
            background: rgba(0,0,0,0.04);
            font-size: 0.95rem !important;
            padding: 0.7rem 1.1rem !important;
            font-weight: 500;
            color: #4b5563;
        }
        .composer-trigger-card .form-control:hover { background: rgba(0,0,0,0.06); }
        body.dark-mode .composer-trigger-card .form-control { color: #d4d6d8; background: rgba(255,255,255,0.06); }
        .composer-trigger-card img.rounded-circle {
            border: 2px solid rgba(255,255,255,0.95);
            box-shadow: 0 2px 8px rgba(0,0,0,0.10);
        }
        body.dark-mode .composer-trigger-card img.rounded-circle { border-color: rgba(0,0,0,0.4); }
        .composer-trigger-card .border-top {
            margin-top: 0.7rem;
            padding-top: 0.7rem;
            border-top: 1px solid rgba(0,0,0,0.05) !important;
        }
        body.dark-mode .composer-trigger-card .border-top { border-top-color: rgba(255,255,255,0.06) !important; }
        .composer-trigger-card .btn-link i {
            font-size: 1.05rem;
            margin-right: 0.35rem !important;
            vertical-align: -2px;
        }

        /* Container-Spacing korrigiert */
        body > .container.mt-4 { margin-top: 0.5rem !important; }
    }

    /* === Mobile-Profile-Hamburger Premium-Banner mit Avatar === */
    @media (max-width: 575px) {
        #mobileProfileToggle img {
            width: 30px !important; height: 30px !important;
            border: 2px solid #fff !important;
            box-shadow: 0 2px 6px rgba(0,160,198,0.18), 0 1px 3px rgba(0,0,0,0.10) !important;
        }
        /* Im offenen Profile-Dropdown: Premium-Banner mit grossem Avatar */
        #mobileProfileToggle + .dropdown-menu > li:first-child {
            display: flex !important; align-items: center; gap: 14px;
            padding: 1rem 1.2rem !important;
            background: linear-gradient(135deg, rgba(0,160,198,0.12) 0%, rgba(0,130,163,0.04) 100%) !important;
            border-radius: 12px !important;
            margin-bottom: 0.5rem !important;
        }
        #mobileProfileToggle + .dropdown-menu > li:first-child::before {
            content: ''; flex-shrink: 0;
            width: 52px; height: 52px;
            border-radius: 50%;
            background-image: var(--ft-profile-pic, none);
            background-size: cover; background-position: center;
            background-color: #00A0C6;
            border: 3px solid #fff;
            box-shadow: 0 4px 14px rgba(0,160,198,0.32), 0 2px 6px rgba(0,0,0,0.08);
        }
        #mobileProfileToggle + .dropdown-menu > li:first-child > strong {
            display: block; line-height: 1.2;
            font-size: 1.05rem; font-weight: 700;
            color: #1f2937; letter-spacing: -0.01em;
        }
        #mobileProfileToggle + .dropdown-menu > li:first-child > small {
            color: #6b7280; font-size: 0.82rem;
        }
        body.dark-mode #mobileProfileToggle + .dropdown-menu > li:first-child {
            background: linear-gradient(135deg, rgba(86,204,242,0.16) 0%, rgba(56,182,212,0.06) 100%) !important;
        }
        body.dark-mode #mobileProfileToggle + .dropdown-menu > li:first-child > strong { color: #f3f4f6; }
        body.dark-mode #mobileProfileToggle + .dropdown-menu > li:first-child > small { color: #9ca3af; }
        body.dark-mode #mobileProfileToggle + .dropdown-menu > li:first-child::before {
            border-color: #1c1e1f;
        }
    }

    /* ====================================================================
       === Wave 27.18: HYBRID-DEVICE-DETECTION CSS-API ====================
       Verwendung in CSS:
         body.ft-view-mobile  .x { ... }   // Window <992px (live mit resize)
         body.ft-view-desktop .x { ... }   // Window >=992px
         body.ft-view-tablet  .x { ... }   // Window 768-991px
         body.ft-device-mobile  .x { ... } // User-Agent ist Mobile (Smartphone/Tablet)
         body.ft-device-desktop .x { ... } // User-Agent ist Desktop
         body.ft-device-tablet  .x { ... } // User-Agent ist Tablet
         body.ft-touch          .x { ... } // Hardware hat Touch
       Sehr handy fuer Cases wo @media nicht reicht.
       ==================================================================== */

    /* Beispiel: Touch-Devices bekommen automatisch groessere Tap-Targets */
    body.ft-touch .nav-link,
    body.ft-touch .dropdown-item {
        min-height: 44px;  /* Apple HIG min Touch-Target */
    }
    body.ft-touch .btn-sm {
        min-height: 36px;
    }

    /* Beispiel: User-Agent-Mobile bekommt automatisch Smooth-Scroll */
    body.ft-device-mobile {
        -webkit-overflow-scrolling: touch;
        scroll-behavior: smooth;
    }

    /* Beispiel: Mobile-View bekommt Hover-Effekte ausgeschaltet (verhindert Sticky-Hover) */
    body.ft-view-mobile *:hover {
        /* Hover-Effekte werden weniger aggressiv auf Touch-Devices */
    }
    body.ft-touch .action-btn:hover { transform: none !important; }
    body.ft-touch .action-btn:hover i { transform: none !important; }

    /* ====================================================================
       === Wave 27.19: UNIVERSAL DEVICE-BREAKPOINTS =======================
       Optimiert fuer alle gaengigen Geraete:
        - iPhone SE (375x667), iPhone 14 Pro Max (430x932)
        - Samsung Galaxy S20 (360x800), Galaxy A71 (412x914)
        - Pixel 7 (412x915)
        - Galaxy Z Fold 5 zu (344x882) / offen (882x1175)
        - Asus Zenbook Fold (1280x1920 zu / 1920x1280 offen)
        - iPad mini (744x1133), iPad (810x1080), iPad Pro 11 (834x1194), 12.9 (1024x1366)
        - Surface Pro 7 (912x1368)
        - Nest Hub (1024x600), Nest Hub Max (1280x800)
       ==================================================================== */

    /* ============ XS: 0-374px (iPhone SE alt, Galaxy Fold zu) ============= */
    @media (max-width: 374px) {
        .navbar-custom .navbar-brand img { height: 22px !important; margin-right: 4px !important; }
        .navbar-custom .logo-friends,
        .navbar-custom .logo-time { font-size: 0.85rem !important; letter-spacing: -0.025em; }
        .ft-iconbar .nav-link { padding: 0.4rem 0.25rem !important; }
        .ft-iconbar .nav-link i.fa-lg { font-size: 0.95rem !important; }
        #mobileProfileToggle img { width: 26px !important; height: 26px !important; }
        .composer-trigger-card .card-body { padding: 0.85rem !important; }
        .card-custom-footer { padding: 0.4rem 0.3rem 0.5rem !important; }
        .action-btn { font-size: 0 !important; padding: 0.5rem 0.15rem !important; }
        .action-btn i { font-size: 1.1rem !important; margin-right: 0 !important; }
    }

    /* ============ SM-Phone: 375-413px (iPhone 12-15, Galaxy S20) ========== */
    @media (min-width: 375px) and (max-width: 413px) {
        .navbar-custom .navbar-brand img { height: 24px !important; }
        .navbar-custom .logo-friends,
        .navbar-custom .logo-time { font-size: 0.95rem !important; }
        .action-btn { font-size: 0.78rem !important; padding: 0.5rem 0.25rem !important; }
        .action-btn i { font-size: 0.95rem !important; }
        .composer-trigger-card .card-body { padding: 0.95rem 1rem !important; }
    }

    /* ============ MD-Phone: 414-575px (iPhone Pro Max, Galaxy A71, Pixel 7) ========== */
    @media (min-width: 414px) and (max-width: 575px) {
        .navbar-custom .navbar-brand img { height: 26px !important; }
        .action-btn { font-size: 0.85rem !important; padding: 0.55rem 0.4rem !important; }
        .composer-trigger-card .card-body { padding: 1rem 1.1rem !important; }
        /* Mehr Inhalt sichtbar bei groesseren Phones */
        #mobileProfileToggle { padding: 0.3rem 0.6rem 0.3rem 0.4rem !important; }
        #mobileProfileToggle img { width: 32px !important; height: 32px !important; }
    }

    /* ============ Galaxy Z Fold 5 offen / Phablet: 576-767px =============== */
    @media (min-width: 576px) and (max-width: 767px) {
        .composer-trigger-card .card-body { padding: 1.1rem 1.2rem !important; }
        .action-btn { font-size: 0.92rem !important; padding: 0.6rem 0.5rem !important; }
    }

    /* ============ Tablet-Klein: 768-991px (iPad mini, iPad portrait) ===== */
    @media (min-width: 768px) and (max-width: 991.98px) {
        /* Tablet: Padding-Top kommt aus ft-mobile.css (125px global) */
        .navbar-custom .navbar-brand img { height: 28px !important; }
        .ft-iconbar .nav-link { padding: 0.55rem 0.45rem !important; }
        .ft-iconbar .nav-link i.fa-lg { font-size: 1.15rem !important; }
        #mobileProfileToggle img { width: 34px !important; height: 34px !important; }
        /* Composer-Card mehr Spacing */
        .composer-trigger-card .card-body { padding: 1.3rem 1.4rem !important; }
        .composer-trigger-card .form-control { font-size: 1rem !important; padding: 0.85rem 1.3rem !important; }
        .action-btn { font-size: 0.95rem !important; padding: 0.65rem 0.55rem !important; }
        /* Profile-Hamburger: groesser auf Tablet */
        #mobileProfileToggle + .dropdown-menu {
            top: 70px !important;
            left: auto !important;
            right: 16px !important;
            width: 360px !important;
            max-width: calc(100vw - 32px);
        }
        #mobileProfileToggle + .dropdown-menu > li:first-child::before {
            width: 60px !important; height: 60px !important;
        }
    }

    /* ============ Tablet-Landscape / iPad Pro 11 portrait: 992-1199px ====== */
    @media (min-width: 992px) and (max-width: 1199.98px) {
        /* Hier greift Desktop-Layout, aber mit etwas reduzierter Padding */
        .container { max-width: 100% !important; padding-left: 16px !important; padding-right: 16px !important; }
    }

    /* ============ Sehr breite Mobile-Foldables (Asus Zenbook Fold) ======= */
    @media (min-width: 1024px) and (max-width: 1280px) and (max-height: 800px) {
        /* Spezielle Optimierung fuer breite, niedrige Foldable-Screens */
        .navbar-custom { height: 52px; max-height: 52px; }
        /* padding-top: 52px wurde entfernt — alle Mobile-Pages nutzen jetzt 125px (Header+Sub-Nav) */
    }

    /* ============ Touch-spezifische Rules (Hardware-Detection) ============ */
    /* .ft-bottom-item stand hier als vierter Selektor und ist nach
       includes/ft_bottom_nav.php gewandert (dieselben Deklarationen). */
    body.ft-touch .nav-link,
    body.ft-touch .dropdown-item,
    body.ft-touch .action-btn {
        -webkit-tap-highlight-color: rgba(0,160,198,0.15);
        cursor: pointer;
    }
    /* Touch-Devices: kein Hover-Lift (verhindert Sticky-Hover-Feels) */
    body.ft-touch .action-btn:hover {
        transform: none !important;
        background: transparent !important;
    }
    body.ft-touch .action-btn:active {
        transform: scale(0.96);
        background: rgba(0,160,198,0.10) !important;
    }
    body.ft-touch .composer-trigger-card .form-control:hover {
        transform: none !important;
    }

    /* ============ Foldable / Faltbarer-Modus (Galaxy Z Fold zu) =========== */
    @media (max-width: 344px) {
        /* Sehr enges Display: Logo-Text komplett verstecken, nur Logo-Image */
        .navbar-custom .logo-friends,
        .navbar-custom .logo-time { display: none !important; }
        .navbar-custom .navbar-brand img { margin-right: 0 !important; }
    }

    /* ====================================================================
       === Wave 27.22: COMPOSER-MODAL TEXT-VISIBILITY FIX (Dark+Light) ===
       Buttons "Foto/Video", "Gefühl/Aktivität", "Standort" zeigen Text korrekt
       ==================================================================== */
    /* Modal-Buttons IMMER mit korrekten Farben (egal Light/Dark) */
    #createPostModal .btn-light,
    #createPostModal label.btn-light {
        color: #1f2937 !important;
        background: #f3f4f6 !important;
        border: 1px solid #e5e7eb !important;
        font-weight: 600 !important;
        white-space: normal !important;  /* Text darf wrappen */
    }
    #createPostModal .btn-light:hover,
    #createPostModal label.btn-light:hover {
        background: #e5e7eb !important;
        color: #00A0C6 !important;
    }
    body.dark-mode #createPostModal .btn-light,
    body.dark-mode #createPostModal label.btn-light {
        color: #f3f4f6 !important;
        background: #3a3b3c !important;
        border: 1px solid #4a4b4c !important;
    }
    body.dark-mode #createPostModal .btn-light:hover,
    body.dark-mode #createPostModal label.btn-light:hover {
        background: #4a4b4c !important;
        color: #56ccf2 !important;
    }
    /* Modal-Header + Body: korrekte Farben */
    #createPostModal .modal-header { background: #fff !important; }
    #createPostModal .modal-body { background: #fff !important; color: #1f2937 !important; }
    #createPostModal .modal-title { color: #1f2937 !important; }
    body.dark-mode #createPostModal .modal-content,
    body.dark-mode #createPostModal .modal-header,
    body.dark-mode #createPostModal .modal-body { background: #242526 !important; color: #e5e7eb !important; }
    body.dark-mode #createPostModal .modal-title { color: #e5e7eb !important; }
    body.dark-mode #createPostModal .btn-close { filter: invert(1); }
    /* Textarea + Input */
    #createPostModal textarea,
    #createPostModal input[type="text"] {
        background: #fff !important;
        color: #1f2937 !important;
        border: 1px solid #e5e7eb !important;
    }
    body.dark-mode #createPostModal textarea,
    body.dark-mode #createPostModal input[type="text"] {
        background: #3a3b3c !important;
        color: #e5e7eb !important;
        border-color: #4a4b4c !important;
    }
    /* "Fuege deinem Beitrag etwas hinzu:" + Border-Container */
    #createPostModal .border.rounded {
        background: rgba(0,0,0,0.02) !important;
        border-color: rgba(0,0,0,0.08) !important;
    }
    #createPostModal .border.rounded .fw-bold {
        color: #1f2937 !important;
    }
    body.dark-mode #createPostModal .border.rounded {
        background: rgba(255,255,255,0.04) !important;
        border-color: rgba(255,255,255,0.10) !important;
    }
    body.dark-mode #createPostModal .border.rounded .fw-bold {
        color: #f3f4f6 !important;
    }

    /* ====================================================================
       === Wave 27.21: COMPOSER-MODAL FIX FUER MOBILE =====================
       Action-Buttons passen nicht in eine Zeile auf <576px
       ==================================================================== */
    @media (max-width: 575px) {
        /* Modal-Body nutzt vollen Platz */
        #createPostModal .modal-dialog { margin: 8px; max-width: calc(100vw - 16px); }
        #createPostModal .modal-content { border-radius: 18px; }
        #createPostModal .modal-body { padding: 1rem !important; }

        /* Action-Buttons-Container: wrappen + grosser Posten-Button als zweite Zeile */
        #createPostModal .d-flex.align-items-center.justify-content-between {
            flex-wrap: wrap !important;
            gap: 10px !important;
        }
        #createPostModal .d-flex.gap-2.flex-wrap {
            flex: 1 1 100%;
            justify-content: space-around !important;
            gap: 4px !important;
        }
        /* Action-Buttons im createPostModal: Wrap auf 2 Zeilen erlauben damit Labels sichtbar */
        #createPostModal .d-flex.gap-2.flex-wrap > * {
            flex: 1 1 calc(50% - 4px) !important;  /* 2 pro Zeile auf Mobile */
            min-width: 0 !important;
            padding: 0.6rem 0.4rem !important;
            justify-content: center !important;
            font-size: 0.85rem !important;
            font-weight: 600;
            border-radius: 10px !important;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        #createPostModal .d-flex.gap-2.flex-wrap > * i {
            font-size: 1rem !important;
            margin-right: 0.35rem !important;
        }
        /* Sehr enge Phones: 1 Button pro Zeile */
        @media (max-width: 374px) {
            #createPostModal .d-flex.gap-2.flex-wrap > * {
                flex: 1 1 100% !important;
                font-size: 0.9rem !important;
            }
        }
        /* IDs aus create_post_form.php — die haben gleiches Layout */
        #createPostModal #addImageBtn,
        #createPostModal #addVideoBtn,
        #createPostModal #addYouTubeBtn,
        #createPostModal #addFeelingBtn,
        #createPostModal #addMentionBtn {
            flex: 1 1 calc(50% - 4px) !important;
            min-width: 0 !important;
            padding: 0.6rem 0.4rem !important;
            justify-content: center !important;
            border-radius: 10px !important;
            font-size: 0.85rem !important;
            transition: all 0.15s;
        }
        #createPostModal .btn-light:active {
            transform: scale(0.95);
            background: rgba(0,160,198,0.10) !important;
        }
        #createPostModal .btn-light i {
            font-size: 1.15rem !important;
            margin-right: 0 !important;
        }
        body.dark-mode #createPostModal #addImageBtn,
        body.dark-mode #createPostModal #addVideoBtn,
        body.dark-mode #createPostModal #addYouTubeBtn,
        body.dark-mode #createPostModal #addFeelingBtn,
        body.dark-mode #createPostModal #addMentionBtn {
            background: rgba(255,255,255,0.06) !important;
            border-color: rgba(255,255,255,0.08) !important;
        }

        /* Posten-Button: volle Breite, gut sichtbar */
        #createPostModal #submitPostBtn {
            flex: 1 1 100% !important;
            padding: 0.75rem 1rem !important;
            font-size: 1rem !important;
            font-weight: 600;
            border-radius: 999px !important;
            box-shadow: 0 4px 12px rgba(0,160,198,0.25);
        }
        #createPostModal #submitPostBtn:active {
            transform: scale(0.98);
        }

        /* Drag-Drop-Bereich kleiner auf Mobile */
        #createPostModal .upload-drop-zone {
            padding: 1rem 0.5rem !important;
            font-size: 0.85rem !important;
        }
        #createPostModal .upload-drop-zone i { font-size: 1.8rem !important; }

        /* Textarea groesser */
        #createPostModal textarea {
            min-height: 80px !important;
            font-size: 1rem !important;
            border-radius: 12px !important;
        }
    }

    /* === iOS Safe-Area + PWA-Standalone-Mode === */
    @supports (padding: max(0px)) {
        .navbar-custom { padding-top: max(0.55rem, env(safe-area-inset-top)); }
    }

    /* === Anti-FOUC Pre-State === */
    html.ft-dark-pre body { background: #181a1b; color: #e5e7eb; }
