
        /* Menyu guruh sarlavhalari */
        .menu-group-title {
            font-size: 12px;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.08em;
            color: #16a34a;
            background: #f0fdf4;
            border: 1px solid #dcfce7;
            border-radius: 9999px;
            padding: 4px 12px;
            margin: 14px 4px 6px;
        }
        .menu-group-title:first-child { margin-top: 4px; }

        /* Akkordeon: guruh sarlavhasi — bosilganda linklar ochiladi/yopiladi */
        button.menu-group-title {
            display: flex;
            align-items: center;
            justify-content: space-between;
            width: 100%;
            cursor: pointer;
            font-family: inherit;
            text-align: left;
            -webkit-appearance: none;
            appearance: none;
        }
        button.menu-group-title::after {
            content: '';
            flex: none;
            width: 7px;
            height: 7px;
            margin-left: 8px;
            border-right: 2px solid #16a34a;
            border-bottom: 2px solid #16a34a;
            transform: rotate(45deg) translateY(-2px);
            transition: transform .2s ease;
        }
        button.menu-group-title[aria-expanded="true"]::after {
            transform: rotate(-135deg) translateY(-2px);
        }
        .menu-group-body { display: none; }
        .menu-group-title[aria-expanded="true"] + .menu-group-body { display: block; }

        /* Gorizontal menyu - endi header bitta qatorida (logo | menyu | tugmalar) */
        .hmenu-bar {
            background: transparent;
            backdrop-filter: none;
            -webkit-backdrop-filter: none;
            box-shadow: none;
            min-width: 0;
        }

        header.bg-white\/80 {
            backdrop-filter: blur(14px);
            -webkit-backdrop-filter: blur(14px);
        }

        /* ===== Sticky header: tepada katta, skrolda kichik (hdr-compact) ===== */
        header.bg-white\/80 > .container,
        header.bg-white\/80 .radio-input,
        header.bg-white\/80 .radio-input input[type="radio"]+label span,
        header.bg-white\/80 .w-11.h-11,
        header.bg-white\/80 .text-2xl.font-bold.text-green-700,
        header.bg-white\/80 .hmenu-bar .py-2,
        header.bg-white\/80 .menu-dd-btn,
        header.bg-white\/80 #auth-link-btn,
        header.bg-white\/80 #cart-icon-btn span {
            transition: padding .25s ease, width .25s ease, height .25s ease,
                font-size .25s ease, box-shadow .25s ease;
        }

        header.bg-white\/80.hdr-compact {
            box-shadow: 0 10px 22px -14px rgba(15, 23, 42, 0.45);
        }

        /* 1-qator: logo + til tugmalari + kirish/savat */
        header.hdr-compact > .container {
            padding-top: 0.5rem;
            padding-bottom: 0.5rem;
        }

        header.hdr-compact .w-11.h-11 {
            width: 2rem;
            height: 2rem;
        }

        header.hdr-compact .text-2xl.font-bold.text-green-700 {
            font-size: 1.25rem;
        }

        header.hdr-compact .radio-input {
            padding: 5px 8px;
        }

        header.hdr-compact .radio-input input[type="radio"]+label span {
            width: 30px;
            height: 30px;
            font-size: 12px;
        }

        header.hdr-compact #auth-link-btn {
            padding: 0.3rem 0.75rem;
        }

        header.hdr-compact #cart-icon-btn span[aria-hidden="true"] {
            font-size: 1.25rem;
        }

        /* 2-qator: gorizontal menyu */
        header.hdr-compact .hmenu-bar .py-2 {
            padding-top: 0.25rem;
            padding-bottom: 0.25rem;
        }

        header.hdr-compact .menu-dd-btn {
            padding: 6px 12px;
            font-size: 13px;
        }

        header.hdr-compact .menu-dd-btn .dd-ico {
            font-size: 13px;
        }

        .hmenu-bar nav {
            -ms-overflow-style: none;
            scrollbar-width: none;
            gap: 6px;
            justify-content: center;
        }

        .hmenu-bar nav::-webkit-scrollbar {
            display: none;
        }

        .menu-dd {
            position: relative;
            flex: none;
        }

        .menu-dd-btn {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            padding: 10px 18px;
            border-radius: 12px;
            font-size: 14.5px;
            font-weight: 600;
            letter-spacing: 0.01em;
            color: #475569;
            background: transparent;
            border: none;
            cursor: pointer;
            white-space: nowrap;
            position: relative;
            transition: background-color 0.2s, color 0.2s, box-shadow 0.2s, transform 0.15s;
        }

        .menu-dd-btn .dd-ico {
            font-size: 16px;
            line-height: 1;
            filter: grayscale(0.2);
            opacity: 0.9;
            transition: filter 0.2s, opacity 0.2s, transform 0.2s;
        }

        .menu-dd-btn:hover .dd-ico {
            filter: none;
            opacity: 1;
            transform: translateY(-1px);
        }

        .menu-dd-caret {
            font-size: 10px;
            color: #94a3b8;
            transition: transform 0.2s, color 0.2s;
        }

        .menu-dd-btn:hover {
            background: #f1f5f9;
            color: #0f172a;
        }

        .menu-dd-btn:focus-visible {
            outline: 2px solid #16a34a;
            outline-offset: 2px;
        }

        .menu-dd-btn:active {
            transform: scale(0.97);
        }

        .menu-dd.open .menu-dd-btn,
        .menu-dd-btn[aria-expanded="true"] {
            background: linear-gradient(180deg, #f0fdf4 0%, #dcfce7 100%);
            color: #15803d;
            box-shadow: inset 0 0 0 1px #bbf7d0;
        }

        .menu-dd.open .menu-dd-caret {
            transform: rotate(180deg);
            color: #16a34a;
        }

        .menu-dd-panel {
            position: absolute;
            top: calc(100% + 10px);
            left: 0;
            z-index: 70;
            min-width: 270px;
            max-width: calc(100vw - 24px);
            padding: 10px;
            background: #ffffff;
            border: 1px solid #e2e8f0;
            border-radius: 16px;
            box-shadow: 0 24px 48px -16px rgba(15, 23, 42, 0.3);
            opacity: 0;
            visibility: hidden;
            transform: translateY(10px) scale(0.98);
            transform-origin: top center;
            transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
        }

        .menu-dd:last-child .menu-dd-panel {
            left: auto;
            right: 0;
        }

        .menu-dd.open .menu-dd-panel {
            opacity: 1;
            visibility: visible;
            transform: translateY(0) scale(1);
        }

        @media (hover: hover) and (pointer: fine) {
            .menu-dd:hover .menu-dd-panel {
                opacity: 1;
                visibility: visible;
                transform: translateY(0) scale(1);
            }

            .menu-dd:hover .menu-dd-caret {
                transform: rotate(180deg);
                color: #16a34a;
            }

            .menu-dd:hover .menu-dd-btn {
                background: #f1f5f9;
                color: #0f172a;
            }

            .menu-dd:hover .menu-dd-btn .dd-ico {
                filter: none;
                opacity: 1;
            }
        }

        /* Panel ichki sarlavha */
        .menu-dd-head {
            font-size: 10.5px;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.09em;
            color: #16a34a;
            padding: 6px 12px 8px;
            border-bottom: 1px dashed #dcfce7;
            margin-bottom: 6px;
        }

        /* Panel ichidagi linklar */
        .dd-link {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 9px 12px;
            border-radius: 10px;
            font-size: 14px;
            font-weight: 500;
            color: #334155;
            text-decoration: none;
            transition: background-color 0.15s, color 0.15s, transform 0.15s;
        }

        .dd-link>span:first-child {
            display: inline-grid;
            place-items: center;
            width: 30px;
            height: 30px;
            flex: none;
            background: #f0fdf4;
            border: 1px solid #dcfce7;
            border-radius: 9px;
            font-size: 15px;
            transition: background-color 0.15s, transform 0.15s;
        }

        .dd-link:hover>span:first-child {
            background: #dcfce7;
            transform: scale(1.08);
        }

        .dd-link:hover {
            background: #f0fdf4;
            color: #15803d;
            transform: translateX(3px);
        }

        .dd-link.active {
            background: #dcfce7;
            color: #15803d;
            font-weight: 700;
        }

        .dd-link:last-child {
            margin-bottom: 2px;
        }

        /* Faol bo'lim ichidagi guruh tugmasini belgilash */
        .menu-dd:has(.dd-link.active) .menu-dd-btn {
            color: #15803d;
        }

        .menu-dd:has(.dd-link.active) .menu-dd-btn::after {
            content: '';
            position: absolute;
            left: 18px;
            right: 18px;
            bottom: 3px;
            height: 3px;
            border-radius: 3px;
            background: linear-gradient(90deg, #16a34a, #34d399);
        }

        .menu-dd:has(.dd-link.active) .menu-dd-btn .dd-ico {
            filter: none;
            opacity: 1;
        }

        /* Sticky menyu ostidagi bo'limlarga skroll padding */
        html {
            scroll-padding-top: 140px;
        }

        /* Screen reader only class */
        .sr-only {
            position: absolute;
            width: 1px;
            height: 1px;
            padding: 0;
            margin: -1px;
            overflow: hidden;
            clip: rect(0, 0, 0, 0);
            white-space: nowrap;
            border-width: 0;
        }

        body {
            font-family: 'Inter', sans-serif;
            background-color: #f0fdf4;
            color: #3f3f46;
            line-height: 1.6;
            overflow-x: hidden;
        }

        .chart-container {
            position: relative;
            width: 100%;
            max-width: 450px;
            margin-left: auto;
            margin-right: auto;
            height: 300px;
            max-height: 400px;
        }

        @media (min-width: 640px) {
            .chart-container {
                height: 350px;
            }
        }

        .stat-card {
            background-color: #ffffff;
            border: 1px solid #dcfce7;
            transition: transform 0.3s ease, box-shadow 0.3s ease;
        }

        .stat-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
        }

        .nav-link.active {
            color: #16a34a;
            font-weight: 600;
        }

        .nav-link {
            transition: color 0.3s;
        }

        .nav-link:hover {
            color: #16a34a;
        }

        /* Android: flex-1 bolalar min-content sabab ota qutidan chiqib ketmasin */
        .flex-1 {
            min-width: 0;
        }

        /* Telefonda sana/badge qatorga sig'masa - yangi qatorga o'tkaziladi */
        @media (max-width: 640px) {
            .flex:has(> #current-date) {
                flex-wrap: wrap;
            }
        }

        /* O'ng tomondan ochiladigan menyu
           (yopiq holatda display:none — Android'da ichki kenglikni kengaytirmasin) */
        #mobile-menu {
            transition: transform 0.3s ease-in-out;
            background-color: #ffffff !important;
            opacity: 1 !important;
            transform: translateX(100%);
            pointer-events: none;
            visibility: hidden;
            display: none;
        }

        #mobile-menu.active {
            transform: translateX(0) !important;
            pointer-events: auto;
            visibility: visible;
        }

        #menu-overlay.active {
            display: block;
        }

        /* Mobil moslashuvchanlik uchun qo'shimcha stillar */

        /* Cart modal mobil qurilmalarda to'liq ekran */
        @media (max-width: 768px) {
            .cart-modal {
                position: fixed !important;
                top: 0 !important;
                left: 0 !important;
                right: 0 !important;
                bottom: 0 !important;
                width: 100% !important;
                height: 100% !important;
                max-width: 100% !important;
                max-height: 100% !important;
                margin: 0 !important;
                border-radius: 0 !important;
                z-index: 9999;
            }

            .cart-modal-content {
                height: 100%;
                display: flex;
                flex-direction: column;
            }

            .cart-modal-body {
                flex: 1;
                overflow-y: auto;
                -webkit-overflow-scrolling: touch;
            }

            /* Checkout form mobil uchun optimallashtirilgan */
            .checkout-form {
                width: 100% !important;
                max-width: 100% !important;
                padding: 1rem !important;
            }

            .checkout-form input[type="tel"] {
                font-size: 16px;
                /* iOS zoom oldini olish uchun */
            }

            .checkout-form input[type="email"] {
                font-size: 16px;
            }

            /* Mahsulot grid mobil uchun */
            .product-grid {
                grid-template-columns: 1fr !important;
            }

            /* Touch-friendly tugmalar */
            button,
            .btn,
            a.btn {
                min-height: 44px;
                /* Apple'ning tavsiya etgan minimal touch target */
                min-width: 44px;
                padding: 12px 16px;
            }

            /* Mobil to'lov usullari */
            .payment-methods-mobile {
                display: flex;
                flex-direction: column;
                gap: 12px;
            }

            .payment-method-option {
                padding: 16px;
                border: 2px solid #dcfce7;
                border-radius: 8px;
                cursor: pointer;
                transition: all 0.3s;
                display: flex;
                align-items: center;
                gap: 12px;
            }

            .payment-method-option:active {
                transform: scale(0.98);
                background-color: #f0fdf4;
            }

            .payment-method-option.selected {
                border-color: #16a34a;
                background-color: #f0fdf4;
            }

            /* Modal overlay mobil uchun */
            .modal-overlay {
                position: fixed;
                top: 0;
                left: 0;
                right: 0;
                bottom: 0;
                background-color: rgba(0, 0, 0, 0.5);
                z-index: 9998;
            }
        }

        /* Tablet va katta ekranlar uchun */
        @media (min-width: 769px) {
            .cart-modal {
                max-width: 600px;
                max-height: 80vh;
                margin: 5vh auto;
                border-radius: 12px;
            }

            .payment-methods-mobile {
                display: grid;
                grid-template-columns: repeat(2, 1fr);
                gap: 16px;
            }
        }

        /* Kichik mobil qurilmalar uchun (< 375px) */
        @media (max-width: 374px) {
            body {
                font-size: 14px;
            }

            h1 {
                font-size: 1.5rem !important;
            }

            h2 {
                font-size: 1.25rem !important;
            }

            .container {
                padding-left: 1rem;
                padding-right: 1rem;
            }
        }

        /* Landscape mode mobil uchun */
        @media (max-width: 768px) and (orientation: landscape) {
            .cart-modal {
                overflow-y: auto;
            }

            .checkout-form {
                padding: 0.5rem !important;
            }
        }

        /* Touch feedback */
        @media (hover: none) and (pointer: coarse) {

            button:active,
            .btn:active,
            a.btn:active {
                opacity: 0.7;
            }

            .stat-card:active {
                transform: scale(0.98);
            }
        }

        /* Til tanlash tugmalari - Radio style */
        .radio-input {
            background-color: #fff;
            padding: 8px 12px;
            border-radius: 20px;
            display: flex;
            box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
        }

        .radio-input input[type="radio"] {
            display: none;
        }

        .radio-input input[type="radio"]+label {
            color: #333;
            font-family: Arial, sans-serif;
            font-size: 12px;
        }

        .radio-input input[type="radio"]+label span {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 36px;
            height: 36px;
            margin: 0 2px;
            vertical-align: middle;
            cursor: pointer;
            border-radius: 50%;
            border: 2px solid #ffffff;
            box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.33);
            background-color: #b0b0b0;
            color: white;
            font-weight: bold;
            font-size: 12px;
            transition: all 0.3s ease;
        }

        .radio-input input[type="radio"]:checked+label span {
            background-color: #16a34a;
            transform: scale(1.1);
        }

        .radio-input input[type="radio"]+label span:hover {
            transform: scale(1.05);
        }

        /* Menu animatsiyalari */
        #mobile-menu {
            background: linear-gradient(180deg, #ffffff 0%, #f0fdf4 50%, #dcfce7 100%) !important;
        }

        #mobile-menu .nav-link {
            position: relative;
            overflow: hidden;
            transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        }

        #mobile-menu .nav-link::before {
            content: '';
            position: absolute;
            left: -100%;
            top: 0;
            width: 100%;
            height: 100%;
            background: linear-gradient(90deg, transparent, rgba(22, 163, 74, 0.2), transparent);
            transition: left 0.5s ease;
        }

        #mobile-menu .nav-link:hover::before {
            left: 100%;
        }

        #mobile-menu .nav-link:hover {
            background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
            transform: translateX(8px) scale(1.02);
            box-shadow: 0 4px 12px rgba(22, 163, 74, 0.15);
            border-left: 4px solid #16a34a;
        }

        #mobile-menu .nav-link span {
            display: inline-block;
            transition: transform 0.3s ease;
        }

        #mobile-menu .nav-link:hover span {
            transform: scale(1.2) rotate(10deg);
        }

        @keyframes slideInRight {
            from {
                opacity: 0;
                transform: translateX(20px);
            }

            to {
                opacity: 1;
                transform: translateX(0);
            }
        }

        #mobile-menu.active .nav-link {
            animation: slideInRight 0.4s ease forwards;
        }

        #mobile-menu.active .nav-link:nth-child(1) {
            animation-delay: 0.05s;
        }

        #mobile-menu.active .nav-link:nth-child(2) {
            animation-delay: 0.1s;
        }

        #mobile-menu.active .nav-link:nth-child(3) {
            animation-delay: 0.15s;
        }

        #mobile-menu.active .nav-link:nth-child(4) {
            animation-delay: 0.2s;
        }

        #mobile-menu.active .nav-link:nth-child(5) {
            animation-delay: 0.25s;
        }

        #mobile-menu.active .nav-link:nth-child(6) {
            animation-delay: 0.3s;
        }

        #mobile-menu.active .nav-link:nth-child(7) {
            animation-delay: 0.35s;
        }

        #mobile-menu.active .nav-link:nth-child(8) {
            animation-delay: 0.4s;
        }

        #mobile-menu.active .nav-link:nth-child(9) {
            animation-delay: 0.45s;
        }

        #mobile-menu.active .nav-link:nth-child(10) {
            animation-delay: 0.5s;
        }

        #mobile-menu.active .nav-link:nth-child(11) {
            animation-delay: 0.55s;
        }

        #mobile-menu.active .nav-link:nth-child(12) {
            animation-delay: 0.6s;
        }

        #mobile-menu.active .nav-link:nth-child(13) {
            animation-delay: 0.65s;
        }

        #mobile-menu.active .nav-link:nth-child(14) {
            animation-delay: 0.7s;
        }

        @keyframes shimmer {
            0% {
                transform: translateX(-100%);
            }

            100% {
                transform: translateX(100%);
            }
        }

        .animate-shimmer {
            animation: shimmer 3s infinite;
        }

        /* Tushayotgan barglar */
        .leaf {
            position: absolute;
            font-size: 24px;
            animation: fall linear infinite;
            opacity: 0.7;
            z-index: 1;
        }

        @keyframes fall {
            0% {
                transform: translateY(-100px) rotate(0deg);
                opacity: 0;
            }

            10% {
                opacity: 0.7;
            }

            90% {
                opacity: 0.7;
            }

            100% {
                transform: translateY(calc(100vh + 100px)) rotate(360deg);
                opacity: 0;
            }
        }

        .leaf:nth-child(1) {
            left: 10%;
            animation-duration: 8s;
            animation-delay: 0s;
        }

        .leaf:nth-child(2) {
            left: 25%;
            animation-duration: 10s;
            animation-delay: 2s;
            font-size: 20px;
        }

        .leaf:nth-child(3) {
            left: 45%;
            animation-duration: 12s;
            animation-delay: 4s;
            font-size: 28px;
        }

        .leaf:nth-child(4) {
            left: 65%;
            animation-duration: 9s;
            animation-delay: 1s;
            font-size: 22px;
        }

        .leaf:nth-child(5) {
            left: 85%;
            animation-duration: 11s;
            animation-delay: 3s;
            font-size: 26px;
        }
    
        /* Kichik ekranlarda gorizontal bar yashiriladi - hamburger + drawer ishlatiladi */
        @media (max-width: 1023px) {
            .hmenu-bar {
                display: none;
            }

            #mobile-menu-btn {
                display: inline-flex !important;
                flex-direction: column;
                align-items: center;
                justify-content: center;
                gap: 4px;
            }
        }
            /* --- Kredit bo'limi (services.html) --- */
            #green-credit .stat-card {
                transition: transform .2s ease, box-shadow .2s ease;
            }
            #green-credit .stat-card:hover {
                transform: translateY(-4px);
                box-shadow: 0 14px 30px rgba(0, 0, 0, .08);
            }
            .credit-term {
                padding: 10px 22px;
                border-radius: 12px;
                border: 1.5px solid #e2e8f0;
                background: #fff;
                font-weight: 700;
                font-size: 14px;
                color: #475569;
                cursor: pointer;
                transition: all .18s ease;
            }
            .credit-term:hover {
                border-color: #86efac;
                background: #f0fdf4;
                color: #15803d;
            }
            .credit-term.active {
                background: linear-gradient(180deg, #f0fdf4, #dcfce7);
                border-color: #16a34a;
                color: #15803d;
                box-shadow: 0 4px 12px rgba(22, 163, 74, .18);
            }
            .credit-term:focus-visible {
                outline: 3px solid rgba(22, 163, 74, .4);
                outline-offset: 2px;
            }
            #credit-apply-btn:disabled {
                pointer-events: none;
            }
            #credit-info-body li b {
                color: #0f172a;
            }

