#mgcs-guest,.mgcs-host{font-family:inherit;color:#30213e;font-size:14px;line-height:1.6}
#mgcs-guest *, .mgcs-host *{box-sizing:border-box}
#mgcs-guest{position:fixed;right:20px;bottom:28px;z-index:99999}
.mgcs-launch{border:2px solid #57317b;border-radius:24px;padding:11px 18px;background:linear-gradient(110deg,#e55aae,#8654d5);color:white;cursor:pointer;box-shadow:0 5px 20px #49276c25;font-weight:700}
.mgcs-launch span,#mgcs-panel header span,.mgcs-brand span{display:block;font-size:12px;font-weight:400}
#mgcs-panel{position:absolute;bottom:80px;right:0;width:390px;max-width:calc(100vw - 24px);height:600px;max-height:calc(100dvh - 130px);border:1px solid #e1d5f1;border-radius:20px;background:#fff;box-shadow:0 12px 48px #30213e30;overflow:hidden;display:flex;flex-direction:column}
#mgcs-panel[hidden]{display:none}
#mgcs-panel header{background:linear-gradient(100deg,#cf54a7,#8155cb,#61b6df);color:#fff;padding:13px 16px;display:flex;align-items:center;gap:8px}
#mgcs-panel header strong{flex:1;font-size:15px}
.mgcs-close{background:#ffffff25;border:0;color:#fff;font-size:24px;border-radius:8px;cursor:pointer;width:32px;height:32px;line-height:1}
.mgcs-host{display:flex;flex-direction:column;min-height:0;flex:1;padding:0!important;overflow:hidden!important;background:#faf7ff}
.mgcs-brand{padding:10px 14px;background:#fff;border-bottom:1px solid #eee5f8}
#mgcs-panel .mgcs-brand{display:none}
.mgcs-content{overflow-y:auto;overscroll-behavior:contain;flex:1;min-height:0;padding:12px;scrollbar-width:thin}
.mgcs-say{background:white;border:1px solid #eee5f8;border-radius:14px;padding:12px;margin-bottom:10px;white-space:pre-line}
.mgcs-menu{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.mgcs-menu button{display:flex;align-items:center;gap:8px;border:1px solid #e6dbef;border-radius:12px;text-align:left;padding:11px 9px;background:white;color:#30213e;cursor:pointer;font:inherit;line-height:1.4;white-space:normal}
.mgcs-menu strong{display:block;font-size:13px}.mgcs-menu small{display:block;color:#786986;font-size:11px;margin-top:3px}.mgcs-icon{font-size:23px;flex-shrink:0}
.mgcs-quick{display:flex;flex-shrink:0;gap:5px;padding:10px 8px;background:white;border-top:1px solid #e9dff5}
.mgcs-quick button,.mgcs-back,.mgcs-pager button{border:1px solid #9d79c4;border-radius:18px;background:#fff;color:#644093;padding:7px 10px;font-size:12px;cursor:pointer;line-height:1.4;font-family:inherit}
.mgcs-quick button{flex:1;white-space:nowrap}.mgcs-back{margin-bottom:10px}.mgcs-pager{display:flex;justify-content:space-between;margin:10px 0}
.mgcs-search{width:100%;border:1px solid #cbb6e2!important;border-radius:10px!important;padding:10px!important;background:white!important;color:#30213e!important;margin:0 0 10px!important;font:inherit!important;height:auto!important}
.mgcs-product{display:flex;align-items:center;gap:10px;padding:10px;width:100%;background:white;border:1px solid #eadff5;border-radius:12px;margin:0 0 8px;text-align:left;cursor:pointer;font:inherit;color:inherit;white-space:normal}
.mgcs-product img{width:66px;height:80px;object-fit:contain;border-radius:8px;background:#f8f3fc;flex-shrink:0}.mgcs-product strong{display:block;font-size:13px}.mgcs-rich{overflow-wrap:anywhere}.mgcs-product .mgcs-rich{font-size:12px;color:#9a3684}.mgcs-rich .screen-reader-text{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}
.mgcs-photo{display:block;width:100%;height:220px;object-fit:contain;background:white;border-radius:14px}.mgcs-detail h3{font-size:17px;margin:12px 0 4px}.mgcs-detail p{margin:8px 0}.mgcs-accordion{border:1px solid #e4d8f0;border-radius:10px;background:#fff;margin:9px 0;overflow:hidden}.mgcs-accordion summary{list-style:none;cursor:pointer;padding:12px 34px 12px 12px;font-weight:600;position:relative;font-size:13px}.mgcs-accordion summary::-webkit-details-marker{display:none}.mgcs-accordion summary:after{content:'+';position:absolute;right:13px;color:#8556b7;font-size:18px;top:8px}.mgcs-accordion[open] summary:after{content:'−'}.mgcs-accordion[open] summary{background:#f1eafb}.mgcs-accordion>.mgcs-rich,.mgcs-accordion>p{padding:10px 12px;margin:0;overflow:auto}.mgcs-rich img{max-width:100%;height:auto}.mgcs-rich table{font-size:12px;width:100%;border-collapse:collapse}.mgcs-rich td,.mgcs-rich th{padding:5px;border:1px solid #e5daef}.mgcs-buy{display:block;text-align:center;padding:10px;border-radius:10px;background:#8655c6;color:white!important;font-weight:700;text-decoration:none!important;margin:12px 0}.mgcs-offer{background:white;border:1px dashed #b18bd8;border-radius:12px;padding:12px;margin:10px 0}.mgcs-offer strong{color:#8b469e}.mgcs-offer p{margin:5px 0}.mgcs-offer small{display:block}.mgcs-note{font-size:12px;color:#756180}.mgcs-tabs{overflow-x:auto!important;flex-shrink:0}.mgcs-tabs .mch-tab{min-width:63px;flex-shrink:0}
.mgcs-host button:focus-visible,.mgcs-host a:focus-visible,.mgcs-host summary:focus-visible,#mgcs-guest button:focus-visible{outline:3px solid #7555b4;outline-offset:2px}
@media(max-width:480px){#mgcs-guest{right:12px;bottom:85px}#mgcs-panel{bottom:76px;max-height:calc(100dvh - 180px)}.mgcs-menu button{padding:10px 7px}.mgcs-icon{font-size:20px}}
.mgcs-use{display:block;border:0;border-radius:9px;padding:8px 14px;background:#8655c6;color:white;cursor:pointer;margin-top:9px;font:inherit}.mgcs-use:disabled{opacity:.6;cursor:wait}.mgcs-coupon-status{font-size:12px}
/* 1.5.1: scoped rules override theme image/button rules and legacy tab sizing. */
.mch-root .mch-tabs.mgcs-tabs{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:5px!important;padding:7px!important;overflow:visible!important;background:#faf5ff!important;border-bottom:1px solid #e7dbf1!important}
.mch-root .mgcs-tabs .mch-tab{display:flex!important;align-items:center!important;justify-content:center!important;gap:6px!important;min-width:0!important;width:auto!important;min-height:38px!important;height:auto!important;padding:8px 5px!important;margin:0!important;font-family:inherit!important;font-size:12px!important;line-height:1.4!important;letter-spacing:normal!important;white-space:normal!important;border:1px solid #e4d6f0!important;border-radius:9px!important;background:white!important;color:#52336c!important;overflow-wrap:anywhere}
.mch-root .mgcs-tabs .mch-tab.is-active{background:#8655c6!important;border-color:#8655c6!important;color:white!important}
.mch-root .mgcs-tabs .mch-tab svg{display:block!important;flex:0 0 17px!important;width:17px!important;height:17px!important;margin:0!important}
.mch-root .mgcs-tabs .mch-tab .mch-dot{margin:0!important;flex-shrink:0}
.mch-root .mgcs-host img.mgcs-photo,#mgcs-guest .mgcs-host img.mgcs-photo{display:block!important;width:100%!important;max-width:100%!important;height:210px!important;min-height:0!important;max-height:210px!important;object-fit:contain!important;object-position:center!important;margin:0!important;float:none!important;position:static!important;aspect-ratio:auto!important}
.mch-root .mgcs-host .mgcs-product img,#mgcs-guest .mgcs-host .mgcs-product img{width:66px!important;min-width:66px!important;max-width:66px!important;height:80px!important;object-fit:contain!important;margin:0!important;float:none!important}
.mgcs-host .mgcs-product>span{min-width:0;flex:1}.mgcs-host .mgcs-brand{line-height:1.5!important}.mgcs-host .mgcs-rich{line-height:1.65!important}.mgcs-host .mgcs-rich p{margin:0 0 8px!important}.mgcs-host .mgcs-rich del{margin-right:7px}.mgcs-host .mgcs-rich .screen-reader-text{display:none!important}
.mgcs-host .mgcs-accordion .mgcs-rich img{height:auto!important;width:auto!important;max-width:100%!important;max-height:none!important;object-fit:contain!important;display:block!important;margin:6px auto!important}
/* 1.5.2: compact icon toolbar; labels retained for screen readers and tooltips. */
.mch-root .mch-tabs.mgcs-tabs{grid-template-columns:repeat(6,minmax(0,1fr))!important;gap:4px!important;padding:6px!important}
.mch-root .mgcs-tabs .mch-tab{min-height:42px!important;padding:9px 4px!important;position:relative!important;overflow:visible!important}
.mch-root .mgcs-tabs .mch-tab .mch-tl{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}
.mch-root .mgcs-tabs .mch-tab svg{width:21px!important;height:21px!important;flex-basis:21px!important}
.mch-root .mgcs-tabs .mch-dot{position:absolute!important;top:0!important;right:0!important;min-width:15px!important;height:15px!important;font-size:9px!important;padding:0 3px!important;line-height:15px!important}
@media(max-width:600px){
 .mch-root.mch-floating,#mgcs-guest{right:10px!important;bottom:calc(84px + env(safe-area-inset-bottom,0px));bottom:var(--mgcs-mobile-dock,calc(84px + env(safe-area-inset-bottom,0px)))!important}
 .mch-root.mch-floating .mch-panel,#mgcs-guest #mgcs-panel{position:fixed!important;left:8px!important;right:8px!important;top:var(--mgcs-mobile-top,8px)!important;bottom:auto!important;width:calc(100vw - 16px)!important;max-width:none!important;height:calc(100dvh - 104px);height:var(--mgcs-mobile-height,calc(100dvh - 104px))!important;max-height:none!important;margin:0!important;border-radius:16px!important;box-shadow:0 8px 30px #30213e30!important}
 .mch-root.mch-floating.mch-open>.mch-fab{visibility:hidden!important}
 #mgcs-guest:has(#mgcs-panel:not([hidden]))>.mgcs-launch{visibility:hidden!important}
 .mgcs-host .mgcs-content{padding:10px!important}.mgcs-host .mgcs-brand{padding:7px 12px!important}
}

/* 1.5.3: khóa kích thước icon/emoji để theme không phóng to trên điện thoại. */
html body .mch-root svg,html body #mgcs-guest svg,html body .mgcs-host svg{flex:none!important;max-width:none!important;max-height:none!important;min-width:0!important;min-height:0!important;margin:0;display:inline-block;vertical-align:middle;overflow:visible}
html body .mch-root svg[width="12"],html body .mgcs-host svg[width="12"]{width:12px!important;height:12px!important}
html body .mch-root svg[width="13"],html body .mgcs-host svg[width="13"]{width:13px!important;height:13px!important}
html body .mch-root svg[width="14"],html body .mgcs-host svg[width="14"]{width:14px!important;height:14px!important}
html body .mch-root svg[width="15"],html body .mgcs-host svg[width="15"]{width:15px!important;height:15px!important}
html body .mch-root svg[width="16"],html body .mgcs-host svg[width="16"]{width:16px!important;height:16px!important}
html body .mch-root svg[width="17"],html body .mgcs-host svg[width="17"]{width:17px!important;height:17px!important}
html body .mch-root svg[width="18"],html body .mgcs-host svg[width="18"]{width:18px!important;height:18px!important}
html body .mch-root svg[width="21"],html body .mgcs-host svg[width="21"]{width:21px!important;height:21px!important}
html body .mch-root svg[width="22"],html body .mgcs-host svg[width="22"]{width:22px!important;height:22px!important}
html body .mch-root svg[width="24"],html body .mgcs-host svg[width="24"]{width:24px!important;height:24px!important}
html body .mch-root svg[width="26"],html body .mgcs-host svg[width="26"]{width:26px!important;height:26px!important}
html body .mch-root svg[width="44"],html body .mgcs-host svg[width="44"]{width:44px!important;height:44px!important}
html body .mch-root .mgp-sa svg{width:26px!important;height:26px!important}
html body .mch-root .mch-fab svg{width:22px!important;height:22px!important}
html body .mch-root .mgcs-tabs .mch-tab svg{width:21px!important;height:21px!important}
/* Emoji do WordPress đổi thành <img class="emoji"> (cả khách chưa đăng nhập) */
html body .mch-root img.emoji,html body #mgcs-guest img.emoji,html body .mgcs-host img.emoji,html body .mch-root img.wp-smiley,html body .mgcs-host img.wp-smiley{width:1em!important;height:1em!important;min-width:0!important;min-height:0!important;max-width:1em!important;max-height:1em!important;margin:0 .1em!important;padding:0!important;border:0!important;border-radius:0!important;box-shadow:none!important;background:none!important;vertical-align:-.15em!important;display:inline!important;float:none!important;object-fit:contain!important}
html body .mch-root .mch-menu-ic,html body .mch-root .mch-hi{overflow:hidden}
html body .mch-root .mch-menu-ic svg{width:17px!important;height:17px!important}
html body .mch-root .mch-tray-ic svg{width:22px!important;height:22px!important}
html body .mch-root .mch-sheet-ic svg{width:18px!important;height:18px!important}
html body .mch-root .mch-dlg-ico svg{width:24px!important;height:24px!important}
html body .mch-root .mch-emob svg{width:21px!important;height:21px!important}
/* Nhân vật trong trang cá nhân: giữ ảnh/GIF trong khung và bấm được */
html body .mch-root .mgp-char{position:relative;-webkit-tap-highlight-color:transparent}
html body .mch-root .mgp-char img,html body .mch-root .mgp-char canvas,html body .mch-root .mgp-char video{max-width:100%;height:auto;pointer-events:auto;cursor:pointer;-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}
html body .mch-root .mgp-char svg{max-width:none!important}

/* 1.5.6: Compact purchase steps */
.mgcs-order-steps{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;padding:3px 0}
.mgcs-order-steps>div{display:flex;gap:6px;align-items:flex-start;min-width:0;background:#fff;border:1px solid #eadcf1;border-radius:10px;padding:8px 6px}
.mgcs-order-steps b{display:grid;place-items:center;flex:0 0 22px;width:22px;height:22px;border-radius:50%;background:linear-gradient(135deg,#dc55a5,#8555ce);color:white;font-size:10px;line-height:1}
.mgcs-order-steps span{min-width:0;display:block;line-height:1.25;font-size:11px}
.mgcs-order-steps strong{font-size:11px;display:inline}
.mgcs-order-steps small{display:block;color:#796b82;font-size:10px;line-height:1.4;margin-top:3px}
@media(max-width:360px){.mgcs-order-steps{gap:5px}.mgcs-order-steps>div{padding:6px 4px}.mgcs-order-steps small{font-size:9px}}
/* Guest: compact chat bubble instead of wide launcher */
html body #mgcs-guest>.mgcs-launch{display:flex!important;align-items:center!important;justify-content:center!important;width:48px!important;height:48px!important;min-width:48px!important;min-height:48px!important;max-width:48px!important;padding:0!important;margin:0!important;border-radius:50%!important;border:2px solid #563177!important;background:linear-gradient(135deg,#df58a8,#8452d0)!important;color:#fff!important;box-shadow:0 5px 16px #49276c35!important;font-size:0!important;line-height:1!important;cursor:pointer!important;overflow:hidden!important}
html body #mgcs-guest>.mgcs-launch svg{display:block!important;width:24px!important;height:24px!important;min-width:24px!important;min-height:24px!important;color:#fff!important;stroke:#fff!important;fill:none!important}
html body #mgcs-guest>.mgcs-launch .screen-reader-text{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}
@media(max-width:480px){html body #mgcs-guest>.mgcs-launch{width:44px!important;height:44px!important;min-width:44px!important;min-height:44px!important;max-width:44px!important}}
