
    /* บังคับล้างค่าที่อาจจะซ่อนเมนูจากธีมหรือแคชเก่า */
    body { padding-bottom: 75px !important; } /* ดันเนื้อหาเว็บขึ้น ไม่ให้เมนูบัง */

    /* หน้าแชทแบบเต็มจอของปลั๊กอิน — กล่องแชทลอยเองอยู่แล้ว ไม่ต้องดันเนื้อหา
       (ตัวย่อกล่องแชทให้จบเหนือแถบอยู่ในสคริปต์ท้ายไฟล์) */
    body.bm-mobile-fullscreen-active { padding-bottom: 0 !important; }

    /* 📱 โครงสร้างแถบเมนูแอป (ขอบมน ดูพรีเมียม) */
    div.super-app-bottom-nav {
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 70px !important; /* บังคับความสูง */
        background-color: #ffffff !important;
        box-shadow: 0 -5px 25px rgba(0, 0, 0, 0.08) !important;
        border-radius: 20px 20px 0 0 !important;
        z-index: 2147483647 !important; /* ลอยอยู่บนสุดของจักรวาล */
        display: flex !important;
        flex-direction: row !important;
        justify-content: space-around !important;
        align-items: center !important;
        padding: 5px !important;
        margin: 0 !important;
        box-sizing: border-box !important;
        font-family: 'Prompt', sans-serif !important;
        opacity: 1 !important;
        visibility: visible !important;
        transform: translateY(0) !important;
    }

    /* 🏷️ โครงสร้างปุ่มพื้นฐาน */
    a.super-app-nav-item {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        text-decoration: none !important;
        flex: 1 !important;
        background: transparent !important;
        border: none !important;
        transition: transform 0.2s ease !important;
        -webkit-tap-highlight-color: transparent;
    }

    a.super-app-nav-item:active {
        transform: scale(0.9) !important;
    }

    i.super-app-nav-icon {
        font-size: 24px !important;
        margin-bottom: 2px !important;
        display: inline-block !important;
        line-height: 1 !important;
    }

    span.super-app-nav-label {
        font-size: 11px !important;
        font-weight: 600 !important;
        color: #78909c !important;
        line-height: 1 !important; 
    }

    /* 🎨 ระบายสีไอคอนแบบ Gradient (ไล่สี) พรีเมียม */
    .icon-color-apps { background: linear-gradient(135deg, #7950f2, #15aabf) !important; -webkit-background-clip: text !important; -webkit-text-fill-color: transparent !important; } /* 🆕 6 ต.ค. */
    .icon-color-shop { background: linear-gradient(135deg, #42a5f5, #1976d2) !important; -webkit-background-clip: text !important; -webkit-text-fill-color: transparent !important; }
    .icon-color-chat { background: linear-gradient(135deg, #66bb6a, #388e3c) !important; -webkit-background-clip: text !important; -webkit-text-fill-color: transparent !important; }
    .icon-color-wallet { background: linear-gradient(135deg, #ffca28, #f57c00) !important; -webkit-background-clip: text !important; -webkit-text-fill-color: transparent !important; }
    .icon-color-profile { background: linear-gradient(135deg, #ab47bc, #7b1fa2) !important; -webkit-background-clip: text !important; -webkit-text-fill-color: transparent !important; }

    /* 🔥 ปุ่มโฮมตรงกลาง (Floating Action Button) 🔥 */
    a.super-app-nav-center {
        position: relative !important;
        top: -20px !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        text-decoration: none !important;
        flex: 1.2 !important;
        -webkit-tap-highlight-color: transparent;
    }

    div.center-btn-circle {
        background: linear-gradient(135deg, #ff4081, #ff79b0) !important;
        width: 60px !important;
        height: 60px !important;
        border-radius: 50% !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        box-shadow: 0 6px 15px rgba(255, 64, 129, 0.4) !important;
        border: 4px solid #ffffff !important;
        color: #ffffff !important;
        font-size: 26px !important;
        transition: transform 0.2s ease !important;
        margin-bottom: 2px !important;
    }

    a.super-app-nav-center:active .center-btn-circle {
        transform: scale(0.9) !important;
    }

    span.center-btn-label {
        color: #e91e63 !important;
        font-size: 11px !important;
        font-weight: 700 !important;
        line-height: 1 !important;
    }

    /* ⌨️ คีย์บอร์ดขึ้นในหน้าแชท → ซ่อนแถบ (จอเล็กไม่เบียด) · ปิดคีย์บอร์ดแล้วกลับมาเอง
       🔴 เดิมซ่อนแถบทั้งหน้าแชท — เอาออก 22 ก.ย. 2026 (ดูประวัติที่หัวไฟล์) */
    body.tms-kb-open div.super-app-bottom-nav {
        display: none !important;
    }

    /* 🆕 12 ต.ค. 2569 ปุ่ม Thai Smiles (ธงชาติ + ยิ้ม) */
    .tms-ts-ic { position: relative !important; display: inline-block !important; width: 30px !important; height: 20px !important; margin: 2px 0 4px !important; }
    .tms-ts-ic svg { width: 30px !important; height: 20px !important; border-radius: 4px !important; display: block !important; box-shadow: 0 0 0 1px rgba(0,0,0,.08) !important; }
    .tms-ts-ic b { position: absolute !important; right: -9px !important; bottom: -7px !important; font-size: 14px !important; line-height: 1 !important; font-weight: normal !important; }

    /* 🆕 12 ต.ค. 2569 ปุ่มแชทลอย + หน้าต่างแชทเล็ก + แถบย่อ */
    #tms-chatfab, #tms-chatmin, #tms-chatpop { font-family: 'Prompt', sans-serif; -webkit-tap-highlight-color: transparent; }
    #tms-chatfab { position: fixed; right: 12px; bottom: calc(84px + env(safe-area-inset-bottom, 0px)); z-index: 2147483000; display: none; }
    #tms-chatfab .b { width: 54px; height: 54px; border-radius: 50%; border: 0; padding: 0; cursor: pointer; background: linear-gradient(135deg, #00b894, #00a383); color: #fff; font-size: 24px; line-height: 54px; text-align: center; box-shadow: 0 8px 18px rgba(0,163,131,.4); position: relative; }
    #tms-chatfab .x { position: absolute; left: -8px; top: -8px; width: 22px; height: 22px; border-radius: 50%; border: 0; padding: 0; background: #fff; color: #636e72; font-size: 11px; line-height: 22px; text-align: center; box-shadow: 0 2px 6px rgba(0,0,0,.18); cursor: pointer; }
    #tms-chatfab .n, #tms-chatmin .n { position: absolute; top: -4px; right: -4px; min-width: 19px; height: 19px; padding: 0 5px; box-sizing: border-box; border-radius: 10px; background: #e74c3c; color: #fff; font-size: 10.5px; font-weight: 700; line-height: 15px; border: 2px solid #fff; text-align: center; }
    #tms-chatmin { position: fixed; right: 0; bottom: calc(100px + env(safe-area-inset-bottom, 0px)); z-index: 2147483000; display: none; border: 0; cursor: pointer; background: linear-gradient(135deg, #00b894, #00a383); color: #fff; border-radius: 14px 0 0 14px; padding: 8px 7px 8px 10px; font-size: 16px; line-height: 1; box-shadow: 0 4px 12px rgba(0,163,131,.35); }
    #tms-chatmin .n { position: static; display: inline-block; margin-left: 3px; border: 0; height: 16px; line-height: 16px; font-size: 9.5px; vertical-align: middle; }
    #tms-chatpop { position: fixed; left: 10px; right: 10px; bottom: calc(84px + env(safe-area-inset-bottom, 0px)); max-height: min(440px, calc(100vh - 140px)); z-index: 2147483001; display: none; flex-direction: column; background: #fff; border-radius: 18px; box-shadow: 0 14px 34px rgba(0,0,0,.24); overflow: hidden; }
    @media (min-width: 600px) { #tms-chatpop { left: auto; right: 16px; width: 360px; } }
    #tms-chatpop .h { display: flex; align-items: center; gap: 8px; padding: 12px 14px; background: linear-gradient(135deg, #00b894, #00a383); color: #fff; font-weight: 700; font-size: 15px; }
    #tms-chatpop .h span { flex: 1; }
    #tms-chatpop .h button { width: 30px; height: 30px; border-radius: 50%; border: 0; background: rgba(255,255,255,.22); color: #fff; font-size: 14px; cursor: pointer; padding: 0; }
    #tms-chatpop .l { overflow-y: auto; flex: 1; }
    #tms-chatpop a.i { display: flex; gap: 10px; align-items: center; padding: 10px 14px; border-bottom: 1px solid #f1f2f6; text-decoration: none; color: #2d3436; }
    #tms-chatpop a.i img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex: none; background: #dfe6e9; }
    #tms-chatpop a.i .t { flex: 1; min-width: 0; font-size: 13.5px; font-weight: 600; }
    #tms-chatpop a.i .t small { display: block; font-weight: 400; color: #8a97a3; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    #tms-chatpop a.i.u .t small { color: #2d3436; font-weight: 600; }
    #tms-chatpop a.i .r { flex: none; text-align: right; font-size: 10.5px; color: #a4b0be; }
    #tms-chatpop a.i .r em { display: block; margin-top: 3px; font-style: normal; background: #e74c3c; color: #fff; border-radius: 9px; padding: 0 6px; font-weight: 700; text-align: center; }
    #tms-chatpop .e { padding: 28px 14px; text-align: center; color: #a4b0be; font-size: 13px; }
    #tms-chatpop a.f { display: block; text-align: center; padding: 12px; font-size: 13px; font-weight: 700; color: #00a383; text-decoration: none; border-top: 1px solid #f1f2f6; }
    body.tms-kb-open #tms-chatfab, body.tms-kb-open #tms-chatmin, body.tms-kb-open #tms-chatpop { display: none !important; }