/* ===== Bog'bon AI: 3D suzuvchi sikkat + suhbat oynasi ===== */
.gm-h { display: none !important; }

#gm-ai3d {
    position: fixed;
    width: 82px;
    height: 82px;
    border-radius: 50%;
    z-index: 9100;
    cursor: grab;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
    background: radial-gradient(circle at 32% 28%, #ecfdf3 0%, #cdefdb 45%, #a9e3c4 100%);
    border: 3px solid #fff;
    box-shadow: 0 14px 30px rgba(21, 128, 61, .35), 0 4px 10px rgba(0, 0, 0, .18),
        inset 0 -8px 14px rgba(21, 128, 61, .18);
    transform-style: preserve-3d;
    will-change: transform;
}
#gm-ai3d:focus-visible {
    outline: 3px solid rgba(22, 163, 74, .55);
    outline-offset: 3px;
}
#gm-ai3d.gm-drag {
    cursor: grabbing;
    box-shadow: 0 26px 48px rgba(21, 128, 61, .45), 0 8px 16px rgba(0, 0, 0, .22);
}
#gm-ai3d canvas {
    position: absolute;
    left: 5px;
    top: 5px;
    width: calc(100% - 10px);
    height: calc(100% - 10px);
    pointer-events: none;
    display: block;
}
.gm-ai3d-fallback {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    line-height: 1;
    pointer-events: none;
    filter: drop-shadow(0 6px 6px rgba(0, 0, 0, .25));
}
.gm-ai3d-badge {
    position: absolute;
    right: -4px;
    top: -4px;
    min-width: 36px;
    height: 21px;
    padding: 0 6px;
    border-radius: 11px;
    background: #16a34a;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
    box-shadow: 0 4px 8px rgba(0, 0, 0, .2);
    animation: gm-ai3d-pulse 2s ease-in-out infinite;
    pointer-events: none;
}
@keyframes gm-ai3d-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.09); }
}

