﻿/* Aion Chat Styles - Extracted 2026-01-30 */

/* ========================================= */
/* FILTER CONTROLS ROW - Desktop visible    */
/* ========================================= */
@media (min-width: 640px) {
    #filter-controls-row {
        max-height: none !important;
        padding: 0.625rem !important; /* p-2.5 */
        margin-bottom: 0.75rem !important; /* mb-3 */
        border: 1px solid rgba(51, 65, 85, 0.5) !important; /* border-slate-700/50 */
    }
}

/* =========================================================================
   Aion Light Theme Refresh
   Final layer for a calmer, structured light UI.
   ========================================================================= */
html.aion-chat-page.theme-light,
html.aion-chat-page.theme-light body {
    background:
        radial-gradient(circle at 50% -12%, rgba(124, 58, 237, 0.055), transparent 36rem),
        linear-gradient(180deg, #f7f9fc 0%, #f3f6fb 100%) !important;
    color: #172033 !important;
}

html.aion-chat-page.theme-light main,
html.aion-chat-page.theme-light main > section,
html.aion-chat-page.theme-light #page_content_wrapper {
    background: transparent !important;
}

html.aion-chat-page.theme-light main .glass-card {
    background: rgba(255, 255, 255, 0.72) !important;
    border-color: rgba(148, 163, 184, 0.22) !important;
    box-shadow: none !important;
    backdrop-filter: blur(14px) !important;
    -webkit-backdrop-filter: blur(14px) !important;
}

html.aion-chat-page.theme-light #chat-sidebar,
html.aion-chat-page.theme-light #quick-access-sidebar {
    background: rgba(248, 250, 252, 0.92) !important;
    border-color: rgba(148, 163, 184, 0.28) !important;
    box-shadow: none !important;
}

html.aion-chat-page.theme-light #chat-sidebar > .glass-card,
html.aion-chat-page.theme-light #quick-access-sidebar > .glass-card {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
}

html.aion-chat-page.theme-light #sidebar-resize-handle > div {
    background: rgba(100, 116, 139, 0.18) !important;
}

html.aion-chat-page.theme-light #sidebar-resize-handle:hover > div {
    background: rgba(124, 58, 237, 0.58) !important;
}

html.aion-chat-page.theme-light #chat-sidebar h2,
html.aion-chat-page.theme-light #quick-access-sidebar h2,
html.aion-chat-page.theme-light .aion-standalone-sidebar-title {
    color: #172033 !important;
}

html.aion-chat-page.theme-light #chat-sidebar .text-gray-400,
html.aion-chat-page.theme-light #chat-sidebar .text-gray-500,
html.aion-chat-page.theme-light #quick-access-sidebar .text-gray-400,
html.aion-chat-page.theme-light #quick-access-sidebar .text-gray-500,
html.aion-chat-page.theme-light .quick-btn-section-label {
    color: #718096 !important;
}

html.aion-chat-page.theme-light #sidebar-divider-chat,
html.aion-chat-page.theme-light #sidebar-divider-analysis {
    background: rgba(148, 163, 184, 0.22) !important;
}

html.aion-chat-page.theme-light #sidebar-mode-toggle,
html.aion-chat-page.theme-light #new-chat-btn,
html.aion-chat-page.theme-light #quick-btn-add,
html.aion-chat-page.theme-light #quick-btn-toggle-hidden,
html.aion-chat-page.theme-light #quick-btn-add-mobile,
html.aion-chat-page.theme-light #quick-btn-toggle-hidden-mobile {
    background: #ffffff !important;
    border-color: rgba(124, 58, 237, 0.20) !important;
    color: #6d28d9 !important;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05) !important;
}

html.aion-chat-page.theme-light #sidebar-mode-toggle:hover,
html.aion-chat-page.theme-light #new-chat-btn:hover,
html.aion-chat-page.theme-light #quick-btn-add:hover,
html.aion-chat-page.theme-light #quick-btn-toggle-hidden:hover,
html.aion-chat-page.theme-light #quick-btn-add-mobile:hover,
html.aion-chat-page.theme-light #quick-btn-toggle-hidden-mobile:hover {
    background: #f3edff !important;
    border-color: rgba(124, 58, 237, 0.38) !important;
    color: #4c1d95 !important;
}

html.aion-chat-page.theme-light #clear-all-chats-btn,
html.aion-chat-page.theme-light #clear-all-analyses-btn,
html.aion-chat-page.theme-light #clear-all-chats-btn-mobile,
html.aion-chat-page.theme-light #clear-all-analyses-btn-mobile {
    background: #fff7f7 !important;
    border-color: rgba(220, 38, 38, 0.18) !important;
    color: #dc2626 !important;
}

html.aion-chat-page.theme-light #clear-all-chats-btn:hover,
html.aion-chat-page.theme-light #clear-all-analyses-btn:hover,
html.aion-chat-page.theme-light #clear-all-chats-btn-mobile:hover,
html.aion-chat-page.theme-light #clear-all-analyses-btn-mobile:hover {
    background: #fee2e2 !important;
    border-color: rgba(220, 38, 38, 0.32) !important;
}

html.aion-chat-page.theme-light .chat-history-item,
html.aion-chat-page.theme-light .analysis-history-item {
    background: rgba(255, 255, 255, 0.78) !important;
    border: 1px solid rgba(148, 163, 184, 0.24) !important;
    border-left: 3px solid rgba(124, 58, 237, 0.34) !important;
    box-shadow: none !important;
}

html.aion-chat-page.theme-light .chat-history-item:hover,
html.aion-chat-page.theme-light .analysis-history-item:hover {
    background: #ffffff !important;
    border-color: rgba(124, 58, 237, 0.28) !important;
    border-left-color: rgba(124, 58, 237, 0.64) !important;
}

html.aion-chat-page.theme-light .chat-history-item.active,
html.aion-chat-page.theme-light .analysis-history-item.active {
    background: #f3edff !important;
    border-color: rgba(124, 58, 237, 0.32) !important;
}

html.aion-chat-page.theme-light .chat-history-item p,
html.aion-chat-page.theme-light .analysis-history-item p,
html.aion-chat-page.theme-light .chat-history-item .text-white,
html.aion-chat-page.theme-light .analysis-history-item .text-white {
    color: #1f2937 !important;
}

html.aion-chat-page.theme-light #chat-container {
    background:
        radial-gradient(circle at 50% 0%, rgba(124, 58, 237, 0.035), transparent 30rem),
        rgba(255, 255, 255, 0.28) !important;
}

html.aion-chat-page.theme-light #chat-container .text-white,
html.aion-chat-page.theme-light #chat-welcome-title,
html.aion-chat-page.theme-light .chat-welcome-title {
    color: #1f2937 !important;
}

html.aion-chat-page.theme-light #chat-welcome-subtitle,
html.aion-chat-page.theme-light .chat-welcome-subtitle,
html.aion-chat-page.theme-light #chat-container .text-gray-400,
html.aion-chat-page.theme-light #chat-container .text-gray-500 {
    color: #718096 !important;
}

html.aion-chat-page.theme-light .quick-btn,
html.aion-chat-page.theme-light .quick-access-item,
html.aion-chat-page.theme-light .suggestion-btn {
    background: rgba(255, 255, 255, 0.82) !important;
    border: 1px solid rgba(148, 163, 184, 0.24) !important;
    color: #1f2937 !important;
    box-shadow: none !important;
}

html.aion-chat-page.theme-light .quick-btn:hover,
html.aion-chat-page.theme-light .quick-access-item:hover,
html.aion-chat-page.theme-light .suggestion-btn:hover {
    background: #ffffff !important;
    border-color: rgba(124, 58, 237, 0.32) !important;
    color: #312e81 !important;
    box-shadow: 0 6px 18px rgba(124, 58, 237, 0.08) !important;
}

html.aion-chat-page.theme-light .quick-btn-action,
html.aion-chat-page.theme-light .quick-btn-hide,
html.aion-chat-page.theme-light .quick-btn-show,
html.aion-chat-page.theme-light .quick-access-visibility-toggle {
    color: #94a3b8 !important;
}

html.aion-chat-page.theme-light .quick-btn-action:hover,
html.aion-chat-page.theme-light .quick-btn-hide:hover,
html.aion-chat-page.theme-light .quick-btn-show:hover,
html.aion-chat-page.theme-light .quick-access-visibility-toggle:hover {
    background: #f3edff !important;
    color: #6d28d9 !important;
}

html.aion-chat-page.theme-light #user-location-display,
html.aion-chat-page.theme-light #user-location-display-mobile,
html.aion-chat-page.theme-light #right-sidebar-limit-wrapper {
    border-color: rgba(148, 163, 184, 0.22) !important;
}

html.aion-chat-page.theme-light #user-location-display > div,
html.aion-chat-page.theme-light #user-location-display-mobile > div,
html.aion-chat-page.theme-light #sidebar-limit-chat,
html.aion-chat-page.theme-light #sidebar-limit-analysis,
html.aion-chat-page.theme-light #right-sidebar-limit-chat,
html.aion-chat-page.theme-light #right-sidebar-limit-analysis {
    background: rgba(255, 255, 255, 0.72) !important;
    border: 1px solid rgba(148, 163, 184, 0.20) !important;
    color: #64748b !important;
}

html.aion-chat-page.theme-light .aion-location-text,
html.aion-chat-page.theme-light #right-sidebar-limit-percent,
html.aion-chat-page.theme-light #right-sidebar-analysis-count,
html.aion-chat-page.theme-light #sidebar-limit-percent,
html.aion-chat-page.theme-light #sidebar-analysis-count {
    color: #334155 !important;
}

html.aion-chat-page.theme-light #chat-form {
    background: linear-gradient(180deg, rgba(247, 249, 252, 0), rgba(247, 249, 252, 0.92) 38%, #f7f9fc 100%) !important;
    border-color: rgba(148, 163, 184, 0.22) !important;
}

html.aion-chat-page.theme-light #chat-input {
    background: #ffffff !important;
    border-color: rgba(148, 163, 184, 0.36) !important;
    color: #111827 !important;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05) !important;
}

html.aion-chat-page.theme-light #chat-input::placeholder {
    color: #a0aec0 !important;
}

html.aion-chat-page.theme-light #chat-input:hover {
    border-color: rgba(100, 116, 139, 0.48) !important;
}

html.aion-chat-page.theme-light #chat-input:focus {
    border-color: rgba(124, 58, 237, 0.45) !important;
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.10) !important;
}

html.aion-chat-page.theme-light #attach-file-btn,
html.aion-chat-page.theme-light #voice-input-btn,
html.aion-chat-page.theme-light #quick-access-toggle {
    background: #ffffff !important;
    border-color: rgba(148, 163, 184, 0.28) !important;
    color: #64748b !important;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04) !important;
}

html.aion-chat-page.theme-light #attach-file-btn:hover,
html.aion-chat-page.theme-light #voice-input-btn:hover,
html.aion-chat-page.theme-light #quick-access-toggle:hover {
    background: #f3edff !important;
    border-color: rgba(124, 58, 237, 0.32) !important;
    color: #6d28d9 !important;
}

html.aion-chat-page.theme-light #action-btn {
    background: linear-gradient(135deg, #7c3aed 0%, #6366f1 100%) !important;
    color: #ffffff !important;
    border-color: rgba(99, 102, 241, 0.30) !important;
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.22) !important;
}

html.aion-chat-page.theme-light #action-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #6d28d9 0%, #4f46e5 100%) !important;
    box-shadow: 0 10px 24px rgba(99, 102, 241, 0.28) !important;
}

html.aion-chat-page.theme-light #action-btn:disabled {
    background: #e2e8f0 !important;
    color: #94a3b8 !important;
    box-shadow: none !important;
}

html.aion-chat-page.theme-light #sidebar-overlay > div,
html.aion-chat-page.theme-light #quick-access-bottom-sheet > div,
html.aion-chat-page.theme-light #filter-bottom-sheet > div {
    background: #f8fafc !important;
    color: #172033 !important;
}

html.aion-chat-page.theme-light .custom-scrollbar::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.44) !important;
}

html.aion-chat-page.theme-light .custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: rgba(100, 116, 139, 0.58) !important;
}

/* ========================================= */
/* MOBILE HAMBURGER NAVIGATION MENU         */
/* ========================================= */
@media (max-width: 759px) {
    #aion-mobile-header {
        display: grid !important;
        grid-template-columns: 7.5rem minmax(0, 1fr) 7.5rem;
        column-gap: 0;
    }

    #aion-mobile-header > div:first-of-type {
        justify-content: flex-start;
        min-width: 0;
    }

    #aion-mobile-header > span {
        text-align: center;
        min-width: 0;
    }

    #aion-mobile-header > div:last-of-type {
        justify-content: flex-end;
        min-width: 0;
    }

    /* Filter Controls auf Mobile versteckt (wird über Hamburger-Menü geöffnet) */
    #filter-controls-row {
        max-height: 0 !important;
        padding: 0 !important;
        margin-bottom: 0 !important;
        border: none !important;
        overflow: hidden !important;
    }
    
    /* Navigation Panel Slide Animation (von RECHTS) */
    #mobile-nav-panel {
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    /* Backdrop fade */
    #mobile-nav-backdrop {
        transition: opacity 0.3s ease;
    }
    
    /* Active link highlight */
    #mobile-nav-panel a.active {
        background: rgba(147, 51, 234, 0.12);
    }

    .mobile-header-action-btn {
        background: rgba(255, 255, 255, 0.04);
        border: 1px solid rgba(255, 255, 255, 0.08);
        color: #c4b5fd;
    }

    #mobile-nav-hamburger {
        border-radius: 0.5rem !important;
        border: 1px solid rgba(255, 255, 255, 0.08) !important;
        background: rgba(255, 255, 255, 0.04) !important;
        color: #c4b5fd !important;
    }

    .mobile-header-action-btn[data-mode-accent="analysis"] {
        color: #6ee7b7;
    }

    .mobile-header-action-btn:hover {
        background: rgba(255, 255, 255, 0.08);
        border-color: rgba(147, 51, 234, 0.45);
        color: #e9d5ff;
    }

    #mobile-nav-hamburger:hover {
        background: rgba(255, 255, 255, 0.08) !important;
        border-color: rgba(147, 51, 234, 0.45) !important;
        color: #e9d5ff !important;
    }

    .mobile-header-action-btn[data-mode-accent="chat"]:hover {
        border-color: rgba(147, 51, 234, 0.45);
    }

    .mobile-header-action-btn[data-mode-accent="analysis"]:hover {
        border-color: rgba(16, 185, 129, 0.45);
    }

    .mobile-header-action-btn.is-active {
        background: rgba(147, 51, 234, 0.25);
        border-color: rgba(147, 51, 234, 0.5);
        color: #e9d5ff;
    }

    .mobile-header-action-btn[data-mode-accent="analysis"].is-active {
        background: rgba(16, 185, 129, 0.25);
        border-color: rgba(16, 185, 129, 0.5);
        color: #a7f3d0;
    }

    #mobile-nav-panel {
        background:
            radial-gradient(circle at top, rgba(88, 101, 242, 0.08), transparent 30%),
            linear-gradient(180deg, #020617 0%, #050816 100%);
    }

    .mobile-nav-shell {
        display: flex;
        height: 100%;
        min-height: 100%;
        flex: 1;
        flex-direction: column;
        overflow: hidden;
    }

    .mobile-nav-header {
        position: relative;
        display: flex;
        height: 3.25rem;
        align-items: center;
        justify-content: space-between;
        padding: 0 0.75rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    }

    .mobile-nav-header__user {
        display: flex;
        align-items: center;
        gap: 0.625rem;
        min-width: 0;
    }

    .mobile-nav-header__avatar {
        width: 2rem;
        height: 2rem;
        border-radius: 50%;
        object-fit: cover;
        flex-shrink: 0;
    }

    .mobile-nav-header__name {
        font-size: 0.88rem;
        font-weight: 600;
        color: #f1f5f9;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .mobile-nav-header__back {
        display: inline-flex;
        align-items: center;
        gap: 0.35rem;
        height: 2rem;
        padding: 0 0.65rem;
        border-radius: 0.65rem;
        background: transparent;
        border: none;
        color: #cbd5e1;
        flex-shrink: 0;
        transition: color 0.18s ease, transform 0.18s ease;
        cursor: pointer;
        font: inherit;
    }

    .mobile-nav-header__back-icon {
        width: 1.25rem;
        height: 1.25rem;
        flex-shrink: 0;
    }

    .mobile-nav-header__back-label {
        font-size: 0.78rem;
        font-weight: 600;
        line-height: 1;
        white-space: nowrap;
    }

    .mobile-nav-header__back:active {
        transform: scale(0.97);
    }

    @media (hover: hover) {
        .mobile-nav-header__back:hover {
            color: #ffffff;
            transform: translateX(-1px);
        }
    }

    .mobile-nav-header__close {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 2.25rem;
        height: 2.25rem;
        border-radius: 0.5rem;
        border: 1px solid rgba(255, 255, 255, 0.08);
        background: rgba(255, 255, 255, 0.04);
        color: #e2e8f0;
        cursor: pointer;
        flex-shrink: 0;
        -webkit-tap-highlight-color: transparent;
        transition: color 0.18s ease, background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
    }

    .mobile-nav-header__close svg {
        width: 1.1rem;
        height: 1.1rem;
        flex-shrink: 0;
    }

    .mobile-nav-header__close:active {
        transform: scale(0.97);
    }

    @media (hover: hover) {
        .mobile-nav-header__close:hover {
            color: #ffffff;
            background: rgba(255, 255, 255, 0.08);
            border-color: rgba(255, 255, 255, 0.14);
        }
    }

    .mobile-nav-scroll {
        display: flex;
        flex: 1;
        min-height: 0;
        flex-direction: column;
        gap: 1rem;
        overflow-y: auto;
        padding: 0.5rem 0 1rem;
    }

    /* Section */
    .mobile-nav-section {
        display: flex;
        flex-direction: column;
        gap: 0.125rem;
        padding-top: 0.625rem;
        border-top: 1px solid rgba(255, 255, 255, 0.06);
    }

    .mobile-nav-section:first-child {
        border-top: none;
        padding-top: 0;
    }

    .mobile-nav-section.is-empty {
        display: none;
    }

    .mobile-nav-scroll > .mobile-nav-section.is-empty + .mobile-nav-section {
        border-top: none;
        padding-top: 0;
    }

    .mobile-nav-section-label {
        font-size: 0.6rem;
        font-weight: 700;
        letter-spacing: 0.12em;
        text-transform: uppercase;
        color: rgba(148, 163, 184, 0.7);
        padding: 0.25rem 0.75rem;
    }

    .mobile-nav-list {
        display: flex;
        flex-direction: column;
        gap: 0;
    }

    /* Row — the single compact item */
    .mobile-nav-row {
        position: relative;
        display: flex;
        align-items: center;
        gap: 0.625rem;
        padding: 0.5rem 0.75rem;
        border-radius: 0;
        color: #ffffff;
        text-decoration: none;
        transition: background 0.15s, color 0.15s;
        cursor: pointer;
        appearance: none;
        -webkit-appearance: none;
        border: none;
        background: transparent;
        width: 100%;
        text-align: left;
        font: inherit;
    }

    #mobile-nav-panel a.mobile-nav-row {
        color: #ffffff !important;
        text-decoration: none !important;
        border-bottom: none !important;
    }

    #mobile-nav-panel a.mobile-nav-row.mobile-nav-row--danger {
        color: #fca5a5 !important;
    }

    #mobile-nav-panel .mobile-nav-row,
    #mobile-nav-panel .mobile-nav-row:hover,
    #mobile-nav-panel .mobile-nav-row:focus,
    #mobile-nav-panel .mobile-nav-row:focus-visible,
    #mobile-nav-panel .mobile-nav-row__label {
        text-decoration: none !important;
        text-decoration-line: none !important;
    }

    .mobile-nav-row__icon {
        display: flex;
        width: 1.75rem;
        height: 1.75rem;
        min-width: 1.75rem;
        min-height: 1.75rem;
        max-width: 1.75rem;
        max-height: 1.75rem;
        align-items: center;
        justify-content: center;
        border-radius: 0.45rem;
        background: rgba(255, 255, 255, 0.05);
        flex-shrink: 0;
        overflow: hidden;
    }

    .mobile-nav-row__icon svg {
        width: 0.95rem;
        height: 0.95rem;
        min-width: 0.95rem;
        min-height: 0.95rem;
        max-width: 0.95rem;
        max-height: 0.95rem;
        flex-shrink: 0;
    }

    .mobile-nav-row__label {
        flex: 1;
        color: inherit;
        text-align: left;
        font-size: 0.84rem;
        font-weight: 500;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .mobile-nav-row__value {
        max-width: 7rem;
        color: rgba(148, 163, 184, 0.82);
        text-align: right;
        font-size: 0.74rem;
        font-weight: 650;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .mobile-nav-row__chevron {
        width: 0.8rem;
        height: 0.8rem;
        min-width: 0.8rem;
        min-height: 0.8rem;
        max-width: 0.8rem;
        max-height: 0.8rem;
        color: rgba(148, 163, 184, 0.4);
        flex-shrink: 0;
    }

    .mobile-nav-row svg {
        flex-shrink: 0;
    }

    /* Color variants */
    .mobile-nav-row--home .mobile-nav-row__icon { color: #cbd5e1; background: rgba(148, 163, 184, 0.1); }
    .mobile-nav-row--news .mobile-nav-row__icon { color: #93c5fd; background: rgba(59, 130, 246, 0.1); }
    .mobile-nav-row--board .mobile-nav-row__icon { color: #6ee7b7; background: rgba(16, 185, 129, 0.1); }
    .mobile-nav-row--aion .mobile-nav-row__icon { color: #c4b5fd; background: rgba(147, 51, 234, 0.1); }
    .mobile-nav-row--charts .mobile-nav-row__icon { color: #67e8f9; background: rgba(6, 182, 212, 0.1); }
    .mobile-nav-row--portal .mobile-nav-row__icon { color: #fbbf24; background: rgba(245, 158, 11, 0.1); }
    .mobile-nav-row--theme .mobile-nav-row__icon { color: #fcd34d; background: rgba(245, 158, 11, 0.1); }
    .mobile-nav-row--location .mobile-nav-row__icon { color: #cbd5e1; background: rgba(148, 163, 184, 0.1); }
    .mobile-nav-row--notifications .mobile-nav-row__icon { color: #f0abfc; background: rgba(217, 70, 239, 0.12); }
    .mobile-nav-row--quick .mobile-nav-row__icon { color: #c4b5fd; background: rgba(147, 51, 234, 0.1); }
    .mobile-nav-row--mode .mobile-nav-row__icon { color: #c4b5fd; background: rgba(147, 51, 234, 0.25); }
    #nav-mode-toggle-btn[data-mode-accent="chat"] .mobile-nav-row__icon { color: #c4b5fd; background: rgba(147, 51, 234, 0.25); }
    #nav-mode-toggle-btn[data-mode-accent="analysis"] .mobile-nav-row__icon { color: #6ee7b7; background: rgba(16, 185, 129, 0.25); }
    .mobile-nav-row--mode {
        background: transparent;
    }

    /* Active */
    .mobile-nav-row.active {
        background: rgba(147, 51, 234, 0.12);
        color: #ffffff;
    }

    .mobile-nav-row.active .mobile-nav-row__icon {
        background: rgba(147, 51, 234, 0.18);
        color: #e9d5ff;
    }

    /* Danger */
    .mobile-nav-row--support .mobile-nav-row__icon {
        color: #86efac;
        background: rgba(34, 197, 94, 0.1);
    }

    .mobile-nav-row--install .mobile-nav-row__icon {
        color: #a78bfa;
        background: rgba(139, 92, 246, 0.15);
    }

    .mobile-nav-row--legal .mobile-nav-row__icon {
        color: #c4b5fd;
        background: rgba(139, 92, 246, 0.12);
    }

    .mobile-nav-row--danger {
        color: #fca5a5 !important;
        background: transparent;
    }

    .mobile-nav-row--danger .mobile-nav-row__icon {
        background: rgba(239, 68, 68, 0.25);
        color: #fca5a5;
    }

    .mobile-nav-footer {
        flex-shrink: 0;
        padding: 0.65rem 0.75rem max(0.65rem, env(safe-area-inset-bottom));
        border-top: 1px solid rgba(255, 255, 255, 0.06);
        background: rgba(2, 6, 23, 0.72);
        backdrop-filter: blur(14px);
    }

    .mobile-nav-legal-links {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.4rem;
        color: rgba(255, 255, 255, 0.48);
        font-size: 0.68rem;
        font-weight: 700;
        line-height: 1.4;
        white-space: nowrap;
    }

    .mobile-nav-legal-links a,
    .mobile-nav-legal-links a:visited {
        color: rgba(255, 255, 255, 0.9) !important;
        text-decoration: none;
        transition: color 0.18s ease, text-decoration-color 0.18s ease;
    }

    .mobile-nav-legal-links a:hover,
    .mobile-nav-legal-links a:focus-visible {
        color: #c4b5fd !important;
        text-decoration: none !important;
        text-decoration-line: none !important;
    }

    /* Hover */
    @media (hover: hover) {
        .mobile-nav-row:hover {
            background: rgba(255, 255, 255, 0.05);
            color: #ffffff;
        }
        .mobile-nav-row--danger:hover {
            background: rgba(239, 68, 68, 0.08);
            color: #fecaca !important;
        }
        .mobile-nav-row--mode:hover {
            background: rgba(147, 51, 234, 0.08);
        }
        #mobile-nav-panel[data-mode-accent="chat"] .mobile-nav-row:not(.active):not(.mobile-nav-row--danger):not(.mobile-nav-row--mode):hover {
            background: rgba(147, 51, 234, 0.08) !important;
            color: #ffffff !important;
        }
        #mobile-nav-panel[data-mode-accent="analysis"] .mobile-nav-row:not(.active):not(.mobile-nav-row--danger):not(.mobile-nav-row--mode):hover {
            background: rgba(16, 185, 129, 0.08) !important;
            color: #ffffff !important;
        }
    }
}

/* Aion Chat: Nur innerer Chat scrollt, kein äußerer Scrollbalken */
        /* Nutze !important um spätere Überschreibungen zu verhindern */
        html.aion-chat-page,
        html.aion-chat-page body {
            overflow: hidden !important;
            overflow-x: hidden !important;
            height: 100vh !important;
            height: 100dvh !important; /* dynamic viewport height for mobile */
            max-height: 100vh !important;
            max-height: 100dvh !important;
            width: 100% !important;
            max-width: 100vw !important;
        }
        html.aion-chat-page #page_content_wrapper {
            position: fixed !important;
            top: var(--aion-navbar-offset) !important;
            left: 0 !important;
            right: 0 !important;
            bottom: 0 !important;
            height: auto !important;
            max-height: none !important;
            width: 100% !important;
            max-width: 100vw !important;
            padding: 0 !important;
            margin: 0 !important;
            overflow: hidden !important;
            overflow-x: hidden !important;
            box-sizing: border-box !important;
            display: flex !important;
            flex-direction: column !important;
        }
        
        /* Mobile: Use compact mobile header (48px = h-12) instead of navbar */
        @media (max-width: 759px) {
            html.aion-chat-page #page_content_wrapper {
                top: 48px !important;
                padding-bottom: env(safe-area-inset-bottom, 16px) !important;
            }
            /* Explicitly hide desktop header on mobile */
            html.aion-chat-page #aion-desktop-header {
                display: none !important;
            }
        }
        
        html.aion-chat-page main {
            height: 100% !important;
            max-height: 100% !important;
            overflow: hidden !important;
            display: flex !important;
            flex-direction: column !important;
            flex: 1 !important;
            min-height: 0 !important;
        }
        html.aion-chat-page main > section {
            height: 100% !important;
            max-height: 100% !important;
            overflow: hidden !important;
            padding: 0 !important;
            box-sizing: border-box !important;
            flex: 1 !important;
            min-height: 0 !important;
        }
        /* Container innerhalb der Section */
        html.aion-chat-page main > section > div {
            height: 100% !important;
            max-height: 100% !important;
            min-height: 0 !important;
            overflow: hidden !important;
        }
        /* Chat-Card soll nicht überlaufen */
        html.aion-chat-page .glass-card {
            max-height: 100% !important;
            overflow: hidden !important;
            min-height: 0 !important;
            border-radius: 0 !important;
            border: none !important;
            box-shadow: none !important;
        }
        /* Alle flex-1 Elemente brauchen min-height: 0 für korrektes Schrumpfen */
        html.aion-chat-page .flex-1 {
            min-height: 0 !important;
        }
        
        /* Bilder in Chat-Nachrichten */
        .ai-message-content img {
            max-width: 100%;
            max-height: 400px;
            border-radius: 12px;
            margin: 8px 0;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
            object-fit: contain;
        }
        
        /* Videos in Chat-Nachrichten */
        .ai-message-content .video-embed {
            position: relative;
            width: 100%;
            max-width: 560px;
            margin: 12px 0;
            border-radius: 12px;
            overflow: hidden;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
        }
        .ai-message-content .video-embed iframe {
            width: 100%;
            height: 315px;
            border: none;
            border-radius: 12px;
        }
        
        /* Bild-Grid für mehrere Bilder */
        .ai-message-content .image-grid {
            max-width: 600px;
        }
        .ai-message-content .image-grid .image-embed-container {
            aspect-ratio: 4/3;
            background: rgba(0, 0, 0, 0.2);
        }
        .ai-message-content .image-grid .image-embed-container img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }
        
        /* ========================================= */
        /* MEDIA CAROUSEL - ChatGPT Style Slider    */
        /* ========================================= */
        
        /* Shop Carousel Filter Controls */
        .shop-carousel-controls {
            display: flex;
            align-items: center;
            gap: 6px;
            margin-left: 10px;
        }
        .shop-filter-btn {
            width: 28px;
            height: 28px;
            border-radius: 6px;
            background: rgba(255,255,255,0.08);
            border: 1px solid rgba(255,255,255,0.15);
            color: #9ca3af;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.2s;
            padding: 0;
        }
        .shop-filter-btn:hover {
            background: rgba(168,85,247,0.2);
            border-color: rgba(168,85,247,0.4);
            color: #c084fc;
        }
        .shop-filter-btn.sort-desc svg {
            transform: scaleY(-1);
        }
        .shop-price-filter {
            position: relative;
        }
        .shop-max-price-input {
            width: 80px;
            height: 28px;
            border-radius: 6px;
            background: rgba(255,255,255,0.08);
            border: 1px solid rgba(255,255,255,0.15);
            color: #e5e7eb;
            font-size: 0.72rem;
            padding: 0 8px;
            outline: none;
            transition: all 0.2s;
            -moz-appearance: textfield;
        }
        .shop-max-price-input::-webkit-outer-spin-button,
        .shop-max-price-input::-webkit-inner-spin-button {
            -webkit-appearance: none;
            margin: 0;
        }
        .shop-max-price-input::placeholder {
            color: #6b7280;
        }
        .shop-max-price-input:focus {
            border-color: rgba(168,85,247,0.5);
            background: rgba(255,255,255,0.12);
        }
        @media (max-width: 480px) {
            .shop-carousel-controls {
                gap: 4px;
            }
            .shop-max-price-input {
                width: 64px;
                font-size: 0.68rem;
            }
        }
        
        .media-carousel {
            position: relative;
            margin: 16px 0;
            max-width: 100%;
        }
        .media-carousel-header {
            display: flex;
            align-items: center;
            margin-bottom: 8px;
        }
        .media-carousel-title {
            font-size: 0.85rem;
            color: #9ca3af;
            font-weight: 500;
        }

        .media-carousel-track {
            display: flex;
            gap: 12px;
            overflow-x: auto;
            scroll-behavior: smooth;
            scroll-snap-type: x mandatory;
            scrollbar-width: thin;
            scrollbar-color: rgba(168,85,247,0.4) transparent;
            padding: 4px 0 4px 0;
        }
        /* Scroll-snap für Cards */
        .media-carousel-track > * {
            scroll-snap-align: start;
        }
        .media-carousel-track::-webkit-scrollbar {
            height: 6px;
        }
        .media-carousel-track::-webkit-scrollbar-track {
            background: transparent;
        }
        .media-carousel-track::-webkit-scrollbar-thumb {
            background: rgba(168,85,247,0.4);
            border-radius: 3px;
        }
        .media-carousel-track::-webkit-scrollbar-thumb:hover {
            background: rgba(168,85,247,0.6);
        }
        
        /* Product Card in Carousel */
        .product-card {
            flex: 0 0 160px;
            min-width: 160px;
            background: linear-gradient(135deg, rgba(30,30,40,0.9), rgba(40,40,55,0.8));
            border: 1px solid rgba(255,255,255,0.1);
            border-radius: 12px;
            overflow: hidden;
            text-decoration: none;
            transition: all 0.25s ease;
            cursor: pointer;
        }
        .product-card:hover {
            transform: translateY(-4px);
            border-color: rgba(168,85,247,0.5);
            box-shadow: 0 8px 24px rgba(0,0,0,0.4);
        }
        .product-card-image {
            width: 100%;
            height: 120px;
            background: rgba(0,0,0,0.3);
            display: flex;
            align-items: center;
            justify-content: center;
            overflow: hidden;
        }
        .product-card-image img {
            width: 100%;
            height: 100%;
            object-fit: contain;
            padding: 8px;
        }
        .product-card-image .placeholder-icon {
            font-size: 2rem;
            opacity: 0.5;
        }
        .product-card-info {
            padding: 10px;
        }
        .product-card-title {
            font-size: 0.8rem;
            font-weight: 500;
            color: #fff;
            line-clamp: 2;
            -webkit-line-clamp: 2;
            display: -webkit-box;
            -webkit-box-orient: vertical;
            overflow: hidden;
            line-height: 1.3;
            min-height: 2.6em;
        }
        .product-card-price {
            font-size: 0.9rem;
            font-weight: 700;
            color: #4ade80;
            margin-top: 6px;
        }
        .product-card-shop {
            font-size: 0.7rem;
            color: #9ca3af;
            margin-top: 4px;
            display: flex;
            align-items: center;
            gap: 4px;
        }
        .product-card-shop img {
            width: 14px;
            height: 14px;
            border-radius: 2px;
        }
        
        /* Recipe Card in Carousel */
        .recipe-card {
            flex: 0 0 180px;
            min-width: 180px;
            background: linear-gradient(135deg, rgba(30,35,40,0.95), rgba(40,45,55,0.9));
            border: 1px solid rgba(255,255,255,0.1);
            border-radius: 12px;
            overflow: hidden;
            text-decoration: none;
            transition: all 0.25s ease;
            cursor: pointer;
        }
        .recipe-card:hover {
            transform: translateY(-4px);
            border-color: rgba(251,146,60,0.6);
            box-shadow: 0 8px 24px rgba(251,146,60,0.2);
        }
        .recipe-card-image {
            width: 100%;
            height: 110px;
            background: rgba(0,0,0,0.3);
            display: flex;
            align-items: center;
            justify-content: center;
            overflow: hidden;
        }
        .recipe-card-image img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }
        .recipe-card-image .placeholder-icon {
            font-size: 2.5rem;
            opacity: 0.5;
        }
        .recipe-card-info {
            padding: 10px;
        }
        .recipe-card-title {
            font-size: 0.8rem;
            font-weight: 600;
            color: #fff;
            line-clamp: 2;
            -webkit-line-clamp: 2;
            display: -webkit-box;
            -webkit-box-orient: vertical;
            overflow: hidden;
            line-height: 1.3;
            min-height: 2.6em;
        }
        .recipe-card-meta {
            font-size: 0.65rem;
            color: #9ca3af;
            margin-top: 6px;
            display: flex;
            flex-wrap: wrap;
            gap: 6px;
        }
        .recipe-card-meta span {
            display: flex;
            align-items: center;
            gap: 2px;
        }
        .recipe-time { color: #fbbf24; }
        .recipe-servings { color: #60a5fa; }
        .recipe-difficulty { color: #a78bfa; }
        .recipe-card-source {
            font-size: 0.7rem;
            color: #6b7280;
            margin-top: 6px;
            display: flex;
            align-items: center;
            gap: 4px;
        }
        .recipe-card-source img {
            width: 14px;
            height: 14px;
            border-radius: 2px;
        }
        .recipe-carousel .media-carousel-title {
            color: #fb923c;
        }
        
        /* Video Card in Carousel */
        .video-card {
            flex: 0 0 200px;
            min-width: 200px;
            background: linear-gradient(135deg, rgba(30,30,40,0.9), rgba(40,40,55,0.8));
            border: 1px solid rgba(255,255,255,0.1);
            border-radius: 12px;
            overflow: hidden;
            text-decoration: none;
            transition: all 0.25s ease;
            cursor: pointer;
        }
        .video-card:hover {
            transform: translateY(-4px);
            border-color: rgba(239,68,68,0.5);
            box-shadow: 0 8px 24px rgba(0,0,0,0.4);
        }
        .video-card-thumbnail {
            width: 100%;
            height: 112px;
            background: rgba(0,0,0,0.5);
            position: relative;
            overflow: hidden;
        }
        .video-card-thumbnail img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }
        .video-card-thumbnail .play-icon {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            width: 40px;
            height: 40px;
            background: rgba(255,0,0,0.9);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            opacity: 0.9;
            transition: all 0.2s;
        }
        .video-card:hover .play-icon {
            transform: translate(-50%, -50%) scale(1.1);
            opacity: 1;
        }
        .video-card-info {
            padding: 10px;
        }
        .video-card-title {
            font-size: 0.8rem;
            font-weight: 500;
            color: #fff;
            line-clamp: 2;
            -webkit-line-clamp: 2;
            display: -webkit-box;
            -webkit-box-orient: vertical;
            overflow: hidden;
            line-height: 1.3;
        }
        .video-card-source {
            font-size: 0.7rem;
            color: #9ca3af;
            margin-top: 4px;
        }
        
        /* Image Card in Carousel */
        .image-card {
            flex: 0 0 160px;
            min-width: 160px;
            height: 160px;
            background: rgba(0,0,0,0.3);
            border: 1px solid rgba(255,255,255,0.1);
            border-radius: 12px;
            overflow: hidden;
            cursor: pointer;
            transition: all 0.25s ease;
            position: relative;
        }
        .image-card:hover {
            transform: scale(1.02);
            border-color: rgba(168,85,247,0.5);
        }
        .image-card img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }
        .image-card-overlay {
            position: absolute;
            bottom: 0;
            left: 0;
            right: 0;
            padding: 6px 8px;
            background: linear-gradient(transparent, rgba(0,0,0,0.8));
            font-size: 0.65rem;
            color: #ccc;
            opacity: 0;
            transition: opacity 0.2s;
        }
        .image-card:hover .image-card-overlay {
            opacity: 1;
        }
        
        /* Mehr anzeigen Button */
        .carousel-more-btn {
            flex: 0 0 160px;
            min-width: 160px;
            align-self: stretch; /* Gleiche Höhe wie Geschwister-Elemente */
            background: rgba(255,255,255,0.05);
            border: 1px dashed rgba(255,255,255,0.2);
            border-radius: 12px;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 8px;
            cursor: pointer;
            transition: all 0.2s;
            color: #9ca3af;
            font-size: 0.75rem;
        }
        .carousel-more-btn:hover {
            background: rgba(255,255,255,0.1);
            color: #fff;
        }
        
        /* ========================================= */
        /* TRAVEL CARD                               */
        /* ========================================= */
        .travel-card {
            flex: 0 0 220px;
            min-width: 220px;
            max-width: 220px;
            background: rgba(20, 20, 35, 0.8);
            border: 1px solid rgba(99, 102, 241, 0.2);
            border-radius: 12px;
            overflow: hidden;
            text-decoration: none;
            color: #e5e7eb;
            transition: all 0.2s ease;
            display: flex;
            flex-direction: column;
        }
        .travel-card:hover {
            border-color: rgba(99, 102, 241, 0.5);
            transform: translateY(-2px);
            box-shadow: 0 4px 15px rgba(99, 102, 241, 0.15);
        }
        .travel-card-image {
            width: 100%;
            height: 120px;
            overflow: hidden;
            background: rgba(99, 102, 241, 0.08);
            display: flex;
            align-items: center;
            justify-content: center;
        }
        .travel-card-image img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }
        .travel-card-image .placeholder-icon {
            font-size: 2.5rem;
            opacity: 0.5;
        }
        .travel-card-info {
            padding: 10px 12px;
            display: flex;
            flex-direction: column;
            gap: 4px;
            flex: 1;
        }
        .travel-card-title {
            font-size: 0.8rem;
            font-weight: 600;
            color: #e5e7eb;
            line-height: 1.3;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
        }
        .travel-card-desc {
            font-size: 0.7rem;
            color: #9ca3af;
            line-height: 1.3;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
        }
        .travel-card-price {
            font-size: 0.85rem;
            font-weight: 700;
            color: #6366f1;
            margin-top: 2px;
        }
        .travel-card-portal {
            display: flex;
            align-items: center;
            gap: 6px;
            margin-top: auto;
            padding-top: 6px;
        }
        .travel-card-portal img {
            width: 14px;
            height: 14px;
            border-radius: 2px;
        }
        .travel-card-portal span {
            font-size: 0.7rem;
            color: #6b7280;
        }
        
        /* ========================================= */
        /* NEWS CARD                                 */
        /* ========================================= */
        .news-card {
            flex: 0 0 200px;
            min-width: 200px;
            background: linear-gradient(135deg, rgba(30,30,40,0.95), rgba(35,38,50,0.9));
            border: 1px solid rgba(255,255,255,0.1);
            border-radius: 12px;
            overflow: hidden;
            text-decoration: none;
            transition: all 0.25s ease;
            cursor: pointer;
        }
        .news-card:hover {
            transform: translateY(-4px);
            border-color: rgba(107,114,128,0.6);
            box-shadow: 0 8px 24px rgba(0,0,0,0.4);
        }
        .news-card-image {
            width: 100%;
            height: 100px;
            background: rgba(0,0,0,0.3);
            display: flex;
            align-items: center;
            justify-content: center;
            overflow: hidden;
            position: relative;
        }
        .news-card-image img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }
        .news-card-type-badge {
            position: absolute;
            top: 6px;
            left: 6px;
            background: rgba(107,114,128,0.85);
            color: #fff;
            font-size: 0.55rem;
            font-weight: 700;
            padding: 2px 6px;
            border-radius: 4px;
            letter-spacing: 0.5px;
        }
        .news-card-info {
            padding: 10px;
        }
        .news-card-title {
            font-size: 0.8rem;
            font-weight: 600;
            color: #fff;
            line-clamp: 2;
            -webkit-line-clamp: 2;
            display: -webkit-box;
            -webkit-box-orient: vertical;
            overflow: hidden;
            line-height: 1.3;
            min-height: 2.1em;
        }
        .news-card-desc {
            font-size: 0.65rem;
            color: #9ca3af;
            margin-top: 4px;
            line-clamp: 2;
            -webkit-line-clamp: 2;
            display: -webkit-box;
            -webkit-box-orient: vertical;
            overflow: hidden;
            line-height: 1.4;
        }
        .news-card-meta {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-top: 6px;
            gap: 4px;
        }
        .news-card-source {
            font-size: 0.65rem;
            color: #6b7280;
            display: flex;
            align-items: center;
            gap: 4px;
        }
        .news-card-source img {
            width: 12px;
            height: 12px;
            border-radius: 2px;
        }
        .news-card-date {
            font-size: 0.6rem;
            color: #6b7280;
            white-space: nowrap;
        }
        .news-carousel .media-carousel-title {
            color: #6b7280;
        }
        
        /* ========================================= */
        /* PODCAST/MUSIC CARD                        */
        /* ========================================= */
        .podcast-card {
            flex: 0 0 180px;
            min-width: 180px;
            background: linear-gradient(135deg, rgba(30,25,50,0.95), rgba(45,30,65,0.9));
            border: 1px solid rgba(139,92,246,0.2);
            border-radius: 12px;
            overflow: hidden;
            text-decoration: none;
            transition: all 0.25s ease;
            cursor: pointer;
        }
        .podcast-card:hover {
            transform: translateY(-4px);
            border-color: rgba(139,92,246,0.6);
            box-shadow: 0 8px 24px rgba(139,92,246,0.15);
        }
        .podcast-card-image {
            width: 100%;
            height: 110px;
            background: linear-gradient(135deg, rgba(88,28,135,0.4), rgba(30,20,50,0.6));
            display: flex;
            align-items: center;
            justify-content: center;
            overflow: hidden;
            position: relative;
        }
        .podcast-card-image img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }
        .podcast-card-play {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            width: 40px;
            height: 40px;
            background: rgba(139,92,246,0.9);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            opacity: 0;
            transition: all 0.2s;
        }
        .podcast-card:hover .podcast-card-play {
            opacity: 1;
            transform: translate(-50%, -50%) scale(1.1);
        }
        .podcast-card-type-badge {
            position: absolute;
            bottom: 6px;
            left: 6px;
            background: rgba(139,92,246,0.85);
            color: #fff;
            font-size: 0.55rem;
            font-weight: 600;
            padding: 2px 6px;
            border-radius: 4px;
        }
        .podcast-card-info {
            padding: 10px;
        }
        .podcast-card-title {
            font-size: 0.8rem;
            font-weight: 600;
            color: #fff;
            line-clamp: 2;
            -webkit-line-clamp: 2;
            display: -webkit-box;
            -webkit-box-orient: vertical;
            overflow: hidden;
            line-height: 1.3;
            min-height: 2.1em;
        }
        .podcast-card-author {
            font-size: 0.7rem;
            color: #c4b5fd;
            margin-top: 3px;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }
        .podcast-card-meta {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-top: 6px;
        }
        .podcast-card-source {
            font-size: 0.65rem;
            color: #6b7280;
            display: flex;
            align-items: center;
            gap: 4px;
        }
        .podcast-card-source img {
            width: 12px;
            height: 12px;
            border-radius: 2px;
        }
        .podcast-card-duration {
            font-size: 0.6rem;
            color: #a78bfa;
        }
        .podcast-carousel .media-carousel-title {
            color: #a78bfa;
        }
        
        /* ========================================= */
        /* MAP EMBED                                 */
        /* ========================================= */
        .map-embed-container {
            margin: 16px 0;
            border-radius: 12px;
            overflow: hidden;
            border: 1px solid rgba(255,255,255,0.1);
            background: rgba(30,30,40,0.9);
        }
        .map-embed-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 10px 14px;
            background: rgba(20,20,30,0.8);
        }
        .map-embed-title {
            font-size: 0.85rem;
            color: #e2e8f0;
            font-weight: 500;
        }
        .map-embed-fullscreen {
            color: #9ca3af;
            transition: color 0.2s;
        }
        .map-embed-fullscreen:hover {
            color: #fff;
        }
        .map-embed-iframe {
            border: none;
            display: block;
        }
        
        /* ========================================= */
        /* SKELETON LOADING                          */
        /* ========================================= */
        .media-skeleton {
            background: linear-gradient(135deg, rgba(30,30,40,0.9), rgba(40,40,55,0.8));
            border: 1px solid rgba(255,255,255,0.05);
            border-radius: 12px;
            overflow: hidden;
            animation: skeletonPulse 1.5s ease-in-out infinite;
        }
        .media-skeleton-image {
            width: 100%;
            height: 110px;
            background: rgba(255,255,255,0.05);
        }
        .media-skeleton-text {
            height: 12px;
            border-radius: 6px;
            background: rgba(255,255,255,0.08);
            margin: 10px;
        }
        .media-skeleton-text.short {
            width: 60%;
        }
        @keyframes skeletonPulse {
            0%, 100% { opacity: 1; }
            50% { opacity: 0.5; }
        }
        
        /* ========================================= */
        /* MEDIA CARD ERROR STATES                   */
        /* ========================================= */
        .media-card-error {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 8px;
            padding: 20px;
            color: #6b7280;
            font-size: 0.75rem;
            text-align: center;
        }
        .media-card-error .retry-btn {
            padding: 4px 12px;
            border-radius: 8px;
            background: rgba(255,255,255,0.1);
            border: 1px solid rgba(255,255,255,0.2);
            color: #9ca3af;
            cursor: pointer;
            font-size: 0.7rem;
            transition: all 0.2s;
        }
        .media-card-error .retry-btn:hover {
            background: rgba(255,255,255,0.2);
            color: #fff;
        }
        
        /* ========================================= */
        /* EMPTY CAROUSEL STATE                      */
        /* ========================================= */
        .media-carousel-empty {
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 24px;
            color: #6b7280;
            font-size: 0.8rem;
            font-style: italic;
        }
        
        /* ========================================= */
        /* WEATHER APP MODAL - Like Calculator/Compass */
        /* ========================================= */
        #weather-modal {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            width: 100%;
            height: 100%;
            z-index: 100000;
            display: none;
            align-items: center;
            justify-content: center;
            background: rgba(0, 0, 0, 0.75);
            backdrop-filter: blur(8px);
            -webkit-backdrop-filter: blur(8px);
            --modal-top-offset: env(safe-area-inset-top, 0px);
            --modal-bottom-offset: calc(env(safe-area-inset-bottom, 0px) + 1rem);
            padding: 1rem;
            padding-top: var(--modal-top-offset);
            padding-bottom: var(--modal-bottom-offset);
            box-sizing: border-box;
            overflow-x: hidden;
            overflow-y: auto;
            animation: weatherModalFadeIn 0.3s ease-out;
        }
        
        @keyframes weatherModalFadeIn {
            from { opacity: 0; transform: scale(0.95); }
            to { opacity: 1; transform: scale(1); }
        }
        
        #weather-modal.active {
            display: flex;
        }
        
        .weather-app-container {
            background: linear-gradient(180deg, rgba(15, 23, 42, 0.98) 0%, rgba(8, 12, 28, 0.99) 100%);
            border: 1px solid rgba(71, 85, 105, 0.35);
            border-radius: 20px;
            width: 100%;
            max-width: 760px;
            max-height: calc(100dvh - var(--modal-top-offset) - var(--modal-bottom-offset));
            overflow: hidden;
            display: flex;
            flex-direction: column;
            box-shadow: 0 24px 64px rgba(0,0,0,0.6);
        }
        @media (min-width: 1100px) {
            .weather-app-container { max-width: 880px; }
        }
        @media (max-width: 600px) {
            #weather-modal {
                padding: 0;
                padding-top: var(--modal-top-offset);
                padding-bottom: var(--modal-bottom-offset);
                align-items: stretch;
            }
            .weather-app-container {
                max-width: 100%;
                max-height: 100%;
                border-radius: 0;
                border: none;
                box-shadow: none;
            }
        }
        
        .weather-app-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 1rem 1.25rem;
            border-bottom: 1px solid rgba(71, 85, 105, 0.3);
            background: rgba(15, 23, 42, 0.5);
        }
        
        .weather-app-title {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            color: #e2e8f0;
            font-weight: 600;
            font-size: 1rem;
        }
        
        .weather-app-icon {
            font-size: 1.25rem;
        }
        
        .weather-app-close {
            width: 32px;
            height: 32px;
            border-radius: 8px;
            background: rgba(71, 85, 105, 0.25);
            border: 1px solid rgba(71, 85, 105, 0.4);
            color: #94a3b8;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.2s ease;
        }
        
        .weather-app-close:hover {
            background: rgba(239, 68, 68, 0.15);
            border-color: rgba(239, 68, 68, 0.4);
            color: #f87171;
        }
        
        .weather-app-close svg {
            width: 16px;
            height: 16px;
        }
        
        .weather-app-content {
            padding: 0;
            overflow-y: auto;
            flex: 1;
            min-height: 0;
        }
        
        .weather-app-content .weather-widget {
            margin: 0;
            border-radius: 0;
            border: none;
            box-shadow: none;
            background: transparent;
        }
        
        /* ========================================= */
        /* WEATHER DAY DETAIL MODAL */
        /* ========================================= */
        #weather-detail-modal {
            position: fixed;
            inset: 0;
            z-index: 200001;
            display: none;
            align-items: center;
            justify-content: center;
            background: rgba(0, 0, 0, 0.85);
            backdrop-filter: blur(12px);
            -webkit-backdrop-filter: blur(12px);
            padding: 1rem;
            animation: fadeIn 0.2s ease-out;
        }
        
        #weather-detail-modal.active {
            display: flex;
        }
        
        .weather-detail-container {
            background: linear-gradient(180deg, rgba(15, 23, 42, 0.98) 0%, rgba(8, 12, 28, 0.99) 100%);
            border: 1px solid rgba(71, 85, 105, 0.4);
            border-radius: 20px;
            width: 500px;
            max-width: 95vw;
            max-height: 85vh;
            overflow: hidden;
            box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6);
        }
        
        .weather-detail-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 1rem 1.25rem;
            border-bottom: 1px solid rgba(71, 85, 105, 0.3);
            background: rgba(15, 23, 42, 0.5);
        }
        
        .weather-detail-header h3 {
            margin: 0;
            font-size: 1.1rem;
            color: #e2e8f0;
            font-weight: 600;
        }
        
        .weather-detail-close {
            width: 32px;
            height: 32px;
            border-radius: 8px;
            background: rgba(71, 85, 105, 0.3);
            border: none;
            color: #94a3b8;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.2s ease;
        }
        
        .weather-detail-close:hover {
            background: rgba(239, 68, 68, 0.2);
            color: #f87171;
        }
        
        .weather-detail-close svg {
            width: 18px;
            height: 18px;
        }
        
        .weather-detail-content {
            padding: 1rem;
            overflow-y: auto;
            max-height: calc(85vh - 80px);
        }
        
        .hourly-forecast {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
            gap: 12px;
        }
        
        .hourly-item {
            background: rgba(15, 23, 42, 0.6);
            border: 1px solid rgba(71, 85, 105, 0.4);
            border-radius: 12px;
            padding: 12px;
            text-align: center;
            display: flex;
            flex-direction: column;
            gap: 6px;
        }
        
        .hourly-time {
            font-size: 0.85rem;
            font-weight: 600;
            color: rgba(255, 255, 255, 0.9);
        }
        
        .hourly-icon {
            font-size: 2.2rem;
            margin: 4px 0;
            filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
        }
        
        .hourly-temp {
            font-size: 1rem;
            font-weight: 600;
            color: #fff;
        }
        
        .hourly-rain {
            font-size: 0.75rem;
            color: #60a5fa;
        }
        
        .hourly-wind {
            font-size: 0.75rem;
            color: rgba(255, 255, 255, 0.6);
        }
        
        @media (max-width: 480px) {
            .hourly-forecast {
                grid-template-columns: repeat(auto-fill, minmax(85px, 1fr));
            }
        }
        
        /* ========================================= */
        /* WEATHER WIDGET - Visual Weather Display  */
        /* ========================================= */
        .weather-widget {
            position: relative;
            background:
                radial-gradient(ellipse at top left, rgba(96,165,250,0.18) 0%, transparent 55%),
                radial-gradient(ellipse at bottom right, rgba(168,85,247,0.15) 0%, transparent 55%),
                linear-gradient(135deg, #1e3a5f 0%, #2d1b4e 55%, #161428 100%);
            border-radius: 20px;
            padding: 22px 24px;
            margin: 16px 0;
            color: white;
            box-shadow: 0 12px 40px rgba(15, 23, 42, 0.5);
            border: 1px solid rgba(255,255,255,0.08);
            max-width: 100%;
            overflow: hidden;
        }
        .weather-widget::before {
            content: "";
            position: absolute;
            inset: 0;
            border-radius: inherit;
            pointer-events: none;
            background: linear-gradient(180deg, rgba(255,255,255,0.06), transparent 40%);
        }
        .weather-widget-header {
            display: flex;
            justify-content: space-between;
            align-items: flex-start;
            margin-bottom: 16px;
        }
        .weather-location {
            display: flex;
            align-items: center;
            gap: 8px;
        }
        .weather-location-icon {
            font-size: 1.2rem;
        }
        .weather-location h3 {
            font-size: 1.4rem;
            font-weight: 600;
            margin: 0;
            color: #fff;
        }
        .weather-location-country {
            font-size: 0.85rem;
            color: rgba(255,255,255,0.6);
            margin-left: 4px;
        }
        .weather-updated {
            font-size: 0.7rem;
            color: rgba(255,255,255,0.4);
        }
        
        /* Weather Warnings */
        .weather-warnings {
            margin-bottom: 16px;
            display: flex;
            flex-direction: column;
            gap: 8px;
        }
        .weather-warning-item {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 10px 14px;
            background: rgba(239, 68, 68, 0.15);
            border: 1px solid rgba(239, 68, 68, 0.3);
            border-radius: 10px;
            color: #fecaca;
            font-size: 0.9rem;
            font-weight: 500;
            animation: warningPulse 2s ease-in-out infinite;
        }
        .weather-warning-item[data-type="storm"] {
            background: rgba(251, 146, 60, 0.15);
            border-color: rgba(251, 146, 60, 0.3);
            color: #fed7aa;
        }
        .weather-warning-item[data-type="ice"],
        .weather-warning-item[data-type="snow"] {
            background: rgba(59, 130, 246, 0.15);
            border-color: rgba(59, 130, 246, 0.3);
            color: #bfdbfe;
        }
        .weather-warning-item[data-type="heat"] {
            background: rgba(239, 68, 68, 0.2);
            border-color: rgba(239, 68, 68, 0.4);
            color: #fca5a5;
        }
        .weather-warning-item[data-type="fog"] {
            background: rgba(156, 163, 175, 0.15);
            border-color: rgba(156, 163, 175, 0.3);
            color: #d1d5db;
        }
        .weather-warning-icon {
            font-size: 1.4rem;
            flex-shrink: 0;
        }
        .weather-warning-message {
            flex: 1;
        }
        @keyframes warningPulse {
            0%, 100% { opacity: 1; }
            50% { opacity: 0.85; }
        }
        
        .weather-current {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 20px;
            margin-bottom: 20px;
            flex-wrap: wrap;
        }
        .weather-main {
            display: flex;
            align-items: center;
            gap: 16px;
        }
        .weather-icon {
            font-size: 4rem;
            line-height: 1;
            filter: drop-shadow(0 4px 8px rgba(0,0,0,0.3));
        }
        .weather-temp-container {
            text-align: left;
        }
        .weather-temp {
            font-size: 3.6rem;
            font-weight: 700;
            line-height: 1;
            letter-spacing: -0.02em;
            background: linear-gradient(135deg, #fff 0%, #c4b5fd 100%);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
            font-variant-numeric: tabular-nums;
        }
        .weather-condition {
            font-size: 1rem;
            color: rgba(255,255,255,0.85);
            margin-top: 4px;
            font-weight: 500;
        }
        .weather-feels-like {
            font-size: 0.82rem;
            color: rgba(255,255,255,0.55);
            margin-top: 2px;
        }
        .weather-details {
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 8px 20px;
            background: rgba(255,255,255,0.04);
            border: 1px solid rgba(255,255,255,0.06);
            border-radius: 12px;
            padding: 12px 16px;
        }
        .weather-detail-item {
            display: flex;
            align-items: center;
            gap: 10px;
            font-size: 0.85rem;
            color: rgba(255,255,255,0.75);
            min-width: 0;
        }
        .weather-detail-icon {
            font-size: 1rem;
            width: 22px;
            text-align: center;
            opacity: 0.9;
        }
        .weather-detail-value {
            font-weight: 600;
            color: #fff;
            font-variant-numeric: tabular-nums;
        }
        .weather-sun-times {
            display: flex;
            flex-wrap: wrap;
            gap: 8px 20px;
            padding-top: 14px;
            border-top: 1px solid rgba(255,255,255,0.08);
            margin-top: 14px;
        }
        .weather-sun-item {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            font-size: 0.8rem;
            color: rgba(255,255,255,0.65);
            font-variant-numeric: tabular-nums;
        }
        .weather-forecast {
            margin-top: 16px;
            padding-top: 16px;
            border-top: 1px solid rgba(255,255,255,0.1);
        }
        .weather-forecast-title {
            font-size: 0.85rem;
            color: rgba(255,255,255,0.5);
            margin-bottom: 12px;
            font-weight: 500;
        }
        .weather-forecast-carousel {
            display: flex;
            gap: 10px;
            overflow-x: auto;
            padding: 4px 0 12px 0;
            scrollbar-width: thin;
            scrollbar-color: rgba(168,85,247,0.5) rgba(255,255,255,0.1);
        }
        .weather-forecast-carousel::-webkit-scrollbar {
            height: 6px;
        }
        .weather-forecast-carousel::-webkit-scrollbar-track {
            background: rgba(255,255,255,0.1);
            border-radius: 3px;
        }
        .weather-forecast-carousel::-webkit-scrollbar-thumb {
            background: rgba(168,85,247,0.5);
            border-radius: 3px;
        }
        .forecast-day {
            background: rgba(255,255,255,0.06);
            backdrop-filter: blur(10px);
            border-radius: 14px;
            padding: 12px 14px;
            min-width: 92px;
            flex: 1;
            text-align: center;
            flex-shrink: 0;
            border: 1px solid rgba(255,255,255,0.08);
            transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
        }
        .forecast-day:hover {
            background: rgba(255,255,255,0.11);
            border-color: rgba(168,85,247,0.35);
            transform: translateY(-2px);
        }
        .forecast-day.today {
            background: linear-gradient(160deg, rgba(168,85,247,0.28), rgba(96,165,250,0.14));
            border-color: rgba(168,85,247,0.5);
            box-shadow: inset 0 1px 0 rgba(255,255,255,0.1);
        }
        .forecast-day-name {
            display: block;
            font-size: 0.75rem;
            font-weight: 600;
            margin-bottom: 8px;
            color: rgba(255,255,255,0.8);
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }
        .forecast-day-icon {
            font-size: 1.8rem;
            margin: 6px 0;
            line-height: 1;
        }
        .forecast-day-temps {
            display: flex;
            justify-content: center;
            gap: 8px;
            margin: 8px 0 4px 0;
        }
        .forecast-temp-high {
            font-weight: 600;
            font-size: 0.95rem;
            color: #fff;
        }
        .forecast-temp-low {
            font-size: 0.95rem;
            color: rgba(255,255,255,0.5);
        }
        .forecast-rain-chance {
            font-size: 0.7rem;
            color: #60a5fa;
            margin-top: 4px;
        }
        @media (max-width: 480px) {
            .weather-widget {
                padding: 16px;
            }
            .weather-temp {
                font-size: 2.8rem;
            }
            .weather-icon {
                font-size: 3rem;
            }
            .weather-details {
                grid-template-columns: 1fr;
            }
            .forecast-day {
                min-width: 75px;
                padding: 10px 12px;
            }
        }

        /* Desktop layout — make use of extra horizontal space */
        @media (min-width: 768px) {
            .weather-app-content {
                padding: 8px 4px;
            }
            .weather-app-content .weather-widget {
                padding: 24px 28px;
            }
            .weather-current {
                display: grid;
                grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
                align-items: stretch;
                gap: 24px;
            }
            .weather-main {
                gap: 22px;
            }
            .weather-icon {
                font-size: 5rem;
            }
            .weather-temp {
                font-size: 4rem;
            }
            .weather-details {
                align-self: stretch;
                grid-template-columns: repeat(2, minmax(0, 1fr));
                gap: 10px 22px;
                padding: 16px 20px;
            }
            .weather-sun-times {
                gap: 10px 28px;
            }
            .weather-forecast-carousel {
                display: grid;
                grid-template-columns: repeat(7, minmax(0, 1fr));
                gap: 10px;
                overflow: visible;
                padding-bottom: 4px;
            }
            .forecast-day {
                min-width: 0;
                flex: initial;
            }
        }

        @media (min-width: 1100px) {
            .weather-app-content .weather-widget {
                padding: 28px 32px;
            }
            .weather-temp {
                font-size: 4.4rem;
            }
            .weather-icon {
                font-size: 5.4rem;
            }
            .forecast-day-icon {
                font-size: 2rem;
            }
        }
        
        /* Weather Loading State */
        .weather-loading .weather-temp-loading,
        .weather-loading .weather-detail-value {
            color: rgba(255,255,255,0.3);
        }
        .weather-loading .weather-condition {
            color: rgba(255,255,255,0.5);
        }
        .weather-icon-loading {
            display: flex;
            align-items: center;
            justify-content: center;
        }
        .weather-spinner {
            width: 48px;
            height: 48px;
            border: 3px solid rgba(255,255,255,0.1);
            border-top-color: #a855f7;
            border-radius: 50%;
            animation: weather-spin 1s linear infinite;
        }
        @keyframes weather-spin {
            to { transform: rotate(360deg); }
        }
        .forecast-day-loading {
            opacity: 0.5;
        }
        .weather-loaded {
            animation: weather-fade-in 0.3s ease-out;
        }
        @keyframes weather-fade-in {
            from { opacity: 0.7; transform: scale(0.98); }
            to { opacity: 1; transform: scale(1); }
        }
        
        /* Weather Error State */
        .weather-error {
            text-align: center;
            padding: 32px 24px;
        }
        .weather-error-content {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 12px;
        }
        .weather-error-icon {
            font-size: 2rem;
        }
        .weather-error p {
            color: rgba(255,255,255,0.7);
            margin: 0;
        }
        .weather-retry-btn {
            margin-top: 8px;
            padding: 8px 16px;
            background: rgba(168, 85, 247, 0.2);
            border: 1px solid rgba(168, 85, 247, 0.4);
            border-radius: 8px;
            color: #a855f7;
            cursor: pointer;
            transition: all 0.2s;
        }
        .weather-retry-btn:hover {
            background: rgba(168, 85, 247, 0.3);
            border-color: rgba(168, 85, 247, 0.6);
        }

        /* ============================================================ */
        /* WEATHER WIDGET — Light Theme Overrides                       */
        /* ============================================================ */
        html.aion-chat-page.theme-light .weather-widget {
            background:
                radial-gradient(ellipse at top left, rgba(139, 92, 246, 0.10) 0%, transparent 55%),
                radial-gradient(ellipse at bottom right, rgba(59, 130, 246, 0.08) 0%, transparent 55%),
                linear-gradient(135deg, #ffffff 0%, #faf9ff 55%, #f5f3ff 100%);
            color: #0f172a;
            border: 1px solid rgba(124, 58, 237, 0.15);
            box-shadow: 0 10px 32px rgba(99, 102, 241, 0.10);
        }
        html.aion-chat-page.theme-light .weather-widget::before {
            background: linear-gradient(180deg, rgba(255,255,255,0.6), transparent 40%);
        }
        html.aion-chat-page.theme-light .weather-location h3 { color: #0f172a; }
        html.aion-chat-page.theme-light .weather-location-country { color: #64748b; }
        html.aion-chat-page.theme-light .weather-location-icon { color: #7c3aed; }
        html.aion-chat-page.theme-light .weather-updated { color: #94a3b8; }

        html.aion-chat-page.theme-light .weather-temp {
            background: linear-gradient(135deg, #0f172a 0%, #7c3aed 100%);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
        }
        html.aion-chat-page.theme-light .weather-condition { color: #334155; font-weight: 500; }
        html.aion-chat-page.theme-light .weather-feels-like { color: #64748b; }
        html.aion-chat-page.theme-light .weather-icon {
            filter: drop-shadow(0 4px 10px rgba(124, 58, 237, 0.20));
        }

        html.aion-chat-page.theme-light .weather-details {
            background: rgba(124, 58, 237, 0.04);
            border-color: rgba(124, 58, 237, 0.10);
        }
        html.aion-chat-page.theme-light .weather-detail-item { color: #475569; }
        html.aion-chat-page.theme-light .weather-detail-value { color: #0f172a; }
        html.aion-chat-page.theme-light .weather-detail-icon { opacity: 1; }

        html.aion-chat-page.theme-light .weather-sun-times {
            border-top-color: rgba(15, 23, 42, 0.08);
        }
        html.aion-chat-page.theme-light .weather-sun-item { color: #64748b; }

        html.aion-chat-page.theme-light .weather-forecast {
            border-top-color: rgba(15, 23, 42, 0.08);
        }
        html.aion-chat-page.theme-light .weather-forecast-title { color: #94a3b8; }
        html.aion-chat-page.theme-light .weather-forecast-carousel {
            scrollbar-color: rgba(124, 58, 237, 0.4) rgba(15, 23, 42, 0.05);
        }
        html.aion-chat-page.theme-light .weather-forecast-carousel::-webkit-scrollbar-track {
            background: rgba(15, 23, 42, 0.05);
        }
        html.aion-chat-page.theme-light .weather-forecast-carousel::-webkit-scrollbar-thumb {
            background: rgba(124, 58, 237, 0.4);
        }
        html.aion-chat-page.theme-light .forecast-day {
            background: rgba(255, 255, 255, 0.7);
            border-color: rgba(15, 23, 42, 0.08);
            backdrop-filter: none;
        }
        html.aion-chat-page.theme-light .forecast-day:hover {
            background: rgba(124, 58, 237, 0.06);
            border-color: rgba(124, 58, 237, 0.30);
        }
        html.aion-chat-page.theme-light .forecast-day.today {
            background: linear-gradient(160deg, rgba(124, 58, 237, 0.14), rgba(59, 130, 246, 0.08));
            border-color: rgba(124, 58, 237, 0.35);
            box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
        }
        html.aion-chat-page.theme-light .forecast-day-name { color: #64748b; }
        html.aion-chat-page.theme-light .forecast-temp-high { color: #0f172a; }
        html.aion-chat-page.theme-light .forecast-temp-low { color: #94a3b8; }
        html.aion-chat-page.theme-light .forecast-rain-chance { color: #2563eb; }

        html.aion-chat-page.theme-light .weather-warning-item {
            background: rgba(239, 68, 68, 0.08);
            border-color: rgba(239, 68, 68, 0.25);
            color: #b91c1c;
        }
        html.aion-chat-page.theme-light .weather-warning-item[data-type="storm"] {
            background: rgba(251, 146, 60, 0.10);
            border-color: rgba(251, 146, 60, 0.30);
            color: #c2410c;
        }
        html.aion-chat-page.theme-light .weather-warning-item[data-type="ice"],
        html.aion-chat-page.theme-light .weather-warning-item[data-type="snow"] {
            background: rgba(59, 130, 246, 0.08);
            border-color: rgba(59, 130, 246, 0.30);
            color: #1d4ed8;
        }
        html.aion-chat-page.theme-light .weather-warning-item[data-type="heat"] {
            background: rgba(239, 68, 68, 0.12);
            border-color: rgba(239, 68, 68, 0.35);
            color: #b91c1c;
        }
        html.aion-chat-page.theme-light .weather-warning-item[data-type="fog"] {
            background: rgba(100, 116, 139, 0.08);
            border-color: rgba(100, 116, 139, 0.25);
            color: #475569;
        }

        html.aion-chat-page.theme-light .weather-loading .weather-temp-loading,
        html.aion-chat-page.theme-light .weather-loading .weather-detail-value {
            color: rgba(15, 23, 42, 0.3);
        }
        html.aion-chat-page.theme-light .weather-loading .weather-condition {
            color: rgba(15, 23, 42, 0.5);
        }
        html.aion-chat-page.theme-light .weather-spinner {
            border-color: rgba(15, 23, 42, 0.08);
            border-top-color: #7c3aed;
        }
        html.aion-chat-page.theme-light .weather-error p { color: #475569; }
        html.aion-chat-page.theme-light .weather-retry-btn {
            background: rgba(124, 58, 237, 0.10);
            border-color: rgba(124, 58, 237, 0.30);
            color: #7c3aed;
        }
        html.aion-chat-page.theme-light .weather-retry-btn:hover {
            background: rgba(124, 58, 237, 0.18);
            border-color: rgba(124, 58, 237, 0.50);
        }

        /* Legacy Shop Links - keep for fallback */
        .ai-message-content .shop-links-container {
            max-width: 600px;
        }
        .ai-message-content .shop-link-card {
            text-decoration: none !important;
        }
        .ai-message-content .shop-link-card:hover {
            transform: translateY(-2px);
            box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
        }
        .ai-message-content .shop-link-card h4 {
            font-size: 0.95rem;
        }
        .ai-message-content .shop-link-card .line-clamp-2 {
            display: -webkit-box;
            -webkit-line-clamp: 2;
            line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
        }
        
        .ai-message-content .video-link {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            padding: 8px 16px;
            background: rgba(255, 0, 0, 0.1);
            border: 1px solid rgba(255, 0, 0, 0.3);
            border-radius: 8px;
            color: #ff4444;
            text-decoration: none;
            margin: 8px 0;
            transition: all 0.2s ease;
        }
        .ai-message-content .video-link:hover {
            background: rgba(255, 0, 0, 0.2);
            transform: translateY(-2px);
        }
        
        /* PDF/Dokument-Links in Chat-Nachrichten */
        .ai-message-content .document-link {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            padding: 10px 16px;
            background: rgba(59, 130, 246, 0.1);
            border: 1px solid rgba(59, 130, 246, 0.3);
            border-radius: 8px;
            color: #60a5fa;
            text-decoration: none;
            margin: 8px 4px;
            transition: all 0.2s ease;
        }
        .ai-message-content .document-link:hover {
            background: rgba(59, 130, 246, 0.2);
            transform: translateY(-2px);
        }

        /* Global: ensure chat container has padding so first letters are not clipped
           and reserve bottom space for the input area */
        #chat-container {
            padding-left: 0.5rem; /* ~12px to avoid clipping at the left edge */
            padding-right: 0.5rem;
            box-sizing: border-box;
            scroll-padding-bottom: calc(var(--chat-input-height, 80px) + 24px);
        }

        @media (min-width: 640px) {
            #chat-container,
            #analysis-container {
                padding-top: 0.75rem;
                scroll-padding-top: 1rem;
            }
        }

        #chat-container .chat-welcome-placeholder {
            box-sizing: border-box;
            min-height: 100%;
            transition: transform 0.22s ease, padding-bottom 0.22s ease;
        }

        /* Global rounding for all chat bubbles and wrappers */
        .ai-message-wrapper, .user-message-wrapper, .ai-message-content, .user-message, .message-bubble, .message-bubble-user, .message-bubble-ai {
            border-radius: 20px !important;
        }
        
        /* Message text should not have forced border-radius */
        .message-text {
            border-radius: 0 !important;
        }

        /* Ensure last items are not hidden behind the input */
        .ai-message-wrapper, .user-message-wrapper {
            scroll-margin-bottom: calc(var(--chat-input-height, 80px) + 24px) !important;
        }
        
        /* Elegant custom scrollbar for chat */
        #chat-container::-webkit-scrollbar {
            width: 6px;
        }
        #chat-container::-webkit-scrollbar-track {
            background: rgba(30, 41, 59, 0.3);
            border-radius: 3px;
        }
        #chat-container::-webkit-scrollbar-thumb {
            background: linear-gradient(180deg, rgba(139, 92, 246, 0.4), rgba(99, 102, 241, 0.3));
            border-radius: 3px;
            transition: background 0.2s ease;
        }
        #chat-container::-webkit-scrollbar-thumb:hover {
            background: linear-gradient(180deg, rgba(139, 92, 246, 0.6), rgba(99, 102, 241, 0.5));
        }

        /* Bottom sentinel (hidden) */
        .messages-bottom-sentinel {
            width: 1px;
            height: 1px;
            visibility: hidden;
            pointer-events: none;
        }
        .ai-message-content .document-link::before {
            content: '📔';
            font-size: 1.2em;
        }
        
        /* Audio/Podcast-Links in Chat-Nachrichten */
        .ai-message-content .audio-link {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            padding: 10px 16px;
            background: rgba(30, 215, 96, 0.1);
            border: 1px solid rgba(30, 215, 96, 0.3);
            border-radius: 8px;
            color: #1ed760;
            text-decoration: none;
            margin: 8px 4px;
            transition: all 0.2s ease;
        }
        .ai-message-content .audio-link:hover {
            background: rgba(30, 215, 96, 0.2);
            transform: translateY(-2px);
        }
        .ai-message-content .audio-link.spotify {
            background: rgba(30, 215, 96, 0.1);
            border-color: rgba(30, 215, 96, 0.3);
            color: #1ed760;
        }
        .ai-message-content .audio-link.apple {
            background: rgba(255, 45, 85, 0.1);
            border-color: rgba(255, 45, 85, 0.3);
            color: #ff2d55;
        }
        .ai-message-content .audio-link.youtube {
            background: rgba(255, 0, 0, 0.1);
            border-color: rgba(255, 0, 0, 0.3);
            color: #ff4444;
        }
        .ai-message-content .audio-link.soundcloud {
            background: rgba(255, 136, 0, 0.1);
            border-color: rgba(255, 136, 0, 0.3);
            color: #ff8800;
        }
        
        /* Map/Standort-Links in Chat-Nachrichten */
        .ai-message-content .map-link {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            padding: 10px 16px;
            background: rgba(34, 197, 94, 0.1);
            border: 1px solid rgba(34, 197, 94, 0.3);
            border-radius: 8px;
            color: #22c55e;
            text-decoration: none;
            margin: 8px 4px;
            transition: all 0.2s ease;
        }
        .ai-message-content .map-link:hover {
            background: rgba(34, 197, 94, 0.2);
            transform: translateY(-2px);
        }
        .ai-message-content .map-link.google {
            background: rgba(66, 133, 244, 0.1);
            border-color: rgba(66, 133, 244, 0.3);
            color: #4285f4;
        }
        .ai-message-content .map-link.osm {
            background: rgba(124, 179, 66, 0.1);
            border-color: rgba(124, 179, 66, 0.3);
            color: #7cb342;
        }
        
        /* Code/GitHub-Links in Chat-Nachrichten */
        .ai-message-content .code-link {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            padding: 10px 16px;
            background: rgba(139, 92, 246, 0.1);
            border: 1px solid rgba(139, 92, 246, 0.3);
            border-radius: 8px;
            color: #a78bfa;
            text-decoration: none;
            margin: 8px 4px;
            transition: all 0.2s ease;
            font-family: 'JetBrains Mono', monospace;
        }
        .ai-message-content .code-link:hover {
            background: rgba(139, 92, 246, 0.2);
            transform: translateY(-2px);
        }
        .ai-message-content .code-link.github {
            background: rgba(36, 41, 46, 0.3);
            border-color: rgba(255, 255, 255, 0.2);
            color: #f0f6fc;
        }
        .ai-message-content .code-link.gist {
            background: rgba(49, 39, 131, 0.2);
            border-color: rgba(121, 184, 255, 0.3);
            color: #79b8ff;
        }
        
        /* Chart-Embed für LightweightCharts */
        .ai-message-content .chart-embed {
            width: 100%;
            height: 350px;
            background: rgba(15, 23, 42, 0.8);
            border: 1px solid rgba(139, 92, 246, 0.3);
            border-radius: 12px;
            margin: 16px 0;
            overflow: hidden;
            position: relative;
        }
        .ai-message-content .chart-embed .chart-loading {
            display: flex;
            align-items: center;
            justify-content: center;
            height: 100%;
            color: #a78bfa;
            font-size: 1.1rem;
            animation: pulse 1.5s infinite;
        }
        @keyframes pulse {
            0%, 100% { opacity: 1; }
            50% { opacity: 0.5; }
        }
        .ai-message-content .chart-embed .chart-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 8px 12px;
            background: rgba(139, 92, 246, 0.1);
            border-bottom: 1px solid rgba(139, 92, 246, 0.2);
        }
        .ai-message-content .chart-embed .chart-symbol {
            font-weight: 600;
            color: #a78bfa;
            font-size: 0.9rem;
        }
        .ai-message-content .chart-embed .chart-timeframe {
            font-size: 0.8rem;
            color: #94a3b8;
            padding: 2px 8px;
            background: rgba(148, 163, 184, 0.1);
            border-radius: 4px;
        }
        .ai-message-content .chart-embed .chart-container {
            height: calc(100% - 40px);
        }
        
        .avatar-glow {
            position: relative;
            transition: transform 0.2s ease;
            /* make a subtle padded background so transparent avatars remain visible */
            padding: 4px; /* space between image and outer glow */
            border-radius: 50%;
            background: linear-gradient(180deg, rgba(15,17,28,0.55), rgba(12,14,22,0.55));
            border: 1px solid rgba(255,255,255,0.03);
            box-shadow: 0 6px 18px rgba(2,6,23,0.45);
        }
        .avatar-glow::before {
            /* subtle glow effect on hover using box-shadow */
            content: '';
            position: absolute;
            inset: -2px;
            border-radius: 50%;
            box-shadow: 0 0 0 1px rgba(168, 85, 247, 0.3);
            opacity: 0;
            transition: box-shadow 0.3s ease, opacity 0.3s ease;
            z-index: -1;
            pointer-events: none;
        }
        .avatar-glow:hover::before,
        .avatar-glow.open::before {
            /* subtle glow on hover */
            opacity: 1;
            box-shadow: 0 0 8px rgba(168, 85, 247, 0.5), 0 0 0 1px rgba(168, 85, 247, 0.4);
        }
        .avatar-glow:hover {
            transform: scale(1.05);
        }
        .avatar-glow::after {
            /* subtle circular background behind the avatar (helps with transparent images) */
            content: '';
            position: absolute;
            inset: 0;
            border-radius: 50%;
            background: radial-gradient(circle at 40% 30%, rgba(255,255,255,0.03), rgba(15,23,42,0.7));
            z-index: -2;
            pointer-events: none;
        }
        @keyframes spin-glow {
            from { transform: rotate(0deg); }
            to { transform: rotate(360deg); }
        }
        /* PAGE-SPECIFIC: Transparenter Glaseffekt fuer Chat-Container */
        /* Gleicher Stil wie der Loader - semi-transparent mit Blur */
        /* Keine abgerundeten Ecken fuer Aion Chat - volle Flaeche nutzen */
        .glass-card {
            background: rgba(2, 6, 23, 0.72) !important;
            backdrop-filter: blur(20px) !important;
            -webkit-backdrop-filter: blur(20px) !important;
            border: none !important;
            border-radius: 0 !important;
            box-shadow: none !important;
        }
        
        /* ============================================ */
        /* CHAT MESSAGE STYLES - Einheitlich & Modern  */
        /* ============================================ */
        
        /* User Message Bubble - Elegant abgerundet */
        .user-chat-message {
            flex: 0 1 auto !important;
            width: auto !important;
            max-width: 85%;
            margin-left: auto;
        }
        @media (max-width: 640px) {
            .user-chat-message {
                max-width: 92%;
            }
        }
        .user-message-bubble {
            background: linear-gradient(135deg, rgba(124, 58, 237, 0.18) 0%, rgba(99, 102, 241, 0.12) 50%, rgba(59, 130, 246, 0.10) 100%);
            border: 1px solid rgba(139, 92, 246, 0.3);
            border-radius: 20px;
            padding: 12px 16px;
            overflow: hidden;
            box-shadow: 
                0 4px 16px rgba(0, 0, 0, 0.2),
                0 0 0 1px rgba(139, 92, 246, 0.05) inset,
                0 1px 0 rgba(255, 255, 255, 0.03) inset;
            backdrop-filter: blur(8px);
            -webkit-backdrop-filter: blur(8px);
            transition: all 0.2s ease;
        }
        .user-message-bubble:hover {
            border-color: rgba(139, 92, 246, 0.5);
            box-shadow: 
                0 6px 20px rgba(0, 0, 0, 0.25),
                0 0 20px rgba(139, 92, 246, 0.08),
                0 0 0 1px rgba(139, 92, 246, 0.1) inset;
        }
        .user-message-expand-toggle {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            margin-top: 8px;
            padding: 4px 0;
            border: 0;
            background: transparent;
            color: rgba(196, 181, 253, 0.95);
            font-size: 13px;
            font-weight: 600;
            line-height: 1.2;
            cursor: pointer;
            transition: color 0.16s ease, opacity 0.16s ease;
        }
        .user-message-expand-toggle:hover,
        .user-message-expand-toggle:focus-visible {
            color: #ddd6fe;
            outline: none;
        }
        .user-message-expand-toggle svg {
            width: 14px;
            height: 14px;
            transition: transform 0.18s ease;
        }
        .user-message-expand-toggle[aria-expanded="true"] svg {
            transform: rotate(180deg);
        }
        
        /* AI Message Bubble - Clean ohne Card */
        .ai-message-bubble {
            background: transparent;
            border: 1px solid transparent;
            border-radius: 16px;
            padding: 13px 17px;
            box-shadow: none;
            backdrop-filter: none;
            -webkit-backdrop-filter: none;
            transition: background 0.2s ease, border-color 0.2s ease;
        }
        .ai-message-bubble:hover {
            background: rgba(255, 255, 255, 0.03);
            border-color: rgba(71, 85, 105, 0.25);
        }

        /* Message Action Bar (ChatGPT-style) */
        .share-popup {
            position: fixed;
            z-index: 9999;
            background: #1e1b2e;
            border: 1px solid rgba(139, 92, 246, 0.25);
            border-radius: 10px;
            padding: 6px;
            min-width: 190px;
            box-shadow: 0 8px 24px rgba(0,0,0,0.4);
            transition: opacity 0.12s ease;
        }
        .share-popup-item {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 8px 10px;
            border-radius: 7px;
            cursor: pointer;
            color: #cbd5e1;
            font-size: 13px;
            transition: background 0.12s, color 0.12s;
        }
        .share-popup-item:hover {
            background: rgba(139, 92, 246, 0.15);
            color: #e2d9f3;
        }
        .share-popup-item svg {
            width: 16px;
            height: 16px;
            flex-shrink: 0;
        }
        .share-popup-item[data-share="discord"] {
            color: #7289da;
        }
        .share-popup-item[data-share="discord"]:hover {
            background: rgba(114, 137, 218, 0.15);
            color: #99aaf5;
        }
        .share-popup-divider {
            height: 1px;
            background: rgba(139, 92, 246, 0.15);
            margin: 4px 0;
        }
        .share-popup-discord-btn {
            color: #7289da !important;
        }
        .share-popup-discord-btn:hover {
            background: rgba(114, 137, 218, 0.15) !important;
            color: #99aaf5 !important;
        }
        .share-popup-arrow {
            width: 14px !important;
            height: 14px !important;
            margin-left: auto;
            flex-shrink: 0;
            opacity: 0.6;
        }
        .share-popup-channel-list {
            border-top: 1px solid rgba(139, 92, 246, 0.15);
            margin-top: 4px;
            padding-top: 4px;
            max-height: 200px;
            overflow-y: auto;
        }
        .share-popup-channel-loading {
            padding: 8px 10px;
            font-size: 12px;
            color: #64748b;
        }
        .share-popup-category {
            padding: 6px 10px 3px;
            font-size: 10px;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.06em;
            color: #64748b;
            user-select: none;
        }
        .share-popup-channel {
            padding: 7px 10px;
            border-radius: 7px;
            cursor: pointer;
            font-size: 12px;
            color: #94a3b8;
            transition: background 0.1s, color 0.1s;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        .share-popup-channel:hover {
            background: rgba(139, 92, 246, 0.15);
            color: #e2d9f3;
        }
        html.aion-chat-page.theme-light .share-popup-channel {
            color: #374151;
        }
        html.aion-chat-page.theme-light .share-popup-channel:hover {
            background: rgba(139, 92, 246, 0.08);
            color: #1f2937;
        }
        html.aion-chat-page.theme-light .share-popup {
            background: #f8f7ff;
            border-color: rgba(109, 40, 217, 0.2);
            box-shadow: 0 8px 24px rgba(0,0,0,0.12);
        }
        html.aion-chat-page.theme-light .share-popup-item {
            color: #374151;
        }
        html.aion-chat-page.theme-light .share-popup-item:hover {
            background: rgba(139, 92, 246, 0.08);
            color: #1f2937;
        }
        html.aion-chat-page.theme-light .share-popup-divider {
            background: rgba(109, 40, 217, 0.12);
        }

        .msg-action-bar {
            display: flex;
            align-items: center;
            gap: 2px;
            margin-top: 10px;
            padding-top: 6px;
            opacity: 1;
        }
        .msg-action-bar > .sources-container {
            margin-left: 12px;
        }
        .msg-meta-row > .sources-container {
            margin-top: 0;
            padding-top: 0;
            border-top: none;
            margin-left: 8px;
        }
        .msg-action-btn {
            display: flex;
            align-items: center;
            justify-content: center;
            width: 32px;
            height: 32px;
            border-radius: 8px;
            border: none;
            background: transparent;
            color: #94a3b8;
            cursor: pointer;
            transition: background 0.15s, color 0.15s;
            padding: 0;
        }
        .msg-action-btn svg {
            width: 16px;
            height: 16px;
        }
        .msg-action-btn:hover {
            background: rgba(139, 92, 246, 0.12);
            color: #c4b5fd;
        }
        .msg-action-btn.active {
            color: #a78bfa;
        }
        .msg-action-btn.active:hover {
            background: rgba(139, 92, 246, 0.15);
        }
        @media (hover: none) {
            .msg-action-btn:not(.active):hover {
                background: transparent;
                color: #94a3b8;
            }
        }

        /* Quellen-Button im Action Bar (neben Weiterleiten) */
        .msg-sources-btn {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            height: 32px;
            padding: 0 10px 0 6px;
            margin-left: 4px;
            border-radius: 8px;
            border: 1px solid rgba(139, 92, 246, 0.25);
            background: rgba(139, 92, 246, 0.08);
            color: #c4b5fd;
            font-size: 12px;
            font-weight: 500;
            cursor: pointer;
            transition: background 0.15s, border-color 0.15s, color 0.15s;
        }
        .msg-sources-btn:hover {
            background: rgba(139, 92, 246, 0.18);
            border-color: rgba(139, 92, 246, 0.45);
            color: #ddd6fe;
        }
        .msg-source-icons-stack {
            display: inline-flex;
            align-items: center;
        }
        .msg-source-icons-stack .msg-source-icon {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 18px;
            height: 18px;
            border-radius: 50%;
            background: #1e293b;
            border: 1.5px solid #0f172a;
            font-size: 10px;
            font-weight: 700;
            color: #cbd5e1;
            overflow: hidden;
            margin-left: -5px;
        }
        .msg-source-icons-stack .msg-source-icon:first-child {
            margin-left: 0;
        }
        .msg-source-icons-stack .msg-source-icon img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }
        .msg-sources-label {
            line-height: 1;
            letter-spacing: 0.01em;
        }
        html.aion-chat-page.theme-light .msg-sources-btn {
            border-color: rgba(109, 40, 217, 0.28);
            background: rgba(109, 40, 217, 0.06);
            color: #6d28d9;
        }
        html.aion-chat-page.theme-light .msg-sources-btn:hover {
            background: rgba(109, 40, 217, 0.14);
            border-color: rgba(109, 40, 217, 0.45);
            color: #5b21b6;
        }
        html.aion-chat-page.theme-light .msg-source-icons-stack .msg-source-icon {
            background: #f1f5f9;
            border-color: #ffffff;
            color: #475569;
        }

        /* Model Label im Action Bar */
        .msg-model-label {
            margin-left: auto;
            font-size: 11px;
            color: #64748b;
            font-weight: 400;
            letter-spacing: 0.02em;
            user-select: none;
            white-space: nowrap;
        }

        /* Meta-Info Zeile: Modell, Tools, Tokens */
        .msg-meta-row {
            margin-left: auto;
            display: flex;
            align-items: center;
            gap: 4px;
            flex-wrap: wrap;
        }

        @media (max-width: 639px) {
            .msg-meta-row .msg-meta-chip { display: none !important; }
        }

        .msg-meta-chip {
            display: inline-flex;
            align-items: center;
            gap: 3px;
            font-size: 10.5px;
            font-weight: 400;
            color: #64748b;
            background: rgba(100, 116, 139, 0.08);
            border: 1px solid rgba(100, 116, 139, 0.15);
            border-radius: 20px;
            padding: 2px 7px;
            white-space: nowrap;
            user-select: none;
            letter-spacing: 0.01em;
            cursor: default;
        }

        /* Tool-Action chips below assistant messages (e.g. "Bearbeiten"
           after the AI created an appointment via function-call). */
        .msg-tool-actions-row {
            margin: 10px 0 0 0;
            display: flex;
            gap: 6px;
            flex-wrap: wrap;
            justify-content: flex-start;
            align-items: flex-start;
            max-width: 100%;
        }
        .msg-tool-action-btn {
            display: inline-flex;
            align-items: center;
            gap: 7px;
            max-width: min(100%, 420px);
            font-size: 12px;
            font-weight: 600;
            line-height: 1.15;
            color: #c4b5fd;
            background: rgba(124, 58, 237, 0.12);
            border: 1px solid rgba(124, 58, 237, 0.3);
            border-radius: 8px;
            padding: 7px 9px;
            cursor: pointer;
            transition: background .15s ease, border-color .15s ease, color .15s ease;
            text-align: left;
        }
        .msg-tool-action-btn:hover {
            background: rgba(124, 58, 237, 0.2);
            border-color: rgba(124, 58, 237, 0.55);
            color: #ddd6fe;
        }
        .msg-tool-action-icon { font-size: 13px; }
        .msg-tool-action-copy {
            min-width: 0;
            display: inline-flex;
            flex-direction: column;
            gap: 1px;
            text-align: left;
        }
        .msg-tool-action-kind {
            color: #a78bfa;
            font-size: 10px;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.04em;
        }
        .msg-tool-action-title {
            min-width: 0;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
            color: #ede9fe;
            font-size: 12px;
            font-weight: 650;
        }
        .msg-tool-action-verb {
            flex: 0 0 auto;
            margin-left: 2px;
            color: #c4b5fd;
            font-size: 11px;
            letter-spacing: 0.01em;
        }

        html.aion-chat-page.theme-light .msg-tool-action-btn {
            color: #6d28d9;
            background: rgba(124, 58, 237, 0.08);
            border-color: rgba(124, 58, 237, 0.35);
        }
        html.aion-chat-page.theme-light .msg-tool-action-btn:hover {
            background: rgba(124, 58, 237, 0.15);
            color: #4c1d95;
        }
        html.aion-chat-page.theme-light .msg-tool-action-kind,
        html.aion-chat-page.theme-light .msg-tool-action-verb {
            color: #7c3aed;
        }
        html.aion-chat-page.theme-light .msg-tool-action-title {
            color: #312e81;
        }

        /* Analysis Action Bar */
        .analysis-action-bar {
            margin-top: 12px;
            padding-top: 8px;
            border-top: 1px solid rgba(255,255,255,0.06);
        }

        html.aion-chat-page.theme-light .analysis-action-bar {
            border-top-color: rgba(0,0,0,0.08);
        }

        /* Kompakte Abstände im Analyse-Ergebnis (prose überschreiben) */
        #analysis-result.prose p,
        #analysis-result.prose h1,
        #analysis-result.prose h2,
        #analysis-result.prose h3,
        #analysis-result.prose h4,
        #analysis-result.prose ul,
        #analysis-result.prose ol,
        #analysis-result.prose li {
            margin-top: 0.35em;
            margin-bottom: 0.35em;
        }
        #analysis-result.prose h2,
        #analysis-result.prose h3 {
            margin-top: 1em;
        }

        /* Light theme action bar */
        html.aion-chat-page.theme-light .msg-action-btn {
            color: #94a3b8;
        }
        html.aion-chat-page.theme-light .msg-action-btn:hover {
            background: rgba(139, 92, 246, 0.08);
            color: #6d28d9;
        }
        html.aion-chat-page.theme-light .msg-action-btn.active {
            color: #7c3aed;
        }
        @media (hover: none) {
            html.aion-chat-page.theme-light .msg-action-btn:not(.active):hover {
                background: transparent;
                color: #94a3b8;
            }
        }
        html.aion-chat-page.theme-light .msg-model-label {
            color: #94a3b8;
        }

        html.aion-chat-page.theme-light .msg-meta-chip {
            color: #94a3b8;
            background: rgba(148, 163, 184, 0.08);
            border-color: rgba(148, 163, 184, 0.18);
        }
        
        /* Message-Abstände - professionell */
        #chat-container .flex.gap-3.mb-4 {
            margin-bottom: 1rem !important;
        }
        /* Extra Abstand nach AI-Antwort (vor nächster User-Nachricht) */
        #chat-container .flex.gap-3.mb-4:has(.ai-message-bubble) + .flex.gap-3.mb-4:has(.user-chat-message) {
            margin-top: 0.75rem !important;
        }

        /* Message Header (Name + Icon) - Hidden for clean design */
        .message-header {
            display: none;
        }
        .message-header .name {
            font-size: 13px;
            font-weight: 600;
            letter-spacing: 0.03em;
            text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
        }
        .message-header.user .name { 
            color: #a5b4fc;
            background: linear-gradient(90deg, #a5b4fc, #818cf8);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
        }
        .message-header.ai .name { 
            color: #c4b5fd;
            background: linear-gradient(90deg, #c4b5fd, #a78bfa);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
        }
        .message-header .icon { 
            width: 18px; 
            height: 18px;
            filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
        }
        .message-header.user .icon { color: #818cf8; }
        .message-header.ai .icon {
            color: #a78bfa;
            width: 22px;
            height: 22px;
        }
        
        /* Message Text Content */
        .message-text {
            color: #e2e8f0;
            line-height: 1.75;
            font-size: 15px;
            letter-spacing: 0.01em;
        }
        .message-text p {
            margin: 0 0 14px 0;
        }
        .message-text p:last-child {
            margin-bottom: 0;
        }
        .user-message-text {
            white-space: pre-wrap;
            overflow-wrap: anywhere;
        }
        .user-message-text-collapsed {
            max-height: calc(1.75em * 8);
            overflow: hidden;
        }

        /* Chat Context Menu */
        .chat-context-menu {
            position: fixed;
            z-index: 9999;
            min-width: 180px;
            background: rgba(15, 23, 42, 0.95);
            border: 1px solid rgba(139, 92, 246, 0.25);
            border-radius: 12px;
            padding: 6px;
            box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255,255,255,0.03) inset;
            backdrop-filter: blur(16px);
            -webkit-backdrop-filter: blur(16px);
            animation: ctx-menu-in 0.12s ease-out;
        }
        @keyframes ctx-menu-in {
            from { opacity: 0; transform: scale(0.95) translateY(-4px); }
            to   { opacity: 1; transform: scale(1) translateY(0); }
        }
        .chat-context-menu-item {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 9px 14px;
            border-radius: 8px;
            font-size: 13px;
            font-weight: 500;
            color: #e2e8f0;
            cursor: pointer;
            transition: background 0.15s, color 0.15s;
            user-select: none;
        }
        .chat-context-menu-item:hover {
            background: rgba(139, 92, 246, 0.15);
            color: #c4b5fd;
        }
        .chat-context-menu-item svg {
            width: 16px;
            height: 16px;
            flex-shrink: 0;
            opacity: 0.7;
        }
        .chat-context-menu-item:hover svg {
            opacity: 1;
        }
        .chat-context-menu-divider {
            height: 1px;
            background: rgba(71, 85, 105, 0.3);
            margin: 4px 8px;
        }

        /* Light theme context menu */
        html.aion-chat-page.theme-light .chat-context-menu {
            background: rgba(255, 255, 255, 0.97);
            border-color: rgba(0, 0, 0, 0.08);
            box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
        }
        html.aion-chat-page.theme-light .chat-context-menu-item {
            color: #1e293b;
        }
        html.aion-chat-page.theme-light .chat-context-menu-item:hover {
            background: rgba(139, 92, 246, 0.08);
            color: #6d28d9;
        }

        /* Streaming Cursor Animation */
        .streaming-cursor {
            color: #a78bfa;
            animation: blink 1s step-end infinite;
            font-weight: bold;
            text-shadow: 0 0 8px rgba(167, 139, 250, 0.5);
        }
        @keyframes blink {
            0%, 100% { opacity: 1; }
            50% { opacity: 0; }
        }

        .aion-typing-dots {
            display: inline-flex;
            align-items: center;
            gap: 4px;
            width: 34px;
            height: 14px;
            flex-shrink: 0;
        }
        .aion-typing-dots span {
            width: 5px;
            height: 5px;
            border-radius: 999px;
            background: rgba(167, 139, 250, 0.86);
            box-shadow: 0 0 8px rgba(167, 139, 250, 0.28);
            animation: aionTypingDot 1.05s ease-in-out infinite;
        }
        .aion-typing-dots span:nth-child(2) {
            animation-delay: 0.14s;
        }
        .aion-typing-dots span:nth-child(3) {
            animation-delay: 0.28s;
        }
        @keyframes aionTypingDot {
            0%, 80%, 100% {
                opacity: 0.35;
                transform: translateY(0);
            }
            40% {
                opacity: 1;
                transform: translateY(-3px);
            }
        }
        
        /* Code Blocks in Messages */
        .message-text pre {
            background: rgba(15, 23, 42, 0.85);
            border: 1px solid rgba(71, 85, 105, 0.45);
            border-radius: 12px;
            padding: 16px 18px;
            margin: 14px 0;
            overflow-x: auto;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
        }
        .message-text code {
            font-family: 'JetBrains Mono', 'Fira Code', monospace;
            font-size: 13px;
            color: #c4b5fd;
        }
        .message-text :not(pre) > code {
            background: rgba(71, 85, 105, 0.35);
            padding: 3px 7px;
            border-radius: 6px;
            font-size: 13px;
            border: 1px solid rgba(71, 85, 105, 0.2);
        }
        
        /* ========================================= */
        /* CODE WIDGET - Dedicated Code Block UI    */
        /* ========================================= */
        .code-widget {
            background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.9));
            border: 1px solid rgba(71, 85, 105, 0.5);
            border-radius: 12px;
            margin: 16px 0;
            overflow: hidden;
            box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.05);
        }
        .code-widget-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 10px 16px;
            background: rgba(30, 41, 59, 0.8);
            border-bottom: 1px solid rgba(71, 85, 105, 0.4);
        }
        .code-widget-lang {
            font-family: 'JetBrains Mono', 'Fira Code', monospace;
            font-size: 11px;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            color: #a78bfa;
            background: rgba(167, 139, 250, 0.15);
            padding: 4px 10px;
            border-radius: 6px;
        }
        .code-widget-lang:empty {
            display: none;
        }
        .code-copy-btn {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 6px;
            min-width: 32px;
            height: 32px;
            padding: 0 10px;
            background: rgba(71, 85, 105, 0.4);
            border: 1px solid rgba(71, 85, 105, 0.5);
            border-radius: 6px;
            color: #94a3b8;
            font-size: 12px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.2s ease;
        }
        .code-copy-btn:hover {
            background: rgba(167, 139, 250, 0.2);
            border-color: rgba(167, 139, 250, 0.4);
            color: #c4b5fd;
        }
        .code-copy-btn.copied {
            background: rgba(34, 197, 94, 0.2);
            border-color: rgba(34, 197, 94, 0.4);
            color: #4ade80;
        }
        .code-copy-btn svg {
            flex-shrink: 0;
        }
        .code-widget-pre {
            margin: 0 !important;
            padding: 18px 20px !important;
            background: transparent !important;
            border: none !important;
            border-radius: 0 !important;
            overflow-x: auto;
        }
        .code-widget-pre code {
            font-family: 'JetBrains Mono', 'Fira Code', Consolas, monospace;
            font-size: 13px;
            line-height: 1.6;
            color: #e2e8f0;
            white-space: pre;
            display: block;
        }
        .code-widget-pre code.hljs {
            background: transparent !important;
            padding: 0 !important;
        }
        /* Syntax Highlighting Colors */
        .code-widget-pre code .keyword { color: #c792ea; }
        .code-widget-pre code .string { color: #c3e88d; }
        .code-widget-pre code .comment { color: #676e95; font-style: italic; }
        .code-widget-pre code .number { color: #f78c6c; }
        .code-widget-pre code .function { color: #82aaff; }
        
        /* Mobile Responsive */
        @media (max-width: 639px) {
            .code-widget {
                margin: 12px -8px;
                border-radius: 8px;
            }
            .code-widget-header {
                padding: 8px 12px;
            }
            .code-copy-btn span {
                display: none;
            }
            .code-widget-pre {
                padding: 14px 12px !important;
                font-size: 12px;
            }
        }
        
        /* Links in Messages */
        .message-text a {
            color: #a78bfa;
            text-decoration: underline;
            text-decoration-color: rgba(167, 139, 250, 0.4);
            text-underline-offset: 3px;
            transition: all 0.2s ease;
        }
        .message-text a:hover {
            color: #c4b5fd;
            text-decoration-color: rgba(196, 181, 253, 0.7);
            text-shadow: 0 0 6px rgba(167, 139, 250, 0.3);
        }
        
        /* Lists in Messages */
        .message-text ul, .message-text ol {
            margin: 12px 0;
            padding-left: 26px;
        }
        .message-text li {
            margin: 8px 0;
            color: #cbd5e1;
            line-height: 1.6;
        }
        .message-text li::marker {
            color: #a78bfa;
        }
        
        /* Headers in Messages */
        .message-text h2, .message-text h3, .message-text h4, .message-text h5 {
            color: #f1f5f9;
            font-weight: 600;
            margin-top: 22px;
            margin-bottom: 12px;
            letter-spacing: -0.01em;
        }
        .message-text h2 { 
            font-size: 1.4em; 
            background: linear-gradient(90deg, #f1f5f9, #e2e8f0);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
        }
        .message-text h3 { font-size: 1.2em; }
        .message-text h4 { font-size: 1.1em; color: #c4b5fd; }
        
        /* Sources Section */
        .sources-section {
            margin-top: 18px;
            padding-top: 14px;
            border-top: 1px solid rgba(71, 85, 105, 0.25);
            background: rgba(15, 23, 42, 0.2);
            margin: 18px -22px -18px -22px;
            padding: 14px 22px 16px 22px;
            border-radius: 0 0 20px 20px;
        }
        .sources-section .sources-label {
            font-size: 12px;
            color: #64748b;
            margin-bottom: 10px;
            display: flex;
            align-items: center;
            gap: 6px;
            text-transform: uppercase;
            letter-spacing: 0.05em;
        }
        .sources-section .source-icons {
            display: flex;
            flex-wrap: wrap;
            gap: 6px;
        }
        .sources-section .source-icon {
            width: 24px;
            height: 24px;
            border-radius: 6px;
            background: rgba(30, 41, 59, 0.6);
            border: 1px solid rgba(71, 85, 105, 0.4);
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.2s ease;
        }
        .sources-section .source-icon:hover {
            background: rgba(71, 85, 105, 0.4);
            transform: translateY(-2px);
        }
        .sources-section .source-icon img {
            width: 16px;
            height: 16px;
            border-radius: 3px;
        }

        /* Sidebar: Etwas dunkler fuer Kontrast */
        main #chat-sidebar .glass-card {
            background: rgba(2, 6, 23, 0.88) !important;
            border-radius: 0 !important;
            transition: none !important;
        }

        #chat-sidebar .aion-desktop-sidebar-title-row {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 0.75rem;
            min-height: 2.75rem;
            padding: 0.25rem 0 0.75rem;
            margin-bottom: 0.75rem;
            border-bottom: 1px solid rgba(139, 92, 246, 0.22);
            flex: 0 0 auto;
        }

        #chat-sidebar .aion-desktop-sidebar-title-main {
            display: inline-flex;
            align-items: center;
            gap: 0.5rem;
            min-width: 0;
            color: #f8fafc;
            font-size: 0.95rem;
            font-weight: 800;
            line-height: 1.2;
        }

        #chat-sidebar .aion-desktop-sidebar-title-main svg {
            width: 1rem;
            height: 1rem;
            color: #c4b5fd;
            flex: 0 0 auto;
        }

        /* Sidebar Resize Handle */
        #sidebar-resize-handle {
            position: relative;
        }
        #sidebar-resize-handle::before {
            content: '';
            position: absolute;
            top: 0;
            bottom: 0;
            left: -4px;
            right: -4px;
        }
        body.sidebar-resizing * {
            cursor: col-resize !important;
            user-select: none !important;
            -webkit-user-select: none !important;
        }
        body.sidebar-resizing #chat-sidebar {
            transition: none !important;
        }

        /* Chat History Item Styles - Elegant abgerundet */
        .chat-history-item {
            position: relative;
            min-height: 56px;
            box-sizing: border-box;
            overflow: hidden;
            border-radius: 14px !important;
            background: rgba(30, 41, 59, 0.25);
            border: 1px solid rgba(71, 85, 105, 0.2);
            margin-bottom: 6px;
            transition: all 0.2s ease;
            border-left: 3px solid rgba(139, 92, 246, 0.3);
        }
        .chat-history-item:hover {
            background: rgba(30, 41, 59, 0.4);
            border-color: rgba(139, 92, 246, 0.25);
            border-left-color: rgba(139, 92, 246, 0.7);
            transform: translateX(2px);
        }
        .chat-history-item.active {
            background: rgba(139, 92, 246, 0.15);
            border-color: rgba(139, 92, 246, 0.35);
        }
        .chat-history-item .chat-item-content {
            padding-right: 40px;
        }
        .chat-history-item .chat-item-title {
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }
        .chat-history-item .chat-item-title p {
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
            flex: 1;
            min-width: 0;
        }
        .chat-history-item .delete-chat-btn {
            position: absolute;
            right: 8px;
            top: 50%;
            transform: translateY(-50%);
            z-index: 10;
            opacity: 0.4;
            padding: 6px;
            border-radius: 10px;
            background: transparent;
            color: #9ca3af;
            transition: all 0.2s ease;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
        }
        .chat-history-item:hover .delete-chat-btn {
            opacity: 1;
        }
        .chat-history-item .delete-chat-btn:hover {
            background: rgba(239, 68, 68, 0.25);
            color: #f87171;
        }
        /* Status-Text (Zeit) nicht umbrechen */
        .chat-history-item .text-xs {
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        
        /* Analysis History Item - identisch zu Chat History */
        .analysis-history-item {
            position: relative;
            min-height: 56px;
            box-sizing: border-box;
            overflow: hidden;
            border-radius: 14px !important;
            background: rgba(30, 41, 59, 0.25);
            border: 1px solid rgba(71, 85, 105, 0.2);
            margin-bottom: 6px;
            transition: all 0.2s ease;
            border-left: 3px solid rgba(16, 185, 129, 0.3);
        }
        .analysis-history-item:hover {
            background: rgba(30, 41, 59, 0.4);
            border-color: rgba(16, 185, 129, 0.25);
            border-left-color: rgba(16, 185, 129, 0.7);
            transform: translateX(2px);
        }
        .analysis-history-item.active {
            background: rgba(16, 185, 129, 0.15);
            border-color: rgba(16, 185, 129, 0.35);
        }
        .analysis-history-item .chat-item-content {
            padding-right: 40px;
        }
        .analysis-history-item .chat-item-title {
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }
        .analysis-history-item .chat-item-title p {
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
            flex: 1;
            min-width: 0;
        }
        .analysis-history-item .delete-analysis-btn {
            position: absolute;
            right: 8px;
            top: 50%;
            transform: translateY(-50%);
            z-index: 10;
            opacity: 0.4;
            padding: 6px;
            border-radius: 10px;
            background: transparent;
            color: #9ca3af;
            transition: all 0.2s ease;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
        }
        .analysis-history-item:hover .delete-analysis-btn {
            opacity: 1;
        }
        .analysis-history-item .delete-analysis-btn:hover {
            background: rgba(239, 68, 68, 0.25);
            color: #f87171;
        }
        .analysis-history-item .text-xs {
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        /* Consistent interactive affordances */
        button:not(:disabled),
        [role="button"]:not([aria-disabled="true"]),
        .chat-history-item,
        .analysis-history-item,
        .location-result-item,
        #mobile-nav-panel a {
            cursor: pointer;
        }
        button:disabled,
        [aria-disabled="true"] {
            cursor: not-allowed;
        }

        #mobile-new-chat-btn:not(:disabled),
        #new-chat-btn:not(:disabled),
        #toggle-analysis-settings-btn:not(:disabled),
        #new-analysis-btn:not(:disabled),
        #new-analysis-btn-right:not(:disabled) {
            cursor: pointer !important;
        }

        #mobile-new-chat-btn svg,
        #mobile-new-chat-btn svg *,
        #new-chat-btn svg,
        #new-chat-btn svg *,
        #toggle-analysis-settings-btn svg,
        #toggle-analysis-settings-btn svg *,
        #new-analysis-btn svg,
        #new-analysis-btn svg *,
        #new-analysis-btn-right svg,
        #new-analysis-btn-right svg * {
            pointer-events: none;
            cursor: inherit;
        }

        #mobile-nav-panel a {
            transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
        }
        #nav-mode-toggle-btn {
            transition: transform 0.2s ease, filter 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
        }
        @media (hover: hover) {
            #nav-mode-toggle-btn:hover {
                transform: translateY(-1px);
                filter: brightness(1.03);
                box-shadow: 0 6px 14px rgba(15, 23, 42, 0.16);
            }
            #nav-mode-toggle-btn[data-mode-accent="chat"]:hover {
                background: rgba(147, 51, 234, 0.08) !important;
            }
            #nav-mode-toggle-btn[data-mode-accent="analysis"]:hover {
                background: rgba(16, 185, 129, 0.08) !important;
            }
            #mobile-nav-panel a:hover {
                background: rgba(255, 255, 255, 0.06) !important;
                color: #ffffff !important;
                transform: translateX(2px);
            }
            #mobile-nav-panel[data-mode-accent="chat"] a.mobile-nav-row:not(.active):not(.mobile-nav-row--danger):not(.mobile-nav-row--mode):hover {
                background: rgba(147, 51, 234, 0.08) !important;
                color: #ffffff !important;
            }
            #mobile-nav-panel[data-mode-accent="analysis"] a.mobile-nav-row:not(.active):not(.mobile-nav-row--danger):not(.mobile-nav-row--mode):hover {
                background: rgba(16, 185, 129, 0.08) !important;
                color: #ffffff !important;
            }
            #mobile-nav-panel a.mobile-nav-row--danger:hover {
                background: rgba(239, 68, 68, 0.08) !important;
                color: #fecaca !important;
            }
        }
        
        /* Running Tasks Styles - Laufende Hintergrund-Analysen */
        .running-task-item {
            position: relative;
        }
        .running-task-item .cancel-task-btn {
            padding: 4px;
            border-radius: 6px;
            background: transparent;
            transition: all 0.2s ease;
        }
        .running-task-item .cancel-task-btn:hover {
            background: rgba(239, 68, 68, 0.2);
        }
        
        /* Running Tasks Indicator (Header) */
        #running-tasks-indicator {
            animation: pulse-glow 2s infinite;
        }
        @keyframes pulse-glow {
            0%, 100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.4); }
            50% { box-shadow: 0 0 10px 2px rgba(52, 211, 153, 0.2); }
        }
        
        /* Running Tasks Panel */
        #running-tasks-panel {
            animation: slideDown 0.2s ease-out;
        }
        @keyframes slideDown {
            from { opacity: 0; transform: translateY(-10px); }
            to { opacity: 1; transform: translateY(0); }
        }
        
        /* Chat History Container - Besseres Spacing */
        #chat-history-list,
        #chat-history-list-mobile,
        #analysis-history-list-mobile,
        #sidebar-analysis-list {
            flex-direction: column;
            gap: 8px;
        }
        #chat-history-list:not(.hidden),
        #chat-history-list-mobile:not(.hidden),
        #analysis-history-list-mobile:not(.hidden),
        #sidebar-analysis-list:not(.hidden) {
            display: flex;
        }
        #chat-history-list.hidden,
        #chat-history-list-mobile.hidden,
        #analysis-history-list-mobile.hidden,
        #sidebar-analysis-list.hidden {
            display: none !important;
        }
        #chat-history-list > .chat-history-item,
        #chat-history-list-mobile > .chat-history-item,
        #analysis-history-list-mobile > .analysis-history-item,
        #sidebar-analysis-list > .analysis-history-item {
            flex-shrink: 0;
        }
        /* Empty state styling */
        #chat-history-list > .text-center,
        #chat-history-list-mobile > .text-center,
        #analysis-history-list-mobile > .text-center,
        #sidebar-analysis-list > .text-center {
            flex-shrink: 0;
        }

        /* Mobile Sidebar & Overlays */
        #sidebar-overlay,
        #sidebar-overlay .absolute {
            background: rgba(2, 6, 23, 0.9) !important;
            backdrop-filter: blur(12px) !important;
            -webkit-backdrop-filter: blur(12px) !important;
        }

        /* Inputs und Controls: Eleganter mit Glaseffekt */
        #chat-input,
        #sidebar-toggle,
        #suggestions-container .rounded-2xl {
            background: rgba(15, 23, 42, 0.85) !important;
            border-color: rgba(71, 85, 105, 0.4) !important;
            box-shadow: 
                0 8px 24px rgba(0, 0, 0, 0.3),
                0 0 0 1px rgba(71, 85, 105, 0.1) inset !important;
            backdrop-filter: blur(12px) !important;
            -webkit-backdrop-filter: blur(12px) !important;
        }
        
        /* Chat Input spezifisch */
        #chat-input {
            border-radius: 0.75rem !important;
            background: #0f172a !important;
            border: 1px solid #334155 !important;
            box-shadow: none !important;
            transition: background-color 0.2s ease, border-color 0.2s ease !important;
            appearance: none !important;
            -webkit-appearance: none !important;
        }
        #chat-input:hover {
            border-color: #475569 !important;
            background: #111c2f !important;
        }
        #chat-input:focus {
            border-color: rgba(139, 92, 246, 0.7) !important;
            background: #111c2f !important;
            box-shadow: none !important;
            animation: none !important;
        }
        #chat-input::placeholder {
            color: rgba(148, 163, 184, 0.6);
        }

        .coin-analyse-start-btn,
        #inline-analyse-start {
            background: linear-gradient(135deg, rgba(16, 185, 129, 0.58), rgba(13, 148, 136, 0.54)) !important;
            border: 1px solid rgba(110, 231, 183, 0.16) !important;
            box-shadow: none !important;
        }

        .coin-analyse-start-btn:hover:not(:disabled),
        #inline-analyse-start:hover:not(:disabled) {
            background: linear-gradient(135deg, rgba(16, 185, 129, 0.68), rgba(13, 148, 136, 0.62)) !important;
            border-color: rgba(110, 231, 183, 0.24) !important;
            box-shadow: none !important;
        }

        .coin-analyse-start-btn:disabled,
        #inline-analyse-start:disabled {
            box-shadow: none !important;
        }

        /* ensure dropdowns and tooltips are solid (but allow aion dropdown to be toggled via JS) */
        #response-mode-dropdown,
        #exchange-dropdown,
        #timeframe-dropdown,
        #markettype-dropdown,
        #cost-tooltip {
            background: #050a16 !important;
            border-color: #1e293b !important;
            backdrop-filter: none !important;
            z-index: 99999 !important;
            position: absolute !important;
        }

        /* User Dropdown Styling - passend zu Charts */
        #aion_user_dropdown {
            background: linear-gradient(180deg, rgba(15, 23, 42, 0.98) 0%, rgba(10, 18, 36, 0.99) 100%) !important;
            border: 1px solid rgba(71, 85, 105, 0.7) !important;
            box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(0, 0, 0, 0.3) !important;
            backdrop-filter: blur(12px) !important;
        }
        #aion_user_dropdown .user-dropdown-header {
            background: linear-gradient(180deg, rgba(88, 101, 242, 0.12) 0%, transparent 100%);
        }
        #aion_user_dropdown a:hover {
            background: rgba(124, 58, 237, 0.15) !important;
        }
        #aion_user_dropdown .logout-link:hover {
            background: rgba(239, 68, 68, 0.12) !important;
        }

        /* Dropdown option hover: use 50% semi-transparent accent so hover matches button backgrounds */
        #response-mode-dropdown .response-mode-option:hover,
        #exchange-dropdown .exchange-option:hover,
        #timeframe-dropdown .timeframe-option:hover,
        #markettype-dropdown .markettype-option:hover {
            background-color: rgba(124,58,237,0.3) !important; /* purple-600 at 30% */
            color: #ffffff !important;
            border-color: rgba(124,58,237,0.4) !important;
        }

        /* Action Button + Attach Button – match mobile-header-action-btn style */
        #attach-file-btn,
        #action-btn {
            transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
            border-radius: 0.5rem !important;
            background: rgba(255, 255, 255, 0.04) !important;
            border: 1px solid rgba(255, 255, 255, 0.08) !important;
            color: #c4b5fd !important;
        }
        #action-btn[data-mode-accent="analysis"],
        #attach-file-btn[data-mode-accent="analysis"] {
            color: #6ee7b7 !important;
        }
        #action-btn[data-action="send"]:hover:not(:disabled),
        #attach-file-btn:hover {
            background: rgba(255, 255, 255, 0.08) !important;
            border-color: rgba(147, 51, 234, 0.45) !important;
            color: #e9d5ff !important;
            box-shadow: none !important;
        }
        #action-btn[data-mode-accent="analysis"][data-action="send"]:hover:not(:disabled),
        #attach-file-btn[data-mode-accent="analysis"]:hover {
            border-color: rgba(16, 185, 129, 0.45) !important;
        }
        #action-btn[data-action="cancel"] {
            background: rgba(239, 68, 68, 0.12) !important;
            border-color: rgba(248, 113, 113, 0.38) !important;
            color: #fca5a5 !important;
            box-shadow: none !important;
        }
        #action-btn[data-action="cancel"]:hover:not(:disabled) {
            background: rgba(239, 68, 68, 0.22) !important;
            border-color: rgba(248, 113, 113, 0.75) !important;
            color: #ffffff !important;
            box-shadow: 0 8px 22px rgba(239, 68, 68, 0.22) !important;
            transform: translateY(-1px);
        }
        #action-btn:active:not(:disabled) {
            transform: translateY(0);
        }
        
        /* Symbol Dropdown Styling */
        #symbol-dropdown {
            max-height: 280px;
            overflow-y: auto;
            z-index: 99999 !important;
        }
        #symbol-dropdown.portal-dropdown {
            position: fixed !important;
        }
        #symbol-dropdown::-webkit-scrollbar {
            width: 4px;
        }
        #symbol-dropdown::-webkit-scrollbar-track {
            background: rgba(30, 41, 59, 0.5);
        }
        #symbol-dropdown::-webkit-scrollbar-thumb {
            background: rgba(124, 58, 237, 0.3);
            border-radius: 2px;
        }
        .symbol-dropdown-item {
            border-bottom: 1px solid rgba(71, 85, 105, 0.3);
        }
        .symbol-dropdown-item:last-child {
            border-bottom: none;
        }
        
        /* Streaming-Cursor Animation */
        .streaming-cursor {
            animation: blink 1s step-end infinite;
            color: #a855f7;
            font-weight: bold;
        }
        @keyframes blink {
            50% { opacity: 0; }
        }

        /* Quick Button Management Styles - Modern Mobile Design */
        .quick-btn-wrapper {
            position: relative;
            width: 100%;
        }
        
        .quick-btn {
            width: 100%;
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 0.75rem 1rem;
            padding-right: 2.5rem;
            min-height: 48px;
            text-align: left;
            position: relative;
            border-radius: 12px;
            background: rgba(30, 41, 59, 0.4);
            border: 1px solid rgba(139, 92, 246, 0.25);
            color: #e2e8f0;
            font-size: 0.875rem;
            transition: all 0.2s ease;
            cursor: pointer;
        }
        
        .quick-btn:hover {
            background: rgba(139, 92, 246, 0.15);
            border-color: rgba(139, 92, 246, 0.45);
            transform: translateY(-1px);
            box-shadow: 0 4px 12px rgba(139, 92, 246, 0.15);
        }
        
        .quick-btn:active {
            transform: translateY(0);
        }
        
        .quick-btn-content {
            display: flex;
            align-items: center;
            gap: 0.625rem;
            flex: 1;
            min-width: 0;
        }
        
        .quick-btn-emoji {
            font-size: 1.125rem;
            flex-shrink: 0;
        }
        
        .quick-btn-label {
            font-weight: 500;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .quick-btn-count {
            min-width: 1.35rem;
            height: 1.35rem;
            padding: 0 0.35rem;
            border-radius: 999px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
            background: rgba(139, 92, 246, 0.24);
            border: 1px solid rgba(167, 139, 250, 0.34);
            color: #ede9fe;
            font-size: 0.72rem;
            font-weight: 700;
            line-height: 1;
        }
        
        /* Mobile Quick Buttons Grid Layout */
        #quick-buttons-container-mobile {
            display: flex;
            flex-direction: column;
            gap: 0.5rem;
        }
        
        #quick-buttons-container-mobile .quick-btn-section-label {
            width: 100%;
            font-size: 0.65rem;
            color: #94a3b8;
            text-transform: uppercase;
            letter-spacing: 0.05em;
            font-weight: 600;
            margin-bottom: 0.5rem;
            margin-top: 0.75rem;
        }
        
        #quick-buttons-container-mobile .quick-btn-divider {
            width: 100%;
            height: 1px;
            background: linear-gradient(to right, transparent, rgba(148, 163, 184, 0.2), transparent);
            margin: 0.5rem 0;
        }
        
        #quick-buttons-container-mobile .quick-btn-wrapper {
            width: 100%;
        }
        
        #quick-buttons-container-mobile .quick-btn {
            min-height: 52px;
            padding: 0.75rem 1rem;
            padding-right: 2.5rem;
            width: 100%;
        }
        
        #quick-buttons-container-mobile .quick-btn-emoji {
            font-size: 1rem;
        }
        
        #quick-buttons-container-mobile .quick-btn-label {
            font-size: 0.8125rem;
            line-height: 1.2;
            white-space: normal;
            word-break: break-word;
        }
        
        /* Mobile Container muss immer sichtbar sein auf kleinen Bildschirmen */
        @media (max-width: 768px) {
            #quick-buttons-container-mobile,
            #quick-buttons-container-mobile .quick-btn-wrapper,
            #quick-buttons-container-mobile .quick-btn {
                display: flex !important;
            }
            
            #quick-buttons-container-mobile {
                flex-direction: column !important;
            }

            #quick-buttons-container-mobile .quick-btn-action {
                opacity: 0.9 !important;
            }
        }
        
        .quick-btn-action {
            position: absolute;
            right: 0.5rem;
            top: 50%;
            transform: translateY(-50%);
            opacity: 0;
            transition: all 0.2s ease;
            padding: 0.25rem;
            border-radius: 8px;
            cursor: pointer;
            background: rgba(15, 23, 42, 0.9);
            z-index: 10;
        }
        .quick-btn-wrapper:hover .quick-btn-action {
            opacity: 0.5;
        }
        .quick-btn-wrapper:hover .quick-btn-action:hover {
            opacity: 1;
        }
        .quick-btn-hide {
            color: #94a3b8;
        }
        .quick-btn-hide:hover {
            color: #f59e0b;
            background: rgba(245, 158, 11, 0.15);
        }
        .quick-btn-delete {
            color: #94a3b8;
        }
        .quick-btn-delete:hover {
            color: #ef4444;
            background: rgba(239, 68, 68, 0.15);
        }
        #quick-btn-toggle-hidden.is-active,
        #quick-btn-toggle-hidden-mobile.is-active {
            background: rgba(139, 92, 246, 0.28) !important;
            border-color: rgba(167, 139, 250, 0.55) !important;
            color: #f5f3ff !important;
            box-shadow: 0 0 0 1px rgba(167, 139, 250, 0.14) inset !important;
        }
        .quick-btn.hidden-btn {
            opacity: 0.4;
            border-style: dashed;
        }
        .quick-btn-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 0.75rem;
            padding-bottom: 0.5rem;
            border-bottom: 1px solid rgba(71, 85, 105, 0.15);
        }
        .quick-btn-header-actions {
            display: flex;
            gap: 0.5rem;
        }
        .quick-btn-header-btn {
            padding: 0.35rem;
            border-radius: 8px;
            cursor: pointer;
            color: #94a3b8;
            transition: all 0.2s ease;
        }
        .quick-btn-header-btn:hover {
            color: #a855f7;
            background: rgba(168, 85, 247, 0.15);
        }
        .quick-btn-header-btn.active {
            color: #a855f7;
            background: rgba(168, 85, 247, 0.2);
        }
        #quick-btn-add-modal {
            position: fixed;
            inset: 0;
            z-index: 100000;
            display: none;
            align-items: center;
            justify-content: center;
            background: rgba(0, 0, 0, 0.75);
            backdrop-filter: blur(8px);
            -webkit-backdrop-filter: blur(8px);
        }
        #quick-btn-add-modal.show {
            display: flex;
        }
        #quick-btn-add-modal .modal-content {
            background: linear-gradient(180deg, rgba(15, 23, 42, 0.98) 0%, rgba(10, 18, 36, 0.99) 100%);
            border: 1px solid rgba(71, 85, 105, 0.5);
            border-radius: 20px;
            padding: 2rem;
            width: 90%;
            max-width: 550px;
            box-shadow: 
                0 25px 60px rgba(0, 0, 0, 0.6),
                0 0 0 1px rgba(139, 92, 246, 0.1) inset;
        }
        #quick-btn-add-modal h3 {
            margin-bottom: 1.5rem;
            font-size: 1.125rem;
        }
        #quick-btn-add-modal input {
            width: 100%;
            padding: 0.75rem 1rem;
            border-radius: 12px;
            border: 1px solid rgba(71, 85, 105, 0.4);
            background: rgba(15, 23, 42, 0.9);
            color: #e2e8f0;
            font-size: 0.875rem;
            transition: all 0.2s ease;
        }
        #quick-btn-add-modal input:focus {
            border-color: rgba(139, 92, 246, 0.5);
            outline: none;
            box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15);
        }
        #quick-btn-add-modal #quick-btn-emoji-input {
            width: 3rem;
            height: 3rem;
            padding: 0;
            text-align: center;
            font-size: 1.5rem;
            line-height: 3rem;
            border-radius: 0.5rem;
            border: 1px solid rgba(71, 85, 105, 0.5);
            background: rgba(15, 23, 42, 0.9);
            color: #e2e8f0;
            transition: all 0.2s;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
        }
        #quick-btn-add-modal #quick-btn-emoji-input:hover {
            background: rgba(30, 41, 59, 0.9);
            border-color: #7c3aed;
        }
        #quick-btn-add-modal #quick-btn-emoji-input:focus {
            outline: none;
            border-color: #7c3aed;
            box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
        }
        #quick-btn-add-modal input {
            padding: 0.75rem;
            border-radius: 0.5rem;
            border: 1px solid rgba(71, 85, 105, 0.5);
            background: rgba(15, 23, 42, 0.9);
            color: #e2e8f0;
            font-size: 0.875rem;
            height: 3rem;
            box-sizing: border-box;
        }
        #quick-btn-add-modal .modal-buttons {
            display: flex;
            gap: 1rem;
            margin-top: 2rem;
        }
        #quick-btn-add-modal .modal-buttons button {
            flex: 1;
            padding: 1rem;
            border-radius: 14px;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.25s ease;
            font-size: 0.9375rem;
        }
        #quick-btn-add-modal .btn-cancel {
            background: rgba(71, 85, 105, 0.25);
            border: 1px solid rgba(71, 85, 105, 0.4);
            color: #94a3b8;
        }
        #quick-btn-add-modal .btn-cancel:hover {
            background: rgba(71, 85, 105, 0.4);
            border-color: rgba(71, 85, 105, 0.6);
            transform: translateY(-1px);
        }
        #quick-btn-add-modal .btn-create {
            background: linear-gradient(135deg, rgba(124, 58, 237, 0.9), rgba(109, 40, 217, 0.9));
            border: 1px solid rgba(139, 92, 246, 0.4);
            color: white;
            box-shadow: 0 4px 12px rgba(124, 58, 237, 0.25);
        }
        #quick-btn-add-modal .btn-create:hover {
            background: linear-gradient(135deg, rgba(139, 92, 246, 0.95), rgba(124, 58, 237, 0.95));
            box-shadow: 0 6px 16px rgba(124, 58, 237, 0.35);
            transform: translateY(-1px);
        }
        .emoji-picker {
            position: absolute;
            top: 100%;
            left: 0;
            margin-top: 0.5rem;
            background: rgba(15, 23, 42, 0.98);
            border: 1px solid rgba(139, 92, 246, 0.3);
            border-radius: 0.75rem;
            padding: 0.75rem;
            box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
            z-index: 1000;
            backdrop-filter: blur(10px);
        }
        .emoji-picker-grid {
            display: grid;
            grid-template-columns: repeat(10, 1fr);
            gap: 0.5rem;
            max-height: 300px;
            overflow-y: auto;
            overflow-x: hidden;
            padding-right: 0.8rem;
        }
        .emoji-btn {
            background: rgba(139, 92, 246, 0.1);
            border: 1px solid rgba(139, 92, 246, 0.2);
            border-radius: 0.5rem;
            padding: 0.5rem;
            font-size: 1.5rem;
            cursor: pointer;
            transition: all 0.2s;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        .emoji-btn:hover {
            background: rgba(139, 92, 246, 0.2);
            border-color: rgba(139, 92, 246, 0.4);
            transform: scale(1.1);
        }
        .emoji-picker-grid::-webkit-scrollbar {
            width: 6px;
        }
        .emoji-picker-grid::-webkit-scrollbar-track {
            background: rgba(15, 23, 42, 0.5);
            border-radius: 3px;
        }
        .emoji-picker-grid::-webkit-scrollbar-thumb {
            background: rgba(139, 92, 246, 0.5);
            border-radius: 3px;
        }
        .emoji-picker-grid::-webkit-scrollbar-thumb:hover {
            background: rgba(139, 92, 246, 0.7);
        }
        .quick-btn-section-label {
            font-size: 0.75rem;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.05em;
            color: #94a3b8;
            margin-bottom: 0.5rem;
            margin-top: 0.75rem;
        }
        .quick-btn-divider {
            height: 1px;
            background: linear-gradient(to right, transparent, rgba(148, 163, 184, 0.2), transparent);
            margin: 0.5rem 0;
        }

        /* ========================================= */
        /* CALCULATOR WIDGET V2 - Professional Design */
        /* ========================================= */
        #calculator-modal {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            width: 100%;
            height: 100%;
            z-index: 100000;
            display: none;
            align-items: center;
            justify-content: center;
            background: rgba(0, 0, 0, 0.75);
            backdrop-filter: blur(8px);
            -webkit-backdrop-filter: blur(8px);
            --modal-top-offset: env(safe-area-inset-top, 0px);
            --modal-bottom-offset: calc(env(safe-area-inset-bottom, 0px) + 1rem);
            padding: 1rem;
            padding-top: var(--modal-top-offset);
            padding-bottom: var(--modal-bottom-offset);
            box-sizing: border-box;
            overflow-x: hidden;
            overflow-y: auto;
            animation: calcModalFadeIn 0.3s ease-out;
        }
        
        @keyframes calcModalFadeIn {
            from { opacity: 0; }
            to { opacity: 1; }
        }
        
        #calculator-modal.show {
            display: flex;
        }
        
        .calculator-widget-v2 {
            background: linear-gradient(180deg, rgba(15, 23, 42, 0.98) 0%, rgba(8, 12, 28, 0.99) 100%);
            border: 1px solid rgba(71, 85, 105, 0.4);
            border-radius: 24px;
            padding: 1.25rem;
            width: 100%;
            max-width: 380px;
            box-sizing: border-box;
            box-shadow: 
                0 25px 60px rgba(0, 0, 0, 0.6),
                0 0 0 1px rgba(139, 92, 246, 0.08) inset,
                0 0 80px rgba(139, 92, 246, 0.05);
        }
        @media (max-width: 480px) {
            #calculator-modal {
                padding: 1rem;
                padding-top: calc(var(--modal-top-offset) + 1rem);
                padding-bottom: var(--modal-bottom-offset);
                align-items: center;
            }
            .calculator-widget-v2 {
                max-width: min(380px, calc(100vw - 2rem));
                border-radius: 24px;
                border-top: 1px solid rgba(71, 85, 105, 0.4);
            }
        }
        
        /* Header */
        .calc-header-v2 {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 1rem;
            padding-bottom: 0.75rem;
            border-bottom: 1px solid rgba(71, 85, 105, 0.3);
        }
        
        .calc-title-v2 {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            color: #e2e8f0;
            font-weight: 600;
            font-size: 0.95rem;
        }
        
        .calc-icon-v2 {
            width: 22px;
            height: 22px;
            color: #a78bfa;
        }
        
        .calc-icon-v2 svg {
            width: 100%;
            height: 100%;
        }
        
        .calc-close-v2 {
            width: 32px;
            height: 32px;
            border-radius: 8px;
            background: rgba(71, 85, 105, 0.25);
            border: 1px solid rgba(71, 85, 105, 0.4);
            color: #94a3b8;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.2s ease;
        }
        
        .calc-close-v2 svg {
            width: 16px;
            height: 16px;
        }
        
        .calc-close-v2:hover {
            background: rgba(239, 68, 68, 0.15);
            border-color: rgba(239, 68, 68, 0.4);
            color: #f87171;
        }
        
        /* Display */
        .calc-display-v2 {
            background: rgba(0, 0, 0, 0.5);
            border: 1px solid rgba(71, 85, 105, 0.3);
            border-radius: 16px;
            padding: 1.25rem;
            margin-bottom: 1rem;
            text-align: right;
            min-height: 90px;
            display: flex;
            flex-direction: column;
            justify-content: flex-end;
        }
        
        .calc-expression-v2 {
            font-size: 0.9rem;
            color: #64748b;
            min-height: 1.4em;
            word-break: break-all;
            margin-bottom: 0.25rem;
        }
        
        .calc-result-v2 {
            font-size: 2.5rem;
            font-weight: 700;
            color: #f8fafc;
            min-height: 2.8rem;
            word-break: break-all;
            line-height: 1.1;
            font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, sans-serif;
            letter-spacing: -0.02em;
        }
        
        /* Buttons Grid */
        .calc-buttons-v2 {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 10px;
        }
        
        .calc-btn-v2 {
            height: 64px;
            border-radius: 16px;
            border: none;
            font-size: 1.4rem;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.15s ease;
            user-select: none;
            display: flex;
            align-items: center;
            justify-content: center;
            -webkit-tap-highlight-color: transparent;
        }
        
        .calc-btn-v2:active {
            transform: scale(0.92);
        }
        
        /* Number buttons */
        .calc-btn-v2.num {
            background: rgba(51, 65, 85, 0.6);
            color: #f1f5f9;
        }
        
        .calc-btn-v2.num:hover {
            background: rgba(71, 85, 105, 0.7);
        }
        
        /* Zero button - spans 2 columns */
        .calc-btn-v2.zero {
            grid-column: span 2;
        }
        
        /* Function buttons (AC, backspace, %) */
        .calc-btn-v2.func {
            background: rgba(71, 85, 105, 0.4);
            color: #94a3b8;
            font-size: 1.1rem;
        }
        
        .calc-btn-v2.func:hover {
            background: rgba(100, 116, 139, 0.5);
            color: #e2e8f0;
        }
        
        /* Operator buttons */
        .calc-btn-v2.op {
            background: rgba(124, 58, 237, 0.35);
            color: #c4b5fd;
            font-size: 1.5rem;
        }
        
        .calc-btn-v2.op:hover {
            background: rgba(139, 92, 246, 0.5);
            color: #ddd6fe;
        }
        
        /* Equals button */
        .calc-btn-v2.equals {
            background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
            color: white;
            font-size: 1.6rem;
            box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
        }
        
        .calc-btn-v2.equals:hover {
            background: linear-gradient(135deg, #a78bfa 0%, #8b5cf6 100%);
            box-shadow: 0 6px 20px rgba(139, 92, 246, 0.4);
        }
        
        /* Calculator Mobile Responsive */
        @media (max-width: 480px) {
            .calc-display-v2 {
                min-height: 80px;
                padding: 1rem;
            }
            
            .calc-result-v2 {
                font-size: 2.25rem;
            }
            
            .calc-buttons-v2 {
                gap: 8px;
            }
            
            .calc-btn-v2 {
                height: 56px;
                border-radius: 14px;
                font-size: 1.3rem;
            }
            
            .calc-btn-v2.op {
                font-size: 1.4rem;
            }
            
            .calc-btn-v2.equals {
                font-size: 1.5rem;
            }
        }

        /* ========================================= */
        /* COMPASS WIDGET V2 - Modern Design */
        /* ========================================= */
        #compass-modal {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            width: 100%;
            height: 100%;
            z-index: 100000;
            display: none;
            align-items: center;
            justify-content: center;
            background: rgba(0, 0, 0, 0.75);
            backdrop-filter: blur(8px);
            -webkit-backdrop-filter: blur(8px);
            --modal-top-offset: env(safe-area-inset-top, 0px);
            --modal-bottom-offset: calc(env(safe-area-inset-bottom, 0px) + 1rem);
            padding: 1rem;
            padding-top: var(--modal-top-offset);
            padding-bottom: var(--modal-bottom-offset);
            box-sizing: border-box;
            overflow-x: hidden;
            overflow-y: auto;
            animation: compassModalFadeIn 0.3s ease-out;
        }
        
        @keyframes compassModalFadeIn {
            from { opacity: 0; }
            to { opacity: 1; }
        }
        
        #compass-modal.show {
            display: flex;
        }
        @media (max-width: 600px) {
            #compass-modal {
                padding: 0;
                padding-top: var(--modal-top-offset);
                padding-bottom: var(--modal-bottom-offset);
                align-items: stretch;
            }
        }
        
        /* Main Widget Container */
        .compass-widget-v2 {
            background: linear-gradient(165deg, rgba(15, 23, 42, 0.97) 0%, rgba(7, 11, 22, 0.99) 100%);
            border: 1px solid rgba(71, 85, 105, 0.35);
            border-radius: 20px;
            padding: 1.5rem;
            width: 100%;
            max-width: 520px;
            max-height: calc(100dvh - var(--modal-top-offset) - var(--modal-bottom-offset));
            overflow-y: auto;
            box-sizing: border-box;
            box-shadow: 
                0 30px 80px rgba(0, 0, 0, 0.7),
                0 0 0 1px rgba(99, 102, 241, 0.15) inset,
                0 0 100px rgba(99, 102, 241, 0.08);
            animation: compassWidgetSlideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
        }
        @media (max-width: 600px) {
            .compass-widget-v2 {
                max-width: 100%;
                max-height: 100%;
                border-radius: 0;
                border: none;
                box-shadow: none;
            }
        }
        
        @keyframes compassWidgetSlideIn {
            from { 
                opacity: 0; 
                transform: translateY(20px) scale(0.95); 
            }
            to { 
                opacity: 1; 
                transform: translateY(0) scale(1); 
            }
        }
        
        /* Header */
        .compass-header-v2 {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 1.25rem;
            padding-bottom: 1rem;
            border-bottom: 1px solid rgba(71, 85, 105, 0.25);
        }
        
        .compass-title-v2 {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            font-size: 1.1rem;
            font-weight: 600;
            color: #f1f5f9;
            letter-spacing: 0.02em;
        }
        
        .compass-icon-v2 {
            width: 32px;
            height: 32px;
            background: linear-gradient(135deg, rgba(99, 102, 241, 0.25), rgba(139, 92, 246, 0.25));
            border-radius: 10px;
            display: flex;
            align-items: center;
            justify-content: center;
            color: #a5b4fc;
        }
        
        .compass-icon-v2 svg {
            width: 18px;
            height: 18px;
        }
        
        .compass-close-v2 {
            width: 32px;
            height: 32px;
            border-radius: 8px;
            background: rgba(71, 85, 105, 0.25);
            border: 1px solid rgba(71, 85, 105, 0.4);
            color: #94a3b8;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.2s ease;
        }
        
        .compass-close-v2 svg {
            width: 16px;
            height: 16px;
        }
        
        .compass-close-v2:hover {
            background: rgba(239, 68, 68, 0.15);
            border-color: rgba(239, 68, 68, 0.4);
            color: #f87171;
        }
        
        /* Main Compass Display */
        .compass-main-v2 {
            display: flex;
            flex-direction: column;
            align-items: center;
            margin-bottom: 1.25rem;
        }
        
        .compass-ring-outer {
            position: relative;
            width: 280px;
            height: 280px;
            padding: 6px;
            background: linear-gradient(145deg, rgba(99, 102, 241, 0.3), rgba(139, 92, 246, 0.15), rgba(99, 102, 241, 0.3));
            border-radius: 50%;
            box-shadow:
                0 0 60px rgba(99, 102, 241, 0.2),
                inset 0 0 20px rgba(0, 0, 0, 0.3);
            animation: compassPulse 4s ease-in-out infinite;
        }
        
        @keyframes compassPulse {
            0%, 100% { box-shadow: 0 0 60px rgba(99, 102, 241, 0.2), inset 0 0 20px rgba(0, 0, 0, 0.3); }
            50% { box-shadow: 0 0 80px rgba(99, 102, 241, 0.3), inset 0 0 20px rgba(0, 0, 0, 0.3); }
        }
        
        .compass-ring-inner {
            position: relative;
            width: 100%;
            height: 100%;
            background: 
                radial-gradient(circle at center, rgba(15, 23, 42, 0.95) 0%, rgba(7, 11, 22, 1) 70%),
                conic-gradient(from 0deg, 
                    rgba(99, 102, 241, 0.08) 0deg, 
                    transparent 3deg, 
                    transparent 27deg, 
                    rgba(99, 102, 241, 0.08) 30deg,
                    transparent 33deg,
                    transparent 57deg,
                    rgba(99, 102, 241, 0.08) 60deg,
                    transparent 63deg,
                    transparent 87deg,
                    rgba(99, 102, 241, 0.15) 90deg,
                    transparent 93deg
                );
            border: 2px solid rgba(51, 65, 85, 0.5);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            overflow: hidden;
        }
        
        /* Compass Rose (rotates) */
        .compass-rose {
            position: absolute;
            width: 240px;
            height: 240px;
            transition: transform 0.15s cubic-bezier(0.4, 0, 0.2, 1);
            will-change: transform;
        }
        
        /* Cardinal Direction Markers */
        .compass-marker {
            position: absolute;
            top: 50%;
            left: 50%;
            transform-origin: center center;
            transform: translate(-50%, -50%) rotate(var(--angle)) translateY(-105px);
            text-align: center;
        }
        
        .marker-label {
            display: block;
            font-size: 1.1rem;
            font-weight: 700;
            color: #e2e8f0;
            text-shadow: 0 0 12px rgba(99, 102, 241, 0.5);
            transform: rotate(calc(-1 * var(--angle)));
        }
        
        .compass-marker-n .marker-label {
            color: #f87171;
            font-size: 1.3rem;
            text-shadow: 0 0 15px rgba(248, 113, 113, 0.6);
        }
        
        .marker-label-small {
            display: block;
            font-size: 0.75rem;
            font-weight: 600;
            color: #64748b;
            transform: rotate(calc(-1 * var(--angle)));
        }
        
        .marker-degree {
            display: block;
            font-size: 0.6rem;
            color: #475569;
            transform: rotate(calc(-1 * var(--angle)));
            margin-top: 2px;
        }
        
        /* Tick Marks */
        .compass-tick {
            position: absolute;
            top: 50%;
            left: 50%;
            transform-origin: center center;
            transform: translate(-50%, -50%) rotate(var(--angle)) translateY(-118px);
        }
        
        .compass-tick::after {
            content: '';
            display: block;
            width: 2px;
            height: 8px;
            background: rgba(71, 85, 105, 0.6);
            border-radius: 1px;
        }
        
        .compass-tick.tick-major::after {
            height: 12px;
            background: rgba(99, 102, 241, 0.5);
        }
        
        /* Celestial Indicators (Sun/Moon) */
        .compass-celestial {
            position: absolute;
            top: 50%;
            left: 50%;
            transform-origin: center center;
            transform: translate(-50%, -50%) rotate(var(--angle)) translateY(-95px);
            width: 20px;
            height: 20px;
        }
        
        .compass-celestial svg {
            width: 100%;
            height: 100%;
            transform: rotate(calc(-1 * var(--angle)));
        }
        
        .compass-sun {
            color: #fbbf24;
            filter: drop-shadow(0 0 8px rgba(251, 191, 36, 0.6));
        }
        
        .compass-moon {
            color: #a5b4fc;
            filter: drop-shadow(0 0 8px rgba(165, 180, 252, 0.5));
        }
        
        /* Fixed Needle */
        .compass-needle-v2 {
            position: absolute;
            width: 100%;
            height: 100%;
            display: flex;
            align-items: center;
            justify-content: center;
            pointer-events: none;
            z-index: 10;
        }
        
        .needle-north {
            position: absolute;
            width: 4px;
            height: 80px;
            background: linear-gradient(to top, transparent, #ef4444 30%, #f87171);
            top: 50%;
            left: 50%;
            transform: translate(-50%, -100%);
            border-radius: 4px 4px 0 0;
            box-shadow: 0 0 20px rgba(239, 68, 68, 0.5);
        }
        
        .needle-north::before {
            content: '';
            position: absolute;
            top: -12px;
            left: 50%;
            transform: translateX(-50%);
            border-left: 8px solid transparent;
            border-right: 8px solid transparent;
            border-bottom: 16px solid #f87171;
            filter: drop-shadow(0 0 8px rgba(248, 113, 113, 0.6));
        }
        
        .needle-center {
            position: absolute;
            width: 16px;
            height: 16px;
            background: linear-gradient(135deg, #475569, #1e293b);
            border: 2px solid #64748b;
            border-radius: 50%;
            box-shadow: 0 0 15px rgba(0, 0, 0, 0.5);
            z-index: 5;
        }
        
        .needle-south {
            position: absolute;
            width: 3px;
            height: 60px;
            background: linear-gradient(to bottom, transparent, #64748b 30%, #94a3b8);
            top: 50%;
            left: 50%;
            transform: translate(-50%, 0);
            border-radius: 0 0 3px 3px;
        }
        
        /* Heading Display */
        .compass-heading-display {
            text-align: center;
            margin-top: 1.25rem;
        }
        
        .heading-degree {
            font-size: 3rem;
            font-weight: 700;
            background: linear-gradient(135deg, #f1f5f9 0%, #a5b4fc 100%);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
            letter-spacing: -0.02em;
            line-height: 1;
        }
        
        .heading-direction {
            font-size: 1rem;
            font-weight: 500;
            color: #94a3b8;
            margin-top: 0.25rem;
        }
        
        /* Status Bar */
        .compass-status-bar {
            display: flex;
            gap: 0.5rem;
            justify-content: center;
            flex-wrap: wrap;
            margin-bottom: 1.25rem;
        }
        
        .status-chip {
            display: flex;
            align-items: center;
            gap: 0.4rem;
            padding: 0.4rem 0.85rem;
            border-radius: 999px;
            font-size: 0.75rem;
            font-weight: 600;
            background: rgba(30, 41, 59, 0.6);
            border: 1px solid rgba(71, 85, 105, 0.35);
            color: #94a3b8;
            text-transform: uppercase;
            letter-spacing: 0.05em;
            transition: all 0.2s ease;
        }
        
        .status-dot {
            width: 6px;
            height: 6px;
            border-radius: 50%;
            background: #64748b;
            transition: all 0.3s ease;
        }
        
        .status-chip.status-success { 
            color: #34d399; 
            border-color: rgba(52, 211, 153, 0.35);
            background: rgba(52, 211, 153, 0.1);
        }
        .status-chip.status-success .status-dot { 
            background: #34d399; 
            box-shadow: 0 0 8px rgba(52, 211, 153, 0.6);
            animation: none;
        }
        
        .status-chip.status-warning { 
            color: #fbbf24; 
            border-color: rgba(251, 191, 36, 0.35);
            background: rgba(251, 191, 36, 0.1);
        }
        .status-chip.status-warning .status-dot { 
            background: #fbbf24; 
            animation: statusBlink 1s ease-in-out infinite;
        }
        
        .status-chip.status-error { 
            color: #f87171; 
            border-color: rgba(248, 113, 113, 0.35);
            background: rgba(248, 113, 113, 0.1);
        }
        .status-chip.status-error .status-dot { background: #f87171; }
        
        .status-chip.status-loading .status-dot {
            animation: statusSpin 1s linear infinite;
        }
        
        @keyframes statusPulse {
            0%, 100% { opacity: 1; transform: scale(1); }
            50% { opacity: 0.6; transform: scale(1.2); }
        }
        
        @keyframes statusBlink {
            0%, 100% { opacity: 1; }
            50% { opacity: 0.4; }
        }
        
        @keyframes statusSpin {
            from { transform: rotate(0deg); }
            to { transform: rotate(360deg); }
        }
        
        .status-accuracy {
            gap: 0.35rem;
        }
        
        .status-accuracy svg {
            opacity: 0.7;
        }
        
        /* Info Cards Grid */
        .compass-info-grid {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 0.75rem;
            margin-bottom: 1rem;
        }
        
        .info-card {
            background: rgba(30, 41, 59, 0.45);
            border: 1px solid rgba(71, 85, 105, 0.25);
            border-radius: 16px;
            padding: 1rem;
            transition: all 0.2s ease;
        }
        
        .info-card:hover {
            border-color: rgba(99, 102, 241, 0.3);
            background: rgba(30, 41, 59, 0.55);
        }
        
        .info-card-header {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            margin-bottom: 0.75rem;
            color: #94a3b8;
            font-size: 0.75rem;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.06em;
        }
        
        .info-card-header svg {
            width: 14px;
            height: 14px;
            opacity: 0.7;
        }
        
        .info-card-content {
            color: #e2e8f0;
        }
        
        .info-row {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 0.35rem 0;
        }
        
        .info-row:not(:last-child) {
            border-bottom: 1px solid rgba(71, 85, 105, 0.15);
        }
        
        .info-label {
            font-size: 0.75rem;
            color: #64748b;
        }
        
        .info-value {
            font-size: 0.8rem;
            font-weight: 600;
            color: #cbd5e1;
            font-family: 'SF Mono', 'Fira Code', monospace;
        }
        
        .info-value-large {
            font-size: 1.75rem;
            font-weight: 700;
            color: #f1f5f9;
            line-height: 1;
        }
        
        .info-unit {
            font-size: 0.7rem;
            color: #64748b;
            margin-top: 0.25rem;
        }
        
        /* Tilt Display */
        .tilt-display {
            display: flex;
            justify-content: space-between;
            gap: 0.5rem;
            margin-bottom: 0.75rem;
        }
        
        .tilt-axis {
            text-align: center;
            flex: 1;
        }
        
        .tilt-label {
            display: block;
            font-size: 0.65rem;
            color: #64748b;
            margin-bottom: 0.25rem;
        }
        
        .tilt-value {
            font-size: 1rem;
            font-weight: 600;
            color: #e2e8f0;
            font-family: 'SF Mono', 'Fira Code', monospace;
        }
        
        .tilt-level {
            position: relative;
            width: 100%;
            height: 40px;
            background: rgba(15, 23, 42, 0.6);
            border: 1px solid rgba(71, 85, 105, 0.3);
            border-radius: 8px;
            overflow: hidden;
        }
        
        .tilt-level::before {
            content: '';
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            width: 1px;
            height: 60%;
            background: rgba(99, 102, 241, 0.4);
        }
        
        .tilt-level::after {
            content: '';
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            width: 60%;
            height: 1px;
            background: rgba(99, 102, 241, 0.4);
        }
        
        .tilt-bubble {
            position: absolute;
            width: 14px;
            height: 14px;
            background: linear-gradient(135deg, #94a3b8, #64748b);
            border: 2px solid #cbd5e1;
            border-radius: 50%;
            transform: translate(-50%, -50%);
            transition: all 0.15s ease-out;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
        }
        
        .tilt-bubble.level {
            background: linear-gradient(135deg, #34d399, #10b981);
            border-color: #6ee7b7;
            box-shadow: 0 0 12px rgba(52, 211, 153, 0.5);
        }
        
        .tilt-bubble.tilted {
            background: linear-gradient(135deg, #fbbf24, #f59e0b);
            border-color: #fcd34d;
        }
        
        /* Celestial Info */
        .celestial-info {
            display: flex;
            flex-direction: column;
            gap: 0.5rem;
        }
        
        .celestial-row {
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }
        
        .celestial-icon {
            font-size: 1rem;
        }
        
        .celestial-label {
            font-size: 0.8rem;
            color: #94a3b8;
            flex: 1;
        }
        
        .celestial-value {
            font-size: 0.8rem;
            font-weight: 600;
            color: #e2e8f0;
            font-family: 'SF Mono', 'Fira Code', monospace;
        }
        
        /* Calibration Hint */
        .compass-calibration-hint {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            padding: 0.85rem 1rem;
            background: rgba(251, 191, 36, 0.1);
            border: 1px solid rgba(251, 191, 36, 0.25);
            border-radius: 12px;
            margin-bottom: 1rem;
            animation: calibrationPulse 2s ease-in-out infinite;
        }
        
        @keyframes calibrationPulse {
            0%, 100% { opacity: 1; }
            50% { opacity: 0.8; }
        }
        
        .calibration-icon {
            width: 32px;
            height: 32px;
            color: #fbbf24;
            animation: calibrationSpin 3s linear infinite;
        }
        
        @keyframes calibrationSpin {
            from { transform: rotate(0deg); }
            to { transform: rotate(360deg); }
        }
        
        .calibration-icon svg {
            width: 100%;
            height: 100%;
        }
        
        .calibration-text strong {
            display: block;
            font-size: 0.85rem;
            color: #fbbf24;
            margin-bottom: 0.2rem;
        }
        
        .calibration-text p {
            margin: 0;
            font-size: 0.75rem;
            color: #94a3b8;
        }
        
        /* Info Message */
        .compass-message {
            text-align: center;
            padding: 0.85rem 1rem;
            background: rgba(30, 41, 59, 0.5);
            border: 1px solid rgba(71, 85, 105, 0.25);
            border-radius: 12px;
        }
        
        .compass-message p {
            margin: 0;
            font-size: 0.85rem;
            color: #94a3b8;
        }
        
        .compass-message.message-success {
            background: rgba(52, 211, 153, 0.08);
            border-color: rgba(52, 211, 153, 0.2);
        }
        
        .compass-message.message-success p {
            color: #34d399;
        }
        
        .compass-message.message-warning {
            background: rgba(251, 191, 36, 0.08);
            border-color: rgba(251, 191, 36, 0.2);
        }
        
        .compass-message.message-warning p {
            color: #fbbf24;
        }
        
        .compass-message.message-error {
            background: rgba(248, 113, 113, 0.08);
            border-color: rgba(248, 113, 113, 0.2);
        }
        
        .compass-message.message-error p {
            color: #f87171;
        }
        
        .compass-message.message-action {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 0.75rem;
        }
        
        /* Permission Button */
        .compass-permission-btn-v2 {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 0.5rem;
            background: linear-gradient(135deg, rgba(99, 102, 241, 0.9), rgba(139, 92, 246, 0.9));
            border: 1px solid rgba(139, 92, 246, 0.5);
            color: white;
            padding: 0.75rem 1.5rem;
            border-radius: 12px;
            font-size: 0.9rem;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.25s ease;
            box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
        }
        
        .compass-permission-btn-v2:hover {
            background: linear-gradient(135deg, rgba(124, 58, 237, 0.95), rgba(139, 92, 246, 0.95));
            transform: translateY(-2px);
            box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
        }
        
        .compass-permission-btn-v2:active {
            transform: translateY(0);
        }
        
        .permission-hint {
            font-size: 0.75rem;
            color: #64748b;
            margin: 0;
        }
        
        /* Compass Mobile Responsive */
        @media (max-width: 480px) {
            .compass-widget-v2 {
                padding: 1.25rem;
                padding-bottom: max(1.5rem, calc(env(safe-area-inset-bottom) + 1rem));
            }
            
            @keyframes compassWidgetSlideUp {
                from { transform: translateY(100%); }
                to { transform: translateY(0); }
            }
            
            .compass-ring-outer {
                width: 240px;
                height: 240px;
            }
            
            .compass-rose {
                width: 200px;
                height: 200px;
            }
            
            .compass-marker {
                transform: translate(-50%, -50%) rotate(var(--angle)) translateY(-85px);
            }
            
            .compass-tick {
                transform: translate(-50%, -50%) rotate(var(--angle)) translateY(-98px);
            }
            
            .compass-celestial {
                transform: translate(-50%, -50%) rotate(var(--angle)) translateY(-75px);
            }
            
            .needle-north {
                height: 60px;
            }
            
            .needle-south {
                height: 45px;
            }
            
            .heading-degree {
                font-size: 2.5rem;
            }
            
            .compass-info-grid {
                grid-template-columns: 1fr;
            }
        }

        /* Mobile Touch Optimierungen */
        @media (max-width: 640px) {
            .symbol-btn, #response-mode-btn, #timeframe-btn, #markettype-btn, #exchange-btn {
                -webkit-tap-highlight-color: transparent;
                touch-action: manipulation;
            }
            
            /* Bessere Scrollbars auf Mobile */
            .custom-scrollbar {
                scrollbar-width: thin;
                -webkit-overflow-scrolling: touch;
            }
            
            /* Smooth Scroll für Chat */
            #chat-container {
                scroll-behavior: smooth;
            }
        }

        /* Sidebar Overlay Positionierung - unter Mobile-Header auf Mobile */
        @media (max-width: 639px) {
            #chat-container .chat-welcome-placeholder {
                padding-bottom: calc(var(--chat-input-height, 80px) + env(safe-area-inset-bottom, 12px) + 0.75rem);
                transform: translateY(var(--mobile-welcome-shift, 0px));
            }

            #sidebar-overlay,
            .sidebar-overlay-responsive {
                top: 0 !important;
                left: 0 !important;
                right: 0 !important;
                bottom: 0 !important;
                height: 100vh !important;
                height: 100dvh !important;
                width: 100% !important;
                z-index: 60 !important;
            }
            #sidebar-overlay > div,
            .sidebar-overlay-responsive > div {
                height: 100% !important;
                width: 100% !important;
                max-width: none !important;
            }
        }
        
        /* Sidebar Overlay Positionierung - unter der Navbar für Tablets */
        @media (min-width: 640px) and (max-width: 1194px) {
            #sidebar-overlay,
            .sidebar-overlay-responsive {
                top: 5rem !important;
                height: calc(100vh - 3.5rem) !important;
            }
            #sidebar-overlay > div,
            .sidebar-overlay-responsive > div {
                height: 100% !important;
            }
        }

        /* Quick-Access Overlay Positionierung - rechts statt links */
        @media (max-width: 1130px) {
            #quick-access-overlay,
            .quick-access-overlay-responsive {
                top: 5rem !important;
                height: calc(100vh - 3.5rem) !important;
            }
            #quick-access-overlay > div,
            .quick-access-overlay-responsive > div {
                height: 100% !important;
            }
        }

        /* Desktop Hover-Effekte */
        @media (min-width: 1024px) {
            .glass-card {
                transition: all 0.3s ease;
            }
            .glass-card:hover {
                border-color: rgba(168, 85, 247, 0.3);
            }
            
            /* Subtile Schatten-Animation */
            #action-btn[data-action="send"]:hover:not(:disabled) {
                box-shadow: none !important;
            }
        }

        /* iPad 11 Zoll Optimierungen - verstecke Sidebars bei knappem Platz */
        .tablet-action-btn {
            display: inline-flex;
            align-items: center;
            gap: 0.375rem;
            height: 2.25rem;
            min-width: 2.25rem;
            padding: 0 0.625rem;
            border-radius: 0.625rem;
            border: 1px solid rgba(139, 92, 246, 0.22);
            background: rgba(139, 92, 246, 0.10);
            color: #c4b5fd;
            transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
        }

        .tablet-action-btn:hover {
            background: rgba(139, 92, 246, 0.18);
            border-color: rgba(168, 85, 247, 0.42);
            color: #fff;
        }

        .tablet-action-btn:active {
            transform: scale(0.97);
        }

        .tablet-action-btn--danger {
            border-color: rgba(239, 68, 68, 0.24);
            background: rgba(239, 68, 68, 0.10);
            color: #f87171;
        }

        .tablet-action-btn--danger:hover {
            border-color: rgba(248, 113, 113, 0.46);
            background: rgba(239, 68, 68, 0.18);
            color: #fecaca;
        }

        #aion-tablet-action-bar {
            display: none;
        }

        @media (min-width: 760px) and (max-width: 899px) {
            #aion-branding {
                display: none !important;
                max-height: 0 !important;
                padding: 0 !important;
                margin: 0 !important;
            }

            #aion-tablet-action-bar {
                display: flex !important;
                margin-top: 0 !important;
                backdrop-filter: none !important;
                -webkit-backdrop-filter: none !important;
            }

            #coin-analyse-bar {
                display: none !important;
            }

            #quick-access-toggle {
                display: none !important;
            }

            #quick-access-bottom-sheet:not(.hidden) {
                display: block !important;
                top: var(--navbar-height, 5rem) !important;
                height: calc(100vh - var(--navbar-height, 5rem)) !important;
            }

            #quick-access-bottom-sheet > div {
                height: 100% !important;
            }
        }

        /* iPad Portrait (834px) und kleinere Tablets */
        @media (min-width: 768px) and (max-width: 899px) {
            /* Chat-History Sidebar ausblenden */
            #chat-sidebar {
                display: none !important;
            }
            
            /* Schnellzugriff Sidebar ausblenden */
            #quick-access-sidebar {
                display: none !important;
            }
            
            /* Hauptchat-Bereich nutzt volle Breite */
            .flex-1.min-w-0 {
                max-width: 100%;
            }
        }

        /* Tablet Landscape bis Desktop: rechte Schnellleiste bleibt ab 900px sichtbar */
        @media (min-width: 900px) and (max-width: 1194px) {
            /* Chat-History Sidebar ausblenden */
            #chat-sidebar {
                display: none !important;
            }
            
            #aion-tablet-action-bar {
                display: none !important;
            }

            /* Schnellzugriff rechts zeigen, bis die Breite unter 900px fällt */
            #quick-access-sidebar {
                display: block !important;
                width: 14rem !important;
            }
            
            /* Sidebar-Toggle Button anzeigen für versteckten Chat-Verlauf */
            #sidebar-toggle {
                display: flex !important;
            }
        }

        @media (max-width: 1194px) {
            #sidebar-overlay:not(.hidden),
            #quick-access-bottom-sheet:not(.hidden) {
                display: flex !important;
                background: rgba(2, 6, 23, 0.62) !important;
                backdrop-filter: blur(10px) !important;
                -webkit-backdrop-filter: blur(10px) !important;
            }

            #sidebar-overlay:not(.hidden) {
                justify-content: flex-start !important;
            }

            #sidebar-overlay:not(.hidden) {
                top: 0 !important;
                bottom: 0 !important;
                left: 0 !important;
                right: 0 !important;
                width: 100vw !important;
                width: 100dvw !important;
                height: 100vh !important;
                height: 100dvh !important;
            }

            #sidebar-overlay:not(.hidden) > div {
                display: grid !important;
                grid-template-rows: auto minmax(0, 1fr) auto !important;
                width: 100vw !important;
                width: 100dvw !important;
                max-width: none !important;
                height: 100vh !important;
                height: 100dvh !important;
                min-height: 0 !important;
                overflow: hidden !important;
            }

            #sidebar-overlay:not(.hidden) > div > .sticky {
                position: relative !important;
                top: auto !important;
                z-index: 5 !important;
                min-height: calc(3.75rem + env(safe-area-inset-top, 0px)) !important;
                padding-top: max(0.75rem, env(safe-area-inset-top, 0px)) !important;
            }

            #sidebar-overlay:not(.hidden) #chat-history-list-mobile,
            #sidebar-overlay:not(.hidden) #analysis-history-list-mobile {
                min-height: 0 !important;
                overflow-y: auto !important;
            }

            #quick-access-bottom-sheet:not(.hidden) {
                justify-content: flex-end !important;
            }

            #sidebar-overlay > div,
            #quick-access-bottom-sheet > div {
                width: min(100vw, 24rem) !important;
                max-width: 24rem !important;
                height: 100% !important;
            }
        }

        /* Volle Breite auf Mobile wie das Hamburger-Menü */
        @media (max-width: 759px) {
            #sidebar-overlay,
            #quick-access-bottom-sheet {
                top: 0 !important;
                bottom: 0 !important;
                left: 0 !important;
                right: 0 !important;
                width: 100vw !important;
                width: 100dvw !important;
                height: 100vh !important;
                height: 100dvh !important;
            }

            #sidebar-overlay > div,
            #quick-access-bottom-sheet > div {
                width: 100vw !important;
                width: 100dvw !important;
                max-width: none !important;
            }
        }

        /* Sidebar Toggle Button - zeigen wenn Sidebar versteckt */
        .sidebar-toggle-btn {
            display: none;
        }
        @media (max-width: 1194px) {
            .sidebar-toggle-btn {
                display: flex !important;
            }
        }
        @media (min-width: 1195px) {
            .sidebar-toggle-btn {
                display: none !important;
            }
            .sidebar-overlay-responsive {
                display: none !important;
            }
        }

        /* Quick-Access Toggle Button in der Eingabeleiste ist redundant:
           Mobile nutzt den Header-Button, Tablet die Tablet-Leiste, Desktop die rechte Sidebar. */
        .quick-access-toggle-btn {
            display: none !important;
        }

        /* iPad Tablet Optimierungen - kompaktere Filter und mehr Platz für Chat */
        @media (min-width: 768px) and (max-width: 1194px) {
            /* Kompaktere Controls Row */
            .glass-card > div > div > .mb-3,
            .glass-card > div > div > .mb-4 {
                padding: 0.5rem 0.75rem !important;
                margin-bottom: 0.5rem !important;
            }
            
            /* Kleinere Filter-Dropdowns */
            #response-mode-btn,
            #timeframe-btn,
            #markettype-btn,
            #exchange-btn {
                padding: 0.375rem 0.625rem !important;
                font-size: 0.7rem !important;
                gap: 0.25rem !important;
            }
            
            /* Kleinere Dropdown-Labels */
            .flex-col.gap-1\.5 > span,
            .flex-col.gap-1 > span {
                font-size: 8px !important;
            }
            
            /* Kompaktere Symbol/Coin-Buttons */
            .symbol-btn {
                padding: 0.375rem 0.625rem !important;
                font-size: 0.7rem !important;
            }
            
            /* Kompakterer Header */
            .glass-card .flex.items-center.justify-between.mb-4,
            .glass-card .flex.items-center.justify-between.mb-6 {
                margin-bottom: 0.5rem !important;
            }
            
            /* Titel kleiner */
            .glass-card h1 {
                font-size: 1.25rem !important;
            }
            
            /* Limit Badge kompakter */
            #cost-badge {
                padding: 0.25rem 0.5rem !important;
                font-size: 0.65rem !important;
            }
            
            /* Divider schmaler */
            .my-2, .my-4 {
                margin-top: 0.25rem !important;
                margin-bottom: 0.25rem !important;
            }
            
            /* Mehr Platz für Chat-Container */
            #chat-container {
                flex: 1 1 auto !important;
                min-height: 0 !important;
            }
            
            /* Kompakteres Input-Feld */
            #chat-input {
                min-height: var(--chat-control-height) !important;
                font-size: 0.875rem !important;
            }
            
            #action-btn {
                height: var(--chat-control-height) !important;
                width: var(--chat-send-button-width) !important;
                min-width: var(--chat-side-button-width) !important;
                padding: 0 !important;
            }

            #sidebar-toggle {
                height: 2.5rem !important;
                width: 2.5rem !important;
                padding: 0 !important;
            }
            
            #action-btn span {
                display: none !important;
            }
            
            /* Glass Card - Abstand links, rechts und unten */
            .glass-card.relative.overflow-hidden {
                padding: 0.5rem 0.75rem calc(0.75rem + env(safe-area-inset-bottom, 12px)) 0.75rem !important;
            }
        }

        /* Desktop Filter kompakter */
        @media (min-width: 1195px) {
            #response-mode-btn,
            #timeframe-btn,
            #markettype-btn,
            #exchange-btn {
                padding: 0.375rem 0.5rem !important;
                font-size: 0.75rem !important;
            }
            .symbol-btn {
                padding: 0.375rem 0.5rem !important;
                font-size: 0.75rem !important;
            }
        }

        /* Aktive Button States - wie Dropdown-Effekt */
        .symbol-btn.active, .symbol-btn[data-active="true"] {
            background: linear-gradient(to right, rgba(124, 58, 237, 0.2) 0%, transparent 100%) !important;
            border-color: rgba(124, 58, 237, 0.4) !important;
            color: rgb(229, 231, 235) !important; /* text-gray-200 */
        }
        
        /* Symbol Button Base Styling - ensure clickability */
        .symbol-btn {
            position: relative;
            z-index: 10;
            pointer-events: auto !important;
            user-select: none;
            -webkit-user-select: none;
        }

        /* Chat Message Bubbles verbessert */
        #chat-container .rounded-2xl {
            backdrop-filter: blur(8px);
        }
        
        /* Quellen-Icons Container - schlicht, ohne Trennlinie */
        .sources-container {
            display: inline-flex;
            align-items: center;
            gap: 4px;
            margin-top: 0.5rem;
            padding-top: 0;
            border-top: none;
            cursor: pointer;
        }

        .sources-label--clickable {
            cursor: pointer;
        }
        .sources-label--clickable:hover {
            color: #c4b5fd;
        }

        .sources-label {
            font-size: 0.75rem;
            color: #94a3b8;
            display: inline-flex;
            align-items: center;
            gap: 4px;
            line-height: 1;
            transition: color 0.2s ease;
        }

        /* Icons-Stack: nur überlappende Icons, kein Rahmen */
        .sources-icons-stack {
            display: inline-flex;
            align-items: center;
            cursor: pointer;
            padding: 0;
            background: transparent;
            border: none;
            border-radius: 0;
            transition: transform 0.2s ease;
            gap: 0;
        }

        .sources-icons-stack:hover,
        .sources-container:hover .sources-icons-stack {
            background: transparent;
            border-color: transparent;
            transform: translateY(-1px);
        }

        .sources-container:hover .sources-label {
            color: #c4b5fd;
        }

        .sources-icons-stack:hover .source-icon,
        .sources-container:hover .source-icon {
            border-color: rgba(167, 139, 250, 0.55);
        }

        .sources-icons-stack:hover .source-icon,
        .sources-icons-stack:hover .sources-count,
        .sources-container:hover .source-icon,
        .sources-container:hover .sources-count {
            box-shadow: 0 3px 8px rgba(0, 0, 0, 0.45);
        }

        /* Einzelnes Quellen-Icon - überlappend, weißer Hintergrund für scharfe Favicons */
        .source-icon {
            width: 26px;
            height: 26px;
            border-radius: 50%;
            background: #1e293b;
            border: 2px solid #1e293b;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            position: relative;
            margin-left: -9px;
            overflow: hidden;
            box-shadow: 0 2px 5px rgba(0, 0, 0, 0.35);
            pointer-events: none;
            transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
        }

        .source-icon:first-child {
            margin-left: 0;
        }

        .source-icon img {
            width: 100%;
            height: 100%;
            border-radius: 50%;
            object-fit: cover;
            background: #1e293b;
            display: block;
        }

        .source-icon .source-fallback {
            width: 100%;
            height: 100%;
            display: flex;
            align-items: center;
            justify-content: center;
            background: linear-gradient(135deg, #ede9fe 0%, #ddd6fe 100%);
            font-size: 11px;
            font-weight: 700;
            color: #6d28d9;
        }

        /* Count Badge für mehr als X Quellen */
        .sources-count {
            position: relative;
            z-index: 6;
            width: 26px;
            height: 26px;
            border-radius: 50%;
            background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
            border: 2px solid #1e293b;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            font-size: 0.65rem;
            color: #ffffff;
            font-weight: 700;
            margin-left: -9px;
            box-shadow: 0 2px 5px rgba(0, 0, 0, 0.35);
            transition: box-shadow 0.2s ease;
        }

        /* Light Theme: Ring-Farbe an helle Bubble anpassen */
        html.aion-chat-page.theme-light .source-icon {
            border-color: #ffffff;
            box-shadow: 0 1px 3px rgba(15, 23, 42, 0.18);
        }
        html.aion-chat-page.theme-light .sources-count {
            border-color: #ffffff;
            box-shadow: 0 1px 3px rgba(15, 23, 42, 0.18);
        }
        html.aion-chat-page.theme-light .sources-label {
            color: #64748b;
        }
        html.aion-chat-page.theme-light .sources-container:hover .sources-label {
            color: #6d28d9;
        }
        html.aion-chat-page.theme-light .sources-container:hover .source-icon,
        html.aion-chat-page.theme-light .sources-icons-stack:hover .source-icon {
            border-color: rgba(109, 40, 217, 0.42);
        }
        html.aion-chat-page.theme-light .sources-container:hover .source-icon,
        html.aion-chat-page.theme-light .sources-container:hover .sources-count,
        html.aion-chat-page.theme-light .sources-icons-stack:hover .source-icon,
        html.aion-chat-page.theme-light .sources-icons-stack:hover .sources-count {
            box-shadow: 0 3px 8px rgba(15, 23, 42, 0.22);
        }
        
        /* Quellen-Sidebar (rechts, ChatGPT-Style) */
        .sources-sidebar-item {
            display: flex;
            gap: 10px;
            padding: 10px;
            border-radius: 10px;
            background: rgba(255, 255, 255, 0.03);
            border: 1px solid rgba(255, 255, 255, 0.06);
            transition: all 0.2s;
            text-decoration: none;
            color: inherit;
            cursor: pointer;
        }
        .sources-sidebar-item:hover {
            background: rgba(168, 85, 247, 0.1);
            border-color: rgba(168, 85, 247, 0.3);
            transform: translateY(-1px);
        }
        .sources-sidebar-item:hover .sources-sidebar-item-icon {
            background: rgba(168, 85, 247, 0.16);
            box-shadow: 0 0 0 1px rgba(168, 85, 247, 0.25);
        }
        .sources-sidebar-item-icon {
            flex-shrink: 0;
            width: 32px;
            height: 32px;
            border-radius: 8px;
            background: rgba(255, 255, 255, 0.06);
            display: flex;
            align-items: center;
            justify-content: center;
            overflow: hidden;
            transition: background 0.2s ease, box-shadow 0.2s ease;
        }
        .sources-sidebar-item-icon img {
            width: 20px;
            height: 20px;
            object-fit: contain;
        }
        .sources-sidebar-item-icon .source-fallback {
            font-size: 13px;
            font-weight: 700;
            color: #a78bfa;
        }
        .sources-sidebar-item-content {
            flex: 1;
            min-width: 0;
        }
        .sources-sidebar-item-domain {
            font-size: 10.5px;
            color: #94a3b8;
            text-transform: lowercase;
            margin-bottom: 3px;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        .sources-sidebar-item-title {
            font-size: 12.5px;
            color: #e2e8f0;
            line-height: 1.35;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
        }
        .sources-sidebar-item-desc {
            margin-top: 4px;
            font-size: 11.5px;
            color: #94a3b8;
            line-height: 1.4;
            display: -webkit-box;
            -webkit-line-clamp: 3;
            -webkit-box-orient: vertical;
            overflow: hidden;
        }
        .sources-sidebar-item:hover .sources-sidebar-item-title {
            color: #fff;
        }
        .source-item-desc {
            margin-top: 4px;
            font-size: 11.5px;
            color: #94a3b8;
            line-height: 1.4;
            display: -webkit-box;
            -webkit-line-clamp: 3;
            -webkit-box-orient: vertical;
            overflow: hidden;
        }

/* ===== SOURCES PANEL (right-side slide-in, all screen sizes) ===== */
#sources-panel {
    position: fixed;
    top: var(--navbar-height, 5rem); right: 0; bottom: 0;
    width: 380px;
    max-width: 100vw;
    z-index: 1500;
    background: linear-gradient(180deg, rgba(13,20,40,0.99) 0%, rgba(9,15,31,0.99) 100%);
    border-left: 1px solid rgba(71,85,105,0.4);
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.28s cubic-bezier(0.4,0,0.2,1);
    box-shadow: -12px 0 48px rgba(0,0,0,0.6);
}
#sources-panel.sp-open { transform: translateX(0); }
#sources-panel-backdrop {
    position: fixed;
    top: var(--navbar-height, 5rem); left: 0; right: 0; bottom: 0;
    z-index: 1499;
    background: rgba(0,0,0,0.45);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.28s;
}
#sources-panel-backdrop.sp-open { opacity: 1; pointer-events: auto; }
.sources-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 16px 12px;
    border-bottom: 1px solid rgba(255,255,255,0.07);
    flex-shrink: 0;
}
.sources-panel-title { display: flex; align-items: center; gap: 8px; min-width: 0; }
.sources-panel-icon { width: 20px; height: 20px; color: #a78bfa; flex-shrink: 0; }
.sources-panel-heading { font-size: 15px; font-weight: 600; color: #fff; white-space: nowrap; }
.sources-panel-close-btn {
    padding: 6px; border-radius: 8px; background: transparent; border: none;
    color: #94a3b8; cursor: pointer; transition: background 0.15s, color 0.15s;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.sources-panel-close-btn:hover { background: rgba(255,255,255,0.1); color: #fff; }
.sources-panel-close-btn svg { width: 18px; height: 18px; }
.sources-panel-list {
    flex: 1; overflow-y: auto; padding: 12px;
    display: flex; flex-direction: column; gap: 6px;
}

        /* Quellen-Popup */
        .sources-popup {
            position: fixed;
            background: linear-gradient(180deg, rgba(15, 23, 42, 0.98) 0%, rgba(10, 18, 36, 0.99) 100%);
            border: 1px solid rgba(71, 85, 105, 0.7);
            border-radius: 12px;
            padding: 1rem;
            box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
            z-index: 100000;
            max-width: 400px;
            min-width: 280px;
            backdrop-filter: blur(12px);
            display: none;
        }
        
        .sources-popup.show {
            display: block;
            animation: fadeInUp 0.2s ease;
        }
        
        @keyframes fadeInUp {
            from {
                opacity: 0;
                transform: translateY(10px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }
        
        .sources-popup-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 0.75rem;
            padding-bottom: 0.5rem;
            border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        }
        
        .sources-popup-title {
            font-size: 0.875rem;
            font-weight: 600;
            color: #e2e8f0;
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }
        
        .sources-popup-close {
            background: none;
            border: none;
            color: #64748b;
            cursor: pointer;
            padding: 0.25rem;
            border-radius: 4px;
            transition: all 0.2s;
        }
        
        .sources-popup-close:hover {
            background: rgba(255, 255, 255, 0.1);
            color: #e2e8f0;
        }
        
        .sources-popup-list {
            display: flex;
            flex-direction: column;
            gap: 0.5rem;
        }
        
        .source-item {
            display: flex;
            align-items: flex-start;
            gap: 0.75rem;
            padding: 0.5rem;
            border-radius: 8px;
            background: rgba(255, 255, 255, 0.03);
            transition: all 0.2s;
        }
        
        .source-item:hover {
            background: rgba(124, 58, 237, 0.1);
        }
        .source-item:hover .source-item-icon {
            transform: translateY(-1px);
        }
        
        .source-item-icon {
            width: 20px;
            height: 20px;
            flex-shrink: 0;
            transition: transform 0.2s ease;
        }
        
        .source-item-icon img {
            width: 100%;
            height: 100%;
            border-radius: 4px;
            object-fit: contain;
        }
        
        .source-item-content {
            flex: 1;
            min-width: 0;
        }
        
        .source-item-title {
            font-size: 0.8125rem;
            color: #a78bfa;
            text-decoration: none;
            display: block;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }
        
        .source-item:hover .source-item-title,
        .source-item-title:hover {
            color: #c4b5fd;
            text-decoration: underline;
        }
        
        .source-item-domain {
            font-size: 0.6875rem;
            color: #64748b;
            margin-top: 0.125rem;
        }
        
        /* Versteckte Source-Links (werden als Icons angezeigt) */
        .hidden-source-link {
            display: none;
        }

/* Ensure the Limit badge renders consistently and isn't clipped
           by parent containers. This forces a stable line-height, padding,
           border-radius and a higher z-index so the badge and its tooltip
           appear above surrounding elements. */
        #cost-badge {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            white-space: nowrap; /* prevent wrapping like 'Limit' / '15.2%' */
            line-height: 1;
            padding: 0.375rem 0.75rem; /* matches px-3 py-1.5 */
            border-radius: 0.5rem; /* rounded-lg */
            position: relative;
            z-index: 60;
            overflow: visible;
            box-shadow: 0 6px 18px rgba(2,6,23,0.35);
            backdrop-filter: none !important;
            min-width: 3.2rem; /* ensure small values don't collapse */
        }
        /* Make sure the tooltip is on top and not clipped */
        #cost-tooltip {
            z-index: 9999 !important;
            pointer-events: none;
        }

        /* Custom Confirmation Modal */
        #confirm-modal-overlay {
            position: fixed;
            inset: 0;
            background: rgba(0, 0, 0, 0.7);
            backdrop-filter: blur(4px);
            z-index: 9998;
            display: none;
            align-items: center;
            justify-content: center;
            animation: fadeIn 0.2s ease;
        }
        #confirm-modal-overlay.show {
            display: flex;
        }
        @keyframes fadeIn {
            from { opacity: 0; }
            to { opacity: 1; }
        }
        @keyframes fadeOut {
            from { opacity: 1; }
            to { opacity: 0; }
        }
        @keyframes slideUp {
            from { transform: translateY(20px); opacity: 0; }
            to { transform: translateY(0); opacity: 1; }
        }
        /* Legacy styles for old modal (kept for backward compatibility) */
        #confirm-modal {
            background: linear-gradient(180deg, rgba(15, 23, 42, 0.98) 0%, rgba(10, 18, 36, 0.99) 100%);
            border: 1px solid rgba(71, 85, 105, 0.7);
            border-radius: 0.75rem;
            padding: 1.25rem 1.5rem;
            width: fit-content;
            min-width: min(92vw, 300px);
            max-width: min(92vw, 400px);
            box-shadow: 0 25px 50px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(0, 0, 0, 0.3);
            animation: slideUp 0.25s ease;
            z-index: 9999;
        }
        #confirm-modal h2 {
            color: #e2e8f0;
            font-size: 1.125rem;
            font-weight: 700;
            margin-bottom: 0.5rem;
            line-height: 1.3;
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }
        #confirm-modal p {
            color: #cbd5e1;
            font-size: 0.95rem;
            margin-bottom: 1rem;
            line-height: 1.5;
            white-space: normal;
            word-break: break-word;
        }
        #confirm-modal .modal-body {
            margin-bottom: 0.75rem;
        }
        #confirm-modal-buttons {
            display: flex;
            width: 100%;
            gap: 0.75rem;
            justify-content: space-between;
            flex-wrap: wrap;
        }
        .modal-btn {
            padding: 0.5rem 0.9rem;
            border-radius: 0.5rem;
            border: 1px solid transparent;
            font-size: 0.9rem;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.16s ease;
            text-align: center;
            min-width: 140px;
        }
        #confirm-modal-cancel {
            margin-right: auto;
            background: rgba(100, 116, 139, 0.12);
            border-color: rgba(100, 116, 139, 0.22);
            color: #cbd5e1;
        }
        #confirm-modal-cancel:hover {
            background: rgba(100, 116, 139, 0.18);
            border-color: rgba(100, 116, 139, 0.4);
        }
        #confirm-modal-confirm {
            background: linear-gradient(90deg, rgba(124,58,237,0.95), rgba(99,102,241,0.95));
            border-color: rgba(124,58,237,0.95);
            color: white;
            box-shadow: 0 6px 18px rgba(124,58,237,0.18);
        }
        #confirm-modal-confirm:hover {
            filter: brightness(1.03);
            transform: translateY(-1px);
        }

        @keyframes spin {
            to { transform: rotate(360deg); }
        }
        .animate-spin {
            animation: spin 1s linear infinite;
        }
        
        /* Lightbox für Bildvergrößerung (Enhanced) */
        .image-lightbox {
            position: fixed;
            inset: 0;
            z-index: 9999;
            background: rgba(0, 0, 0, 0.95);
            display: flex;
            align-items: center;
            justify-content: center;
            opacity: 0;
            visibility: hidden;
            transition: opacity 0.3s ease, visibility 0.3s ease;
            backdrop-filter: blur(8px);
        }
        .image-lightbox.show,
        .image-lightbox.active {
            opacity: 1;
            visibility: visible;
        }
        .lightbox-backdrop {
            position: absolute;
            inset: 0;
            cursor: zoom-out;
        }
        .lightbox-content {
            position: relative;
            display: flex;
            align-items: center;
            justify-content: center;
            width: 100%;
            height: 100%;
            padding: 60px 70px;
        }
        .lightbox-image-wrapper {
            position: relative;
            display: flex;
            align-items: center;
            justify-content: center;
            max-width: 100%;
            max-height: 100%;
        }
        .lightbox-loading {
            position: absolute;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        .lightbox-spinner {
            width: 32px;
            height: 32px;
            border: 3px solid rgba(255,255,255,0.2);
            border-top-color: #a78bfa;
            border-radius: 50%;
            animation: spin 0.8s linear infinite;
        }
        .image-lightbox .lightbox-image {
            max-width: 90vw;
            max-height: 80vh;
            object-fit: contain;
            border-radius: 8px;
            box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
            transition: opacity 0.3s ease, transform 0.3s ease;
            cursor: default;
        }
        .image-lightbox .lightbox-close {
            position: absolute;
            top: 16px;
            right: 16px;
            width: 44px;
            height: 44px;
            border-radius: 50%;
            background: rgba(255, 255, 255, 0.1);
            border: 1px solid rgba(255, 255, 255, 0.2);
            color: white;
            font-size: 22px;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: background 0.2s;
            z-index: 10;
        }
        .image-lightbox .lightbox-close:hover {
            background: rgba(255, 255, 255, 0.25);
        }
        /* Lightbox Navigation Buttons */
        .image-lightbox .lightbox-nav {
            position: absolute;
            top: 50%;
            transform: translateY(-50%);
            width: 48px;
            height: 48px;
            border-radius: 50%;
            background: rgba(0, 0, 0, 0.6);
            border: 1px solid rgba(255, 255, 255, 0.2);
            color: white;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.2s;
            z-index: 10;
        }
        .image-lightbox .lightbox-nav:hover {
            background: rgba(255, 255, 255, 0.2);
            transform: translateY(-50%) scale(1.1);
        }
        .image-lightbox .lightbox-prev {
            left: 16px;
        }
        .image-lightbox .lightbox-next {
            right: 16px;
        }
        .lightbox-footer {
            position: absolute;
            bottom: 16px;
            left: 0;
            right: 0;
            display: flex;
            justify-content: center;
            align-items: center;
            gap: 16px;
            color: rgba(255,255,255,0.7);
            font-size: 0.85rem;
            z-index: 10;
        }
        .lightbox-title {
            max-width: 60%;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }
        .lightbox-counter {
            background: rgba(255,255,255,0.1);
            padding: 4px 12px;
            border-radius: 12px;
            font-size: 0.75rem;
        }
        @media (max-width: 640px) {
            .lightbox-content { padding: 50px 10px; }
            .image-lightbox .lightbox-nav { width: 40px; height: 40px; }
            .image-lightbox .lightbox-prev { left: 8px; }
            .image-lightbox .lightbox-next { right: 8px; }
            .image-lightbox .lightbox-close { top: 8px; right: 8px; width: 36px; height: 36px; font-size: 18px; }
        }

/* TradingView Widget Styles */
    .tradingview-widget-container {
        width: 100%;
        max-width: 100%;
        margin: 0.75rem 0;
        border-radius: 12px;
        overflow: hidden;
        background: rgba(15, 23, 42, 0.8);
        border: 1px solid rgba(148, 163, 184, 0.2);
    }

    /* Chart Grid - Charts nebeneinander wenn genug Platz */
    .chart-grid {
        display: flex;
        flex-wrap: wrap;
        gap: 0.75rem;
        margin: 1rem 0;
    }

    .chart-grid .tradingview-widget-container {
        flex: 1 1 380px;
        min-width: 320px;
        max-width: 100%;
        width: auto;
        margin: 0;
    }

    .chart-grid .tradingview-widget {
        height: 420px;
    }
    
    .tradingview-widget {
        width: 100%;
        height: 450px;
    }
    
    @media (max-width: 860px) {
        .chart-grid .tradingview-widget-container {
            flex: 1 1 100%;
        }
    }

    @media (max-width: 360px) {
        .tradingview-widget-container {
            width: 320px;
            max-width: 100%;
        }
        .tradingview-widget {
            height: 320px;
        }
    }
    
    .tradingview-chart-loading {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.5rem;
        padding: 1rem;
        color: #94a3b8;
        font-size: 0.9rem;
    }
    
    .chart-loading-spinner {
        width: 20px;
        height: 20px;
        border: 2px solid rgba(148, 163, 184, 0.3);
        border-top-color: #a855f7;
        border-radius: 50%;
        animation: spin 1s linear infinite;
    }
    
    @keyframes spin {
        to { transform: rotate(360deg); }
    }
    
    /* Aionity Chart Styles (für BTC, ETH, XRP, SOL, LINK, TAO) */
    .aionity-chart-container {
        width: 100%;
        margin: 1rem 0;
        border-radius: 12px;
        overflow: hidden;
        background: rgba(15, 23, 42, 0.9);
        border: 1px solid rgba(168, 85, 247, 0.3);
        box-shadow: 0 4px 20px rgba(168, 85, 247, 0.1);
    }
    
    .aionity-chart-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0.75rem 1rem;
        background: linear-gradient(135deg, rgba(168, 85, 247, 0.15), rgba(139, 92, 246, 0.1));
        border-bottom: 1px solid rgba(168, 85, 247, 0.2);
    }
    
    .aionity-chart-title {
        font-weight: 600;
        color: #e2e8f0;
        font-size: 0.95rem;
    }
    
    .aionity-chart-link {
        color: #a855f7;
        opacity: 0.7;
        transition: opacity 0.2s, transform 0.2s;
    }
    
    .aionity-chart-link:hover {
        opacity: 1;
        transform: scale(1.1);
    }
    
    .aionity-chart-iframe {
        width: 100%;
        height: 450px;
        border: none;
        background: #0f172a;
    }

    /* Voice Recording Overlay */
    #voice-recording-overlay {
        backdrop-filter: blur(6px);
        -webkit-backdrop-filter: blur(6px);
        transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
    }

    #voice-recording-overlay.is-listening {
        border-color: rgba(168, 85, 247, 0.55);
        box-shadow: 0 0 0 1px rgba(168, 85, 247, 0.35), 0 0 22px rgba(168, 85, 247, 0.25);
    }

    #voice-recording-overlay.is-speaking {
        border-color: rgba(34, 197, 94, 0.7);
        box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.45), 0 0 28px rgba(34, 197, 94, 0.45);
    }

    #voice-recording-overlay.is-processing {
        border-color: rgba(148, 163, 184, 0.5);
        box-shadow: 0 0 0 1px rgba(148, 163, 184, 0.35);
    }

    /* Mic orb with pulsing rings for "listening" idle state */
    .voice-mic-orb {
        position: relative;
        width: 36px;
        height: 36px;
        border-radius: 9999px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: linear-gradient(135deg, rgba(168, 85, 247, 0.55), rgba(99, 102, 241, 0.55));
        color: #fff;
    }

    .voice-mic-icon {
        width: 18px;
        height: 18px;
        position: relative;
        z-index: 2;
    }

    .voice-mic-ring {
        position: absolute;
        inset: 0;
        border-radius: 9999px;
        border: 2px solid rgba(168, 85, 247, 0.65);
        opacity: 0;
        transform: scale(1);
        pointer-events: none;
    }

    #voice-recording-overlay.is-listening .voice-mic-ring {
        animation: voice-mic-ring-pulse 1.6s ease-out infinite;
    }

    #voice-recording-overlay.is-listening .voice-mic-ring-2 {
        animation-delay: 0.8s;
    }

    #voice-recording-overlay.is-speaking .voice-mic-orb {
        background: linear-gradient(135deg, rgba(34, 197, 94, 0.75), rgba(16, 185, 129, 0.75));
        animation: voice-mic-orb-throb 0.9s ease-in-out infinite;
    }

    #voice-recording-overlay.is-speaking .voice-mic-ring {
        border-color: rgba(34, 197, 94, 0.7);
        animation: voice-mic-ring-pulse 1s ease-out infinite;
    }

    #voice-recording-overlay.is-speaking .voice-mic-ring-2 {
        animation-delay: 0.4s;
    }

    @keyframes voice-mic-ring-pulse {
        0% { opacity: 0.7; transform: scale(0.85); }
        80% { opacity: 0; transform: scale(1.65); }
        100% { opacity: 0; transform: scale(1.65); }
    }

    @keyframes voice-mic-orb-throb {
        0%, 100% { transform: scale(1); }
        50% { transform: scale(1.08); }
    }

    /* Status label & live transcript preview */
    .voice-status-label {
        font-size: 0.78rem;
        font-weight: 600;
        letter-spacing: 0.02em;
        color: rgba(226, 232, 240, 0.95);
        text-transform: uppercase;
    }

    #voice-recording-overlay.is-speaking .voice-status-label {
        color: rgb(134, 239, 172);
    }

    #voice-recording-overlay.is-listening .voice-status-label {
        color: rgb(216, 180, 254);
    }

    #voice-recording-overlay #voice-stop-btn {
        border: 0 !important;
        outline: 0 !important;
        box-shadow: 0 6px 18px rgba(127, 29, 29, 0.22);
        transition: background-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
    }

    #voice-recording-overlay #voice-stop-btn:hover {
        background: rgba(239, 68, 68, 0.98) !important;
        border: 0 !important;
        box-shadow: 0 10px 24px rgba(127, 29, 29, 0.38);
        transform: translateY(-1px);
    }

    #voice-recording-overlay #voice-stop-btn:active {
        transform: translateY(0) scale(0.98);
    }

    /* Hide "Höre zu…" label on very small screens to free up space */
    @media (max-width: 349px) {
        .voice-status-label {
            display: none;
        }

        #voice-recording-overlay #voice-timer {
            position: absolute;
            left: 50%;
            margin-left: 0 !important;
            transform: translateX(-50%);
        }
    }

    .voice-transcript-preview {
        font-size: 0.85rem;
        line-height: 1.15;
        color: rgba(226, 232, 240, 0.95);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        min-width: 0;
        opacity: 0;
        transition: opacity 0.15s ease;
    }

    .voice-transcript-preview.has-text {
        opacity: 1;
    }

    /* Live VU-style level bars (heights driven by JS via transform scaleY) */
    .voice-level-indicator {
        position: relative;
        display: none; /* hidden on mobile, shown via media query below */
        align-items: center;
        justify-content: center;
        gap: 3px;
        height: 26px;
        flex-shrink: 0;
        padding: 0 4px;
    }

    .voice-level-bar {
        width: 3px;
        height: 22px;
        border-radius: 9999px;
        background: linear-gradient(180deg, rgba(216, 180, 254, 0.95), rgba(168, 85, 247, 0.85));
        transform-origin: center;
        transform: scaleY(0.18);
        transition: transform 0.08s linear, background 0.25s ease;
        will-change: transform;
    }

    #voice-recording-overlay.is-speaking .voice-level-bar {
        background: linear-gradient(180deg, rgba(187, 247, 208, 0.95), rgba(34, 197, 94, 0.9));
    }

    #voice-recording-overlay.is-processing .voice-level-bar {
        background: linear-gradient(180deg, rgba(203, 213, 225, 0.7), rgba(148, 163, 184, 0.7));
    }

    @media (min-width: 640px) {
        .voice-level-indicator {
            display: flex;
        }
    }

    /* ========================================= */
    /* SHOPPING SEARCH WIDGET                   */
    /* ========================================= */
    #shopping-modal {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        height: 100%;
        z-index: 100000;
        display: none;
        align-items: center;
        justify-content: center;
        background: rgba(0, 0, 0, 0.75);
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
        --modal-top-offset: env(safe-area-inset-top, 0px);
        --modal-bottom-offset: calc(env(safe-area-inset-bottom, 0px) + 1rem);
        padding: 1rem;
        padding-top: var(--modal-top-offset);
        padding-bottom: var(--modal-bottom-offset);
        box-sizing: border-box;
        overflow-x: hidden;
        overflow-y: auto;
    }
    #shopping-modal.show {
        display: flex;
    }
    .shopping-widget {
        background: linear-gradient(180deg, rgba(15, 23, 42, 0.98) 0%, rgba(10, 18, 36, 0.99) 100%);
        border: 1px solid rgba(71, 85, 105, 0.5);
        border-radius: 24px;
        padding: 1.5rem;
        width: 100%;
        max-width: 760px;
        max-height: calc(100dvh - var(--modal-top-offset) - var(--modal-bottom-offset));
        overflow-y: auto;
        overflow-x: hidden;
        box-sizing: border-box;
        margin: 0 auto;
        box-shadow: 
            0 25px 60px rgba(0, 0, 0, 0.6),
            0 0 0 1px rgba(251, 191, 36, 0.1) inset;
    }
    .shopping-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 1rem;
    }
    .shopping-header h3 {
        font-size: 1.1rem;
        font-weight: 600;
        color: #e2e8f0;
        margin: 0;
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }
    .shopping-close {
        background: rgba(71, 85, 105, 0.3);
        border: none;
        color: #94a3b8;
        width: 32px;
        height: 32px;
        border-radius: 8px;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.2s;
    }
    .shopping-close:hover {
        background: rgba(239, 68, 68, 0.2);
        color: #ef4444;
    }
    
    .shopping-search-form {
        padding: 0.5rem 0;
        display: flex;
        flex-direction: column;
        height: 100%;
    }
    
    .shopping-search-header {
        text-align: center;
        margin-bottom: 1.25rem;
    }
    
    .shopping-search-header h4 {
        margin: 0 0 0.25rem 0;
        font-size: 1.2rem;
        font-weight: 600;
        color: #e2e8f0;
    }
    
    .shopping-search-subtitle {
        margin: 0;
        font-size: 0.85rem;
        color: #64748b;
    }
    
    .shopping-form-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.75rem;
        margin-bottom: 1rem;
    }
    
    .shopping-form-full {
        grid-column: 1 / -1;
    }
    
    .shopping-form-group {
        display: flex;
        flex-direction: column;
        gap: 0.35rem;
    }
    
    .shopping-form-group label {
        font-size: 0.8rem;
        color: #94a3b8;
        font-weight: 500;
    }
    
    .shopping-form-group input,
    .shopping-form-group select {
        background: rgba(0, 0, 0, 0.4);
        border: 1px solid rgba(71, 85, 105, 0.5);
        border-radius: 10px;
        padding: 0.65rem 0.85rem;
        color: #e2e8f0;
        font-size: 0.95rem;
        outline: none;
        transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
    }
    
    .shopping-form-group input:focus,
    .shopping-form-group select:focus {
        border-color: rgba(251, 191, 36, 0.6);
        background: rgba(0, 0, 0, 0.5);
        box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.1);
        outline: none;
    }
    
    .shopping-form-group input::placeholder {
        color: #64748b;
    }
    
    .shopping-form-group select {
        cursor: pointer;
        appearance: none;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%2394a3b8' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
        background-repeat: no-repeat;
        background-position: right 0.75rem center;
        padding-right: 2rem;
    }
    
    .shopping-form-group input[type="number"] {
        -moz-appearance: textfield;
    }
    
    .shopping-form-group input[type="number"]::-webkit-inner-spin-button,
    .shopping-form-group input[type="number"]::-webkit-outer-spin-button {
        -webkit-appearance: none;
        margin: 0;
    }
    
    /* Categories */
    .shopping-categories {
        margin-bottom: 1rem;
    }
    
    .shopping-categories label {
        display: block;
        font-size: 0.8rem;
        color: #94a3b8;
        margin-bottom: 0.5rem;
    }
    
    .shopping-category-buttons {
        display: flex;
        gap: 0.4rem;
        flex-wrap: wrap;
    }
    
    .shopping-cat-btn {
        background: rgba(30, 41, 59, 0.5);
        border: 1px solid rgba(71, 85, 105, 0.4);
        border-radius: 8px;
        padding: 0.4rem 0.65rem;
        color: #94a3b8;
        font-size: 0.8rem;
        cursor: pointer;
        transition: all 0.2s;
    }
    
    .shopping-cat-btn:hover {
        background: rgba(251, 191, 36, 0.1);
        border-color: rgba(251, 191, 36, 0.3);
        color: #cbd5e1;
    }
    
    .shopping-cat-btn.active {
        background: linear-gradient(135deg, rgba(251, 191, 36, 0.25), rgba(245, 158, 11, 0.2));
        border-color: rgba(251, 191, 36, 0.5);
        color: #fbbf24;
    }
    
    /* Main Search Button */
    .shopping-search-btn-main {
        width: 100%;
        background: linear-gradient(135deg, rgba(146, 64, 14, 0.72), rgba(120, 53, 15, 0.82));
        border: 1px solid rgba(251, 191, 36, 0.28);
        border-radius: 12px;
        padding: 0.85rem 1.5rem;
        color: #fffbeb;
        font-size: 1rem;
        font-weight: 600;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.5rem;
        transition: all 0.2s;
        margin-bottom: 1rem;
    }
    
    .shopping-search-btn-main:hover {
        background: linear-gradient(135deg, rgba(180, 83, 9, 0.82), rgba(146, 64, 14, 0.88));
        border-color: rgba(251, 191, 36, 0.42);
        transform: translateY(-1px);
        box-shadow: 0 4px 15px rgba(120, 53, 15, 0.32);
    }
    
    .shopping-search-btn-main svg {
        stroke: #fffbeb;
    }
    
    /* Search Buttons Container */
    .shopping-search-buttons,
    .travel-search-buttons {
        display: flex;
        gap: 0.5rem;
        margin-bottom: 0.5rem;
    }
    
    @media (max-width: 480px) {
        .shopping-search-buttons,
        .travel-search-buttons {
            flex-direction: column;
            margin-top: auto;
            gap: 0.75rem;
        }
    }
    
    .shopping-search-buttons .shopping-search-btn-main,
    .travel-search-buttons .travel-search-btn-main {
        flex: 1;
        margin-bottom: 0;
    }
    
    /* AI Search Button */
    .shopping-ai-search-btn,
    .travel-ai-search-btn {
        flex: 1;
        background: linear-gradient(135deg, rgba(139, 92, 246, 0.9), rgba(124, 58, 237, 0.9));
        border: none;
        border-radius: 12px;
        padding: 0.85rem 1rem;
        color: white;
        font-size: 0.95rem;
        font-weight: 600;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.4rem;
        transition: all 0.2s;
    }
    
    .shopping-ai-search-btn:hover,
    .travel-ai-search-btn:hover {
        background: linear-gradient(135deg, rgba(139, 92, 246, 1), rgba(124, 58, 237, 1));
        transform: translateY(-1px);
        box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
    }
    
    /* Mode Hint */
    .shopping-mode-hint,
    .travel-mode-hint {
        font-size: 0.75rem;
        color: #64748b;
        text-align: center;
        margin: 0 0 0.75rem 0;
        padding: 0;
    }

    .app-inline-notice {
        display: flex;
        align-items: flex-start;
        gap: 0.65rem;
        margin: 0 0 1rem 0;
        padding: 0.75rem 0.85rem;
        border-radius: 12px;
        border: 1px solid rgba(148, 163, 184, 0.22);
        background: rgba(15, 23, 42, 0.78);
        color: #e2e8f0;
        font-size: 0.88rem;
        line-height: 1.35;
        box-shadow: 0 12px 24px rgba(2, 6, 23, 0.24);
    }

    .app-inline-notice-icon {
        flex: 0 0 auto;
        width: 1.35rem;
        height: 1.35rem;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border-radius: 999px;
        font-weight: 800;
        font-size: 0.82rem;
        background: rgba(148, 163, 184, 0.14);
    }

    .app-inline-notice-message {
        flex: 1;
        min-width: 0;
    }

    .app-inline-notice-warning {
        border-color: rgba(251, 191, 36, 0.38);
        background: rgba(251, 191, 36, 0.12);
        color: #fde68a;
    }

    .app-inline-notice-error {
        border-color: rgba(248, 113, 113, 0.38);
        background: rgba(248, 113, 113, 0.12);
        color: #fecaca;
    }

    .app-inline-notice-success {
        border-color: rgba(52, 211, 153, 0.38);
        background: rgba(52, 211, 153, 0.12);
        color: #bbf7d0;
    }

    .app-inline-notice-info {
        border-color: rgba(34, 211, 238, 0.34);
        background: rgba(34, 211, 238, 0.1);
        color: #bae6fd;
    }

    .aion-temp-chat-message {
        display: flex;
        align-items: flex-start;
        gap: 0.75rem;
        width: min(100%, 46rem);
        margin: 0.25rem auto 1rem auto;
        padding: 0.85rem 0.95rem;
        border: 1px solid rgba(148, 163, 184, 0.24);
        border-radius: 14px;
        background: rgba(15, 23, 42, 0.82);
        color: #cbd5e1;
        box-shadow: 0 16px 34px rgba(2, 6, 23, 0.24);
        transition: opacity 0.18s ease, transform 0.18s ease;
    }

    .aion-temp-chat-message.is-leaving {
        opacity: 0;
        transform: translateY(4px);
    }

    .aion-temp-chat-icon {
        flex: 0 0 auto;
        width: 1.45rem;
        height: 1.45rem;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border-radius: 999px;
        background: rgba(148, 163, 184, 0.16);
        color: #e2e8f0;
        font-size: 0.8rem;
        font-weight: 900;
        line-height: 1;
    }

    .aion-temp-chat-body {
        flex: 1;
        min-width: 0;
    }

    .aion-temp-chat-title {
        margin-bottom: 0.12rem;
        color: #f8fafc;
        font-size: 0.86rem;
        font-weight: 800;
    }

    .aion-temp-chat-text {
        color: inherit;
        font-size: 0.82rem;
        line-height: 1.45;
    }

    .aion-temp-chat-close {
        flex: 0 0 auto;
        width: 1.8rem;
        height: 1.8rem;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border: 0;
        border-radius: 9px;
        background: transparent;
        color: currentColor;
        opacity: 0.7;
        cursor: pointer;
        transition: background 0.15s ease, opacity 0.15s ease;
    }

    .aion-temp-chat-close:hover {
        background: rgba(255, 255, 255, 0.08);
        opacity: 1;
    }

    .aion-temp-chat-info {
        border-color: rgba(34, 211, 238, 0.32);
        background: rgba(8, 47, 73, 0.42);
        color: #bae6fd;
    }

    .aion-temp-chat-warning {
        border-color: rgba(251, 191, 36, 0.4);
        background: rgba(120, 53, 15, 0.34);
        color: #fde68a;
    }

    .aion-temp-chat-danger {
        border-color: rgba(248, 113, 113, 0.42);
        background: rgba(127, 29, 29, 0.36);
        color: #fecaca;
    }

    .aion-temp-chat-success {
        border-color: rgba(52, 211, 153, 0.38);
        background: rgba(6, 78, 59, 0.34);
        color: #bbf7d0;
    }
    
    /* Filter Hint */
    .shopping-filter-hint {
        font-size: 0.7rem;
        color: #64748b;
        text-align: center;
        margin: -0.25rem 0 0.75rem 0;
        padding: 0.5rem 0.75rem;
        background: rgba(59, 130, 246, 0.1);
        border: 1px solid rgba(59, 130, 246, 0.2);
        border-radius: 8px;
    }
    
    /* Popular Section */
    .shopping-popular-section {
        padding: 0.75rem 0;
        border-top: 1px solid rgba(71, 85, 105, 0.3);
    }
    
    .shopping-popular-label {
        display: block;
        font-size: 0.8rem;
        color: #64748b;
        margin-bottom: 0.5rem;
    }
    
    .shopping-popular-tags {
        display: flex;
        flex-wrap: wrap;
        gap: 0.4rem;
    }
    
    .shopping-popular-tag {
        background: rgba(30, 41, 59, 0.5);
        border: 1px solid rgba(71, 85, 105, 0.3);
        border-radius: 16px;
        padding: 0.3rem 0.6rem;
        color: #cbd5e1;
        font-size: 0.75rem;
        cursor: pointer;
        transition: all 0.2s;
    }
    
    .shopping-popular-tag:hover {
        background: rgba(251, 191, 36, 0.15);
        border-color: rgba(251, 191, 36, 0.4);
        color: #fbbf24;
    }
    
    /* Deals Teaser */
    .shopping-deals-teaser {
        padding-top: 0.5rem;
    }
    
    .shopping-deals-btn {
        width: 100%;
        background: rgba(239, 68, 68, 0.1);
        border: 1px solid rgba(239, 68, 68, 0.3);
        border-radius: 10px;
        padding: 0.65rem;
        color: #ef4444;
        font-size: 0.85rem;
        cursor: pointer;
        transition: all 0.2s;
    }
    
    .shopping-deals-btn:hover {
        background: rgba(239, 68, 68, 0.2);
        border-color: rgba(239, 68, 68, 0.5);
    }
    
    /* Results Header */
    .shopping-results-header {
        display: flex;
        flex-direction: column;
        gap: 0.75rem;
        margin-bottom: 1rem;
        padding-bottom: 0.75rem;
        border-bottom: 1px solid rgba(71, 85, 105, 0.3);
    }
    
    .shopping-results-header-top {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 0.75rem;
    }

    .shopping-back-btn {
        background: rgba(71, 85, 105, 0.3);
        border: none;
        color: #94a3b8;
        padding: 0.5rem 0.75rem;
        border-radius: 10px;
        cursor: pointer;
        display: flex;
        align-items: center;
        gap: 0.4rem;
        transition: all 0.2s;
        flex-shrink: 0;
        font-size: 0.85rem;
    }

    .shopping-back-btn:hover {
        background: rgba(71, 85, 105, 0.5);
        color: #e2e8f0;
    }

    .shopping-results-title {
        flex: 1;
        text-align: center;
    }

    .shopping-results-title h4 {
        margin: 0;
        font-size: 1rem;
        font-weight: 600;
        color: #e2e8f0;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.4rem;
    }

    .shopping-results-info {
        font-size: 0.8rem;
        color: #64748b;
        display: block;
        margin-top: 0.2rem;
    }
    
    /* Loading */
    .shopping-loading {
        text-align: center;
        padding: 2rem;
    }
    
    .shopping-loading-spinner {
        width: 40px;
        height: 40px;
        border: 3px solid rgba(251, 191, 36, 0.2);
        border-top-color: #fbbf24;
        border-radius: 50%;
        animation: shopping-spin 0.8s linear infinite;
        margin: 0 auto 1rem;
    }
    
    @keyframes shopping-spin {
        to { transform: rotate(360deg); }
    }
    
    .shopping-loading p {
        color: #94a3b8;
        font-size: 0.9rem;
        margin: 0;
    }
    
    /* Portals Section */
    .shopping-portals-section {
        margin-bottom: 1rem;
    }
    
    .shopping-portals-section h5 {
        margin: 0 0 0.25rem 0;
        font-size: 0.95rem;
        font-weight: 600;
        color: #e2e8f0;
    }
    
    .shopping-portals-hint {
        margin: 0 0 0.75rem 0;
        font-size: 0.8rem;
        color: #64748b;
    }
    
    .shopping-portal-category {
        margin-bottom: 0.75rem;
    }
    
    .shopping-portal-cat-label {
        display: block;
        font-size: 0.75rem;
        color: #94a3b8;
        margin-bottom: 0.4rem;
        font-weight: 500;
    }
    
    .shopping-portal-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(85px, 1fr));
        gap: 0.5rem;
    }
    
    .shopping-portal-btn {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0.2rem;
        background: rgba(30, 41, 59, 0.5);
        border: 1px solid rgba(71, 85, 105, 0.3);
        border-radius: 10px;
        padding: 0.55rem 0.4rem;
        color: #cbd5e1;
        text-decoration: none;
        font-size: 0.7rem;
        transition: all 0.2s;
        text-align: center;
    }
    
    .shopping-portal-btn:hover {
        background: rgba(251, 191, 36, 0.15);
        border-color: rgba(251, 191, 36, 0.4);
        color: #fbbf24;
        transform: translateY(-2px);
    }
    
    .shopping-portal-icon {
        font-size: 1.2rem;
    }
    
    .shopping-portal-name {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 100%;
    }
    
    /* Web Results */
    .shopping-web-results {
        margin: 1rem 0;
        padding-top: 1rem;
        border-top: 1px solid rgba(71, 85, 105, 0.3);
    }
    
    .shopping-web-results h5 {
        margin: 0 0 0.75rem 0;
        font-size: 0.9rem;
        font-weight: 600;
        color: #e2e8f0;
    }
    
    .shopping-results-list {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
        max-height: 180px;
        overflow-y: auto;
    }
    
    .shopping-web-result {
        display: flex;
        align-items: center;
        gap: 0.6rem;
        background: rgba(30, 41, 59, 0.4);
        border: 1px solid rgba(71, 85, 105, 0.25);
        border-radius: 10px;
        padding: 0.55rem 0.7rem;
        color: #cbd5e1;
        text-decoration: none;
        transition: all 0.2s;
    }
    
    .shopping-web-result:hover {
        background: rgba(251, 191, 36, 0.1);
        border-color: rgba(251, 191, 36, 0.3);
    }
    
    .shopping-result-icon {
        font-size: 1rem;
        flex-shrink: 0;
    }
    
    .shopping-result-content {
        flex: 1;
        min-width: 0;
        display: flex;
        flex-direction: column;
    }
    
    .shopping-result-title {
        font-size: 0.8rem;
        font-weight: 500;
        color: #e2e8f0;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .shopping-result-url {
        font-size: 0.65rem;
        color: #64748b;
    }
    
    .shopping-result-arrow {
        flex-shrink: 0;
        color: #64748b;
    }
    
    /* Deals Section */
    .shopping-deals-section {
        margin-top: 1rem;
        padding-top: 1rem;
        border-top: 1px solid rgba(71, 85, 105, 0.3);
    }
    
    .shopping-deals-section h5 {
        margin: 0 0 0.5rem 0;
        font-size: 0.9rem;
        font-weight: 600;
        color: #ef4444;
    }
    
    /* Deal Cards */
    .shopping-deals-full {
        padding: 0.5rem 0;
    }
    
    .shopping-deals-info {
        font-size: 0.85rem;
        color: #94a3b8;
        margin: 0 0 1rem 0;
    }
    
    .shopping-deal-cards {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
        margin-bottom: 1.5rem;
    }
    
    .shopping-deal-card {
        display: flex;
        align-items: center;
        gap: 0.75rem;
        background: rgba(239, 68, 68, 0.08);
        border: 1px solid rgba(239, 68, 68, 0.25);
        border-radius: 12px;
        padding: 0.85rem 1rem;
        color: #e2e8f0;
        text-decoration: none;
        transition: all 0.2s;
    }
    
    .shopping-deal-card:hover {
        background: rgba(239, 68, 68, 0.15);
        border-color: rgba(239, 68, 68, 0.4);
        transform: translateY(-2px);
    }
    
    .shopping-deal-icon {
        font-size: 1.75rem;
    }
    
    .shopping-deal-info {
        flex: 1;
        display: flex;
        flex-direction: column;
    }
    
    .shopping-deal-name {
        font-size: 0.95rem;
        font-weight: 600;
        color: #ef4444;
    }
    
    .shopping-deal-desc {
        font-size: 0.8rem;
        color: #94a3b8;
    }
    
    /* Tips Section */
    .shopping-tips {
        background: rgba(30, 41, 59, 0.4);
        border-radius: 12px;
        padding: 1rem;
    }
    
    .shopping-tips h5 {
        margin: 0 0 0.75rem 0;
        font-size: 0.9rem;
        font-weight: 600;
        color: #e2e8f0;
    }
    
    .shopping-tips ul {
        margin: 0;
        padding: 0;
        list-style: none;
    }
    
    .shopping-tips li {
        font-size: 0.85rem;
        color: #94a3b8;
        padding: 0.35rem 0;
    }
    
    /* Mobile Responsive */
    @media (max-width: 480px) {
        #shopping-modal {
            padding: 0;
            align-items: stretch;
        }
        .shopping-widget {
            width: 100%;
            max-width: 100%;
            height: 100dvh;
            max-height: 100dvh;
            border-radius: 0;
            padding: calc(env(safe-area-inset-top, 0px) + 1rem) 1.25rem calc(env(safe-area-inset-bottom, 0px) + 1rem);
            box-sizing: border-box;
            margin: 0;
            display: flex;
            flex-direction: column;
        }
        .shopping-form-grid {
            grid-template-columns: 1fr;
        }
        .shopping-category-buttons {
            overflow-x: auto;
            flex-wrap: nowrap;
            -webkit-overflow-scrolling: touch;
            padding-bottom: 0.25rem;
        }
        .shopping-cat-btn {
            flex-shrink: 0;
        }
        .shopping-portal-grid {
            grid-template-columns: repeat(3, 1fr);
        }
    }

    /* ========================================= */
    /* TRAVEL WIDGET - Reise-Informationen      */
    /* ========================================= */
    #travel-modal {
        position: fixed;
        inset: 0;
        z-index: 100000;
        display: none;
        align-items: center;
        justify-content: center;
        background: rgba(0, 0, 0, 0.75);
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
        --modal-top-offset: env(safe-area-inset-top, 0px);
        --modal-bottom-offset: calc(env(safe-area-inset-bottom, 0px) + 1rem);
        padding: 1rem;
        padding-top: var(--modal-top-offset);
        padding-bottom: var(--modal-bottom-offset);
        box-sizing: border-box;
        overflow-x: hidden;
        overflow-y: auto;
    }
    #travel-modal.show {
        display: flex;
    }
    .travel-widget {
        background: linear-gradient(180deg, rgba(15, 23, 42, 0.98) 0%, rgba(10, 18, 36, 0.99) 100%);
        border: 1px solid rgba(71, 85, 105, 0.5);
        border-radius: 24px;
        padding: 1.5rem;
        width: 100%;
        max-width: 760px;
        max-height: calc(100dvh - var(--modal-top-offset) - var(--modal-bottom-offset));
        overflow-y: auto;
        overflow-x: hidden;
        box-sizing: border-box;
        box-shadow: 
            0 25px 60px rgba(0, 0, 0, 0.6),
            0 0 0 1px rgba(34, 211, 238, 0.1) inset;
    }
    .travel-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 1rem;
    }
    
    #travel-content {
        max-width: 100%;
        overflow: visible;
        box-sizing: border-box;
    }
    .travel-header h3 {
        font-size: 1.1rem;
        font-weight: 600;
        color: #e2e8f0;
        margin: 0;
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }
    .travel-close {
        background: rgba(71, 85, 105, 0.3);
        border: none;
        color: #94a3b8;
        width: 32px;
        height: 32px;
        border-radius: 8px;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.2s;
    }
    .travel-close:hover {
        background: rgba(239, 68, 68, 0.2);
        color: #ef4444;
    }

    /* ========================================= */
    /* JOURNEY WIDGET - Reise                    */
    /* ========================================= */
    #journey-modal {
        position: fixed;
        inset: 0;
        width: 100%;
        height: 100%;
        z-index: 100000;
        display: none;
        align-items: center;
        justify-content: center;
        background: rgba(0, 0, 0, 0.75);
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
        --modal-top-offset: env(safe-area-inset-top, 0px);
        --modal-bottom-offset: calc(env(safe-area-inset-bottom, 0px) + 1rem);
        padding: 1rem;
        padding-top: var(--modal-top-offset);
        padding-bottom: var(--modal-bottom-offset);
        box-sizing: border-box;
        overflow-x: hidden;
        overflow-y: auto;
    }

    #journey-modal.show {
        display: flex;
    }

    .journey-widget {
        width: 100%;
        max-width: 760px;
        max-height: calc(100dvh - var(--modal-top-offset) - var(--modal-bottom-offset));
        overflow-y: auto;
        overflow-x: hidden;
        box-sizing: border-box;
        margin: 0 auto;
        border-radius: 24px;
        border: 1px solid rgba(34, 211, 238, 0.35);
        background: linear-gradient(180deg, rgba(15, 23, 42, 0.98) 0%, rgba(10, 18, 36, 0.99) 100%);
        box-shadow:
            0 25px 60px rgba(0, 0, 0, 0.6),
            0 0 0 1px rgba(34, 211, 238, 0.1) inset;
        padding: 1.5rem;
    }

    .journey-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 1rem;
        margin-bottom: 1rem;
    }

    .journey-header h3 {
        margin: 0;
        color: #e2e8f0;
        font-size: 1.1rem;
        font-weight: 600;
    }

    .journey-close {
        width: 32px;
        height: 32px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border: none;
        border-radius: 8px;
        color: #94a3b8;
        background: rgba(71, 85, 105, 0.3);
        cursor: pointer;
        transition: color 0.2s, background 0.2s;
    }

    .journey-close:hover {
        color: #ef4444;
        background: rgba(239, 68, 68, 0.2);
    }

    #journey-content {
        max-width: 100%;
        overflow: hidden;
        box-sizing: border-box;
    }

    .journey-search-form {
        padding: 0.5rem 0;
        display: flex;
        flex-direction: column;
        height: 100%;
        max-width: 100%;
        overflow: hidden;
    }

    .journey-search-header {
        text-align: center;
        margin-bottom: 1.25rem;
    }

    .journey-search-header h4 {
        margin: 0 0 0.25rem 0;
        font-size: 1.2rem;
        font-weight: 600;
        color: #e2e8f0;
    }

    .journey-search-subtitle {
        margin: 0;
        font-size: 0.85rem;
        color: #64748b;
    }

    .journey-form-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.75rem;
        margin-bottom: 1rem;
        width: 100%;
        box-sizing: border-box;
    }

    .journey-form-group {
        display: flex;
        flex-direction: column;
        gap: 0.35rem;
        min-width: 0;
        overflow: hidden;
    }

    .journey-form-group label {
        font-size: 0.8rem;
        color: #94a3b8;
        font-weight: 500;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .journey-form-group input {
        width: 100%;
        min-width: 0;
        box-sizing: border-box;
        background: rgba(0, 0, 0, 0.4);
        border: 1px solid rgba(71, 85, 105, 0.5);
        border-radius: 10px;
        padding: 0.65rem 0.85rem;
        color: #e2e8f0;
        font-size: 0.95rem;
        outline: none;
        transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
    }

    .journey-form-group input:focus {
        border-color: rgba(34, 211, 238, 0.6);
        background: rgba(0, 0, 0, 0.5);
        box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.1);
        outline: none;
    }

    .journey-form-group input::placeholder {
        color: #64748b;
    }

    .journey-search-type {
        margin-bottom: 1rem;
    }

    .journey-search-type label {
        display: block;
        font-size: 0.8rem;
        color: #94a3b8;
        margin-bottom: 0.5rem;
    }

    .journey-type-buttons {
        display: flex;
        gap: 0.5rem;
        flex-wrap: wrap;
    }

    .journey-type-btn {
        flex: 1;
        min-width: 110px;
        background: rgba(30, 41, 59, 0.5);
        border: 1px solid rgba(71, 85, 105, 0.4);
        border-radius: 10px;
        padding: 0.55rem 0.75rem;
        color: #94a3b8;
        font-size: 0.85rem;
        cursor: pointer;
        transition: all 0.2s;
        text-align: center;
    }

    .journey-type-btn:hover {
        background: rgba(34, 211, 238, 0.1);
        border-color: rgba(34, 211, 238, 0.3);
        color: #cbd5e1;
    }

    .journey-type-btn.active {
        background: linear-gradient(135deg, rgba(34, 211, 238, 0.25), rgba(6, 182, 212, 0.2));
        border-color: rgba(34, 211, 238, 0.5);
        color: #22d3ee;
    }

    .journey-filter-hint,
    .journey-mode-hint,
    .journey-portals-hint {
        margin: 0 0 1rem 0;
        color: #64748b;
        font-size: 0.8rem;
        line-height: 1.45;
    }

    .journey-search-buttons {
        display: flex;
        gap: 0.5rem;
        margin-bottom: 0.5rem;
    }

    .journey-search-btn-main,
    .journey-ai-search-btn {
        flex: 1;
        border: none;
        border-radius: 12px;
        padding: 0.85rem 1rem;
        color: #ffffff;
        font-size: 0.95rem;
        font-weight: 600;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.5rem;
        transition: all 0.2s;
        min-width: 0;
    }

    .journey-search-btn-main {
        background: linear-gradient(135deg, rgba(14, 116, 144, 0.68), rgba(21, 94, 117, 0.82));
        border: 1px solid rgba(34, 211, 238, 0.28);
    }

    .journey-ai-search-btn {
        background: linear-gradient(135deg, rgba(139, 92, 246, 0.9), rgba(124, 58, 237, 0.9));
    }

    .journey-search-btn-main:hover,
    .journey-ai-search-btn:hover {
        transform: translateY(-1px);
    }

    .journey-search-btn-main:hover {
        background: linear-gradient(135deg, rgba(8, 145, 178, 0.78), rgba(14, 116, 144, 0.88));
        border-color: rgba(34, 211, 238, 0.42);
        box-shadow: 0 4px 15px rgba(8, 145, 178, 0.26);
    }

    .journey-ai-search-btn:hover {
        box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
    }

    .journey-search-btn-main svg {
        stroke: #ffffff;
        flex: 0 0 auto;
    }

    .journey-portals-section {
        margin-top: 1rem;
        padding-top: 1rem;
        border-top: 1px solid rgba(71, 85, 105, 0.3);
    }

    .journey-portals-section h5 {
        margin: 0 0 0.35rem 0;
        color: #e2e8f0;
        font-size: 0.95rem;
        font-weight: 600;
    }

    .journey-portal-grid {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 0.5rem;
    }

    .journey-provider-link {
        min-height: 2.8rem;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 0.5rem;
        border-radius: 10px;
        border: 1px solid rgba(71, 85, 105, 0.45);
        color: #ffffff;
        background: rgba(30, 41, 59, 0.5);
        font-size: 0.88rem;
        font-weight: 600;
        text-decoration: none;
        transition: transform 0.16s, background 0.16s, border-color 0.16s;
    }

    .journey-provider-link:hover {
        transform: translateY(-1px);
        color: #ffffff;
        background: rgba(34, 211, 238, 0.1);
        border-color: rgba(34, 211, 238, 0.35);
    }

    .journey-provider-link img {
        width: 1.15rem;
        height: 1.15rem;
        object-fit: contain;
        border-radius: 4px;
        background: #ffffff;
    }

    .journey-chat-card {
        margin-top: 1rem;
        border: 1px solid rgba(34, 211, 238, 0.32);
        border-radius: 10px;
        background: rgba(9, 25, 43, 0.86);
        overflow: hidden;
    }

    .journey-chat-card-head {
        display: flex;
        align-items: center;
        gap: 0.7rem;
        padding: 0.95rem 1rem;
        border-bottom: 1px solid rgba(148, 163, 184, 0.12);
    }

    .journey-chat-icon {
        width: 2rem;
        height: 2rem;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border-radius: 10px;
        color: #67e8f9;
        background: rgba(14, 116, 144, 0.28);
        border: 1px solid rgba(34, 211, 238, 0.22);
    }

    .journey-chat-body {
        padding: 0.95rem 1rem 0;
    }

    .journey-chat-title {
        color: #e2e8f0;
        font-size: 0.95rem;
        font-weight: 700;
        line-height: 1.2;
    }

    .journey-chat-subtitle {
        color: #94a3b8;
        font-size: 0.78rem;
        margin-top: 0.1rem;
    }

    .journey-chat-timeline {
        position: relative;
        display: grid;
        gap: 1.2rem;
        padding-left: 1.4rem;
        margin-bottom: 1rem;
    }

    .journey-chat-timeline::before {
        content: '';
        position: absolute;
        left: 0.42rem;
        top: 1.05rem;
        bottom: 1.05rem;
        width: 1px;
        background: rgba(148, 163, 184, 0.32);
    }

    .journey-chat-stop {
        position: relative;
        min-width: 0;
    }

    .journey-chat-stop::before {
        content: '';
        position: absolute;
        left: -1.18rem;
        top: 0.12rem;
        width: 0.64rem;
        height: 0.64rem;
        border-radius: 999px;
        border: 3px solid rgba(15, 23, 42, 0.92);
        box-shadow: 0 0 0 1px rgba(148, 163, 184, 0.18);
    }

    .journey-chat-stop-start::before {
        background: #22c55e;
    }

    .journey-chat-stop-destination::before {
        background: #a78bfa;
    }

    .journey-chat-stop span {
        display: block;
        color: #94a3b8;
        font-size: 0.75rem;
        margin-bottom: 0.2rem;
    }

    .journey-chat-stop strong {
        display: block;
        color: #e2e8f0;
        font-size: 0.9rem;
        line-height: 1.25;
        overflow-wrap: anywhere;
    }

    .journey-chat-links {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 0.5rem;
        padding: 0;
        margin-bottom: 0.95rem;
    }

    .journey-chat-link {
        min-height: 2.45rem;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 0.45rem;
        border-radius: 10px;
        border: 1px solid rgba(71, 85, 105, 0.48);
        color: #ffffff;
        background: rgba(15, 23, 42, 0.62);
        font-size: 0.82rem;
        font-weight: 650;
        text-decoration: none;
        transition: background 0.16s, border-color 0.16s, transform 0.16s;
    }

    .journey-chat-link,
    .journey-chat-link:visited,
    .journey-chat-link span {
        color: #ffffff !important;
    }

    .journey-chat-link:hover {
        color: #ffffff;
        background: rgba(14, 116, 144, 0.24);
        border-color: rgba(34, 211, 238, 0.34);
        transform: translateY(-1px);
    }

    .journey-chat-link img {
        width: 1rem;
        height: 1rem;
        object-fit: contain;
        border-radius: 3px;
        background: #ffffff;
    }

    .journey-chat-foot {
        padding: 0.75rem 1rem 0.9rem;
        border-top: 1px solid rgba(148, 163, 184, 0.1);
        color: #64748b;
        font-size: 0.76rem;
    }

    @media (max-width: 640px) {
        #journey-modal {
            align-items: stretch;
            padding: 0;
        }

        .journey-widget {
            width: 100%;
            max-width: 100%;
            height: 100dvh;
            max-height: 100dvh;
            margin: 0;
            padding: calc(env(safe-area-inset-top, 0px) + 1rem) 1.25rem calc(env(safe-area-inset-bottom, 0px) + 1rem);
            border-radius: 0;
            border: none;
            display: flex;
            flex-direction: column;
        }

        .journey-form-grid,
        .journey-search-buttons,
        .journey-portal-grid,
        .journey-chat-links {
            grid-template-columns: 1fr;
        }

        .journey-chat-card-head,
        .journey-chat-body,
        .journey-chat-foot {
            padding-left: 1rem;
            padding-right: 1rem;
        }

        .journey-chat-timeline {
            padding-left: 1.35rem;
            margin-left: 0;
        }

        .journey-chat-links {
            gap: 0.55rem;
            margin-left: 0;
        }

        .journey-chat-link {
            justify-content: center;
            width: 100%;
        }

        .journey-search-buttons {
            flex-direction: column;
        }
    }
    
    /* Destination Input */
    .travel-input-section {
        margin-bottom: 1.5rem;
    }
    .travel-input-section label {
        display: block;
        font-size: 0.9rem;
        color: #94a3b8;
        margin-bottom: 0.5rem;
    }
    .travel-input-wrapper {
        display: flex;
        gap: 0.5rem;
    }
    .travel-input-wrapper input {
        flex: 1;
        background: rgba(0, 0, 0, 0.4);
        border: 1px solid rgba(71, 85, 105, 0.5);
        border-radius: 12px;
        padding: 0.75rem 1rem;
        color: #e2e8f0;
        font-size: 1rem;
        outline: none;
        transition: border-color 0.2s;
    }
    .travel-input-wrapper input:focus {
        border-color: rgba(34, 211, 238, 0.5);
    }
    .travel-input-wrapper input::placeholder {
        color: #64748b;
    }
    .travel-search-btn {
        background: linear-gradient(135deg, rgba(34, 211, 238, 0.8), rgba(6, 182, 212, 0.8));
        border: none;
        border-radius: 12px;
        width: 48px;
        color: white;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.2s;
    }
    .travel-search-btn:hover {
        background: linear-gradient(135deg, rgba(34, 211, 238, 1), rgba(6, 182, 212, 1));
        transform: scale(1.05);
    }
    
    /* Popular Destinations */
    .travel-popular {
        margin-top: 1rem;
    }
    .travel-popular-label {
        font-size: 0.8rem;
        color: #64748b;
        display: block;
        margin-bottom: 0.5rem;
    }
    .travel-popular-tags {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    .travel-popular-tags button {
        background: rgba(30, 41, 59, 0.6);
        border: 1px solid rgba(71, 85, 105, 0.4);
        border-radius: 20px;
        padding: 0.4rem 0.8rem;
        color: #cbd5e1;
        font-size: 0.85rem;
        cursor: pointer;
        transition: all 0.2s;
    }
    .travel-popular-tags button:hover {
        background: rgba(34, 211, 238, 0.15);
        border-color: rgba(34, 211, 238, 0.4);
        color: #22d3ee;
    }
    
    /* Destination Header */
    .travel-destination-header {
        display: flex;
        align-items: center;
        gap: 0.75rem;
        padding: 1rem;
        background: rgba(0, 0, 0, 0.3);
        border-radius: 16px;
        margin-bottom: 1rem;
    }
    .travel-flag {
        font-size: 2.5rem;
        line-height: 1;
    }
    .travel-destination-text {
        flex: 1;
        display: flex;
        flex-direction: column;
    }
    .travel-dest-name {
        font-size: 1.25rem;
        font-weight: 600;
        color: #e2e8f0;
    }
    .travel-dest-country {
        font-size: 0.85rem;
        color: #64748b;
    }
    .travel-change-btn {
        background: rgba(71, 85, 105, 0.3);
        border: none;
        color: #94a3b8;
        width: 36px;
        height: 36px;
        border-radius: 10px;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.2s;
    }
    .travel-change-btn:hover {
        background: rgba(34, 211, 238, 0.2);
        color: #22d3ee;
    }
    
    /* Info Grid */
    .travel-info-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.75rem;
        margin-bottom: 1rem;
    }
    .travel-info-card {
        background: rgba(30, 41, 59, 0.5);
        border: 1px solid rgba(71, 85, 105, 0.3);
        border-radius: 12px;
        padding: 0.75rem;
        display: flex;
        gap: 0.6rem;
        align-items: flex-start;
    }
    .travel-info-card.disabled {
        opacity: 0.5;
    }
    .travel-info-icon {
        font-size: 1.5rem;
        line-height: 1;
    }
    .travel-info-data {
        display: flex;
        flex-direction: column;
        min-width: 0;
    }
    .travel-info-value {
        font-size: 0.9rem;
        font-weight: 500;
        color: #e2e8f0;
        word-break: break-word;
    }
    .travel-info-label {
        font-size: 0.75rem;
        color: #64748b;
        margin-top: 0.15rem;
    }
    
    /* Compass Permission Button */
    .compass-permission-btn {
        background: linear-gradient(135deg, rgba(34, 211, 238, 0.3), rgba(6, 182, 212, 0.3));
        border: 1px solid rgba(34, 211, 238, 0.4);
        border-radius: 6px;
        padding: 0.3rem 0.6rem;
        color: #22d3ee;
        font-size: 0.8rem;
        cursor: pointer;
        transition: all 0.2s;
    }
    .compass-permission-btn:hover {
        background: linear-gradient(135deg, rgba(34, 211, 238, 0.5), rgba(6, 182, 212, 0.5));
    }
    
    /* Action Buttons */
    .travel-actions {
        display: flex;
        gap: 0.5rem;
    }
    .travel-action-btn {
        flex: 1;
        background: rgba(30, 41, 59, 0.6);
        border: 1px solid rgba(71, 85, 105, 0.4);
        border-radius: 12px;
        padding: 0.75rem;
        color: #cbd5e1;
        font-size: 0.85rem;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.5rem;
        transition: all 0.2s;
    }
    .travel-action-btn:hover {
        background: rgba(34, 211, 238, 0.15);
        border-color: rgba(34, 211, 238, 0.4);
        color: #22d3ee;
    }
    .travel-action-btn svg {
        flex-shrink: 0;
    }
    
    /* ========================================= */
    /* TRAVEL SEARCH WIDGET - Reise-Suchmaschine */
    /* ========================================= */
    
    /* Origin field wrapper with country badge */
    .travel-origin-wrapper {
        position: relative;
        display: flex;
        align-items: center;
        min-width: 0;
        width: 100%;
    }
    
    .travel-origin-wrapper input {
        flex: 1;
        min-width: 0;
        padding-right: 2.5rem !important;
    }
    
    .travel-country-badge {
        position: absolute;
        right: 0.6rem;
        top: 50%;
        transform: translateY(-50%);
        font-size: 1.2rem;
        cursor: help;
        opacity: 0.85;
        transition: opacity 0.2s;
    }
    
    .travel-country-badge:hover {
        opacity: 1;
    }

    .travel-destination-wrapper {
        position: relative;
        width: 100%;
    }

    .travel-destination-suggestions {
        position: absolute;
        top: calc(100% + 0.3rem);
        left: 0;
        right: 0;
        z-index: 80;
        background: rgba(8, 14, 34, 0.98);
        border: 1px solid rgba(71, 85, 105, 0.55);
        border-radius: 10px;
        overflow: hidden;
        box-shadow: 0 12px 24px rgba(2, 6, 23, 0.5);
        max-height: 240px;
        overflow-y: auto;
    }

    .travel-destination-suggestions.is-hidden {
        display: none;
    }

    .travel-destination-item {
        width: 100%;
        border: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.06);
        background: transparent;
        color: #e2e8f0;
        cursor: pointer;
        text-align: left;
        padding: 0.55rem 0.75rem;
        display: flex;
        flex-direction: column;
        gap: 0.12rem;
        transition: background 0.15s ease;
    }

    .travel-destination-item:last-child {
        border-bottom: 0;
    }

    .travel-destination-item:hover {
        background: rgba(34, 211, 238, 0.12);
    }

    .travel-destination-item-label {
        font-size: 0.88rem;
        line-height: 1.2;
    }

    .travel-destination-item-sub {
        font-size: 0.74rem;
        color: #94a3b8;
        line-height: 1.2;
    }

    .travel-destination-empty {
        padding: 0.65rem 0.75rem;
        color: #94a3b8;
        font-size: 0.8rem;
    }
    
    /* Popular destination chips */
    .travel-popular-destinations {
        display: flex;
        flex-wrap: wrap;
        gap: 0.4rem;
        padding: 0.15rem 0;
        max-width: 100%;
        overflow: hidden;
    }
    
    .travel-dest-chip {
        background: rgba(30, 41, 59, 0.5);
        border: 1px solid rgba(71, 85, 105, 0.35);
        border-radius: 20px;
        padding: 0.3rem 0.7rem;
        color: #94a3b8;
        font-size: 0.78rem;
        cursor: pointer;
        transition: all 0.2s;
        white-space: nowrap;
    }
    
    .travel-dest-chip:hover {
        background: rgba(34, 211, 238, 0.12);
        border-color: rgba(34, 211, 238, 0.4);
        color: #22d3ee;
    }
    
    .travel-search-form {
        padding: 0.5rem 0;
        display: flex;
        flex-direction: column;
        height: 100%;
        max-width: 100%;
        overflow: visible;
    }
    
    .travel-search-header {
        text-align: center;
        margin-bottom: 1.25rem;
    }
    
    .travel-search-header h4 {
        margin: 0 0 0.25rem 0;
        font-size: 1.2rem;
        font-weight: 600;
        color: #e2e8f0;
    }
    
    .travel-search-subtitle {
        margin: 0;
        font-size: 0.85rem;
        color: #64748b;
    }
    
    .travel-form-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.75rem;
        margin-bottom: 1rem;
        width: 100%;
        box-sizing: border-box;
    }
    
    .travel-form-full {
        grid-column: 1 / -1;
    }
    
    .travel-form-group {
        display: flex;
        flex-direction: column;
        gap: 0.35rem;
        min-width: 0;
        overflow: hidden;
    }

    .travel-form-group:has(.travel-destination-wrapper),
    .journey-form-group:has(.travel-destination-wrapper) {
        overflow: visible;
    }
    
    .travel-form-group label {
        font-size: 0.8rem;
        color: #94a3b8;
        font-weight: 500;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    
    .travel-form-group input,
    .travel-form-group select {
        background: rgba(0, 0, 0, 0.4);
        border: 1px solid rgba(71, 85, 105, 0.5);
        border-radius: 10px;
        padding: 0.65rem 0.85rem;
        color: #e2e8f0;
        font-size: 0.95rem;
        outline: none;
        transition: border-color 0.2s, background 0.2s;
        min-width: 0;
        width: 100%;
        box-sizing: border-box;
    }
    
    .travel-form-group input:focus,
    .travel-form-group select:focus {
        border-color: rgba(34, 211, 238, 0.6);
        background: rgba(0, 0, 0, 0.5);
    }
    
    .travel-form-group input::placeholder {
        color: #64748b;
    }
    
    .travel-form-group select {
        cursor: pointer;
        appearance: none;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%2394a3b8' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
        background-repeat: no-repeat;
        background-position: right 0.75rem center;
        padding-right: 2rem;
    }
    
    .travel-form-group input[type="date"] {
        cursor: pointer;
    }
    
    .travel-form-group input[type="date"]::-webkit-calendar-picker-indicator {
        filter: invert(0.7);
        cursor: pointer;
    }
    
    /* Search Type Buttons */
    .travel-search-type {
        margin-bottom: 1rem;
    }
    
    .travel-search-type label {
        display: block;
        font-size: 0.8rem;
        color: #94a3b8;
        margin-bottom: 0.5rem;
    }
    
    .travel-type-buttons {
        display: flex;
        gap: 0.5rem;
        flex-wrap: wrap;
    }
    
    .travel-type-btn {
        flex: 1;
        min-width: 70px;
        background: rgba(30, 41, 59, 0.5);
        border: 1px solid rgba(71, 85, 105, 0.4);
        border-radius: 10px;
        padding: 0.55rem 0.75rem;
        color: #94a3b8;
        font-size: 0.85rem;
        cursor: pointer;
        transition: all 0.2s;
        text-align: center;
    }
    
    .travel-type-btn:hover {
        background: rgba(34, 211, 238, 0.1);
        border-color: rgba(34, 211, 238, 0.3);
        color: #cbd5e1;
    }
    
    .travel-type-btn.active {
        background: linear-gradient(135deg, rgba(34, 211, 238, 0.25), rgba(6, 182, 212, 0.2));
        border-color: rgba(34, 211, 238, 0.5);
        color: #22d3ee;
    }
    
    /* Main Search Button */
    .travel-search-btn-main {
        width: 100%;
        background: linear-gradient(135deg, rgba(14, 116, 144, 0.68), rgba(21, 94, 117, 0.82));
        border: 1px solid rgba(34, 211, 238, 0.28);
        border-radius: 12px;
        padding: 0.85rem 1.5rem;
        color: white;
        font-size: 1rem;
        font-weight: 600;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.5rem;
        transition: all 0.2s;
        margin-bottom: 1rem;
    }
    
    .travel-search-btn-main:hover {
        background: linear-gradient(135deg, rgba(8, 145, 178, 0.78), rgba(14, 116, 144, 0.88));
        border-color: rgba(34, 211, 238, 0.42);
        transform: translateY(-1px);
        box-shadow: 0 4px 15px rgba(8, 145, 178, 0.26);
    }
    
    .travel-search-btn-main:active {
        transform: translateY(0);
    }
    
    /* Popular Section */
    .travel-popular-section {
        padding: 0.75rem 0;
        border-top: 1px solid rgba(71, 85, 105, 0.3);
    }
    
    .travel-popular-tag {
        background: rgba(30, 41, 59, 0.5);
        border: 1px solid rgba(71, 85, 105, 0.3);
        border-radius: 20px;
        padding: 0.35rem 0.7rem;
        color: #cbd5e1;
        font-size: 0.8rem;
        cursor: pointer;
        transition: all 0.2s;
    }
    
    .travel-popular-tag:hover {
        background: rgba(34, 211, 238, 0.15);
        border-color: rgba(34, 211, 238, 0.4);
        color: #22d3ee;
    }
    
    /* Deals Teaser */
    .travel-deals-teaser {
        padding-top: 0.5rem;
    }
    
    .travel-deals-btn {
        width: 100%;
        background: rgba(251, 191, 36, 0.1);
        border: 1px solid rgba(251, 191, 36, 0.3);
        border-radius: 10px;
        padding: 0.65rem;
        color: #fbbf24;
        font-size: 0.85rem;
        cursor: pointer;
        transition: all 0.2s;
    }
    
    .travel-deals-btn:hover {
        background: rgba(251, 191, 36, 0.2);
        border-color: rgba(251, 191, 36, 0.5);
    }
    
    /* Results Header */
    .travel-results-header {
        display: flex;
        flex-direction: column;
        gap: 0.75rem;
        margin-bottom: 1rem;
        padding-bottom: 0.75rem;
        border-bottom: 1px solid rgba(71, 85, 105, 0.3);
    }
    
    .travel-results-header-top {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 0.75rem;
    }

    .travel-back-btn {
        background: rgba(71, 85, 105, 0.3);
        border: none;
        color: #94a3b8;
        padding: 0.5rem 0.75rem;
        border-radius: 10px;
        cursor: pointer;
        display: flex;
        align-items: center;
        gap: 0.4rem;
        transition: all 0.2s;
        flex-shrink: 0;
        font-size: 0.85rem;
    }

    .travel-back-btn:hover {
        background: rgba(71, 85, 105, 0.5);
        color: #e2e8f0;
    }

    .travel-results-title {
        flex: 1;
        text-align: center;
    }

    .travel-results-title h4 {
        margin: 0;
        font-size: 1rem;
        font-weight: 600;
        color: #e2e8f0;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.4rem;
    }

    .travel-results-dates {
        font-size: 0.8rem;
        color: #64748b;
        display: block;
        margin-top: 0.2rem;
    }
    
    /* Loading */
    .travel-loading {
        text-align: center;
        padding: 2rem;
    }
    
    .travel-loading-spinner {
        width: 40px;
        height: 40px;
        border: 3px solid rgba(34, 211, 238, 0.2);
        border-top-color: #22d3ee;
        border-radius: 50%;
        animation: travel-spin 0.8s linear infinite;
        margin: 0 auto 1rem;
    }
    
    @keyframes travel-spin {
        to { transform: rotate(360deg); }
    }
    
    .travel-loading p {
        color: #94a3b8;
        font-size: 0.9rem;
        margin: 0;
    }
    
    /* Portals Section */
    .travel-portals-section {
        margin-bottom: 1rem;
    }
    
    .travel-portals-section h5 {
        margin: 0 0 0.25rem 0;
        font-size: 0.95rem;
        font-weight: 600;
        color: #e2e8f0;
    }
    
    .travel-portals-hint {
        margin: 0 0 0.75rem 0;
        font-size: 0.8rem;
        color: #64748b;
    }
    
    .travel-portal-category {
        margin-bottom: 0.75rem;
    }
    
    .travel-portal-cat-label {
        display: block;
        font-size: 0.75rem;
        color: #94a3b8;
        margin-bottom: 0.4rem;
        font-weight: 500;
    }
    
    .travel-portal-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(85px, 1fr));
        gap: 0.5rem;
    }
    
    .travel-portal-btn {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0.2rem;
        background: rgba(30, 41, 59, 0.5);
        border: 1px solid rgba(71, 85, 105, 0.3);
        border-radius: 10px;
        padding: 0.55rem 0.4rem;
        color: #cbd5e1;
        text-decoration: none;
        font-size: 0.7rem;
        transition: all 0.2s;
        text-align: center;
    }
    
    .travel-portal-btn:hover {
        background: rgba(34, 211, 238, 0.15);
        border-color: rgba(34, 211, 238, 0.4);
        color: #22d3ee;
        transform: translateY(-2px);
    }
    
    .travel-portal-icon {
        font-size: 1.2rem;
    }
    
    .travel-portal-name {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 100%;
    }
    
    /* Web Results */
    .travel-web-results {
        margin: 1rem 0;
        padding-top: 1rem;
        border-top: 1px solid rgba(71, 85, 105, 0.3);
    }
    
    .travel-web-results h5 {
        margin: 0 0 0.75rem 0;
        font-size: 0.9rem;
        font-weight: 600;
        color: #e2e8f0;
    }
    
    .travel-results-list {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
        max-height: 180px;
        overflow-y: auto;
    }
    
    .travel-web-result {
        display: flex;
        align-items: center;
        gap: 0.6rem;
        background: rgba(30, 41, 59, 0.4);
        border: 1px solid rgba(71, 85, 105, 0.25);
        border-radius: 10px;
        padding: 0.55rem 0.7rem;
        color: #cbd5e1;
        text-decoration: none;
        transition: all 0.2s;
    }
    
    .travel-web-result:hover {
        background: rgba(34, 211, 238, 0.1);
        border-color: rgba(34, 211, 238, 0.3);
    }
    
    .travel-result-cat {
        font-size: 1.1rem;
        flex-shrink: 0;
    }
    
    .travel-result-content {
        flex: 1;
        min-width: 0;
        display: flex;
        flex-direction: column;
    }
    
    .travel-result-title {
        font-size: 0.85rem;
        font-weight: 500;
        color: #e2e8f0;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .travel-result-url {
        font-size: 0.7rem;
        color: #64748b;
    }
    
    .travel-result-arrow {
        flex-shrink: 0;
        color: #64748b;
    }
    
    /* Deals Section */
    .travel-deals-section {
        margin-top: 1rem;
        padding-top: 1rem;
        border-top: 1px solid rgba(71, 85, 105, 0.3);
    }
    
    .travel-deals-section h5 {
        margin: 0 0 0.5rem 0;
        font-size: 0.9rem;
        font-weight: 600;
        color: #fbbf24;
    }
    
    /* Deal Cards (full view) */
    .travel-deals-full {
        padding: 0.5rem 0;
    }
    
    .travel-deals-info {
        font-size: 0.85rem;
        color: #94a3b8;
        margin: 0 0 1rem 0;
    }
    
    .travel-deal-cards {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
        margin-bottom: 1.5rem;
    }
    
    .travel-deal-card {
        display: flex;
        align-items: center;
        gap: 0.75rem;
        background: rgba(251, 191, 36, 0.08);
        border: 1px solid rgba(251, 191, 36, 0.25);
        border-radius: 12px;
        padding: 0.85rem 1rem;
        color: #e2e8f0;
        text-decoration: none;
        transition: all 0.2s;
    }
    
    .travel-deal-card:hover {
        background: rgba(251, 191, 36, 0.15);
        border-color: rgba(251, 191, 36, 0.4);
        transform: translateY(-2px);
    }
    
    .travel-deal-icon {
        font-size: 1.75rem;
    }
    
    .travel-deal-info {
        flex: 1;
        display: flex;
        flex-direction: column;
    }
    
    .travel-deal-name {
        font-size: 0.95rem;
        font-weight: 600;
        color: #fbbf24;
    }
    
    .travel-deal-desc {
        font-size: 0.8rem;
        color: #94a3b8;
    }
    
    /* Tips Section */
    .travel-tips {
        background: rgba(30, 41, 59, 0.4);
        border-radius: 12px;
        padding: 1rem;
    }
    
    .travel-tips h5 {
        margin: 0 0 0.75rem 0;
        font-size: 0.9rem;
        font-weight: 600;
        color: #e2e8f0;
    }
    
    .travel-tips ul {
        margin: 0;
        padding: 0;
        list-style: none;
    }
    
    .travel-tips li {
        font-size: 0.85rem;
        color: #94a3b8;
        padding: 0.35rem 0;
    }
    
    /* Mobile Responsive */
    @media (max-width: 480px) {
        #travel-modal {
            align-items: stretch;
            padding: 0;
        }
        .travel-widget {
            width: 100%;
            max-width: 100%;
            height: 100dvh;
            max-height: 100dvh;
            border-radius: 0;
            padding: calc(env(safe-area-inset-top, 0px) + 1rem) 1.25rem calc(env(safe-area-inset-bottom, 0px) + 1rem);
            display: flex;
            flex-direction: column;
        }
        .travel-info-grid {
            grid-template-columns: 1fr;
        }
        .travel-actions {
            flex-direction: column;
        }
        .travel-form-grid {
            grid-template-columns: 1fr;
        }
        .travel-type-buttons {
            flex-wrap: nowrap;
            overflow-x: auto;
            -webkit-overflow-scrolling: touch;
            padding-bottom: 0.25rem;
        }
        .travel-type-btn {
            flex-shrink: 0;
        }
        .travel-portal-grid {
            grid-template-columns: repeat(3, 1fr);
        }
    }

/* ========================================= */
/* LIGHT THEME OVERRIDES FOR Aion CHAT       */
/* ========================================= */
html.aion-chat-page.theme-light {
    background-color: #f1f5f9 !important;
}
html.aion-chat-page.theme-light body {
    background-color: #f1f5f9 !important;
    color: #0f172a !important;
}

/* Mobile header */
html.aion-chat-page.theme-light #aion-mobile-header {
    background-color: #ffffff !important;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

/* Mobile nav panel */
html.aion-chat-page.theme-light #mobile-nav-panel {
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%) !important;
}

html.aion-chat-page.theme-light .mobile-nav-header {
    border-bottom-color: rgba(15, 23, 42, 0.06) !important;
}

html.aion-chat-page.theme-light .mobile-nav-header__name {
    color: #0f172a !important;
}

html.aion-chat-page.theme-light .mobile-nav-section {
    border-top-color: rgba(15, 23, 42, 0.06) !important;
}

html.aion-chat-page.theme-light .mobile-nav-section-label {
    color: #64748b !important;
}

html.aion-chat-page.theme-light .mobile-nav-row {
    color: #334155 !important;
}

html.aion-chat-page.theme-light #mobile-nav-panel a.mobile-nav-row {
    color: #334155 !important;
}

html.aion-chat-page.theme-light #mobile-nav-panel a.mobile-nav-row.mobile-nav-row--danger {
    color: #dc2626 !important;
}

html.aion-chat-page.theme-light .mobile-nav-row__icon {
    background: rgba(15, 23, 42, 0.04) !important;
}

html.aion-chat-page.theme-light .mobile-nav-row--home .mobile-nav-row__icon { color: #475569 !important; }
html.aion-chat-page.theme-light .mobile-nav-row--news .mobile-nav-row__icon { color: #2563eb !important; background: rgba(59, 130, 246, 0.08) !important; }
html.aion-chat-page.theme-light .mobile-nav-row--board .mobile-nav-row__icon { color: #059669 !important; background: rgba(16, 185, 129, 0.08) !important; }
html.aion-chat-page.theme-light .mobile-nav-row--aion .mobile-nav-row__icon { color: #7c3aed !important; background: rgba(139, 92, 246, 0.08) !important; }
html.aion-chat-page.theme-light .mobile-nav-row--charts .mobile-nav-row__icon { color: #0891b2 !important; background: rgba(6, 182, 212, 0.08) !important; }
html.aion-chat-page.theme-light .mobile-nav-row--portal .mobile-nav-row__icon,
html.aion-chat-page.theme-light .mobile-nav-row--theme .mobile-nav-row__icon { color: #d97706 !important; background: rgba(245, 158, 11, 0.08) !important; }
html.aion-chat-page.theme-light .mobile-nav-row--location .mobile-nav-row__icon { color: #475569 !important; background: rgba(100, 116, 139, 0.08) !important; }
html.aion-chat-page.theme-light .mobile-nav-row--notifications .mobile-nav-row__icon { color: #a21caf !important; background: rgba(217, 70, 239, 0.08) !important; }
html.aion-chat-page.theme-light .mobile-nav-row--quick .mobile-nav-row__icon,
html.aion-chat-page.theme-light .mobile-nav-row--mode .mobile-nav-row__icon { color: #7c3aed !important; background: rgba(139, 92, 246, 0.08) !important; }
html.aion-chat-page.theme-light #nav-mode-toggle-btn[data-mode-accent="chat"] .mobile-nav-row__icon { color: #7c3aed !important; background: rgba(139, 92, 246, 0.08) !important; }
html.aion-chat-page.theme-light #nav-mode-toggle-btn[data-mode-accent="analysis"] .mobile-nav-row__icon { color: #047857 !important; background: rgba(16, 185, 129, 0.08) !important; }

html.aion-chat-page.theme-light .mobile-nav-row.active {
    background: rgba(139, 92, 246, 0.08) !important;
    color: #0f172a !important;
}

html.aion-chat-page.theme-light .mobile-nav-row.active .mobile-nav-row__icon {
    background: rgba(139, 92, 246, 0.12) !important;
    color: #7c3aed !important;
}

html.aion-chat-page.theme-light .mobile-nav-row--danger {
    color: #dc2626 !important;
    background: transparent !important;
}

html.aion-chat-page.theme-light .mobile-nav-row--support .mobile-nav-row__icon {
    background: rgba(22, 163, 74, 0.08) !important;
    color: #16a34a !important;
}

html.aion-chat-page.theme-light .mobile-nav-row--legal .mobile-nav-row__icon {
    background: rgba(139, 92, 246, 0.08) !important;
    color: #7c3aed !important;
}

html.aion-chat-page.theme-light .mobile-nav-row--danger .mobile-nav-row__icon {
    background: rgba(239, 68, 68, 0.06) !important;
    color: #dc2626 !important;
}

html.aion-chat-page.theme-light .mobile-nav-footer {
    background: rgba(255, 255, 255, 0.82) !important;
    border-top-color: rgba(15, 23, 42, 0.06) !important;
}

html.aion-chat-page.theme-light .mobile-nav-legal-links {
    color: rgba(100, 116, 139, 0.7) !important;
}

html.aion-chat-page.theme-light .mobile-nav-legal-links a,
html.aion-chat-page.theme-light .mobile-nav-legal-links a:visited {
    color: #334155 !important;
}

html.aion-chat-page.theme-light .mobile-nav-legal-links a:hover,
html.aion-chat-page.theme-light .mobile-nav-legal-links a:focus-visible {
    color: #7c3aed !important;
    text-decoration: none !important;
    text-decoration-line: none !important;
}

@media (hover: hover) {
    html.aion-chat-page.theme-light .mobile-nav-row:hover {
        background: rgba(15, 23, 42, 0.03) !important;
        color: #0f172a !important;
    }
    html.aion-chat-page.theme-light #nav-mode-toggle-btn[data-mode-accent="chat"]:hover {
        background: rgba(139, 92, 246, 0.05) !important;
        color: #7c3aed !important;
    }
    html.aion-chat-page.theme-light #nav-mode-toggle-btn[data-mode-accent="analysis"]:hover {
        background: rgba(16, 185, 129, 0.05) !important;
        color: #047857 !important;
    }
    html.aion-chat-page.theme-light #mobile-nav-panel[data-mode-accent="chat"] .mobile-nav-row:not(.active):not(.mobile-nav-row--danger):not(.mobile-nav-row--mode):hover {
        background: rgba(139, 92, 246, 0.05) !important;
        color: #0f172a !important;
    }
    html.aion-chat-page.theme-light #mobile-nav-panel[data-mode-accent="analysis"] .mobile-nav-row:not(.active):not(.mobile-nav-row--danger):not(.mobile-nav-row--mode):hover {
        background: rgba(16, 185, 129, 0.05) !important;
        color: #0f172a !important;
    }
    html.aion-chat-page.theme-light .mobile-nav-row--danger:hover {
        background: rgba(239, 68, 68, 0.04) !important;
        color: #dc2626 !important;
    }
    html.aion-chat-page.theme-light #mobile-nav-panel a.mobile-nav-row--danger:hover {
        background: rgba(239, 68, 68, 0.05) !important;
        color: #dc2626 !important;
    }
}

/* Sidebar */
html.aion-chat-page.theme-light #chat-sidebar,
html.aion-chat-page.theme-light .sidebar-overlay-responsive > div {
    background-color: #ffffff !important;
    border-color: rgba(15, 23, 42, 0.08) !important;
}

/* Glass card */
html.aion-chat-page.theme-light .glass-card {
    background: rgba(255, 255, 255, 0.92) !important;
    border-color: rgba(15, 23, 42, 0.08) !important;
}

/* Chat input */
html.aion-chat-page.theme-light #chat-input,
html.aion-chat-page.theme-light #sidebar-toggle,
html.aion-chat-page.theme-light #suggestions-container .rounded-2xl {
    background: rgba(255, 255, 255, 0.9) !important;
    border-color: rgba(15, 23, 42, 0.1) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04), 0 0 0 1px rgba(15, 23, 42, 0.04) inset !important;
    color: #0f172a !important;
}
html.aion-chat-page.theme-light #chat-input:hover {
    border-color: rgba(100, 116, 139, 0.35) !important;
    background: #ffffff !important;
}
html.aion-chat-page.theme-light #chat-input:focus {
    border-color: rgba(100, 116, 139, 0.45) !important;
    background: #ffffff !important;
    box-shadow: none !important;
    animation: none !important;
}
html.aion-chat-page.theme-light #chat-input::placeholder {
    color: #94a3b8;
}

/* User message bubble */
html.aion-chat-page.theme-light .user-message-bubble {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.08) 0%, rgba(99, 102, 241, 0.06) 50%, rgba(59, 130, 246, 0.05) 100%) !important;
    border-color: rgba(139, 92, 246, 0.15) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04) !important;
    color: #1e293b !important;
}

html.aion-chat-page.theme-light .user-message-expand-toggle {
    color: #6d28d9 !important;
}

html.aion-chat-page.theme-light .user-message-expand-toggle:hover,
html.aion-chat-page.theme-light .user-message-expand-toggle:focus-visible {
    color: #4c1d95 !important;
}

/* AI message bubble */
html.aion-chat-page.theme-light .ai-message-bubble {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    color: #1e293b !important;
}

/* AI message content text */
html.aion-chat-page.theme-light .ai-message-content,
html.aion-chat-page.theme-light .message-text {
    color: #1e293b !important;
}

/* Message header names */
html.aion-chat-page.theme-light .message-header .name {
    text-shadow: none !important;
}
html.aion-chat-page.theme-light .message-header.user .name {
    -webkit-text-fill-color: #6d28d9 !important;
    background: none !important;
}
html.aion-chat-page.theme-light .message-header.ai .name {
    -webkit-text-fill-color: #4f46e5 !important;
    background: none !important;
}

/* Filter controls row */
html.aion-chat-page.theme-light #filter-controls-row {
    background: linear-gradient(to right, rgba(255, 255, 255, 0.9), rgba(248, 250, 252, 0.85)) !important;
    border-color: rgba(15, 23, 42, 0.08) !important;
}

/* Dropdowns (response-mode, exchange etc.) */
html.aion-chat-page.theme-light #response-mode-dropdown,
html.aion-chat-page.theme-light #exchange-dropdown {
    background: rgba(255, 255, 255, 0.98) !important;
    border-color: rgba(15, 23, 42, 0.1) !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08) !important;
}

/* Chat scrollbar */
html.aion-chat-page.theme-light #chat-container::-webkit-scrollbar-track {
    background: transparent;
}
html.aion-chat-page.theme-light #chat-container::-webkit-scrollbar-thumb {
    background: rgba(15, 23, 42, 0.1);
}
html.aion-chat-page.theme-light #chat-container::-webkit-scrollbar-thumb:hover {
    background: rgba(15, 23, 42, 0.18);
}

/* Cost badge */
html.aion-chat-page.theme-light #cost-badge {
    background: rgba(241, 245, 249, 0.6) !important;
    border-color: rgba(15, 23, 42, 0.06) !important;
    box-shadow: none !important;
}
html.aion-chat-page.theme-light #cost-badge.border-emerald-500\/50 {
    border-color: rgba(16, 185, 129, 0.45) !important;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.08), rgba(16, 185, 129, 0.03)) !important;
    box-shadow: inset 0 0 8px rgba(16, 185, 129, 0.1) !important;
}
html.aion-chat-page.theme-light #cost-badge.border-amber-500\/50 {
    border-color: rgba(245, 158, 11, 0.45) !important;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.08), rgba(245, 158, 11, 0.03)) !important;
    box-shadow: inset 0 0 8px rgba(245, 158, 11, 0.1) !important;
}
html.aion-chat-page.theme-light #cost-badge.border-red-500\/50 {
    border-color: rgba(239, 68, 68, 0.45) !important;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.08), rgba(239, 68, 68, 0.03)) !important;
    box-shadow: inset 0 0 8px rgba(239, 68, 68, 0.1) !important;
}
html.aion-chat-page.theme-light #cost-tooltip {
    background: rgba(255, 255, 255, 0.98) !important;
    border-color: rgba(15, 23, 42, 0.08) !important;
    color: #475569 !important;
}

/* Sidebar toggle buttons */
html.aion-chat-page.theme-light .sidebar-toggle-btn {
    background: rgba(255, 255, 255, 0.9) !important;
    border-color: rgba(15, 23, 42, 0.08) !important;
    color: #64748b !important;
}
html.aion-chat-page.theme-light .sidebar-toggle-btn:hover {
    border-color: rgba(139, 92, 246, 0.3) !important;
    color: #0f172a !important;
}

/* Bottom sheets (Filter, Quick Access) */
html.aion-chat-page.theme-light .bg-slate-900\/98 {
    background: rgba(255, 255, 255, 0.98) !important;
}

/* Suggestion chips */
html.aion-chat-page.theme-light .suggestion-chip,
html.aion-chat-page.theme-light [class*="suggestion"] button {
    background: rgba(255, 255, 255, 0.85) !important;
    border-color: rgba(15, 23, 42, 0.08) !important;
    color: #475569 !important;
}

/* Code blocks inside AI messages */
html.aion-chat-page.theme-light .ai-message-content pre,
html.aion-chat-page.theme-light .ai-message-content code {
    background: rgba(241, 245, 249, 0.8) !important;
    color: #1e293b !important;
    border-color: rgba(15, 23, 42, 0.08) !important;
}

/* Recipe/card backgrounds in messages */
html.aion-chat-page.theme-light .recipe-card,
html.aion-chat-page.theme-light .shop-link-card,
html.aion-chat-page.theme-light .video-link,
html.aion-chat-page.theme-light .document-link,
html.aion-chat-page.theme-light .audio-link,
html.aion-chat-page.theme-light .map-link,
html.aion-chat-page.theme-light .code-link {
    background: rgba(248, 250, 252, 0.8) !important;
    border-color: rgba(15, 23, 42, 0.08) !important;
}

/* Chart embed in messages */
html.aion-chat-page.theme-light .chart-embed {
    background: rgba(255, 255, 255, 0.9) !important;
    border-color: rgba(15, 23, 42, 0.08) !important;
}

/* Typing indicator */
html.aion-chat-page.theme-light .typing-indicator,
html.aion-chat-page.theme-light #typing-indicator {
    color: #64748b !important;
}

/* Input section wrapper */
html.aion-chat-page.theme-light #input-wrapper,
html.aion-chat-page.theme-light #input-section {
    background: rgba(248, 250, 252, 0.95) !important;
    border-color: rgba(15, 23, 42, 0.08) !important;
}

/* Send button */
html.aion-chat-page.theme-light #send-btn:not(:disabled) {
    background: rgba(139, 92, 246, 0.9) !important;
    color: #ffffff !important;
}

/* ---- Sidebar glass card (very dark override) ---- */
html.aion-chat-page.theme-light main #chat-sidebar .glass-card {
    background: rgba(255, 255, 255, 0.95) !important;
}

/* ---- Sidebar header text ---- */
html.aion-chat-page.theme-light #chat-sidebar h2,
html.aion-chat-page.theme-light #chat-sidebar .text-white,
html.aion-chat-page.theme-light .sidebar-overlay-responsive h2,
html.aion-chat-page.theme-light .sidebar-overlay-responsive .text-white {
    color: #1e293b !important;
}

/* ---- Sidebar header buttons (delete, new chat) ---- */
html.aion-chat-page.theme-light #chat-sidebar .bg-red-500\/10,
html.aion-chat-page.theme-light #chat-sidebar [class*="bg-red-500"] {
    background: rgba(239, 68, 68, 0.08) !important;
    border-color: rgba(239, 68, 68, 0.15) !important;
}
html.aion-chat-page.theme-light #chat-sidebar .bg-purple-500\/10,
html.aion-chat-page.theme-light #chat-sidebar [class*="bg-purple-500/10"] {
    background: rgba(139, 92, 246, 0.08) !important;
    border-color: rgba(139, 92, 246, 0.15) !important;
}

/* ---- Chat history items ---- */
html.aion-chat-page.theme-light .chat-history-item {
    background: rgba(255, 255, 255, 0.7) !important;
    border: 1px solid rgba(15, 23, 42, 0.08) !important;
    border-left: 3px solid rgba(139, 92, 246, 0.3) !important;
}
html.aion-chat-page.theme-light .chat-history-item:hover {
    background: rgba(255, 255, 255, 0.9) !important;
    border-color: rgba(139, 92, 246, 0.2) !important;
    border-left-color: rgba(139, 92, 246, 0.6) !important;
}
html.aion-chat-page.theme-light .chat-history-item.active {
    background: rgba(139, 92, 246, 0.08) !important;
    border-color: rgba(139, 92, 246, 0.2) !important;
}
html.aion-chat-page.theme-light .chat-history-item .text-white,
html.aion-chat-page.theme-light .chat-history-item .text-gray-200,
html.aion-chat-page.theme-light .chat-history-item p {
    color: #1e293b !important;
}
html.aion-chat-page.theme-light .chat-history-item .text-gray-400,
html.aion-chat-page.theme-light .chat-history-item .text-gray-500,
html.aion-chat-page.theme-light .chat-history-item .text-xs {
    color: #64748b !important;
}
html.aion-chat-page.theme-light .chat-history-item .delete-chat-btn {
    color: #94a3b8 !important;
}
html.aion-chat-page.theme-light .chat-history-item .delete-chat-btn:hover {
    background: rgba(239, 68, 68, 0.1) !important;
    color: #ef4444 !important;
}

/* ---- Analysis history items ---- */
html.aion-chat-page.theme-light .analysis-history-item {
    background: rgba(255, 255, 255, 0.7) !important;
    border: 1px solid rgba(15, 23, 42, 0.08) !important;
    border-left: 3px solid rgba(16, 185, 129, 0.3) !important;
}
html.aion-chat-page.theme-light .analysis-history-item:hover {
    background: rgba(255, 255, 255, 0.9) !important;
    border-color: rgba(16, 185, 129, 0.2) !important;
    border-left-color: rgba(16, 185, 129, 0.6) !important;
}
html.aion-chat-page.theme-light .analysis-history-item.active {
    background: rgba(16, 185, 129, 0.08) !important;
    border-color: rgba(16, 185, 129, 0.2) !important;
}
html.aion-chat-page.theme-light .analysis-history-item .text-white,
html.aion-chat-page.theme-light .analysis-history-item .text-gray-200,
html.aion-chat-page.theme-light .analysis-history-item p {
    color: #1e293b !important;
}
html.aion-chat-page.theme-light .analysis-history-item .text-gray-400,
html.aion-chat-page.theme-light .analysis-history-item .text-xs {
    color: #64748b !important;
}
html.aion-chat-page.theme-light .analysis-history-item .delete-analysis-btn {
    color: #94a3b8 !important;
}
html.aion-chat-page.theme-light .analysis-history-item .delete-analysis-btn:hover {
    background: rgba(239, 68, 68, 0.1) !important;
    color: #ef4444 !important;
}

/* ---- Quick buttons (Schnellzugriff) ---- */
html.aion-chat-page.theme-light .quick-btn {
    background: rgba(255, 255, 255, 0.8) !important;
    border-color: rgba(139, 92, 246, 0.15) !important;
    color: #1e293b !important;
}
html.aion-chat-page.theme-light .quick-btn:hover {
    background: rgba(139, 92, 246, 0.06) !important;
    border-color: rgba(139, 92, 246, 0.3) !important;
}
html.aion-chat-page.theme-light .quick-btn-action {
    background: rgba(255, 255, 255, 0.95) !important;
}
html.aion-chat-page.theme-light .quick-btn-hide,
html.aion-chat-page.theme-light .quick-btn-delete {
    color: #64748b !important;
}
html.aion-chat-page.theme-light .quick-btn-header-btn {
    color: #64748b !important;
}
html.aion-chat-page.theme-light .quick-btn-header-btn:hover {
    color: #7c3aed !important;
    background: rgba(139, 92, 246, 0.08) !important;
}
html.aion-chat-page.theme-light .quick-btn-section-label {
    color: #64748b !important;
}
html.aion-chat-page.theme-light .quick-btn-header {
    border-bottom-color: rgba(15, 23, 42, 0.08) !important;
}

/* ---- Quick button add modal ---- */
html.aion-chat-page.theme-light #quick-btn-add-modal .modal-content {
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%) !important;
    border-color: rgba(15, 23, 42, 0.1) !important;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.15) !important;
    color: #1e293b !important;
}
html.aion-chat-page.theme-light #quick-btn-add-modal input {
    background: #ffffff !important;
    border-color: rgba(15, 23, 42, 0.12) !important;
    color: #0f172a !important;
}
html.aion-chat-page.theme-light #quick-btn-add-modal #quick-btn-emoji-input {
    background: #ffffff !important;
    border-color: rgba(15, 23, 42, 0.12) !important;
    color: #0f172a !important;
}
html.aion-chat-page.theme-light #quick-btn-add-modal .btn-cancel {
    background: #f1f5f9 !important;
    border-color: rgba(15, 23, 42, 0.1) !important;
    color: #475569 !important;
}
html.aion-chat-page.theme-light #quick-btn-add-modal .btn-cancel:hover {
    background: #e2e8f0 !important;
}

/* ---- Emoji picker ---- */
html.aion-chat-page.theme-light .emoji-picker {
    background: #ffffff !important;
    border-color: rgba(15, 23, 42, 0.12) !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1) !important;
}
html.aion-chat-page.theme-light .emoji-btn {
    background: rgba(139, 92, 246, 0.06) !important;
    border-color: rgba(139, 92, 246, 0.1) !important;
}
html.aion-chat-page.theme-light .emoji-btn:hover {
    background: rgba(139, 92, 246, 0.12) !important;
}
html.aion-chat-page.theme-light .emoji-picker-grid::-webkit-scrollbar-track {
    background: #f1f5f9 !important;
}
html.aion-chat-page.theme-light .emoji-picker-grid::-webkit-scrollbar-thumb {
    background: rgba(139, 92, 246, 0.3) !important;
}

/* ---- Confirm modal ---- */
html.aion-chat-page.theme-light #confirm-modal .modal-content,
html.aion-chat-page.theme-light #confirm-modal > div > div {
    background: #ffffff !important;
    border-color: rgba(15, 23, 42, 0.1) !important;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.12) !important;
}
html.aion-chat-page.theme-light #confirm-modal h2 {
    color: #0f172a !important;
}
html.aion-chat-page.theme-light #confirm-modal p {
    color: #475569 !important;
}
html.aion-chat-page.theme-light #confirm-modal-cancel {
    background: #f1f5f9 !important;
    color: #475569 !important;
    border-color: rgba(15, 23, 42, 0.1) !important;
}

/* ---- Sidebar overlay (mobile) ---- */
html.aion-chat-page.theme-light #sidebar-overlay,
html.aion-chat-page.theme-light #sidebar-overlay .absolute {
    background: rgba(241, 245, 249, 0.92) !important;
}
html.aion-chat-page.theme-light #sidebar-overlay .bg-slate-900,
html.aion-chat-page.theme-light .sidebar-overlay-responsive .bg-slate-900 {
    background: #ffffff !important;
}

/* ---- Dropdowns (all remaining) ---- */
html.aion-chat-page.theme-light #timeframe-dropdown,
html.aion-chat-page.theme-light #markettype-dropdown,
html.aion-chat-page.theme-light #finance-type-dropdown,
html.aion-chat-page.theme-light #asset-class-dropdown,
html.aion-chat-page.theme-light #symbol-dropdown {
    background: rgba(255, 255, 255, 0.98) !important;
    border-color: rgba(15, 23, 42, 0.1) !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08) !important;
}
html.aion-chat-page.theme-light #aion_user_dropdown {
    background: #ffffff !important;
    border-color: rgba(15, 23, 42, 0.1) !important;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.1) !important;
}
html.aion-chat-page.theme-light #aion_user_dropdown a,
html.aion-chat-page.theme-light #aion_user_dropdown button {
    color: #334155 !important;
}
html.aion-chat-page.theme-light #aion_user_dropdown a:hover {
    background: rgba(139, 92, 246, 0.06) !important;
}

/* ---- Filter controls row ---- */
html.aion-chat-page.theme-light #filter-controls-row {
    background: linear-gradient(to right, rgba(255, 255, 255, 0.9), rgba(248, 250, 252, 0.85)) !important;
    border-color: rgba(15, 23, 42, 0.08) !important;
}
html.aion-chat-page.theme-light #filter-controls-row .text-gray-400 {
    color: #64748b !important;
}

/* ---- Filter buttons (THEMA, WEB, DENKEN etc.) ---- */
html.aion-chat-page.theme-light #response-mode-btn,
html.aion-chat-page.theme-light #exchange-btn,
html.aion-chat-page.theme-light #web-search-btn,
html.aion-chat-page.theme-light #thinking-mode-btn,
html.aion-chat-page.theme-light #timeframe-btn,
html.aion-chat-page.theme-light #markettype-btn,
html.aion-chat-page.theme-light #finance-type-btn,
html.aion-chat-page.theme-light #asset-class-btn,
html.aion-chat-page.theme-light [id$="-btn"][class*="bg-gradient"],
html.aion-chat-page.theme-light [id$="-btn"][class*="bg-slate-800"] {
    background: rgba(255, 255, 255, 0.85) !important;
    border-color: rgba(15, 23, 42, 0.1) !important;
    color: #334155 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
}
html.aion-chat-page.theme-light #response-mode-btn:hover,
html.aion-chat-page.theme-light #exchange-btn:hover,
html.aion-chat-page.theme-light #web-search-btn:hover,
html.aion-chat-page.theme-light #thinking-mode-btn:hover {
    background: rgba(255, 255, 255, 1) !important;
    border-color: rgba(139, 92, 246, 0.3) !important;
}
/* Active/toggled filter buttons */
html.aion-chat-page.theme-light [id$="-btn"].active,
html.aion-chat-page.theme-light [id$="-btn"][class*="from-green"],
html.aion-chat-page.theme-light [id$="-btn"][class*="from-amber"],
html.aion-chat-page.theme-light [id$="-btn"][class*="from-blue"] {
    background: rgba(139, 92, 246, 0.08) !important;
    border-color: rgba(139, 92, 246, 0.25) !important;
    color: #4c1d95 !important;
}

/* ---- Dropdown option text colors ---- */
html.aion-chat-page.theme-light .response-mode-option,
html.aion-chat-page.theme-light .exchange-option,
html.aion-chat-page.theme-light #response-mode-dropdown button,
html.aion-chat-page.theme-light #exchange-dropdown button {
    color: #334155 !important;
}
html.aion-chat-page.theme-light .response-mode-option .text-gray-200,
html.aion-chat-page.theme-light .exchange-option .text-gray-200,
html.aion-chat-page.theme-light #response-mode-dropdown .text-gray-200 {
    color: #1e293b !important;
}
html.aion-chat-page.theme-light .response-mode-option .text-gray-500,
html.aion-chat-page.theme-light #response-mode-dropdown .text-gray-500 {
    color: #64748b !important;
}

/* ---- Cost badge ---- */
html.aion-chat-page.theme-light #cost-badge {
    background: rgba(241, 245, 249, 0.6) !important;
    border-color: rgba(15, 23, 42, 0.06) !important;
    box-shadow: none !important;
}
html.aion-chat-page.theme-light #cost-badge.border-emerald-500\/50 {
    border-color: rgba(16, 185, 129, 0.45) !important;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.08), rgba(16, 185, 129, 0.03)) !important;
    box-shadow: inset 0 0 8px rgba(16, 185, 129, 0.1) !important;
}
html.aion-chat-page.theme-light #cost-badge.border-amber-500\/50 {
    border-color: rgba(245, 158, 11, 0.45) !important;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.08), rgba(245, 158, 11, 0.03)) !important;
    box-shadow: inset 0 0 8px rgba(245, 158, 11, 0.1) !important;
}
html.aion-chat-page.theme-light #cost-badge.border-red-500\/50 {
    border-color: rgba(239, 68, 68, 0.45) !important;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.08), rgba(239, 68, 68, 0.03)) !important;
    box-shadow: inset 0 0 8px rgba(239, 68, 68, 0.1) !important;
}
html.aion-chat-page.theme-light #cost-badge .text-gray-300,
html.aion-chat-page.theme-light #cost-badge span {
    color: #475569 !important;
}
html.aion-chat-page.theme-light #cost-badge .text-white,
html.aion-chat-page.theme-light #cost-badge-percent {
    color: #0f172a !important;
}

/* ---- Code widget (code blocks) ---- */
html.aion-chat-page.theme-light .code-widget {
    background: rgba(241, 245, 249, 0.8) !important;
    border-color: rgba(15, 23, 42, 0.1) !important;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06) !important;
}
html.aion-chat-page.theme-light .code-widget-header {
    background: rgba(226, 232, 240, 0.6) !important;
    border-bottom-color: rgba(15, 23, 42, 0.08) !important;
}
html.aion-chat-page.theme-light .code-widget-lang {
    color: #7c3aed !important;
    background: rgba(139, 92, 246, 0.1) !important;
}
html.aion-chat-page.theme-light .code-copy-btn {
    background: transparent !important;
    border-color: transparent !important;
    color: #94a3b8 !important;
    box-shadow: none !important;
}
html.aion-chat-page.theme-light .code-copy-btn:hover {
    background: transparent !important;
    border-color: transparent !important;
    color: #334155 !important;
}
html.aion-chat-page.theme-light .code-copy-btn.copied {
    background: transparent !important;
    border-color: transparent !important;
    color: #059669 !important;
}
html.aion-chat-page.theme-light .code-widget-pre code {
    color: #1e293b !important;
}
html.aion-chat-page.theme-light .code-widget-pre code.hljs {
    background: transparent !important;
}
html.aion-chat-page.theme-light .code-widget-pre .hljs-doctag,
html.aion-chat-page.theme-light .code-widget-pre .hljs-keyword,
html.aion-chat-page.theme-light .code-widget-pre .hljs-meta .hljs-keyword,
html.aion-chat-page.theme-light .code-widget-pre .hljs-template-tag,
html.aion-chat-page.theme-light .code-widget-pre .hljs-type {
    color: #7c3aed !important;
}
html.aion-chat-page.theme-light .code-widget-pre .hljs-title,
html.aion-chat-page.theme-light .code-widget-pre .hljs-title.class_,
html.aion-chat-page.theme-light .code-widget-pre .hljs-title.function_ {
    color: #2563eb !important;
}
html.aion-chat-page.theme-light .code-widget-pre .hljs-attr,
html.aion-chat-page.theme-light .code-widget-pre .hljs-attribute,
html.aion-chat-page.theme-light .code-widget-pre .hljs-literal,
html.aion-chat-page.theme-light .code-widget-pre .hljs-meta,
html.aion-chat-page.theme-light .code-widget-pre .hljs-number,
html.aion-chat-page.theme-light .code-widget-pre .hljs-variable {
    color: #0369a1 !important;
}
html.aion-chat-page.theme-light .code-widget-pre .hljs-string,
html.aion-chat-page.theme-light .code-widget-pre .hljs-regexp {
    color: #059669 !important;
}
html.aion-chat-page.theme-light .code-widget-pre .hljs-built_in,
html.aion-chat-page.theme-light .code-widget-pre .hljs-symbol {
    color: #ea580c !important;
}
html.aion-chat-page.theme-light .code-widget-pre .hljs-comment,
html.aion-chat-page.theme-light .code-widget-pre .hljs-code,
html.aion-chat-page.theme-light .code-widget-pre .hljs-formula {
    color: #64748b !important;
}
html.aion-chat-page.theme-light .code-widget-pre .hljs-name,
html.aion-chat-page.theme-light .code-widget-pre .hljs-selector-tag,
html.aion-chat-page.theme-light .code-widget-pre .hljs-selector-class,
html.aion-chat-page.theme-light .code-widget-pre .hljs-selector-id {
    color: #15803d !important;
}
html.aion-chat-page.theme-light .code-widget-pre code .keyword { color: #7c3aed !important; }
html.aion-chat-page.theme-light .code-widget-pre code .string { color: #059669 !important; }
html.aion-chat-page.theme-light .code-widget-pre code .comment { color: #94a3b8 !important; }
html.aion-chat-page.theme-light .code-widget-pre code .number { color: #ea580c !important; }
html.aion-chat-page.theme-light .code-widget-pre code .function { color: #2563eb !important; }

/* ---- Attach file button ---- */
html.aion-chat-page.theme-light #attach-file-btn {
    background: rgba(255, 255, 255, 0.85) !important;
    border-color: rgba(15, 23, 42, 0.1) !important;
    color: #475569 !important;
}
html.aion-chat-page.theme-light #attach-file-btn:hover {
    background: #ffffff !important;
    border-color: rgba(139, 92, 246, 0.3) !important;
    color: #7c3aed !important;
}

/* ---- Senden-Button (#action-btn) ---- */
html.aion-chat-page.theme-light #action-btn {
    background: linear-gradient(135deg, #7c3aed 0%, #6366f1 100%) !important;
    border: 1px solid rgba(124, 58, 237, 0.35) !important;
    color: #ffffff !important;
    box-shadow:
        0 4px 12px rgba(124, 58, 237, 0.22),
        inset 0 1px 0 rgba(255, 255, 255, 0.18) !important;
}
html.aion-chat-page.theme-light #action-btn[data-mode-accent="analysis"] {
    background: linear-gradient(135deg, #059669 0%, #10b981 100%) !important;
    border-color: rgba(5, 150, 105, 0.35) !important;
    color: #ffffff !important;
    box-shadow:
        0 4px 12px rgba(5, 150, 105, 0.22),
        inset 0 1px 0 rgba(255, 255, 255, 0.18) !important;
}
html.aion-chat-page.theme-light #action-btn[data-action="send"]:hover:not(:disabled) {
    background: linear-gradient(135deg, #6d28d9 0%, #4f46e5 100%) !important;
    border-color: rgba(109, 40, 217, 0.55) !important;
    color: #ffffff !important;
    box-shadow:
        0 6px 18px rgba(124, 58, 237, 0.32),
        inset 0 1px 0 rgba(255, 255, 255, 0.22) !important;
    transform: translateY(-1px);
}
html.aion-chat-page.theme-light #action-btn[data-mode-accent="analysis"][data-action="send"]:hover:not(:disabled) {
    background: linear-gradient(135deg, #047857 0%, #059669 100%) !important;
    border-color: rgba(4, 120, 87, 0.55) !important;
    box-shadow:
        0 6px 18px rgba(5, 150, 105, 0.32),
        inset 0 1px 0 rgba(255, 255, 255, 0.22) !important;
}
html.aion-chat-page.theme-light #action-btn:disabled {
    background: rgba(124, 58, 237, 0.15) !important;
    border-color: rgba(124, 58, 237, 0.18) !important;
    color: rgba(124, 58, 237, 0.55) !important;
    box-shadow: none !important;
}
/* Cancel-Mode (X-Icon): neutraler, nicht lila */
html.aion-chat-page.theme-light #action-btn[data-action="cancel"] {
    background: rgba(239, 68, 68, 0.08) !important;
    border-color: rgba(239, 68, 68, 0.28) !important;
    color: #dc2626 !important;
    box-shadow: none !important;
}
html.aion-chat-page.theme-light #action-btn[data-action="cancel"]:hover:not(:disabled) {
    background: rgba(239, 68, 68, 0.14) !important;
    border-color: rgba(239, 68, 68, 0.45) !important;
    color: #b91c1c !important;
    box-shadow: 0 6px 16px rgba(239, 68, 68, 0.16) !important;
    transform: translateY(-1px);
}

/* ---- Quick access toggle button ---- */
html.aion-chat-page.theme-light #quick-access-toggle {
    background: rgba(139, 92, 246, 0.12) !important;
    border-color: rgba(139, 92, 246, 0.24) !important;
    color: #7c3aed !important;
}
html.aion-chat-page.theme-light #quick-access-toggle:hover {
    background: rgba(139, 92, 246, 0.18) !important;
    border-color: rgba(139, 92, 246, 0.34) !important;
    color: #7c3aed !important;
}

/* ---- Right panel (Schnellzugriff sidebar) ---- */
html.aion-chat-page.theme-light #quick-access-sidebar {
    background: #ffffff !important;
    border-color: rgba(15, 23, 42, 0.08) !important;
}
html.aion-chat-page.theme-light #quick-access-sidebar h2,
html.aion-chat-page.theme-light #quick-access-sidebar .text-white {
    color: #1e293b !important;
}
html.aion-chat-page.theme-light #quick-access-sidebar .bg-purple-500\/10,
html.aion-chat-page.theme-light #quick-access-sidebar [class*="bg-purple-500/10"] {
    background: rgba(139, 92, 246, 0.06) !important;
    border-color: rgba(139, 92, 246, 0.12) !important;
}

/* ---- User location ---- */
html.aion-chat-page.theme-light #user-location-display {
    border-color: rgba(15, 23, 42, 0.06) !important;
}
html.aion-chat-page.theme-light #user-location-display .text-gray-400,
html.aion-chat-page.theme-light #user-location-display .text-gray-500 {
    color: #64748b !important;
}
html.aion-chat-page.theme-light #edit-location-btn {
    color: #64748b !important;
}
html.aion-chat-page.theme-light #edit-location-btn:hover {
    background: rgba(15, 23, 42, 0.04) !important;
    color: #334155 !important;
}

/* ---- Mobile nav panel ---- */
html.aion-chat-page.theme-light #mobile-nav-panel .bg-slate-950,
html.aion-chat-page.theme-light #mobile-nav-panel .bg-slate-900 {
    background: #ffffff !important;
}
html.aion-chat-page.theme-light #mobile-nav-panel .text-white,
html.aion-chat-page.theme-light #mobile-nav-panel .text-gray-300 {
    color: #1e293b !important;
}
html.aion-chat-page.theme-light #mobile-nav-panel .border-white\/10,
html.aion-chat-page.theme-light #mobile-nav-panel .border-white\/5 {
    border-color: rgba(15, 23, 42, 0.08) !important;
}
html.aion-chat-page.theme-light #mobile-nav-overlay {
    background: rgba(0, 0, 0, 0.3) !important;
}

/* ---- Bottom sheets (filter, quick access) ---- */
html.aion-chat-page.theme-light #filter-bottom-sheet .bg-slate-900\/98,
html.aion-chat-page.theme-light #quick-access-bottom-sheet .bg-slate-900\/98 {
    background: rgba(255, 255, 255, 0.98) !important;
}
html.aion-chat-page.theme-light #filter-bottom-sheet .text-white,
html.aion-chat-page.theme-light #quick-access-bottom-sheet .text-white {
    color: #1e293b !important;
}
html.aion-chat-page.theme-light #filter-bottom-sheet .text-gray-400,
html.aion-chat-page.theme-light #quick-access-bottom-sheet .text-gray-400 {
    color: #64748b !important;
}
html.aion-chat-page.theme-light #filter-bottom-sheet .border-white\/10,
html.aion-chat-page.theme-light #filter-bottom-sheet .border-white\/5,
html.aion-chat-page.theme-light #quick-access-bottom-sheet .border-white\/10,
html.aion-chat-page.theme-light #quick-access-bottom-sheet .border-white\/5 {
    border-color: rgba(15, 23, 42, 0.06) !important;
}
html.aion-chat-page.theme-light #filter-bottom-sheet .bg-slate-600,
html.aion-chat-page.theme-light #quick-access-bottom-sheet .bg-slate-600 {
    background: #cbd5e1 !important;
}
html.aion-chat-page.theme-light #filter-bottom-sheet .bg-slate-800\/80,
html.aion-chat-page.theme-light #quick-access-bottom-sheet .bg-slate-800\/80 {
    background: #f1f5f9 !important;
}

/* ---- Sidebar dividers ---- */
html.aion-chat-page.theme-light #chat-sidebar .bg-gradient-to-r,
html.aion-chat-page.theme-light #quick-access-sidebar .bg-gradient-to-r {
    opacity: 0.3;
}

/* ---- Chat dividers ---- */
html.aion-chat-page.theme-light .chat-divider,
html.aion-chat-page.theme-light [class*="bg-gradient-to-r"][class*="via-slate-600"] {
    opacity: 0.2;
}

/* ---- Coin analyse bar ---- */
html.aion-chat-page.theme-light #coin-analyse-bar,
html.aion-chat-page.theme-light [id*="coin-analyse"] {
    background: rgba(255, 255, 255, 0.85) !important;
    border-color: rgba(15, 23, 42, 0.08) !important;
}
html.aion-chat-page.theme-light #coin-analyse-bar .text-white {
    color: #1e293b !important;
}
html.aion-chat-page.theme-light #coin-analyse-bar .text-gray-400 {
    color: #64748b !important;
}

/* ---- Shopping widget ---- */
html.aion-chat-page.theme-light .shopping-widget {
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%) !important;
    border-color: rgba(15, 23, 42, 0.1) !important;
}
html.aion-chat-page.theme-light .shopping-header h3,
html.aion-chat-page.theme-light .shopping-widget .text-white {
    color: #1e293b !important;
}
html.aion-chat-page.theme-light .shopping-close {
    background: #f1f5f9 !important;
    color: #475569 !important;
}

/* ---- Travel widget ---- */
html.aion-chat-page.theme-light .travel-widget {
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%) !important;
    border-color: rgba(15, 23, 42, 0.1) !important;
}
html.aion-chat-page.theme-light .travel-widget .text-white {
    color: #1e293b !important;
}

/* ---- Alpha badge ---- */
html.aion-chat-page.theme-light .text-purple-300 {
    color: #7c3aed !important;
}

/* ---- Generic catch-all for remaining dark Tailwind in aion ---- */
html.aion-chat-page.theme-light .bg-white\/\[0\.02\],
html.aion-chat-page.theme-light [class*="bg-white/[0.02]"] {
    background: rgba(255, 255, 255, 0.7) !important;
}
html.aion-chat-page.theme-light .border-white\/10,
html.aion-chat-page.theme-light .border-white\/5 {
    border-color: rgba(15, 23, 42, 0.06) !important;
}
html.aion-chat-page.theme-light .text-gray-200 {
    color: #1e293b !important;
}
html.aion-chat-page.theme-light .text-gray-300 {
    color: #334155 !important;
}
html.aion-chat-page.theme-light .text-gray-400 {
    color: #64748b !important;
}
html.aion-chat-page.theme-light .bg-slate-800\/60,
html.aion-chat-page.theme-light .bg-slate-800\/80,
html.aion-chat-page.theme-light .bg-slate-800\/70 {
    background: rgba(255, 255, 255, 0.85) !important;
}
html.aion-chat-page.theme-light .border-slate-600\/40,
html.aion-chat-page.theme-light .border-slate-600\/50,
html.aion-chat-page.theme-light .border-slate-700\/50,
html.aion-chat-page.theme-light .border-slate-700\/60 {
    border-color: rgba(15, 23, 42, 0.08) !important;
}
html.aion-chat-page.theme-light .hover\:bg-white\/10:hover {
    background: rgba(15, 23, 42, 0.04) !important;
}

/* ============================================================
   FINAL LIGHT-MODE CLEANUP — remaining dark spots on /aion
   ============================================================ */

/* Chat-Input Textarea */
html.aion-chat-page.theme-light #chat-input {
    background: #ffffff !important;
    border-color: rgba(15, 23, 42, 0.12) !important;
    color: #0f172a !important;
}
html.aion-chat-page.theme-light #chat-input::placeholder {
    color: #94a3b8 !important;
}
html.aion-chat-page.theme-light #chat-input:hover {
    background: #ffffff !important;
    border-color: rgba(100, 116, 139, 0.35) !important;
}
html.aion-chat-page.theme-light #chat-input:focus {
    background: #ffffff !important;
    border-color: rgba(100, 116, 139, 0.45) !important;
    box-shadow: none !important;
    animation: none !important;
}

/* Voice-Input (Mikrofon) */
html.aion-chat-page.theme-light #voice-input-btn {
    color: #64748b !important;
}
html.aion-chat-page.theme-light #voice-input-btn:hover {
    color: #7c3aed !important;
    background: rgba(139, 92, 246, 0.08) !important;
}

/* Limit-Pills am unteren Rand */
html.aion-chat-page.theme-light #right-sidebar-limit-chat,
html.aion-chat-page.theme-light #right-sidebar-limit-analysis,
html.aion-chat-page.theme-light #sidebar-limit-chat,
html.aion-chat-page.theme-light #sidebar-limit-analysis {
    background: rgba(15, 23, 42, 0.04) !important;
    color: #475569 !important;
}
html.aion-chat-page.theme-light #right-sidebar-limit-chat .text-gray-200,
html.aion-chat-page.theme-light #right-sidebar-limit-analysis .text-gray-200,
html.aion-chat-page.theme-light #sidebar-limit-chat .text-gray-200,
html.aion-chat-page.theme-light #sidebar-limit-analysis .text-gray-200 {
    color: #0f172a !important;
}

/* Tooltips auf den Limit-Pills */
html.aion-chat-page.theme-light #right-sidebar-limit-tooltip,
html.aion-chat-page.theme-light #right-sidebar-analysis-tooltip,
html.aion-chat-page.theme-light #sidebar-limit-tooltip,
html.aion-chat-page.theme-light #sidebar-analysis-tooltip {
    background: #ffffff !important;
    border-color: rgba(15, 23, 42, 0.10) !important;
    color: #334155 !important;
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.10) !important;
}

/* Chat-Liste leerer Zustand */
html.aion-chat-page.theme-light #chat-list-container .text-gray-400,
html.aion-chat-page.theme-light #chat-list-container .text-gray-500,
html.aion-chat-page.theme-light .chat-history-item .text-gray-400,
html.aion-chat-page.theme-light .chat-history-item .text-gray-500 {
    color: #64748b !important;
}
/* Chat-Tab-Pille („Chat ⇄") ganz oben in der Sidebar */
html.aion-chat-page.theme-light .chat-tab-btn,
html.aion-chat-page.theme-light #chat-tab-selector {
    background: rgba(139, 92, 246, 0.08) !important;
    color: #6d28d9 !important;
    border-color: rgba(139, 92, 246, 0.18) !important;
}
/* Delete-/Neuer-Chat Icons in der Sidebar-Tab-Reihe */
html.aion-chat-page.theme-light #clear-all-chats-btn,
html.aion-chat-page.theme-light #new-chat-btn {
    color: #64748b !important;
    background: rgba(15, 23, 42, 0.03) !important;
    border-color: rgba(15, 23, 42, 0.08) !important;
}
html.aion-chat-page.theme-light #clear-all-chats-btn:hover {
    color: #dc2626 !important;
    background: rgba(239, 68, 68, 0.08) !important;
    border-color: rgba(239, 68, 68, 0.25) !important;
}
html.aion-chat-page.theme-light #new-chat-btn:hover {
    color: #7c3aed !important;
    background: rgba(139, 92, 246, 0.08) !important;
    border-color: rgba(139, 92, 246, 0.25) !important;
}

/* Empty-Chat-State Icon + Text */
html.aion-chat-page.theme-light .chat-empty-state,
html.aion-chat-page.theme-light #chat-empty-state {
    color: #94a3b8 !important;
}
html.aion-chat-page.theme-light .chat-empty-state svg,
html.aion-chat-page.theme-light #chat-empty-state svg {
    color: #cbd5e1 !important;
}

/* Was kann ich für dich tun Placeholder (Center Welcome) */
html.aion-chat-page.theme-light #chat-welcome-title,
html.aion-chat-page.theme-light .chat-welcome-title,
html.aion-chat-page.theme-light #chat-welcome-subtitle,
html.aion-chat-page.theme-light .chat-welcome-subtitle {
    color: #475569 !important;
}

/* Schnellzugriff-Items & ihre Eye-Toggle */
html.aion-chat-page.theme-light .quick-btn,
html.aion-chat-page.theme-light .quick-access-item {
    background: #ffffff !important;
    border-color: rgba(15, 23, 42, 0.08) !important;
    color: #1e293b !important;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04) !important;
}
html.aion-chat-page.theme-light .quick-btn:hover,
html.aion-chat-page.theme-light .quick-access-item:hover {
    background: rgba(139, 92, 246, 0.05) !important;
    border-color: rgba(139, 92, 246, 0.25) !important;
}
html.aion-chat-page.theme-light .quick-btn-visibility-toggle,
html.aion-chat-page.theme-light .quick-access-visibility-toggle {
    color: #94a3b8 !important;
}
html.aion-chat-page.theme-light .quick-btn-visibility-toggle:hover,
html.aion-chat-page.theme-light .quick-access-visibility-toggle:hover {
    color: #7c3aed !important;
}
html.aion-chat-page.theme-light #quick-access-sidebar .text-gray-400 {
    color: #94a3b8 !important;
}

/* Sidebar-Header „STANDARD" */
html.aion-chat-page.theme-light .quick-access-section-label,
html.aion-chat-page.theme-light #quick-access-sidebar [class*="text-gray-500"] {
    color: #94a3b8 !important;
}

/* Schnellzugriff: + Button (obere rechte Ecke des Panels) */
html.aion-chat-page.theme-light #quick-access-add-btn {
    background: rgba(139, 92, 246, 0.12) !important;
    color: #7c3aed !important;
    border-color: rgba(139, 92, 246, 0.28) !important;
}
html.aion-chat-page.theme-light #quick-access-add-btn:hover {
    background: rgba(139, 92, 246, 0.20) !important;
    border-color: rgba(139, 92, 246, 0.45) !important;
}

/* Generische bg-slate-800/95 Tooltips im Chat */
html.aion-chat-page.theme-light .bg-slate-800\/95 {
    background: #ffffff !important;
    color: #1e293b !important;
    border-color: rgba(15, 23, 42, 0.08) !important;
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.10) !important;
}

/* ============================================================
   ANALYSE-MODUS (Coin-Select Screen) — Light-Mode Lesbarkeit
   ============================================================ */

/* „Analysieren"-Button (grüner CTA) — weiße Schrift + satterer Teal-Gradient */
html.aion-chat-page.theme-light .coin-analyse-start-btn,
html.aion-chat-page.theme-light .coin-analyse-start-btn * {
    color: #ffffff !important;
}
html.aion-chat-page.theme-light .coin-analyse-start-btn {
    background: linear-gradient(135deg, #059669 0%, #0d9488 100%) !important;
    border-color: rgba(5, 150, 105, 0.35) !important;
    box-shadow:
        0 4px 12px rgba(5, 150, 105, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.18) !important;
}
html.aion-chat-page.theme-light .coin-analyse-start-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #047857 0%, #0f766e 100%) !important;
    box-shadow:
        0 6px 18px rgba(5, 150, 105, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.22) !important;
    transform: translateY(-1px);
}

/* Invest/Trading + Short/Long-Term Mode-Buttons — Inaktiv */
html.aion-chat-page.theme-light #markettype-btn,
html.aion-chat-page.theme-light #timeframe-btn,
html.aion-chat-page.theme-light #coin-bar-markettype-btn,
html.aion-chat-page.theme-light #coin-bar-timeframe-btn {
    background: #ffffff !important;
    border-color: rgba(15, 23, 42, 0.12) !important;
    color: #475569 !important;
}
html.aion-chat-page.theme-light #markettype-btn:hover,
html.aion-chat-page.theme-light #timeframe-btn:hover,
html.aion-chat-page.theme-light #coin-bar-markettype-btn:hover,
html.aion-chat-page.theme-light #coin-bar-timeframe-btn:hover {
    background: rgba(139, 92, 246, 0.06) !important;
    border-color: rgba(139, 92, 246, 0.30) !important;
    color: #7c3aed !important;
}

/* Aktiver State (per JS mit bg-emerald-500/15 + text-emerald-200 gesetzt) */
html.aion-chat-page.theme-light .bg-emerald-500\/15,
html.aion-chat-page.theme-light .bg-emerald-500\/20 {
    background-color: rgba(16, 185, 129, 0.12) !important;
}
html.aion-chat-page.theme-light .border-emerald-500\/20,
html.aion-chat-page.theme-light .border-emerald-500\/30,
html.aion-chat-page.theme-light .border-emerald-500\/40,
html.aion-chat-page.theme-light .border-emerald-500\/50 {
    border-color: rgba(5, 150, 105, 0.35) !important;
}
/* Emerald-Text auf hellem Emerald-BG — stark dunkler für Kontrast */
html.aion-chat-page.theme-light .text-emerald-200,
html.aion-chat-page.theme-light .text-emerald-300,
html.aion-chat-page.theme-light .text-emerald-400 {
    color: #047857 !important;   /* emerald-700 */
}
html.aion-chat-page.theme-light .text-emerald-500 {
    color: #065f46 !important;   /* emerald-800 */
}

/* Dropdowns des Coin-Selectors */
html.aion-chat-page.theme-light #coin-bar-markettype-dropdown,
html.aion-chat-page.theme-light #coin-bar-timeframe-dropdown,
html.aion-chat-page.theme-light #coin-bar-symbol-dropdown,
html.aion-chat-page.theme-light #markettype-dropdown,
html.aion-chat-page.theme-light #timeframe-dropdown {
    background: #ffffff !important;
    border-color: rgba(15, 23, 42, 0.10) !important;
    box-shadow: 0 8px 28px rgba(15, 23, 42, 0.12) !important;
}
html.aion-chat-page.theme-light .coin-bar-mt-opt,
html.aion-chat-page.theme-light .markettype-option,
html.aion-chat-page.theme-light .timeframe-option {
    color: #1e293b !important;
    border-color: rgba(15, 23, 42, 0.06) !important;
}
html.aion-chat-page.theme-light .coin-bar-mt-opt:hover,
html.aion-chat-page.theme-light .markettype-option:hover,
html.aion-chat-page.theme-light .timeframe-option:hover {
    background: rgba(139, 92, 246, 0.08) !important;
    color: #4f46e5 !important;
}

/* „Welchen Coin analysieren?" Heading und Chevron */
html.aion-chat-page.theme-light .coin-analyse-heading,
html.aion-chat-page.theme-light #coin-analyse-title {
    color: #0f172a !important;
}
html.aion-chat-page.theme-light #coin-bar-symbol-btn {
    background: #ffffff !important;
    border-color: rgba(15, 23, 42, 0.12) !important;
    color: #0f172a !important;
}
html.aion-chat-page.theme-light #coin-bar-symbol-btn svg {
    color: #94a3b8 !important;
}

/* Analyse-Limit-Anzeige („0/12 Analysen") */
html.aion-chat-page.theme-light #analyse-limit-display {
    color: #64748b !important;
}

/* Analyse-History-Items (SOL Invest-Analyse, BTC Invest-Analyse) */
html.aion-chat-page.theme-light .analysis-history-item {
    background: #ffffff !important;
    border-color: rgba(15, 23, 42, 0.08) !important;
    color: #0f172a !important;
}
html.aion-chat-page.theme-light .analysis-history-item:hover {
    background: rgba(16, 185, 129, 0.04) !important;
    border-color: rgba(5, 150, 105, 0.25) !important;
}
html.aion-chat-page.theme-light .analysis-history-item.active {
    background: rgba(16, 185, 129, 0.08) !important;
    border-color: rgba(5, 150, 105, 0.35) !important;
}
html.aion-chat-page.theme-light .analysis-history-item .text-gray-500,
html.aion-chat-page.theme-light .analysis-history-item .text-gray-400 {
    color: #64748b !important;
}

/* „Analyse ⇄" Tab-Pille oben in Sidebar (analyse-mode) */
html.aion-chat-page.theme-light [data-mode-accent="analysis"].chat-tab-btn,
html.aion-chat-page.theme-light [data-mode-accent="analysis"]#chat-tab-selector,
html.aion-chat-page.theme-light .chat-tab-btn[data-mode="analyse"],
html.aion-chat-page.theme-light #chat-tab-selector[data-mode="analyse"] {
    background: rgba(16, 185, 129, 0.08) !important;
    color: #047857 !important;
    border-color: rgba(5, 150, 105, 0.22) !important;
}

/* =========================================================================
   LIGHT THEME — visual hierarchy & contrast polish (final override block)
   ========================================================================= */

/* --- Page layout: clear column separation --- */
/* Body stays light gray; sidebars become pure white with stronger borders;
   main chat area gets a subtle white card so it pops between two lighter sidebars. */
html.aion-chat-page.theme-light {
    background-color: #ffffff !important;
}
html.aion-chat-page.theme-light body {
    background-color: #ffffff !important;
}

/* Both sidebars: slightly off-white with visible border */
html.aion-chat-page.theme-light #chat-sidebar,
html.aion-chat-page.theme-light #quick-access-sidebar {
    background-color: #ffffff !important;
    border-color: rgba(15, 23, 42, 0.12) !important;
}
html.aion-chat-page.theme-light #chat-sidebar > .glass-card,
html.aion-chat-page.theme-light #quick-access-sidebar > .glass-card {
    background-color: transparent !important;
    border-color: transparent !important;
    border-radius: 0 !important;
    transition: none !important;
}

/* Sidebar resize handle — match dark-mode subtleness.
   Dunkler Modus nutzt bg-white/10 = white@10% auf dunklem BG (kaum sichtbar).
   Im Light-Mode wirkt slate@10% deutlich stärker, weil dunkle Punkte auf
   hellem BG visuell präsenter sind. Daher niedrigere Opacity setzen. */
html.aion-chat-page.theme-light #sidebar-resize-handle > div {
    background: rgba(15, 23, 42, 0.06) !important;
}
html.aion-chat-page.theme-light #sidebar-resize-handle:hover > div {
    background: rgba(139, 92, 246, 0.5) !important;
}

/* --- "Aion" branding text in main content header --- */
html.aion-chat-page.theme-light #aion-branding > span {
    color: #6d28d9 !important;
}

/* --- Sidebar mode-toggle pill (Chat 💬 / Analyse) --- */
html.aion-chat-page.theme-light #sidebar-mode-toggle {
    background: rgba(139, 92, 246, 0.10) !important;
    border-color: rgba(139, 92, 246, 0.25) !important;
    color: #6d28d9 !important;
}
html.aion-chat-page.theme-light #sidebar-mode-toggle:hover {
    background: rgba(139, 92, 246, 0.18) !important;
    border-color: rgba(139, 92, 246, 0.4) !important;
    color: #5b21b6 !important;
}
html.aion-chat-page.theme-light #sidebar-mode-toggle svg {
    color: #6d28d9 !important;
    opacity: 0.7;
}

/* --- Sidebar header action buttons (clear, new chat, +, eye) --- */
html.aion-chat-page.theme-light #clear-all-chats-btn,
html.aion-chat-page.theme-light #clear-all-analyses-btn,
html.aion-chat-page.theme-light #clear-all-chats-btn-mobile,
html.aion-chat-page.theme-light #clear-all-analyses-btn-mobile {
    background: rgba(239, 68, 68, 0.08) !important;
    border-color: rgba(239, 68, 68, 0.25) !important;
    color: #dc2626 !important;
}
html.aion-chat-page.theme-light #clear-all-chats-btn:hover,
html.aion-chat-page.theme-light #clear-all-analyses-btn:hover {
    background: rgba(239, 68, 68, 0.15) !important;
    border-color: rgba(239, 68, 68, 0.4) !important;
}

html.aion-chat-page.theme-light #new-chat-btn,
html.aion-chat-page.theme-light #toggle-analysis-settings-btn,
html.aion-chat-page.theme-light #quick-btn-toggle-hidden,
html.aion-chat-page.theme-light #quick-btn-add,
html.aion-chat-page.theme-light #quick-btn-toggle-hidden-mobile,
html.aion-chat-page.theme-light #quick-btn-add-mobile {
    background: rgba(139, 92, 246, 0.10) !important;
    border-color: rgba(139, 92, 246, 0.30) !important;
    color: #6d28d9 !important;
}
html.aion-chat-page.theme-light #new-chat-btn:hover,
html.aion-chat-page.theme-light #toggle-analysis-settings-btn:hover,
html.aion-chat-page.theme-light #quick-btn-toggle-hidden:hover,
html.aion-chat-page.theme-light #quick-btn-add:hover,
html.aion-chat-page.theme-light #quick-btn-toggle-hidden-mobile:hover,
html.aion-chat-page.theme-light #quick-btn-add-mobile:hover {
    background: rgba(139, 92, 246, 0.18) !important;
    border-color: rgba(139, 92, 246, 0.45) !important;
}
html.aion-chat-page.theme-light #quick-btn-toggle-hidden.is-active,
html.aion-chat-page.theme-light #quick-btn-toggle-hidden-mobile.is-active {
    background: #ede9fe !important;
    border-color: rgba(124, 58, 237, 0.44) !important;
    color: #4c1d95 !important;
}

/* --- Quick-access buttons (Wetter, Shopping, Reise, Taschenrechner...) --- */
html.aion-chat-page.theme-light .quick-btn,
html.aion-chat-page.theme-light .suggestion-btn {
    background: #ffffff !important;
    border: 1px solid rgba(15, 23, 42, 0.10) !important;
    color: #0f172a !important;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04) !important;
}
html.aion-chat-page.theme-light .quick-btn:hover,
html.aion-chat-page.theme-light .suggestion-btn:hover {
    background: #faf7ff !important;
    border-color: rgba(139, 92, 246, 0.35) !important;
    color: #1e1b4b !important;
    box-shadow: 0 2px 6px rgba(139, 92, 246, 0.10) !important;
}
html.aion-chat-page.theme-light .quick-btn .quick-btn-emoji,
html.aion-chat-page.theme-light .quick-btn .quick-btn-icon {
    opacity: 1 !important;
}
/* Hidden-state eye icon on quick-btn (right edge) */
html.aion-chat-page.theme-light .quick-btn .quick-btn-hide,
html.aion-chat-page.theme-light .quick-btn .quick-btn-show {
    color: #94a3b8 !important;
}

/* --- Sidebar section headers ("Schnellzugriff", "Verlauf", titles) --- */
html.aion-chat-page.theme-light #chat-sidebar h2,
html.aion-chat-page.theme-light #quick-access-sidebar h2 {
    color: #0f172a !important;
}

html.aion-chat-page .aion-chat-history-header-icon,
html.aion-chat-page .aion-standalone-sidebar-icon {
    color: #c084fc !important;
    filter: drop-shadow(0 0 4px rgba(192, 132, 252, 0.35));
}

html.aion-chat-page .aion-chat-history-header-icon path,
html.aion-chat-page .aion-standalone-sidebar-icon path {
    stroke-width: 2.5;
}

/* --- Empty-state placeholders ("Noch keine Chats vorhanden") --- */
html.aion-chat-page.theme-light #chat-history-list .text-gray-500,
html.aion-chat-page.theme-light #chat-history-list-mobile .text-gray-500,
html.aion-chat-page.theme-light #sidebar-analysis-list .text-gray-500,
html.aion-chat-page.theme-light #analysis-history-list-mobile .text-gray-500 {
    color: #64748b !important;
}
html.aion-chat-page.theme-light #chat-history-list .text-gray-600,
html.aion-chat-page.theme-light #chat-history-list-mobile .text-gray-600,
html.aion-chat-page.theme-light #sidebar-analysis-list .text-gray-600 {
    color: #94a3b8 !important;
}

/* --- User location / limit display rows at the bottom of left sidebar --- */
html.aion-chat-page.theme-light #user-location-display,
html.aion-chat-page.theme-light #user-location-display-mobile {
    border-top-color: rgba(15, 23, 42, 0.08) !important;
}
html.aion-chat-page.theme-light #user-location-display > div,
html.aion-chat-page.theme-light #user-location-display-mobile > div,
html.aion-chat-page.theme-light #sidebar-limit-chat,
html.aion-chat-page.theme-light #sidebar-limit-analysis,
html.aion-chat-page.theme-light #right-sidebar-limit-chat,
html.aion-chat-page.theme-light #right-sidebar-limit-analysis {
    background: rgba(15, 23, 42, 0.04) !important;
    color: #475569 !important;
}
html.aion-chat-page.theme-light #user-location-text,
html.aion-chat-page.theme-light #user-location-text-mobile,
html.aion-chat-page.theme-light .aion-location-text {
    color: #475569 !important;
}
html.aion-chat-page.theme-light #edit-location-btn,
html.aion-chat-page.theme-light #edit-location-btn-mobile,
html.aion-chat-page.theme-light .aion-edit-location-btn {
    color: #64748b !important;
}
html.aion-chat-page.theme-light #edit-location-btn:hover,
html.aion-chat-page.theme-light #edit-location-btn-mobile:hover,
html.aion-chat-page.theme-light .aion-edit-location-btn:hover {
    background: rgba(15, 23, 42, 0.08) !important;
    color: #1e293b !important;
}
/* Tagesverbrauch / Analysen counters numeric */
html.aion-chat-page.theme-light #sidebar-limit-percent,
html.aion-chat-page.theme-light #sidebar-analysis-count,
html.aion-chat-page.theme-light #right-sidebar-limit-percent,
html.aion-chat-page.theme-light #right-sidebar-analysis-count {
    color: #1e293b !important;
}

/* --- Bottom border above limit-display --- */
html.aion-chat-page.theme-light #quick-access-view .border-white\/10 {
    border-color: rgba(15, 23, 42, 0.10) !important;
}

/* --- Chat input form: stronger surface so it doesn't disappear --- */
html.aion-chat-page.theme-light #chat-input {
    background: #ffffff !important;
    border-color: rgba(15, 23, 42, 0.15) !important;
    color: #0f172a !important;
    box-shadow: none !important;
}
html.aion-chat-page.theme-light #chat-input::placeholder {
    color: #94a3b8 !important;
}
html.aion-chat-page.theme-light #attach-file-btn {
    background: rgba(15, 23, 42, 0.05) !important;
    color: #475569 !important;
}
html.aion-chat-page.theme-light #attach-file-btn:hover {
    background: rgba(139, 92, 246, 0.10) !important;
    color: #6d28d9 !important;
}
html.aion-chat-page.theme-light #voice-input-btn {
    color: #64748b !important;
}
html.aion-chat-page.theme-light #voice-input-btn:hover {
    background: rgba(139, 92, 246, 0.10) !important;
    color: #6d28d9 !important;
}

/* --- Send button (gradient purple, must keep white text) --- */
html.aion-chat-page.theme-light #chat-form button[type="submit"],
html.aion-chat-page.theme-light #send-btn {
    background: linear-gradient(135deg, #7c3aed 0%, #6366f1 100%) !important;
    color: #ffffff !important;
    border-color: transparent !important;
    box-shadow: 0 2px 8px rgba(124, 58, 237, 0.30) !important;
}
html.aion-chat-page.theme-light #chat-form button[type="submit"] *,
html.aion-chat-page.theme-light #send-btn * {
    color: #ffffff !important;
}

/* --- Welcome placeholder ("Was kann ich für dich tun?") --- */
html.aion-chat-page.theme-light .chat-welcome-placeholder h2,
html.aion-chat-page.theme-light .chat-welcome-placeholder .text-gray-200 {
    color: #1e293b !important;
}
html.aion-chat-page.theme-light .chat-welcome-placeholder p,
html.aion-chat-page.theme-light .chat-welcome-placeholder .text-gray-500 {
    color: #64748b !important;
}

/* --- Divider gradients are nearly invisible on white; bump them --- */
html.aion-chat-page.theme-light #sidebar-divider-chat,
html.aion-chat-page.theme-light #sidebar-divider-analysis,
html.aion-chat-page.theme-light #quick-access-view .h-px.bg-gradient-to-r {
    background: rgba(139, 92, 246, 0.20) !important;
}

/* =========================================================================
   LIGHT THEME — anfasser/handle slimming + remaining dark spots
   Im Dark Mode ist der Sidebar-Border `border-white/10` quasi unsichtbar
   und nur die 2px-Pille im 6px-Handle wirkt als Anfasser. Im Light-Mode
   waren bisher Border (sichtbar gemacht) + Handle-Container + Pille
   gleichzeitig zu sehen — dadurch wirkte der Anfasser optisch zu breit.
   Wir verstecken jetzt die Sidebar-Borders (der Page-BG #eef2f7 vs.
   weißes Sidebar-Panel liefert genug Trennung) und reduzieren die Pille
   auf einen sehr leisen Hauch. Hover bleibt deutlich.
   ========================================================================= */
html.aion-chat-page.theme-light #chat-sidebar,
html.aion-chat-page.theme-light #quick-access-sidebar {
    border-color: transparent !important;
}
html.aion-chat-page.theme-light #sidebar-resize-handle > div {
    background: rgba(15, 23, 42, 0.04) !important;
}
html.aion-chat-page.theme-light #sidebar-resize-handle:hover > div,
html.aion-chat-page.theme-light #sidebar-resize-handle.group:hover > div {
    background: rgba(139, 92, 246, 0.55) !important;
}

/* --- "Tagesverbrauch / Tageslimit / Analysen"-Zeilen: hellen Text fixen ---
   Die Prozent-Spans tragen Tailwind `text-gray-200` (#e5e7eb), praktisch
   unleserlich auf weißem Card-BG. */
html.aion-chat-page.theme-light #right-sidebar-limit-chat,
html.aion-chat-page.theme-light #right-sidebar-limit-analysis,
html.aion-chat-page.theme-light #sidebar-limit-chat,
html.aion-chat-page.theme-light #sidebar-limit-analysis {
    background: rgba(15, 23, 42, 0.04) !important;
    color: #475569 !important;
    border-top-color: rgba(15, 23, 42, 0.08) !important;
}
html.aion-chat-page.theme-light #right-sidebar-limit-chat .text-gray-200,
html.aion-chat-page.theme-light #right-sidebar-limit-analysis .text-gray-200,
html.aion-chat-page.theme-light #sidebar-limit-chat .text-gray-200,
html.aion-chat-page.theme-light #sidebar-limit-analysis .text-gray-200,
html.aion-chat-page.theme-light #right-sidebar-limit-percent,
html.aion-chat-page.theme-light #sidebar-limit-percent,
html.aion-chat-page.theme-light #sidebar-analysis-count,
html.aion-chat-page.theme-light #right-sidebar-analysis-count {
    color: #1e293b !important;
}

/* Top-Border über den Limit-Zeilen (`border-t border-white/10`) */
html.aion-chat-page.theme-light #quick-access-sidebar .border-white\/10,
html.aion-chat-page.theme-light #chat-sidebar .border-white\/10 {
    border-color: rgba(15, 23, 42, 0.08) !important;
}

/* Standort-Edit-Pencil-Hover (`hover:bg-white/10`) */
html.aion-chat-page.theme-light #edit-location-btn:hover,
html.aion-chat-page.theme-light #edit-location-btn-mobile:hover,
html.aion-chat-page.theme-light .aion-edit-location-btn:hover {
    background: rgba(139, 92, 246, 0.12) !important;
    color: #6d28d9 !important;
}
html.aion-chat-page.theme-light #user-location-text,
html.aion-chat-page.theme-light #user-location-text-mobile,
html.aion-chat-page.theme-light .aion-location-text {
    color: #1e293b !important;
}
html.aion-chat-page.theme-light #user-location-display svg,
html.aion-chat-page.theme-light #user-location-display-mobile svg {
    color: #6d28d9 !important;
}

html.aion-chat-page.theme-light .aion-temp-chat-message {
    background: rgba(255, 255, 255, 0.94) !important;
    border-color: rgba(15, 23, 42, 0.10) !important;
    color: #334155 !important;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08) !important;
}

html.aion-chat-page.theme-light .aion-temp-chat-title {
    color: #0f172a !important;
}

html.aion-chat-page.theme-light .aion-temp-chat-close:hover {
    background: rgba(15, 23, 42, 0.08) !important;
}

html.aion-chat-page.theme-light .aion-temp-chat-info {
    border-color: rgba(14, 165, 233, 0.24) !important;
    background: #eff6ff !important;
    color: #075985 !important;
}

html.aion-chat-page.theme-light .aion-temp-chat-warning {
    border-color: rgba(245, 158, 11, 0.28) !important;
    background: #fffbeb !important;
    color: #92400e !important;
}

html.aion-chat-page.theme-light .aion-temp-chat-danger {
    border-color: rgba(239, 68, 68, 0.24) !important;
    background: #fef2f2 !important;
    color: #991b1b !important;
}

html.aion-chat-page.theme-light .aion-temp-chat-success {
    border-color: rgba(16, 185, 129, 0.24) !important;
    background: #ecfdf5 !important;
    color: #065f46 !important;
}

/* =========================================================================
   LIGHT THEME — kill the dark vertical bar between sidebar and main column
   Defensive: we don't know which element exactly carries the dark color
   (could be sidebar's border-right, the resize-handle outer box, the main
   wrapper's left border, or a glass-card backdrop). Nuke them all.
   ========================================================================= */
html.aion-chat-page.theme-light #chat-sidebar {
    border-right: 1px solid rgba(15, 23, 42, 0.08) !important;
    box-shadow: none !important;
}
html.aion-chat-page.theme-light #quick-access-sidebar {
    border-left: 1px solid rgba(15, 23, 42, 0.08) !important;
    box-shadow: none !important;
}
html.aion-chat-page.theme-light #sidebar-resize-handle {
    background: transparent !important;
    background-color: transparent !important;
    border: 0 !important;
}
/* Main chat wrapper (flex-1 sibling after resize handle) */
html.aion-chat-page.theme-light main > section > div > div.flex-1 {
    background-color: #ffffff !important;
    border-left: 0 !important;
    border-left-color: transparent !important;
    box-shadow: none !important;
}
html.aion-chat-page.theme-light main > section > div > div.flex-1 > .glass-card {
    background: #ffffff !important;
    background-color: #ffffff !important;
    border-left: 0 !important;
    border-left-color: transparent !important;
    box-shadow: none !important;
}
/* Make sure neural-background canvas does NOT show through in light mode */
html.aion-chat-page.theme-light #neural-background,
html.aion-chat-page.theme-light canvas#neuralCanvas,
html.aion-chat-page.theme-light canvas#neural-bg-canvas,
html.aion-chat-page.theme-light .neural-background {
    display: none !important;
}
html.aion-chat-page.theme-light main {
    background-color: #ffffff !important;
}
html.aion-chat-page.theme-light main > section {
    background-color: #ffffff !important;
}
/* Just to be sure: any vertical 1-3px element near the seam */
html.aion-chat-page.theme-light #chat-sidebar + #sidebar-resize-handle,
html.aion-chat-page.theme-light #sidebar-resize-handle + div {
    border-left: 0 !important;
    border-right: 0 !important;
}

/* ---- Coin Analysis Result (light theme) ---- */
/* The HTML returned by /coin-analysis/generate uses dark slate gradients;
   override them so the result blocks fit a light background. */
html.aion-chat-page.theme-light .coin-analysis-result h2,
html.aion-chat-page.theme-light .coin-analysis-result h3,
html.aion-chat-page.theme-light .coin-analysis-result .text-white {
    color: #0f172a !important;
}
html.aion-chat-page.theme-light .coin-analysis-result .text-gray-200,
html.aion-chat-page.theme-light .coin-analysis-result .text-gray-300 {
    color: #334155 !important;
}
html.aion-chat-page.theme-light .coin-analysis-result .border-slate-700\/50,
html.aion-chat-page.theme-light .coin-analysis-result .border-slate-600\/30 {
    border-color: rgba(15, 23, 42, 0.10) !important;
}
/* Fazit box (and any inline dark gradient block inside the result) */
html.aion-chat-page.theme-light .coin-analysis-result [class*="bg-gradient-to-r"][class*="from-slate-800"],
html.aion-chat-page.theme-light .coin-analysis-result [class*="from-slate-700"] {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.08) 0%, rgba(255, 255, 255, 0.95) 100%) !important;
    border-color: rgba(16, 185, 129, 0.25) !important;
}
/* Section icon backgrounds (blue/purple/red/emerald w/ /20 alpha) – keep as is, just brighten icon color contrast */
html.aion-chat-page.theme-light .coin-analysis-result .bg-blue-500\/20 { background: rgba(59, 130, 246, 0.12) !important; }
html.aion-chat-page.theme-light .coin-analysis-result .bg-purple-500\/20 { background: rgba(168, 85, 247, 0.12) !important; }
html.aion-chat-page.theme-light .coin-analysis-result .bg-red-500\/20 { background: rgba(239, 68, 68, 0.12) !important; }
html.aion-chat-page.theme-light .coin-analysis-result .bg-emerald-500\/20 { background: rgba(16, 185, 129, 0.14) !important; }

/* ---- FINAL chat input reset: keep field visible on mobile and desktop ---- */
html.aion-chat-page #chat-form {
    align-items: flex-end !important;
}

html.aion-chat-page #chat-form #chat-input {
    display: block !important;
    width: 100% !important;
    min-height: var(--chat-control-height, 2.75rem) !important;
    height: auto;
    max-height: min(33rem, 42dvh) !important;
    margin: 0 !important;
    background: #0f172a !important;
    border: 1px solid #334155 !important;
    border-radius: 0.75rem !important;
    box-shadow: none !important;
    outline: 0 !important;
    color: #f8fafc !important;
    resize: none !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    scrollbar-width: none !important;
}

@media (max-width: 640px) {
    html.aion-chat-page #chat-form #chat-input {
        max-height: min(12rem, 34dvh) !important;
    }
}

html.aion-chat-page #chat-form #chat-input:hover {
    background: #111c2f !important;
    border-color: #475569 !important;
}

html.aion-chat-page #chat-form #chat-input:focus,
html.aion-chat-page #chat-form #chat-input:active {
    background: #111c2f !important;
    border-color: #64748b !important;
    box-shadow: none !important;
    outline: 0 !important;
}

html.aion-chat-page #chat-form #chat-input.chat-input-empty {
    caret-color: #ffffff !important;
}

html.aion-chat-page #chat-form #chat-input::-webkit-scrollbar {
    width: 0 !important;
    height: 0 !important;
    display: none !important;
}

html.aion-chat-page #chat-form #voice-input-btn {
    top: auto !important;
    bottom: 0.375rem !important;
    transform: none !important;
}

html.aion-chat-page #chat-form .quick-access-toggle-btn {
    background: rgba(255, 255, 255, 0.04) !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
    color: #c4b5fd !important;
}

html.aion-chat-page #chat-form .quick-access-toggle-btn svg {
    color: #c4b5fd !important;
}

html.aion-chat-page #chat-form .quick-access-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.08) !important;
    border-color: rgba(147, 51, 234, 0.45) !important;
    color: #e9d5ff !important;
}

html.aion-chat-page #chat-form .quick-access-toggle-btn:hover svg {
    color: #e9d5ff !important;
}

html.aion-chat-page.theme-light #chat-form #chat-input {
    background: #ffffff !important;
    border-color: #cbd5e1 !important;
    color: #0f172a !important;
}

html.aion-chat-page.theme-light #chat-form #chat-input:hover,
html.aion-chat-page.theme-light #chat-form #chat-input:focus,
html.aion-chat-page.theme-light #chat-form #chat-input:active {
    background: #ffffff !important;
    border-color: #94a3b8 !important;
}

html.aion-chat-page .mobile-header-action-btn:disabled,
html.aion-chat-page .tablet-action-btn:disabled,
html.aion-chat-page #new-chat-btn:disabled,
html.aion-chat-page #new-chat-btn-mobile:disabled {
    opacity: 0.4 !important;
    cursor: not-allowed !important;
    filter: grayscale(0.35);
}

html.aion-chat-page .aion-news-list {
    margin: 1rem 0;
    width: 100%;
}

html.aion-chat-page .aion-news-list .news-section-divider {
    margin: 0 0 0.75rem;
}

html.aion-chat-page .aion-news-list .news-featured-row {
    grid-template-columns: repeat(2, minmax(280px, 1fr));
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

html.aion-chat-page .aion-news-list .news-featured-card {
    grid-template-columns: 120px 1fr;
    gap: 0.9rem;
    align-items: start;
    min-height: 150px;
    padding: 0.8rem;
    border-radius: 0.75rem;
    background: rgba(15, 23, 42, 0.62);
}

html.aion-chat-page .aion-news-list .news-featured-image {
    width: 120px;
    height: 88px;
    aspect-ratio: auto;
    border-radius: 0.6rem;
}

html.aion-chat-page .aion-news-list .news-featured-body {
    justify-content: flex-start;
    gap: 0.45rem;
}

html.aion-chat-page .aion-news-list .news-featured-card .news-featured-title {
    font-size: 0.98rem !important;
    line-height: 1.35 !important;
    margin: 0;
}

html.aion-chat-page .aion-news-list .news-featured-desc {
    font-size: 0.9rem;
    line-height: 1.5;
    -webkit-line-clamp: 3;
    margin: 0;
}

html.aion-chat-page .aion-news-list .news-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.75rem;
}

html.aion-chat-page .aion-news-list .news-article {
    border-radius: 0.75rem;
    background: rgba(15, 23, 42, 0.62);
}

html.aion-chat-page .aion-news-list .news-article-title {
    font-size: 0.95rem;
    line-height: 1.35;
}

html.aion-chat-page .aion-news-list .news-article-desc {
    font-size: 0.84rem;
    -webkit-line-clamp: 3;
}

html.aion-chat-page .aion-news-source-link,
html.aion-chat-page .aion-news-open-source {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    min-height: 2rem;
    padding: 0.35rem 0;
    color: #f8fafc !important;
    font-size: 0.78rem;
    font-weight: 700;
    text-decoration: none !important;
}

html.aion-chat-page .aion-news-source-link:hover,
html.aion-chat-page .aion-news-open-source:hover {
    color: #67e8f9 !important;
}

@media (max-width: 759px) {
    html.aion-chat-page #aion-mobile-header {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        z-index: 10 !important;
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        transform: none !important;
    }

    html.aion-chat-page:not(.aion-standalone-chat-only) body.aion-unified-chat-body #page_content_wrapper {
        top: 3rem !important;
        height: calc(100dvh - 3rem) !important;
        min-height: 0 !important;
        overflow: hidden !important;
    }

    html.aion-chat-page:not(.aion-standalone-chat-only) body.aion-unified-chat-body main {
        height: calc(100dvh - 3rem) !important;
        min-height: 0 !important;
    }

    html.aion-chat-page #mobile-nav-overlay {
        top: 0 !important;
        bottom: 0 !important;
        z-index: 100000 !important;
        pointer-events: none !important;
    }
    html.aion-chat-page #mobile-nav-overlay:not(.hidden) {
        display: block !important;
        pointer-events: auto !important;
    }
    html.aion-chat-page #mobile-nav-panel {
        top: 0 !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        z-index: 100001 !important;
        width: 100vw !important;
        width: 100dvw !important;
        max-width: none !important;
        border-right: 0;
        box-shadow: none;
    }

    html.aion-chat-page #bottom-sheet-backdrop {
        z-index: 920 !important;
    }

    html.aion-chat-page #sidebar-overlay,
    html.aion-chat-page #filter-bottom-sheet,
    html.aion-chat-page #quick-access-bottom-sheet,
    html.aion-chat-page #sources-mobile-sheet {
        z-index: 950 !important;
    }

    html.aion-chat-page #sidebar-overlay,
    html.aion-chat-page #quick-access-bottom-sheet {
        top: 0 !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100vw !important;
        width: 100dvw !important;
        max-width: none !important;
        min-width: 0 !important;
        margin: 0 !important;
        transform: none !important;
    }

    html.aion-chat-page #sidebar-overlay:not(.hidden) {
        display: flex !important;
    }

    html.aion-chat-page #sidebar-overlay > div {
        padding-top: env(safe-area-inset-top, 0px) !important;
        box-sizing: border-box !important;
    }

    html.aion-chat-page #sidebar-overlay > div,
    html.aion-chat-page #quick-access-bottom-sheet > div {
        width: 100vw !important;
        width: 100dvw !important;
        max-width: none !important;
        min-width: 0 !important;
        margin: 0 !important;
    }

    html.aion-chat-page #chat-container {
        padding-bottom: 0.85rem !important;
        scroll-padding-bottom: calc(var(--chat-input-height, 80px) + 44px) !important;
    }

    html.aion-chat-page #chat-form {
        margin-top: 0.55rem !important;
        padding-top: 0.35rem !important;
    }

    html.aion-chat-page .ai-message-wrapper,
    html.aion-chat-page .user-message-wrapper {
        scroll-margin-bottom: calc(var(--chat-input-height, 80px) + 44px) !important;
    }

    html.aion-chat-page .aion-news-list .news-featured-row {
        grid-template-columns: 1fr;
    }

    html.aion-chat-page .aion-news-list .news-featured-card {
        grid-template-columns: 96px 1fr;
        min-height: 128px;
        padding: 0.7rem;
    }

    html.aion-chat-page .aion-news-list .news-featured-image {
        width: 96px;
        height: 76px;
    }

}

/* =========================================================================
   Aion Light Theme Refresh
   Final layer: structured, higher-contrast light UI.
   ========================================================================= */
html.aion-chat-page.theme-light,
html.aion-chat-page.theme-light body {
    background:
        radial-gradient(circle at 50% -10%, rgba(124, 58, 237, 0.08), transparent 34rem),
        linear-gradient(180deg, #f7f9fc 0%, #eef3f9 100%) !important;
    color: #172033 !important;
}

html.aion-chat-page.theme-light #page_content_wrapper,
html.aion-chat-page.theme-light main,
html.aion-chat-page.theme-light main > section {
    background: transparent !important;
}

html.aion-chat-page.theme-light #neural-background,
html.aion-chat-page.theme-light canvas#neuralCanvas,
html.aion-chat-page.theme-light canvas#neural-bg-canvas,
html.aion-chat-page.theme-light .neural-background {
    display: none !important;
}

html.aion-chat-page.theme-light #chat-sidebar,
html.aion-chat-page.theme-light #quick-access-sidebar {
    background: rgba(248, 250, 252, 0.94) !important;
    border-color: rgba(15, 23, 42, 0.10) !important;
    box-shadow: none !important;
}

html.aion-chat-page.theme-light #chat-sidebar {
    border-right: 1px solid rgba(15, 23, 42, 0.10) !important;
}

html.aion-chat-page.theme-light #quick-access-sidebar {
    border-left: 1px solid rgba(15, 23, 42, 0.10) !important;
}

html.aion-chat-page.theme-light #chat-sidebar > .glass-card,
html.aion-chat-page.theme-light #quick-access-sidebar > .glass-card,
html.aion-chat-page.theme-light main .glass-card {
    background: transparent !important;
    border-color: transparent !important;
    box-shadow: none !important;
}

html.aion-chat-page.theme-light #sidebar-resize-handle,
html.aion-chat-page.theme-light #sidebar-resize-handle + div {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
}

html.aion-chat-page.theme-light #sidebar-resize-handle > div {
    background: rgba(100, 116, 139, 0.16) !important;
}

html.aion-chat-page.theme-light #sidebar-resize-handle:hover > div {
    background: rgba(124, 58, 237, 0.46) !important;
}

html.aion-chat-page.theme-light #chat-container {
    background:
        radial-gradient(circle at 50% 24%, rgba(124, 58, 237, 0.045), transparent 30rem),
        linear-gradient(180deg, rgba(255, 255, 255, 0.58), rgba(247, 249, 252, 0.40)) !important;
}

/* Aion sidebar footer menu: keep the profile/menu button visible on Aionity
   and standalone while the history list owns only the scrollable middle area. */
html.aion-chat-page #chat-sidebar {
    height: 100% !important;
    min-height: 0 !important;
    overflow: visible !important;
}

html.aion-chat-page #chat-sidebar > .glass-card {
    height: 100% !important;
    min-height: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: visible !important;
    padding-top: max(0.75rem, env(safe-area-inset-top, 0px)) !important;
    padding-bottom: 0.75rem !important;
}

@media (min-width: 1024px) {
    html.aion-chat-page #desktop-sidebar-title-row,
    html.aion-chat-page #chat-sidebar .aion-standalone-sidebar-header {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        flex: 0 0 auto !important;
        position: relative !important;
        z-index: 8 !important;
    }

    html.aion-chat-page #sidebar-mode-toggle,
    html.aion-chat-page #sidebar-header-actions {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        position: relative !important;
        z-index: 8 !important;
    }

    html.aion-chat-page #sidebar-mode-toggle {
        flex: 1 1 auto !important;
        min-width: 0 !important;
    }

html.aion-chat-page #sidebar-header-actions {
    flex: 0 0 auto !important;
}

html.aion-chat-page #clear-all-analyses-btn {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
}
}

html.aion-chat-page #desktop-sidebar-title-row,
html.aion-chat-page #sidebar-header-actions,
html.aion-chat-page #sidebar-divider-chat,
html.aion-chat-page #sidebar-divider-analysis,
html.aion-chat-page #user-location-display {
    flex-shrink: 0 !important;
}

/* Shared profile popup: Aionity /aion keeps the site header, so it does not
   receive the standalone html class. Keep the same popup usable there too. */
html.aion-chat-page .aion-standalone-profile-modal {
    position: fixed;
    inset: 0;
    z-index: 2147483200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(0.75rem, 2vw, 1.5rem);
    background: rgba(2, 6, 23, 0.74);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

html.aion-chat-page .aion-standalone-profile-modal[hidden] {
    display: none !important;
}

html.aion-chat-page .aion-standalone-profile-dialog {
    width: min(46rem, calc(100vw - 2rem));
    max-height: min(56rem, calc(100dvh - 1.25rem));
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 0.95rem;
    border: 1px solid rgba(148, 163, 184, 0.22);
    background:
        radial-gradient(circle at top left, rgba(124, 58, 237, 0.12), transparent 34rem),
        linear-gradient(180deg, rgba(15, 23, 42, 0.99), rgba(9, 14, 25, 0.99));
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55);
    color: #e2e8f0;
}

html.aion-chat-page .aion-standalone-profile-head,
html.aion-chat-page .aion-standalone-profile-summary,
html.aion-chat-page .aion-standalone-profile-tabs,
html.aion-chat-page .aion-standalone-profile-item,
html.aion-chat-page .aion-standalone-notification-hero,
html.aion-chat-page .aion-standalone-notification-group,
html.aion-chat-page .aion-standalone-billing-card,
html.aion-chat-page .aion-standalone-billing-field,
html.aion-chat-page .aion-standalone-linked-row,
html.aion-chat-page .aion-standalone-portal-content .portal-card {
    border-color: rgba(148, 163, 184, 0.14);
}

html.aion-chat-page .aion-standalone-profile-head {
    position: sticky;
    top: 0;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 1rem 1.1rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.14);
    background: rgba(15, 23, 42, 0.94);
}

html.aion-chat-page .aion-standalone-profile-title,
html.aion-chat-page .aion-standalone-profile-summary-name,
html.aion-chat-page .aion-standalone-profile-item strong {
    color: #f8fafc;
}

html.aion-chat-page .aion-standalone-profile-title {
    margin: 0;
    font-size: 1.02rem;
    font-weight: 780;
}

html.aion-chat-page .aion-standalone-profile-close {
    width: 2.15rem;
    height: 2.15rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 0.65rem;
    background: rgba(255, 255, 255, 0.04);
    color: #cbd5e1;
    cursor: pointer;
}

html.aion-chat-page .aion-standalone-profile-close:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

html.aion-chat-page .aion-standalone-profile-close svg {
    width: 1rem;
    height: 1rem;
}

html.aion-chat-page .aion-standalone-profile-body {
    min-height: 0;
    overflow: auto;
    padding: 1.1rem;
}

html.aion-chat-page .aion-standalone-profile-summary {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.1rem 0 1rem;
}

html.aion-chat-page .aion-standalone-profile-summary img {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 999px;
    object-fit: cover;
    border: 1px solid rgba(167, 139, 250, 0.36);
    background: rgba(124, 58, 237, 0.16);
}

html.aion-chat-page .aion-standalone-profile-summary-name {
    font-size: 1rem;
    font-weight: 760;
    line-height: 1.2;
}

html.aion-chat-page .aion-standalone-profile-summary-meta,
html.aion-chat-page .aion-standalone-profile-text,
html.aion-chat-page .aion-standalone-profile-item span {
    color: #94a3b8;
}

html.aion-chat-page .aion-standalone-profile-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.4rem;
    padding: 0.4rem;
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 0.75rem;
    background: rgba(2, 6, 23, 0.42);
}

html.aion-chat-page .aion-standalone-profile-tab {
    min-height: 2.15rem;
    min-width: 0;
    border: 0;
    border-radius: 0.55rem;
    background: transparent;
    color: #94a3b8;
    font-size: 0.78rem;
    font-weight: 720;
    cursor: pointer;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

html.aion-chat-page .aion-standalone-profile-tab.is-active {
    background: rgba(124, 58, 237, 0.28);
    color: #fff;
}

html.aion-chat-page .aion-standalone-profile-panel {
    padding-top: 1rem;
}

html.aion-chat-page .aion-standalone-profile-panel[hidden] {
    display: none !important;
}

html.aion-chat-page .aion-standalone-profile-item,
html.aion-chat-page .aion-standalone-notification-group,
html.aion-chat-page .aion-standalone-billing-field,
html.aion-chat-page .aion-standalone-linked-row,
html.aion-chat-page .aion-standalone-portal-content .portal-card {
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: 0.75rem;
    background: rgba(15, 23, 42, 0.42);
}

html.aion-chat-page .aion-standalone-profile-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.85rem;
    min-height: 3.25rem;
    margin-top: 0.55rem;
    padding: 0.75rem;
}

html.aion-chat-page .aion-standalone-profile-item > div {
    flex: 1 1 auto;
    min-width: 0;
}

html.aion-chat-page .aion-standalone-profile-item strong {
    display: block;
    color: #f8fafc;
    font-size: 0.84rem;
    font-weight: 720;
}

html.aion-chat-page .aion-standalone-profile-item span {
    display: block;
    margin-top: 0.16rem;
    color: #94a3b8;
    font-size: 0.72rem;
    line-height: 1.35;
}

html.aion-chat-page .aion-standalone-account-grid,
html.aion-chat-page .aion-standalone-billing-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
}

html.aion-chat-page .aion-standalone-account-section-title,
html.aion-chat-page .aion-standalone-billing-section-title {
    margin: 1rem 0 0.6rem;
    color: #94a3b8;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

html.aion-chat-page .aion-standalone-portal-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

html.aion-chat-page .aion-standalone-portal-content .portal-card {
    padding: 1rem;
    border-radius: 0.85rem;
    background: linear-gradient(145deg, rgba(15, 23, 42, 0.65), rgba(15, 23, 42, 0.4));
    backdrop-filter: blur(12px);
}

html.aion-chat-page .aion-standalone-portal-content .portal-card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

html.aion-chat-page .aion-standalone-portal-content .portal-card-icon {
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    border-radius: 0.5rem;
}

html.aion-chat-page .aion-standalone-portal-content .portal-card-icon svg {
    width: 1rem;
    height: 1rem;
    flex: 0 0 auto;
}

html.aion-chat-page .aion-standalone-account-icon--profile {
    border: 1px solid rgba(129, 140, 248, 0.24);
    background: rgba(79, 70, 229, 0.16);
    color: #c4b5fd;
}

html.aion-chat-page .aion-standalone-account-icon--linked {
    border: 1px solid rgba(16, 185, 129, 0.24);
    background: rgba(16, 185, 129, 0.12);
    color: #6ee7b7;
}

html.aion-chat-page .aion-standalone-portal-content .portal-card-title-inline {
    margin: 0;
    color: #e2e8f0;
    font-size: 0.94rem;
    font-weight: 650;
    line-height: 1.25;
}

html.aion-chat-page .aion-standalone-portal-content .portal-data-field {
    min-width: 0;
    padding: 0.75rem 1rem;
    border-radius: 0.62rem;
    border: 1px solid transparent;
    background: rgba(30, 41, 59, 0.35);
}

html.aion-chat-page .aion-standalone-portal-content .portal-data-label {
    margin-bottom: 0.35rem;
    color: #64748b;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

html.aion-chat-page .aion-standalone-portal-content .portal-data-value {
    margin: 0;
    color: #f1f5f9;
    font-size: 0.86rem;
    font-weight: 520;
    overflow-wrap: anywhere;
}

html.aion-chat-page .aion-standalone-linked-list,
html.aion-chat-page .aion-standalone-billing-list,
html.aion-chat-page .aion-standalone-billing-invoices {
    display: flex;
    flex-direction: column;
}

html.aion-chat-page .aion-standalone-linked-list {
    gap: 0.55rem;
}

html.aion-chat-page .aion-standalone-linked-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    min-height: 3rem;
    padding: 0.65rem 0.75rem;
    border-radius: 0.65rem;
}

html.aion-chat-page .aion-standalone-linked-row.is-primary {
    border-color: rgba(245, 158, 11, 0.28);
    background: rgba(120, 53, 15, 0.14);
}

html.aion-chat-page .aion-standalone-linked-provider {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    min-width: 0;
}

html.aion-chat-page .aion-standalone-linked-icon {
    width: 1.25rem;
    height: 1.25rem;
    flex: 0 0 auto;
}

html.aion-chat-page .aion-standalone-linked-name {
    color: #f8fafc;
    font-size: 0.82rem;
    font-weight: 740;
    line-height: 1.2;
}

html.aion-chat-page .aion-standalone-linked-meta {
    margin-top: 0.16rem;
    color: #94a3b8;
    font-size: 0.72rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

html.aion-chat-page .aion-standalone-linked-actions {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    flex: 0 0 auto;
}

html.aion-chat-page .aion-standalone-linked-action {
    flex: 0 0 auto;
    border: 0;
    background: transparent;
    color: #c4b5fd !important;
    font-size: 0.74rem;
    font-weight: 760;
    text-decoration: none;
    cursor: pointer;
}

html.aion-chat-page .aion-standalone-linked-action--danger {
    color: #fca5a5 !important;
}

html.aion-chat-page .aion-standalone-profile-badge {
    display: inline-flex;
    align-items: center;
    min-height: 1.7rem;
    padding: 0.28rem 0.55rem;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: rgba(15, 23, 42, 0.72);
    color: #cbd5e1;
    font-size: 0.72rem;
    font-weight: 760;
    white-space: nowrap;
}

html.aion-chat-page .aion-standalone-billing-list {
    gap: 1rem;
}

html.aion-chat-page .aion-standalone-billing-card {
    padding: 1rem;
    border-radius: 0.8rem;
    background: rgba(15, 23, 42, 0.54);
}

html.aion-chat-page .aion-standalone-billing-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    padding-bottom: 0.9rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

html.aion-chat-page .aion-standalone-billing-product {
    color: #f8fafc;
    font-size: 0.96rem;
    font-weight: 780;
    line-height: 1.2;
}

html.aion-chat-page .aion-standalone-billing-price {
    margin-top: 0.25rem;
    color: #cbd5e1;
    font-size: 0.8rem;
    line-height: 1.35;
}

html.aion-chat-page .aion-standalone-billing-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    padding-top: 0.85rem;
}

html.aion-chat-page .aion-standalone-billing-field {
    min-width: 0;
    padding: 0.65rem;
    border-radius: 0.55rem;
    background: rgba(2, 6, 23, 0.24);
}

html.aion-chat-page .aion-standalone-billing-label {
    color: #64748b;
    font-size: 0.64rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

html.aion-chat-page .aion-standalone-billing-value-row {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    min-width: 0;
}

html.aion-chat-page .aion-standalone-billing-value {
    margin-top: 0.22rem;
    color: #e2e8f0;
    font-size: 0.78rem;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

html.aion-chat-page .aion-standalone-billing-value-row .aion-standalone-billing-value {
    flex: 1 1 auto;
    text-transform: uppercase;
}

html.aion-chat-page .aion-standalone-copy-btn {
    width: 1.7rem;
    height: 1.7rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 0.5rem;
    background: rgba(15, 23, 42, 0.62);
    color: #94a3b8;
    cursor: pointer;
}

html.aion-chat-page .aion-standalone-copy-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

html.aion-chat-page .aion-standalone-copy-btn svg {
    width: 0.9rem;
    height: 0.9rem;
}

html.aion-chat-page .aion-standalone-billing-invoices {
    gap: 0.45rem;
    max-height: 13rem;
    overflow-y: auto;
    padding-right: 0.25rem;
}

html.aion-chat-page .aion-standalone-billing-invoice {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) auto auto;
    gap: 0.55rem;
    align-items: center;
    min-height: 2.35rem;
    padding: 0.58rem 0.65rem;
    border-radius: 0.55rem;
    background: rgba(2, 6, 23, 0.28);
    color: #cbd5e1;
    font-size: 0.74rem;
}

html.aion-chat-page .aion-standalone-billing-invoice a {
    color: #c4b5fd !important;
    text-decoration: none;
    font-weight: 760;
}

html.aion-chat-page .aion-standalone-billing-empty {
    padding: 1rem;
    border-radius: 0.75rem;
    border: 1px solid rgba(148, 163, 184, 0.14);
    background: rgba(15, 23, 42, 0.48);
    color: #94a3b8;
    font-size: 0.82rem;
    line-height: 1.45;
}

html.aion-chat-page .aion-standalone-profile-switch {
    position: relative;
    width: 2.55rem;
    height: 1.45rem;
    display: inline-flex;
    flex: 0 0 auto;
}

html.aion-chat-page .aion-standalone-profile-switch input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

html.aion-chat-page .aion-standalone-profile-switch-track {
    position: absolute;
    inset: 0;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.24);
    background: rgba(51, 65, 85, 0.95);
    transition: background 150ms ease, border-color 150ms ease;
}

html.aion-chat-page .aion-standalone-profile-switch-track::after {
    content: "";
    position: absolute;
    top: 0.18rem;
    left: 0.18rem;
    width: 0.98rem;
    height: 0.98rem;
    border-radius: 999px;
    background: #e2e8f0;
    transition: transform 150ms ease;
}

html.aion-chat-page .aion-standalone-profile-switch input:checked + .aion-standalone-profile-switch-track {
    border-color: rgba(196, 181, 253, 0.45);
    background: rgba(124, 58, 237, 0.95);
}

html.aion-chat-page .aion-standalone-profile-switch input:checked + .aion-standalone-profile-switch-track::after {
    transform: translateX(1.1rem);
}

html.aion-chat-page .aion-standalone-notifications {
    display: grid;
    gap: 0.8rem;
}

html.aion-chat-page .aion-standalone-notification-hero,
html.aion-chat-page .aion-standalone-notification-group {
    border: 1px solid rgba(51, 65, 85, 0.5);
    border-radius: 0.75rem;
    background: rgba(2, 6, 23, 0.22);
}

html.aion-chat-page .aion-standalone-notification-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.85rem;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.62), rgba(15, 23, 42, 0.36));
    cursor: pointer;
    user-select: none;
}

html.aion-chat-page .aion-standalone-notification-hero:hover {
    border-color: rgba(148, 163, 184, 0.24);
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.62), rgba(15, 23, 42, 0.42));
}

html.aion-chat-page .aion-standalone-notification-hero--inline {
    margin: 0 0 0.85rem;
    padding: 0 0 0.85rem;
    border: 0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: 0;
    background: transparent;
}

html.aion-chat-page .aion-standalone-notification-hero--inline:hover {
    border-color: rgba(148, 163, 184, 0.18);
    background: transparent;
}

html.aion-chat-page .aion-standalone-notification-master {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
}

html.aion-chat-page .aion-standalone-notification-master-icon,
html.aion-chat-page .aion-standalone-notification-row-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    border: 1px solid rgba(129, 140, 248, 0.18);
    background: rgba(99, 102, 241, 0.1);
    color: #c4b5fd;
}

html.aion-chat-page .aion-standalone-notification-master-icon {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 0.65rem;
}

html.aion-chat-page .aion-standalone-notification-row-icon {
    width: 2rem;
    height: 2rem;
    border-radius: 0.58rem;
}

html.aion-chat-page .aion-standalone-notification-master-icon svg,
html.aion-chat-page .aion-standalone-notification-row-icon svg {
    width: 1rem;
    height: 1rem;
}

html.aion-chat-page .aion-standalone-notification-title {
    margin: 0;
    color: #f8fafc;
    font-size: 0.9rem;
    font-weight: 780;
    line-height: 1.25;
}

html.aion-chat-page .aion-standalone-notification-desc {
    margin: 0.18rem 0 0;
    color: #94a3b8;
    font-size: 0.72rem;
    line-height: 1.35;
}

html.aion-chat-page .aion-standalone-notification-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.8rem;
    align-items: start;
}

html.aion-chat-page .aion-standalone-notification-group {
    padding: 0.85rem;
}

html.aion-chat-page .aion-standalone-notification-group-title {
    margin: 0 0 0.65rem;
    color: #64748b;
    font-size: 0.66rem;
    font-weight: 820;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

html.aion-chat-page .aion-standalone-notification-row,
html.aion-chat-page .aion-standalone-settings-action-row {
    min-height: 3.75rem;
    padding: 0.65rem;
    border: 1px solid rgba(148, 163, 184, 0.1);
    border-radius: 0.65rem;
    background: rgba(15, 23, 42, 0.36);
}

html.aion-chat-page .aion-standalone-notification-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) repeat(2, minmax(5rem, 6.25rem));
    align-items: center;
    gap: 0.9rem;
}

html.aion-chat-page .aion-standalone-notification-row + .aion-standalone-notification-row {
    margin-top: 0.5rem;
}

html.aion-chat-page .aion-standalone-notification-row:hover,
html.aion-chat-page .aion-standalone-settings-action-row:hover {
    border-color: rgba(148, 163, 184, 0.18);
    background: rgba(30, 41, 59, 0.42);
}

html.aion-chat-page .aion-standalone-settings-action-row {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.9rem;
    color: inherit;
    text-align: left;
    cursor: pointer;
}

html.aion-chat-page #aion-standalone-profile-location-button .aion-standalone-notification-row-icon {
    color: #fff;
}

html.aion-chat-page #aion-standalone-profile-theme-button .aion-standalone-notification-row-icon {
    color: #fcd34d;
}

html.aion-chat-page .aion-standalone-settings-action-value {
    min-width: 7rem;
    max-width: 45%;
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.45rem;
    color: #c4b5fd;
    font-size: 0.72rem;
    font-weight: 760;
    text-align: right;
}

html.aion-chat-page .aion-standalone-settings-action-value span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

html.aion-chat-page .aion-standalone-settings-action-value svg {
    width: 0.95rem;
    height: 0.95rem;
    flex: 0 0 auto;
}

html.aion-chat-page .aion-standalone-notification-row-main {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    min-width: 0;
}

html.aion-chat-page .aion-standalone-notification-row-text {
    min-width: 0;
}

html.aion-chat-page .aion-standalone-notification-row-text strong {
    display: block;
    color: #f8fafc;
    font-size: 0.8rem;
    font-weight: 740;
    line-height: 1.25;
}

html.aion-chat-page .aion-standalone-notification-row-text span {
    display: block;
    margin-top: 0.16rem;
    color: #94a3b8;
    font-size: 0.7rem;
    line-height: 1.36;
}

html.aion-chat-page .aion-standalone-notification-matrix-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) repeat(2, minmax(5rem, 6.25rem));
    gap: 0.9rem;
    padding: 0 0.65rem 0.5rem;
    color: #64748b;
    font-size: 0.62rem;
    font-weight: 820;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

html.aion-chat-page .aion-standalone-notification-matrix-head span:not(:first-child) {
    text-align: center;
}

html.aion-chat-page .aion-standalone-notification-row-controls {
    display: contents;
}

html.aion-chat-page .aion-standalone-notification-channels {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.48rem;
}

html.aion-chat-page .aion-standalone-notification-channel {
    position: relative;
    min-height: 2.35rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.42rem;
    padding: 0 0.5rem;
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: 0.58rem;
    background: rgba(15, 23, 42, 0.36);
    color: #cbd5e1;
    font-size: 0.7rem;
    font-weight: 760;
    cursor: pointer;
    white-space: nowrap;
}

html.aion-chat-page .aion-standalone-notification-channel:hover {
    background: rgba(255, 255, 255, 0.07);
    color: #fff;
}

html.aion-chat-page .aion-standalone-notification-channel.is-active {
    border-color: rgba(129, 140, 248, 0.38);
    background: rgba(99, 102, 241, 0.14);
    color: #fff;
}

html.aion-chat-page .aion-standalone-notification-channel input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

html.aion-chat-page .aion-standalone-notification-channel-mark {
    width: 1.05rem;
    height: 1.05rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    border-radius: 0.32rem;
    border: 1px solid rgba(148, 163, 184, 0.26);
    background: rgba(2, 6, 23, 0.38);
    color: transparent;
}

html.aion-chat-page .aion-standalone-notification-channel-mark svg {
    width: 0.75rem;
    height: 0.75rem;
}

html.aion-chat-page .aion-standalone-notification-channel.is-active .aion-standalone-notification-channel-mark {
    border-color: rgba(196, 181, 253, 0.46);
    background: #7c3aed;
    color: #fff;
}

html.aion-chat-page .aion-standalone-notification-channel.is-disabled {
    opacity: 0.48;
    cursor: not-allowed;
}

html.aion-chat-page .aion-standalone-notification-status {
    min-height: 1rem;
    margin-top: 0.65rem;
    color: #94a3b8;
    font-size: 0.7rem;
    line-height: 1.35;
}

html.aion-chat-page .aion-standalone-notification-status.is-ok {
    color: #86efac;
}

html.aion-chat-page .aion-standalone-notification-status.is-warn {
    color: #fcd34d;
}

html.aion-chat-page .aion-standalone-profile-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    padding-top: 0.85rem;
}

html.aion-chat-page .aion-standalone-profile-action {
    min-height: 2.2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.55rem 0.75rem;
    border-radius: 0.62rem;
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: rgba(255, 255, 255, 0.06);
    color: #f8fafc !important;
    font-size: 0.76rem;
    font-weight: 760;
    text-decoration: none;
    cursor: pointer;
}

html.aion-chat-page .aion-standalone-profile-action:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff !important;
}

html.aion-chat-page .aion-standalone-profile-action--primary {
    border-color: rgba(124, 58, 237, 0.5);
    background: rgba(124, 58, 237, 0.78);
}

html.aion-chat-page .aion-standalone-profile-action--primary:hover {
    background: rgba(124, 58, 237, 0.92);
}

@media (max-width: 640px) {
    html.aion-chat-page .aion-standalone-profile-dialog {
        width: calc(100vw - 1rem);
        max-height: calc(100dvh - 1rem);
        border-radius: 0.85rem;
    }

    html.aion-chat-page .aion-standalone-account-grid,
    html.aion-chat-page .aion-standalone-billing-grid {
        grid-template-columns: 1fr;
    }
}

html.aion-chat-page #chat-history-list {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    padding-bottom: 0.5rem !important;
}

html.aion-chat-page.aion-switching-to-analysis #chat-history-list,
html.aion-chat-page.aion-switching-to-analysis #chat-history-list-mobile,
html.aion-chat-page.aion-mode-analysis #chat-history-list,
html.aion-chat-page.aion-mode-analysis #chat-history-list-mobile {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

html.aion-chat-page.aion-switching-to-analysis .chat-history-item .delete-chat-btn,
html.aion-chat-page.aion-mode-analysis .chat-history-item .delete-chat-btn,
html.aion-chat-page.aion-switching-to-analysis #clear-all-chats-btn,
html.aion-chat-page.aion-switching-to-analysis #clear-all-chats-btn-mobile,
html.aion-chat-page.aion-switching-to-analysis #clear-all-analyses-btn,
html.aion-chat-page.aion-switching-to-analysis #clear-all-analyses-btn-mobile {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

html.aion-chat-page #analysis-history-sidebar {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    overflow: hidden !important;
}

html.aion-chat-page #sidebar-analysis-list {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    padding-bottom: 0.5rem !important;
}

html.aion-chat-page #user-location-display {
    display: block !important;
    visibility: visible !important;
    flex: 0 0 auto !important;
    min-height: 3.15rem !important;
    margin-top: 0.75rem !important;
    padding-top: 0.75rem !important;
    padding-bottom: 0 !important;
    border-top: 1px solid rgba(255, 255, 255, 0.10) !important;
    background: rgba(2, 6, 23, 0.96) !important;
    position: relative !important;
    z-index: 95 !important;
    pointer-events: auto !important;
}

html.aion-chat-page #user-location-display .aion-standalone-menu-button {
    display: inline-flex !important;
    pointer-events: auto !important;
}

html.aion-chat-page .aion-standalone-menu {
    position: fixed !important;
    left: 0.75rem;
    right: auto !important;
    bottom: 4.25rem;
    z-index: 2147483000 !important;
    width: min(20rem, calc(100vw - 1.5rem));
    max-width: min(20rem, calc(100vw - 1.5rem)) !important;
    max-height: calc(100dvh - 5rem) !important;
    overflow-y: auto !important;
    overscroll-behavior: contain !important;
    contain: none !important;
    clip-path: none !important;
}

@media (min-width: 760px) {
    html.aion-chat-page .aion-standalone-menu {
        width: min(20rem, calc(100vw - 1rem)) !important;
        max-width: 20rem !important;
    }
}

html.aion-chat-page .aion-standalone-menu,
html.aion-chat-page .aion-standalone-menu * {
    letter-spacing: 0 !important;
}

html.aion-chat-page .aion-standalone-menu-legal-section {
    padding-top: 0.35rem !important;
    margin-top: 0.35rem !important;
}

html.aion-chat-page .aion-standalone-legal-links {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.35rem !important;
    padding: 0.15rem 0.65rem 0 !important;
    color: rgba(255, 255, 255, 0.48) !important;
    font-size: 0.68rem !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
}

html.aion-chat-page .aion-standalone-legal-links a,
html.aion-chat-page .aion-standalone-legal-links a:visited {
    color: rgba(255, 255, 255, 0.9) !important;
    text-decoration: none !important;
}

html.aion-chat-page .aion-standalone-legal-links a:hover,
html.aion-chat-page .aion-standalone-legal-links a:focus-visible {
    color: #c4b5fd !important;
    text-decoration: underline !important;
    text-decoration-color: rgba(196, 181, 253, 0.72) !important;
    text-underline-offset: 3px !important;
}

html.aion-chat-page .aion-standalone-menu-account-name {
    color: #f8fafc !important;
    font-size: 0.9rem !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;
}

html.aion-chat-page .aion-standalone-menu-label {
    color: #8491a7 !important;
    font-size: 0.66rem !important;
    font-weight: 650 !important;
    line-height: 1.1 !important;
    text-transform: uppercase !important;
}

html.aion-chat-page .aion-standalone-menu-row,
html.aion-chat-page .aion-standalone-menu a.aion-standalone-menu-row,
html.aion-chat-page .aion-standalone-menu button.aion-standalone-menu-row,
html.aion-chat-page .aion-standalone-menu a.aion-standalone-menu-row:visited {
    color: #e5e7eb !important;
    font-size: 0.82rem !important;
    font-weight: 500 !important;
    line-height: 1.25 !important;
    text-decoration: none !important;
}

html.aion-chat-page .aion-standalone-menu-row span {
    color: inherit !important;
    font: inherit !important;
}

html.aion-chat-page .aion-standalone-menu-row svg {
    color: #a78bfa !important;
    stroke: currentColor !important;
}

html.aion-chat-page .aion-standalone-menu-row:hover,
html.aion-chat-page .aion-standalone-menu a.aion-standalone-menu-row:hover,
html.aion-chat-page .aion-standalone-menu button.aion-standalone-menu-row:hover {
    color: #ffffff !important;
    background: rgba(124, 58, 237, 0.16) !important;
}

html.aion-chat-page .aion-standalone-menu-row--danger,
html.aion-chat-page .aion-standalone-menu a.aion-standalone-menu-row--danger,
html.aion-chat-page .aion-standalone-menu button.aion-standalone-menu-row--danger {
    color: #fca5a5 !important;
}

html.aion-chat-page .aion-standalone-menu-row--danger svg {
    color: #f87171 !important;
}

html.aion-chat-page .aion-standalone-menu-row--danger:hover,
html.aion-chat-page .aion-standalone-menu a.aion-standalone-menu-row--danger:hover,
html.aion-chat-page .aion-standalone-menu button.aion-standalone-menu-row--danger:hover {
    color: #fecaca !important;
    background: rgba(127, 29, 29, 0.22) !important;
}

html.aion-chat-page.theme-light #chat-container h1,
html.aion-chat-page.theme-light #chat-container h2,
html.aion-chat-page.theme-light #chat-container h3,
html.aion-chat-page.theme-light #welcome-message,
html.aion-chat-page.theme-light .aion-standalone-sidebar-title,
html.aion-chat-page.theme-light #chat-sidebar h2,
html.aion-chat-page.theme-light #quick-access-sidebar h2,
html.aion-chat-page.theme-light #chat-sidebar .text-white,
html.aion-chat-page.theme-light #quick-access-sidebar .text-white {
    color: #172033 !important;
}

html.aion-chat-page.theme-light #chat-sidebar .text-gray-300,
html.aion-chat-page.theme-light #chat-sidebar .text-gray-400,
html.aion-chat-page.theme-light #chat-sidebar .text-gray-500,
html.aion-chat-page.theme-light #quick-access-sidebar .text-gray-300,
html.aion-chat-page.theme-light #quick-access-sidebar .text-gray-400,
html.aion-chat-page.theme-light #quick-access-sidebar .text-gray-500,
html.aion-chat-page.theme-light .quick-btn-section-label {
    color: #718096 !important;
}

html.aion-chat-page.theme-light #sidebar-divider-chat,
html.aion-chat-page.theme-light #sidebar-divider-analysis,
html.aion-chat-page.theme-light #quick-access-sidebar .border-white\/10,
html.aion-chat-page.theme-light #quick-access-sidebar [class*="border-white/10"] {
    background: transparent !important;
    border-color: rgba(15, 23, 42, 0.09) !important;
}

html.aion-chat-page.theme-light .chat-history-item,
html.aion-chat-page.theme-light .analysis-history-item,
html.aion-chat-page.theme-light .quick-btn-item,
html.aion-chat-page.theme-light .quick-btn-card,
html.aion-chat-page.theme-light #quick-access-sidebar button[id^="quick-btn-"],
html.aion-chat-page.theme-light #quick-access-sidebar .quick-access-card {
    background: rgba(255, 255, 255, 0.82) !important;
    border: 1px solid rgba(15, 23, 42, 0.10) !important;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.045) !important;
}

html.aion-chat-page.theme-light .chat-history-item,
html.aion-chat-page.theme-light .analysis-history-item {
    border-left: 3px solid rgba(124, 58, 237, 0.34) !important;
}

html.aion-chat-page.theme-light .chat-history-item:hover,
html.aion-chat-page.theme-light .analysis-history-item:hover,
html.aion-chat-page.theme-light .quick-btn-item:hover,
html.aion-chat-page.theme-light .quick-btn-card:hover,
html.aion-chat-page.theme-light #quick-access-sidebar button[id^="quick-btn-"]:hover,
html.aion-chat-page.theme-light #quick-access-sidebar .quick-access-card:hover {
    background: #ffffff !important;
    border-color: rgba(124, 58, 237, 0.28) !important;
    color: #172033 !important;
}

html.aion-chat-page.theme-light .chat-history-item.active,
html.aion-chat-page.theme-light .analysis-history-item.active {
    background: #f1ecff !important;
    border-color: rgba(124, 58, 237, 0.34) !important;
    border-left-color: rgba(124, 58, 237, 0.72) !important;
}

html.aion-chat-page.theme-light .chat-history-item p,
html.aion-chat-page.theme-light .analysis-history-item p,
html.aion-chat-page.theme-light .quick-btn-item,
html.aion-chat-page.theme-light .quick-btn-card {
    color: #263248 !important;
}

html.aion-chat-page.theme-light #quick-buttons-container .quick-btn,
html.aion-chat-page.theme-light #quick-buttons-container-mobile .quick-btn,
html.aion-chat-page.theme-light #quick-buttons-container .suggestion-btn,
html.aion-chat-page.theme-light #quick-buttons-container-mobile .suggestion-btn {
    background: rgba(255, 255, 255, 0.86) !important;
    border: 1px solid rgba(15, 23, 42, 0.10) !important;
    color: #263248 !important;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.045) !important;
}

html.aion-chat-page.theme-light #quick-buttons-container .quick-btn:hover,
html.aion-chat-page.theme-light #quick-buttons-container-mobile .quick-btn:hover,
html.aion-chat-page.theme-light #quick-buttons-container .suggestion-btn:hover,
html.aion-chat-page.theme-light #quick-buttons-container-mobile .suggestion-btn:hover {
    background: #ffffff !important;
    border-color: rgba(124, 58, 237, 0.28) !important;
    color: #172033 !important;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.07) !important;
}

html.aion-chat-page.theme-light #quick-buttons-container .quick-btn-label,
html.aion-chat-page.theme-light #quick-buttons-container-mobile .quick-btn-label {
    color: #263248 !important;
}

html.aion-chat-page.theme-light #quick-buttons-container .quick-btn-action,
html.aion-chat-page.theme-light #quick-buttons-container-mobile .quick-btn-action {
    color: #94a3b8 !important;
}

html.aion-chat-page.theme-light #quick-buttons-container .quick-btn-action:hover,
html.aion-chat-page.theme-light #quick-buttons-container-mobile .quick-btn-action:hover {
    background: #f1ecff !important;
    color: #6d28d9 !important;
}

html.aion-chat-page.theme-light .chat-history-item svg,
html.aion-chat-page.theme-light .analysis-history-item svg,
html.aion-chat-page.theme-light #quick-access-sidebar svg {
    color: #64748b !important;
}

html.aion-chat-page.theme-light .aion-chat-history-header-icon,
html.aion-chat-page.theme-light .aion-standalone-sidebar-icon {
    color: #7c3aed !important;
    filter: none;
}

html.aion-chat-page.theme-light #sidebar-mode-toggle,
html.aion-chat-page.theme-light #new-chat-btn,
html.aion-chat-page.theme-light #mobile-new-chat-btn,
html.aion-chat-page.theme-light #quick-btn-add,
html.aion-chat-page.theme-light #quick-btn-toggle-hidden,
html.aion-chat-page.theme-light #quick-btn-add-mobile,
html.aion-chat-page.theme-light #quick-btn-toggle-hidden-mobile,
html.aion-chat-page.theme-light .mobile-header-action-btn,
html.aion-chat-page.theme-light .tablet-action-btn {
    background: #ffffff !important;
    border: 1px solid rgba(124, 58, 237, 0.18) !important;
    color: #6d28d9 !important;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05) !important;
}

html.aion-chat-page.theme-light #sidebar-mode-toggle:hover,
html.aion-chat-page.theme-light #new-chat-btn:hover,
html.aion-chat-page.theme-light #mobile-new-chat-btn:hover,
html.aion-chat-page.theme-light #quick-btn-add:hover,
html.aion-chat-page.theme-light #quick-btn-toggle-hidden:hover,
html.aion-chat-page.theme-light #quick-btn-add-mobile:hover,
html.aion-chat-page.theme-light #quick-btn-toggle-hidden-mobile:hover,
html.aion-chat-page.theme-light .mobile-header-action-btn:hover,
html.aion-chat-page.theme-light .tablet-action-btn:hover {
    background: #f1ecff !important;
    border-color: rgba(124, 58, 237, 0.34) !important;
    color: #5521b5 !important;
}

html.aion-chat-page.theme-light #clear-all-chats-btn,
html.aion-chat-page.theme-light #clear-all-analyses-btn,
html.aion-chat-page.theme-light #clear-all-chats-btn-mobile,
html.aion-chat-page.theme-light #clear-all-analyses-btn-mobile {
    background: #fff7f7 !important;
    border-color: rgba(220, 38, 38, 0.20) !important;
    color: #dc2626 !important;
}

html.aion-chat-page.theme-light #chat-form {
    background: rgba(248, 250, 252, 0.86) !important;
    border-top: 1px solid rgba(15, 23, 42, 0.08) !important;
    box-shadow: 0 -18px 45px rgba(248, 250, 252, 0.72) !important;
}

html.aion-chat-page.theme-light #chat-form #chat-input {
    background: #ffffff !important;
    border: 1px solid rgba(100, 116, 139, 0.34) !important;
    color: #172033 !important;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06) !important;
}

html.aion-chat-page.theme-light #chat-form #chat-input::placeholder {
    color: #94a3b8 !important;
}

html.aion-chat-page.theme-light #chat-form #chat-input:hover,
html.aion-chat-page.theme-light #chat-form #chat-input:focus,
html.aion-chat-page.theme-light #chat-form #chat-input:active {
    background: #ffffff !important;
    border-color: rgba(124, 58, 237, 0.42) !important;
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.10) !important;
}

html.aion-chat-page.theme-light #attach-file-btn,
html.aion-chat-page.theme-light #voice-input-btn,
html.aion-chat-page.theme-light #chat-form .quick-access-toggle-btn {
    background: #ffffff !important;
    border: 1px solid rgba(100, 116, 139, 0.22) !important;
    color: #64748b !important;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05) !important;
}

html.aion-chat-page.theme-light #attach-file-btn:hover,
html.aion-chat-page.theme-light #voice-input-btn:hover,
html.aion-chat-page.theme-light #chat-form .quick-access-toggle-btn:hover {
    background: #f1ecff !important;
    border-color: rgba(124, 58, 237, 0.34) !important;
    color: #6d28d9 !important;
}

html.aion-chat-page.theme-light #action-btn {
    background: linear-gradient(135deg, #7c3aed 0%, #5b5ff1 100%) !important;
    border: 1px solid rgba(124, 58, 237, 0.35) !important;
    color: #ffffff !important;
    box-shadow: 0 8px 20px rgba(124, 58, 237, 0.24) !important;
}

html.aion-chat-page.theme-light #action-btn:hover {
    background: linear-gradient(135deg, #6d28d9 0%, #4f46e5 100%) !important;
    box-shadow: 0 10px 24px rgba(124, 58, 237, 0.28) !important;
}

html.aion-chat-page.theme-light #user-location-display,
html.aion-chat-page.theme-light #right-sidebar-limit-chat,
html.aion-chat-page.theme-light #right-sidebar-limit-analysis {
    background: rgba(255, 255, 255, 0.80) !important;
    border-top: 1px solid rgba(15, 23, 42, 0.08) !important;
    color: #718096 !important;
}

html.aion-chat-page.theme-light #right-sidebar-limit-wrapper {
    margin-top: auto !important;
    padding: 0.75rem 0 0 !important;
    border-top: 1px solid rgba(15, 23, 42, 0.08) !important;
    background: transparent !important;
    box-shadow: none !important;
}

html.aion-chat-page.theme-light #right-sidebar-limit-chat,
html.aion-chat-page.theme-light #right-sidebar-limit-analysis {
    min-height: 2.4rem !important;
    background: #ffffff !important;
    border: 1px solid rgba(15, 23, 42, 0.10) !important;
    border-radius: 0.65rem !important;
    color: #64748b !important;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.045) !important;
}

html.aion-chat-page.theme-light #right-sidebar-limit-percent,
html.aion-chat-page.theme-light #right-sidebar-analysis-count {
    color: #172033 !important;
}

html.aion-chat-page.theme-light #right-sidebar-limit-tooltip,
html.aion-chat-page.theme-light #right-sidebar-analysis-tooltip {
    background: #ffffff !important;
    border-color: rgba(15, 23, 42, 0.12) !important;
    color: #263248 !important;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.14) !important;
}

html.aion-chat-page.theme-light #aion-mobile-header,
html.aion-chat-page.theme-light #mobile-nav-panel,
html.aion-chat-page.theme-light #sidebar-overlay,
html.aion-chat-page.theme-light #quick-access-bottom-sheet,
html.aion-chat-page.theme-light #filter-bottom-sheet,
html.aion-chat-page.theme-light #sources-mobile-sheet {
    background: rgba(248, 250, 252, 0.96) !important;
    border-color: rgba(15, 23, 42, 0.10) !important;
    color: #172033 !important;
}

html.aion-chat-page.theme-light * {
    scrollbar-color: rgba(100, 116, 139, 0.30) transparent;
}

html.aion-chat-page.theme-light *::-webkit-scrollbar-thumb {
    background: rgba(100, 116, 139, 0.30) !important;
    border-radius: 999px !important;
}

/* Final polish: right sidebar usage pill. */
html.aion-chat-page.theme-light #right-sidebar-limit-wrapper {
    margin-top: auto !important;
    padding: 0.65rem 0.25rem 0.2rem !important;
    border-top: 1px solid rgba(15, 23, 42, 0.08) !important;
    background: transparent !important;
    box-shadow: none !important;
}

html.aion-chat-page.theme-light #right-sidebar-limit-chat,
html.aion-chat-page.theme-light #right-sidebar-limit-analysis {
    min-height: 2.25rem !important;
    padding: 0.45rem 0.65rem !important;
    border: 1px solid rgba(148, 163, 184, 0.22) !important;
    border-radius: 0.7rem !important;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%) !important;
    color: #64748b !important;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05) !important;
    cursor: help !important;
}

html.aion-chat-page.theme-light #right-sidebar-limit-dot,
html.aion-chat-page.theme-light #right-sidebar-analysis-dot {
    width: 0.5rem !important;
    height: 0.5rem !important;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.12) !important;
}

html.aion-chat-page.theme-light #right-sidebar-limit-percent,
html.aion-chat-page.theme-light #right-sidebar-analysis-count {
    color: #263248 !important;
    font-weight: 700 !important;
}
