
    /* บังคับล้างค่าที่อาจจะซ่อนเมนูจากธีมหรือแคชเก่า */
    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: flex !important; width: 30px !important; height: 20px !important; margin: 2px 0 4px !important; filter: drop-shadow(0 1px 1px rgba(0,0,0,.18)); }
    .tms-ts-ic b { position: absolute !important; right: -10px !important; bottom: -8px !important; font-size: 14px !important; line-height: 1 !important; font-weight: normal !important; animation: tmsTsBob 1.6s ease-in-out infinite; }
    /* 🆕 12 ต.ค. 2569 ธงพริ้ว (ม็อคอัพ mockups/mockup-ธงพริ้ว-ThaiSmiles-12ต.ค..html · เจ้าของ 08:06 "เอาเลย") แถบตั้ง 10 แถบขยับไล่จังหวะ + เงาวิ่ง */
    .tms-ts-ic i { flex: 1 !important; height: 100% !important; display: block !important; position: relative !important; background: linear-gradient(#A51931 0 16.66%, #F4F5F8 16.66% 33.33%, #2D2A4A 33.33% 66.66%, #F4F5F8 66.66% 83.33%, #A51931 83.33%) !important; animation: tmsTsWave 1.6s ease-in-out infinite; }
    .tms-ts-ic i::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0,0,0,.14), rgba(255,255,255,.18), rgba(0,0,0,.14)); animation: tmsTsShade 1.6s ease-in-out infinite; animation-delay: inherit; }
    .tms-ts-ic i:first-of-type { border-radius: 3px 0 0 3px !important; } .tms-ts-ic i:last-of-type { border-radius: 0 3px 3px 0 !important; }
    .tms-ts-ic i:nth-of-type(2) { animation-delay: -.12s; } .tms-ts-ic i:nth-of-type(3) { animation-delay: -.24s; } .tms-ts-ic i:nth-of-type(4) { animation-delay: -.36s; } .tms-ts-ic i:nth-of-type(5) { animation-delay: -.48s; }
    .tms-ts-ic i:nth-of-type(6) { animation-delay: -.6s; } .tms-ts-ic i:nth-of-type(7) { animation-delay: -.72s; } .tms-ts-ic i:nth-of-type(8) { animation-delay: -.84s; } .tms-ts-ic i:nth-of-type(9) { animation-delay: -.96s; } .tms-ts-ic i:nth-of-type(10) { animation-delay: -1.08s; }
    .tms-ts-ic s { position: absolute !important; left: -3px !important; top: -3px !important; bottom: -5px !important; width: 2px !important; background: linear-gradient(#cfd8dc, #78909c) !important; border-radius: 2px !important; text-decoration: none !important; }
    @keyframes tmsTsWave { 0%, 100% { transform: translateY(-6%); } 50% { transform: translateY(6%); } }
    @keyframes tmsTsShade { 0%, 100% { opacity: .25; } 50% { opacity: 1; } }
    @keyframes tmsTsBob { 0%, 100% { transform: translateY(0) rotate(-6deg); } 50% { transform: translateY(-2px) rotate(6deg); } }
    @media (prefers-reduced-motion: reduce) { .tms-ts-ic i, .tms-ts-ic i::after, .tms-ts-ic b { animation: none !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(540px, 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; }
    /* 🆕 12 ต.ค. 2569 09:06 ห้องแชทรวม 6 ห้องบนสุดของแชทลอย (ม็อคอัพ mockups/mockup-แชทลอย-ห้องแชทรวม6-12ต.ค..html แบบ A · เจ้าของเลือก 09:06) */
    #tms-chatpop .sec { flex: none; padding: 9px 14px 4px; font-size: 12px; font-weight: 700; color: #8a6d00; }
    #tms-chatpop .sec.p { color: #00a383; }
    #tms-chatpop .rooms { flex: none; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 2px; padding: 4px 8px 10px; border-bottom: 6px solid #f4f5f8; }
    #tms-chatpop a.rm { display: flex; flex-direction: column; align-items: center; gap: 4px; text-decoration: none; color: #2B2540; min-width: 0; }
    #tms-chatpop a.rm .ic { position: relative; overflow: hidden; width: 42px; height: 42px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 21px; line-height: 1; box-shadow: 0 3px 8px rgba(30,20,60,.16), inset 0 -2px 0 rgba(0,0,0,.08); transition: transform .15s; }
    #tms-chatpop a.rm .ic::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 50%; background: linear-gradient(180deg, rgba(255,255,255,.45), rgba(255,255,255,0)); pointer-events: none; }
    #tms-chatpop a.rm:active .ic { transform: scale(.92); }
    #tms-chatpop a.rm small { font-size: 10px; line-height: 1.2; text-align: center; font-weight: 600; }
    #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; }
    /* 🆕 19 ต.ค. เลขแดงบนปุ่มแชทในแถบล่าง */
    a.tms-nav-chat { position: relative !important; }
    .tms-nav-emo { font-size: 22px; line-height: 1; margin-bottom: 3px; display: inline-block; }
    .tms-nav-n { position: absolute; top: 2px; left: 54%; min-width: 17px; height: 17px; padding: 0 4px; box-sizing: border-box; border-radius: 9px; background: #e74c3c; color: #fff; font: 700 10px/17px 'Prompt', sans-serif; text-align: center; }
    .tms-nav-n[hidden] { display: none; }