#gm-ai3d-chat {
    position: fixed;
    z-index: 9150;
    width: min(370px, calc(100vw - 24px));
    background: #fff;
    border: 1px solid #dcfce7;
    border-radius: 18px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, .28);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    /* Chat ekranni to'liq egallamasin — kichik qoladi, xabarlar ichida scroll */
    max-height: calc(100vh - 24px);
    max-height: calc(100dvh - 24px);
    max-height: min(calc(100dvh - 24px), 560px);
    transform-origin: bottom right;
    animation: gm-ai3d-chat-in .18s ease;
}
@keyframes gm-ai3d-chat-in {
    from { opacity: 0; transform: translateY(10px) scale(.96); }
    to { opacity: 1; transform: none; }
}
.gm-chat-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    background: linear-gradient(135deg, #15803d, #16a34a);
    color: #fff;
}
.gm-chat-ava {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .18);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex: none;
}
.gm-chat-head b { font-size: 15px; display: block; }
.gm-chat-head small { font-size: 12px; opacity: .85; font-weight: 400; }
.gm-chat-x {
    margin-left: auto;
    background: rgba(255, 255, 255, .15);
    border: 0;
    color: #fff;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    font-size: 17px;
    line-height: 1;
    cursor: pointer;
    flex: none;
}
.gm-chat-x:hover { background: rgba(255, 255, 255, .3); }
/* Avtomatik ovoz tugmasi (chat sarlavhasida) */
.gm-chat-tts { font-size: 15px; margin-left: auto; }
.gm-chat-tts.off { opacity: .5; background: rgba(255, 255, 255, .08); }
.gm-chat-msgs {
    padding: 12px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: #f8fafc;
}
.gm-msg {
    max-width: 85%;
    padding: 9px 12px;
    border-radius: 14px;
    font-size: 14px;
    line-height: 1.45;
    white-space: pre-line;
    word-break: break-word;
}
.gm-msg-ai {
    align-self: flex-start;
    background: #fff;
    border: 1px solid #e2e8f0;
    color: #1e293b;
    border-bottom-left-radius: 4px;
}
.gm-msg-user {
    align-self: flex-end;
    background: #15803d;
    color: #fff;
    border-bottom-right-radius: 4px;
}
.gm-msg-err {
    align-self: center;
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
    font-size: 13px;
    max-width: 95%;
}
/* Feedback: AI xabar ostidagi 👍/👎 */
.gm-fb {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 7px;
    padding-top: 6px;
    border-top: 1px dashed #e2e8f0;
}
.gm-fb-btn {
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1;
    padding: 4px 8px;
    cursor: pointer;
    transition: transform .15s, background .15s;
}
.gm-fb-btn:hover:not(:disabled) {
    background: #ecfdf5;
    transform: translateY(-1px);
}
.gm-fb-btn:disabled {
    opacity: .45;
    cursor: default;
}
.gm-fb-thanks {
    font-size: 11.5px;
    color: #15803d;
    font-weight: 600;
}
.gm-chat-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    max-width: 90%;
}
.gm-chip {
    background: #fff;
    border: 1px solid #bbf7d0;
    color: #166534;
    border-radius: 10px;
    font-size: 12.5px;
    padding: 5px 9px;
}
.gm-chip b { color: #15803d; }
.gm-typing {
    align-self: flex-start;
    display: flex;
    gap: 4px;
    padding: 12px 14px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    border-bottom-left-radius: 4px;
}
.gm-typing span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #94a3b8;
    animation: gm-ai3d-blink 1.2s infinite;
}
.gm-typing span:nth-child(2) { animation-delay: .2s; }
.gm-typing span:nth-child(3) { animation-delay: .4s; }
@keyframes gm-ai3d-blink {
    0%, 80%, 100% { transform: translateY(0); opacity: .5; }
    40% { transform: translateY(-4px); opacity: 1; }
}
.gm-chat-foot {
    display: flex;
    gap: 8px;
    padding: 10px;
    border-top: 1px solid #e2e8f0;
    background: #fff;
}
.gm-chat-foot input {
    flex: 1;
    min-width: 0;
    border: 1px solid #d1d5db;
    border-radius: 12px;
    padding: 10px 12px;
    font-size: 14px;
    outline: none;
}
.gm-chat-foot input:focus {
    border-color: #22c55e;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, .15);
}
.gm-chat-send {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    border: 0;
    background: #15803d;
    color: #fff;
    font-size: 17px;
    cursor: pointer;
    flex: none;
}
.gm-chat-send:hover { background: #166534; }
.gm-chat-send:disabled { opacity: .5; cursor: not-allowed; }

/* "Kirish" tugmasi tap-target kafolati (mobil emas, sm+ ko'rinadi) */
header.bg-white\/80:not(.hdr-compact) #auth-link-btn {
    min-height: 40px;
    min-width: 96px;
}

@media (max-width: 480px) {
    #gm-ai3d { width: 72px; height: 72px; }
    .gm-ai3d-fallback { font-size: 30px; }

    /* Telefonda header bir qatorda sig'adi:
       wordmark yashiriladi (logo belgisi qoladi), radio kichraytiriladi */
    header > .container { gap: 6px; }
    header .text-2xl.font-bold.text-green-700 { display: none; }
    header a[href="./#home"] { gap: 8px; }
    header > .container > .flex.items-center.gap-3 { gap: 8px; }
    .radio-input { padding: 6px 8px; }
    .radio-input input[type="radio"]+label span {
        width: 34px;
        height: 34px;
        margin: 0 1px;
        font-size: 12px;
    }
}