.mm-chat { position:fixed; right:max(1.2rem,env(safe-area-inset-right)); bottom:calc(1.2rem + env(safe-area-inset-bottom)); z-index:35; }
.mm-chat [hidden], .mm-inbox [hidden], body:has(.mobile-menu[open],#art-dialog[open]) .mm-chat-launch { display:none!important; }
.mm-chat-launch { position:relative; display:grid; place-items:center; width:52px; height:52px; color:#fff; background:#a6402c; border:0; border-radius:50%; box-shadow:0 3px 12px #25271d33; cursor:pointer; }
.mm-presence-dot { position:absolute; top:1px; right:1px; box-sizing:border-box; width:13px; height:13px; border:2px solid white; border-radius:50%; background:#92958e; pointer-events:none; }
.mm-chat-launch[data-online="true"] .mm-presence-dot { background:#29dd52; }
.mm-unread { position:absolute; bottom:0; right:1px; width:12px; height:12px; background:#272923; border:2px solid white; border-radius:50%; }
.mm-chat dialog { position:fixed; inset:auto max(1rem,env(safe-area-inset-right)) calc(1rem + env(safe-area-inset-bottom)) auto; margin:0; padding:0; box-sizing:border-box; width:min(25rem,calc(100vw - 1.5rem)); max-width:none; max-height:none; border:1px solid #dadad1; border-radius:.55rem; box-shadow:0 10px 40px #1a201f30; color:#252823; background:white; font:inherit; }
.mm-chat dialog::backdrop { background:#20251f33; }
.mm-dialog-inner { display:flex; flex-direction:column; height:min(36rem,85vh); height:min(36rem,85dvh); min-height:0; }
.mm-chat header { flex:none; display:flex; justify-content:space-between; align-items:center; padding:.85rem 1rem; background:#faf9f6; border-bottom:1px solid #e2e1da; }
.mm-chat header h2,.mm-inbox h2 { font-weight:600; line-height:1.2; font-family:inherit; font-size:1.25rem; margin:0; }
.mm-chat header p { margin:.3rem 0 0; font-size:.9rem; }
.mm-chat [data-close] { cursor:pointer; background:transparent; border:none; font:inherit; font-size:1.6rem; width:44px; height:44px; }
.mm-history { display:flex; align-items:flex-start; flex-direction:column; gap:.45rem; padding:.8rem 1rem; min-height:0; overflow:auto; overscroll-behavior:contain; flex:1; overflow-wrap:anywhere; }
.mm-bubble { background:#f2f1ec; color:#292c26; border-radius:.5rem; padding:.5rem .7rem; max-width:90%; }
.mm-bubble.mine { background:#faede7; align-self:flex-end; }
.mm-bubble small { color:#595d50; font-size:.74rem; }
.mm-bubble p { white-space:pre-wrap; margin:.2rem 0 0; line-height:1.4; }
.mm-bubble img { display:block; max-width:min(100%,11rem); max-height:10rem; object-fit:contain; margin:.3rem 0; }
.mm-compose { display:grid; flex:none; gap:.5rem; border-top:1px solid #e2e1da; padding:.85rem 1rem; overflow:auto; max-height:64%; }
.mm-compose label { display:grid; gap:.2rem; font-size:.875rem; }
.mm-compose input:not([type=file]), .mm-compose textarea { width:100%; box-sizing:border-box; padding:.45rem .6rem; line-height:1.3; min-height:40px; border:1px solid #bdbeb4; font:inherit; font-size:1rem; border-radius:.2rem; background:white; color:inherit; }
.mm-tools, .mm-actions { display:flex; flex-wrap:wrap; gap:.5rem; align-items:center; justify-content:space-between; }
.mm-compose button[type=submit],.mm-compose .mm-file { display:inline-flex; position:relative; align-items:center; justify-content:center; min-height:42px; padding:.5rem .85rem; border:1px solid #a6402c; border-radius:.25rem; font:inherit; font-size:.9rem; background:#a6402c; color:#fff; cursor:pointer; }
.mm-compose .mm-file { color:inherit; background:white; border-color:#c8c9c0; }
.mm-file input { position:absolute; inset:0; width:100%; opacity:0; cursor:pointer; }
.mm-file:focus-within, .mm-chat-launch:focus-visible { outline:2px solid #242720; outline-offset:3px; }
.mm-compose [data-save-contact] { justify-self:start; padding:.35rem 0; border:0; background:none; color:inherit; font:inherit; font-size:.875rem; text-decoration:underline; cursor:pointer; }
.mm-file-info,.mm-status,.mm-mail { font-size:.85rem; overflow-wrap:anywhere; }
.mm-status:empty { display:none; }
.mm-file-info button,.mm-mail { border:0; background:none; color:inherit; text-decoration:underline; cursor:pointer; }
.mm-inbox { max-width:70rem; }
.mm-actions { justify-content:flex-start; margin:.8rem 0; }
.mm-switch { display:inline-flex; align-items:center; gap:.65rem; min-height:48px; padding:.6rem .9rem; border:1px solid #bbbdb4; background:white; color:inherit; border-radius:.3rem; font:inherit; font-weight:600; cursor:pointer; }
.mm-switch::before { content:''; width:2.15rem; height:1.3rem; border-radius:1rem; background:radial-gradient(circle at .64rem center,white .42rem,transparent .45rem),#73766e; }
.mm-switch[aria-checked=true]::before { background:radial-gradient(circle at 1.51rem center,white .42rem,transparent .45rem),#376041; }
.mm-inbox-grid { display:grid; grid-template-columns:minmax(12rem,1fr) minmax(18rem,2fr); gap:1rem; }
.mm-inbox-grid section { min-width:0; }
.mm-inbox .mm-history { height:min(43vh,26rem); margin:.7rem 0; padding:.3rem 0; }
.mm-inbox .mm-compose { max-height:none; padding:1rem 0 0; }
.mm-thread { display:block; width:100%; text-align:left; padding:.65rem .35rem; font:inherit; color:inherit; background:white; border:0; border-bottom:1px solid #d7d8ce; min-height:44px; overflow-wrap:anywhere; cursor:pointer; }
.mm-thread[aria-pressed=true] { color:#923820; font-weight:600; }
@media(max-width:680px) {
 .mm-chat { right:.8rem; bottom:calc(.8rem + env(safe-area-inset-bottom)); }
 .mm-chat dialog { right:.45rem; bottom:calc(.45rem + env(safe-area-inset-bottom)); width:calc(100vw - .9rem); }
 .mm-inbox-grid { grid-template-columns:minmax(0,1fr); }
 .mm-inbox [data-threads] { max-height:12rem; overflow:auto; }
 .mm-inbox .mm-history { height:32vh; }
}

.mm-faq { overflow:auto; padding:1rem; min-height:0; }
.mm-faq h3 { font-size:1.1rem; font-weight:600; line-height:1.3; margin:0 0 .7rem; }
.mm-faq details { border-bottom:1px solid #dbdbd3; }
.mm-faq summary { cursor:pointer; padding:.85rem .2rem; font-size:1rem; font-weight:500; }
.mm-faq details p { font-size:.95rem; margin:0 0 .7rem; line-height:1.5; }
.mm-faq details a { display:inline-block; color:#893a29; margin-bottom:.8rem; text-decoration:underline; }
.mm-faq [data-write] { margin-top:1rem; width:100%; padding:.8rem; color:#fff; background:#a6402c; border:0; border-radius:.25rem; cursor:pointer; font:inherit; }
.mm-chat [data-show-faq] { align-self:flex-start; background:none; color:inherit; padding:.55rem 1rem; border:0; cursor:pointer; font:inherit; text-decoration:underline; }
