
        /* === FIXED CHAT SHELL — iPhone / Android (sin saltos ni rubber-band) === */
        :root {
            --cp-vvh: 100dvh;
            --cp-vvo: 0px;
            --cp-kb: 0px;
        }
        html {
            height: 100% !important;
            width: 100% !important;
            overflow: hidden !important;
            position: fixed !important;
            inset: 0 !important;
            overscroll-behavior: none !important;
            -webkit-text-size-adjust: 100% !important;
            text-size-adjust: 100% !important;
        }
        body {
            height: 100% !important;
            width: 100% !important;
            max-height: 100% !important;
            overflow: hidden !important;
            position: fixed !important;
            inset: 0 !important;
            margin: 0 !important;
            padding: 0 !important;
            overscroll-behavior: none !important;
            touch-action: none !important;
            -webkit-overflow-scrolling: auto !important;
            background: var(--bg-main, #fff);
        }
        #cp-chat-page {
            position: fixed !important;
            top: var(--cp-vvo, 0px) !important;
            left: 0 !important;
            right: 0 !important;
            bottom: auto !important;
            width: 100% !important;
            max-width: 100vw !important;
            height: var(--cp-vvh, 100dvh) !important;
            max-height: var(--cp-vvh, 100dvh) !important;
            overflow: hidden !important;
            overscroll-behavior: none !important;
            -webkit-overflow-scrolling: auto !important;
            padding-top: env(safe-area-inset-top, 0px);
            padding-bottom: env(safe-area-inset-bottom, 0px);
            box-sizing: border-box !important;
            z-index: 0;
            transform: translateZ(0);
            -webkit-transform: translateZ(0);
        }
        .cp-layout {
            display: flex !important;
            height: 100% !important;
            max-height: 100% !important;
            width: 100% !important;
            overflow: hidden !important;
        }
        .cp-main {
            display: flex !important;
            flex-direction: column !important;
            flex: 1 1 0 !important;
            min-width: 0 !important;
            min-height: 0 !important;
            height: 100% !important;
            max-height: 100% !important;
            overflow: hidden !important;
            position: relative !important;
        }
        .messages-area {
            flex: 1 1 0 !important;
            min-height: 0 !important;
            overflow-y: auto !important;
            overflow-x: hidden !important;
            -webkit-overflow-scrolling: touch !important;
            overscroll-behavior-y: contain !important;
            touch-action: pan-y !important;
            padding-bottom: 0.5rem !important;
        }
        .text-input-container {
            flex: 0 0 auto !important;
            flex-shrink: 0 !important;
            position: relative !important;
            z-index: 30 !important;
            width: 100% !important;
            box-sizing: border-box !important;
            background: var(--bg-main, #fff);
            padding-bottom: max(0px, env(safe-area-inset-bottom, 0px));
            transform: translateZ(0);
            -webkit-transform: translateZ(0);
        }
        .cp-textarea {
            font-size: 16px !important;
            line-height: 1.4 !important;
            -webkit-user-select: text !important;
            user-select: text !important;
            touch-action: manipulation !important;
        }
        body.cp-keyboard-open .messages-area {
            padding-bottom: 0.25rem !important;
        }
        body.cp-keyboard-open .cp-header {
            display: none !important;
        }
        body.cp-keyboard-open .text-input-container {
            padding-bottom: 0 !important;
        }
        body.cp-keyboard-open .bottom-search-area {
            padding-bottom: 4px !important;
        }
        body.cp-keyboard-open .search-hint {
            display: none !important;
        }
        body.cp-keyboard-open .welcome-center-wrapper {
            justify-content: flex-start !important;
            padding-top: 8px !important;
        }
        .cp-sidebar,
        .cp-rail {
            overscroll-behavior: none !important;
            -webkit-overflow-scrolling: touch !important;
        }
        .cp-input-pill-wrapper {
            display: flex !important;
            align-items: center !important;
            flex-shrink: 0 !important;
        }
        .cp-input-pill-wrapper .attachment-menu-container {
            display: flex !important;
            align-items: center !important;
            flex-shrink: 0 !important;
        }
        @@media (max-width: 767.98px) {
            .cp-input-area {
                padding-bottom: max(4px, env(safe-area-inset-bottom, 0px)) !important;
            }
            .msg-bubble {
                font-size: 15.5px !important;
            }
            .gen-image-wrap {
                max-width: 100% !important;
            }
            .cp-input-pill-wrapper .cp-btn-icon,
            .cp-input-pill-wrapper .btn-attach-plus {
                width: 36px !important;
                height: 36px !important;
                min-width: 36px !important;
                min-height: 36px !important;
                font-size: 0.85rem !important;
                padding: 0 !important;
            }
            .cp-input-pill-wrapper .attachment-popup {
                position: static !important;
                bottom: 0 !important;
                left: 0 !important;
                right: 0 !important;
                top: auto !important;
                width: 100% !important;
                max-width: 100% !important;
                border-radius: 16px 16px 0 0 !important;
                max-height: 50vh !important;
                z-index: 9999 !important;
                animation: slideUp 0.25s ease-out !important;
                background: var(--bg-main, #fff) !important;
                box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.12) !important;
                padding-bottom: env(safe-area-inset-bottom, 0px) !important;
                overflow-y: auto !important;
            }
            @@keyframes slideUp {
                from {
                    transform: translateY(100%);
                }
                to {
                    transform: translateY(0);
                }
            }
            .cp-input-pill-wrapper .attachment-popup .attach-option {
                padding: 14px 20px !important;
                font-size: 15px !important;
                min-height: 48px !important;
                gap: 12px !important;
                border-radius: 10px !important;
                margin: 0 12px !important;
            }
            .cp-input-pill-wrapper .attachment-popup .attach-option:active {
                background: rgba(0, 0, 0, 0.06) !important;
            }
            .cp-input-pill-wrapper .dropdown-backdrop {
                position: fixed !important;
                inset: 0 !important;
                background: rgba(0, 0, 0, 0.35) !important;
                z-index: 9998 !important;
            }
            .text-input-inner.composer-row {
                gap: 4px !important;
                padding: 4px 6px !important;
                min-height: 46px !important;
            }
            .cp-textarea {
                font-size: 16px !important;
                min-height: 38px !important;
                max-height: min(35vh, 160px) !important;
                padding: 8px 4px !important;
                line-height: 1.4 !important;
            }
            .input-right-actions {
                gap: 2px !important;
            }
            .input-right-actions .input-icon-btn {
                width: 36px !important;
                height: 36px !important;
                min-width: 36px !important;
                min-height: 36px !important;
            }
            .input-attachments-preview {
                padding: 6px 8px !important;
            }
            .input-attachments-preview .att-preview-chip {
                max-width: calc(50% - 4px) !important;
                min-width: 0 !important;
            }
            .input-attachments-preview .att-name {
                font-size: 0.7rem !important;
                max-width: 80px !important;
            }
            .cp-search-wrapper-global {
                margin: 0 4px !important;
            }
            .bottom-search-area .cp-search-wrapper-global {
                margin: 0 4px 4px 4px !important;
            }
        }
        @@media (max-width: 374px) {
            .cp-input-pill-wrapper .cp-btn-icon,
            .cp-input-pill-wrapper .btn-attach-plus {
                width: 32px !important;
                height: 32px !important;
                min-width: 32px !important;
                min-height: 32px !important;
            }
            .text-input-inner.composer-row {
                border-radius: 18px !important;
                min-height: 42px !important;
                padding: 3px 5px !important;
            }
            .cp-textarea {
                font-size: 16px !important;
                padding: 6px 3px !important;
                max-height: min(30vh, 130px) !important;
            }
        }
        @@media (min-width: 768px) and (max-width: 1024px) {
            .cp-textarea {
                font-size: 16px !important;
                padding: 8px 6px !important;
            }
        }
        @@media (min-width: 1025px) {
            .cp-search-wrapper-global {
                max-width: 720px !important;
                margin-left: auto !important;
                margin-right: auto !important;
            }
            .cp-textarea {
                font-size: 15px !important;
                padding: 10px 8px !important;
            }
        }
        .weather-card {
            background: linear-gradient(135deg, #3b82f6, #2563eb);
            color: white;
            border-radius: 12px;
            padding: 16px;
            margin-top: 12px;
            font-family: sans-serif;
            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
            max-width: 350px;
        }
        .weather-header h4 {
            margin: 0;
            font-size: 1.2rem;
            font-weight: 600;
            color: white;
        }
        .weather-desc {
            font-size: 0.9rem;
            opacity: 0.9;
            text-transform: capitalize;
        }
        .weather-main {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin: 16px 0;
        }
        .weather-temp {
            font-size: 2.5rem;
            font-weight: bold;
        }
        .weather-details {
            display: flex;
            flex-direction: column;
            font-size: 0.85rem;
            opacity: 0.9;
            gap: 4px;
        }
        .weather-forecast {
            display: flex;
            justify-content: space-between;
            border-top: 1px solid rgba(255, 255, 255, 0.2);
            padding-top: 12px;
            margin-top: 8px;
            overflow-x: auto;
            gap: 12px;
        }
        .forecast-item {
            display: flex;
            flex-direction: column;
            align-items: center;
            font-size: 0.8rem;
            min-width: 45px;
        }
        .forecast-item .time {
            font-weight: 600;
            margin-bottom: 4px;
        }
        .forecast-item .rain {
            font-size: 0.7rem;
            opacity: 0.8;
        }
        .welcome-center-wrapper {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            min-height: 100%;
            width: 100%;
            padding: 20px 16px;
            box-sizing: border-box;
            overflow-x: hidden;
        }
        .welcome-center-wrapper .cp-empty-state {
            display: flex;
            flex-direction: column;
            align-items: center;
            margin-bottom: 24px;
            text-align: center;
            width: 100%;
        }
        .welcome-center-wrapper .cp-search-wrapper-global {
            margin-bottom: 1.25rem;
            padding: 0 0.75rem;
        }
        @@media (max-width: 640px) {
            .welcome-center-wrapper .cp-search-wrapper-global {
                padding: 0 0.5rem;
                margin-bottom: 0.75rem;
            }
        }
        .welcome-center-wrapper .action-buttons {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 16px;
            width: 100%;
            max-width: 800px;
            box-sizing: border-box;
        }
        .welcome-center-wrapper .action-row {
            display: flex;
            justify-content: center;
            gap: 10px;
            flex-wrap: wrap;
            width: 100%;
        }
        .bottom-search-area {
            padding-bottom: 8px !important;
        }
        @@keyframes spinCamera {
            to {
                transform: rotate(360deg);
            }
        }
        #cp-chat-page,
        #cp-chat-page * {
            -webkit-tap-highlight-color: transparent;
        }
        #cp-chat-page button:focus-visible,
        #cp-chat-page a:focus-visible,
        #cp-chat-page textarea:focus-visible,
        #cp-chat-page input:focus-visible,
        #cp-chat-page [tabindex]:focus-visible {
            outline: 2px solid #3073d5 !important;
            outline-offset: 2px !important;
        }
        .messages-area {
            scrollbar-gutter: stable;
        }
        .messages-area::-webkit-scrollbar {
            width: 8px;
        }
        .messages-area::-webkit-scrollbar-track {
            background: transparent;
        }
        .messages-area::-webkit-scrollbar-thumb {
            background: rgba(0, 0, 0, 0.18);
            border-radius: 8px;
        }
        .messages-area::-webkit-scrollbar-thumb:hover {
            background: rgba(0, 0, 0, 0.32);
        }
        .cp-message-row {
            min-width: 0;
        }
        .msg-bubble {
            overflow-wrap: anywhere;
            word-break: break-word;
            max-width: 100%;
        }
        .msg-bubble img,
        .msg-bubble video,
        .msg-bubble iframe {
            max-width: 100%;
            height: auto;
        }
        .msg-bubble pre {
            white-space: pre-wrap;
            word-break: break-word;
            max-width: 100%;
            overflow-x: auto;
        }
        .msg-bubble code {
            overflow-wrap: anywhere;
        }
        .empty-subtitle {
            color: #4b5563;
            font-size: 0.95rem;
            line-height: 1.5;
            margin: 0.5rem auto 0;
            max-width: 640px;
        }
        .prompt-suggestions {
            display: flex;
            flex-wrap: wrap;
            justify-content: center;
            gap: 8px;
            margin-top: 16px;
            max-width: 720px;
        }
        .prompt-chip {
            border: 1px solid rgba(0, 0, 0, 0.1);
            background: rgba(0, 0, 0, 0.02);
            color: #374151;
            padding: 8px 14px;
            border-radius: 16px;
            font-size: 0.85rem;
            cursor: pointer;
            transition: all 0.2s ease;
        }
        .prompt-chip:hover {
            background: rgba(48, 115, 213, 0.1);
            border-color: rgba(48, 115, 213, 0.3);
            color: #1f2937;
        }
        .scroll-bottom-btn {
            position: absolute;
            bottom: 96px;
            right: 24px;
            z-index: 50;
            width: 44px;
            height: 44px;
            border-radius: 50%;
            background: rgba(17, 24, 39, 0.85);
            color: white;
            border: none;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: opacity 0.3s ease;
        }
        .scroll-bottom-btn:active {
            transform: scale(0.95);
        }
        .msg-action-btn {
            font-size: 0.78rem;
            padding: 3px 10px;
            border-radius: 6px;
            cursor: pointer;
            border: 1px solid transparent;
            background: rgba(0, 0, 0, 0.05);
            color: #4b5563;
        }
        .msg-action-btn:hover {
            background: rgba(0, 0, 0, 0.1);
        }
        .stop-gen-btn {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 6px;
            margin: 4px auto 8px auto;
            padding: 5px 12px;
            font-size: 0.7rem;
            font-weight: 600;
            color: #b91c1c;
            background: #fee2e2;
            border: 1px solid #fecaca;
            border-radius: 14px;
            cursor: pointer;
            transition: all 0.2s ease;
            box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
        }
        .stop-gen-btn:hover {
            background: #fecaca;
        }
        .stop-gen-btn svg {
            width: 10px;
            height: 10px;
            fill: currentColor;
        }
        @@media (prefers-reduced-motion: reduce) {
            #cp-chat-page *,
            #cp-chat-page *::before,
            #cp-chat-page *::after {
                animation-duration: 0.01ms !important;
                animation-iteration-count: 1 !important;
                transition-duration: 0.01ms !important;
                scroll-behavior: auto !important;
            }
        }
        @@media (max-height: 500px) and (orientation: landscape) {
            .welcome-center-wrapper {
                justify-content: flex-start !important;
                padding-top: 8px !important;
            }
            .welcome-center-wrapper .cp-empty-state {
                margin-bottom: 10px !important;
            }
            .welcome-center-wrapper .action-buttons {
                gap: 8px !important;
            }
            .empty-logo svg {
                max-height: 64px;
            }
        }
        @@media (hover: none) and (pointer: coarse) {
            .history-actions {
                opacity: 1 !important;
                visibility: visible !important;
            }
            .cp-rail-btn,
            .cp-nav-item,
            .action-btn,
            .history-action-btn {
                min-height: 44px;
            }
        }
