/* ══════════════════════════════════════════════════════════════════════════
   MK STORE · แชทกับแอดมิน (Messenger style)
   Opens from every "ติดต่อแอดมิน" link. Colours follow the backend theme.
   ══════════════════════════════════════════════════════════════════════════ */
.mk-chat {
    position: fixed;
    z-index: 1072;
    right: 20px;
    bottom: 20px;
    width: 368px;
    height: min(580px, calc(100vh - 110px));
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 18px;
    background: #0d0e14;
    border: 1px solid rgba(var(--mk-accent-rgb), .45);
    box-shadow: 0 26px 70px rgba(0, 0, 0, .7), 0 0 30px rgba(var(--mk-accent-rgb), .18);
    color: #ffffff;
    font-family: var(--font-main, 'Kanit', 'Prompt', system-ui, sans-serif);
    text-align: left;
    transform-origin: 100% 100%;
}
.mk-chat[hidden] { display: none !important; }
.mk-chat.is-in { animation: mkChatIn .22s cubic-bezier(.2, .8, .3, 1) both; }
.mk-chat *, .mk-chat *::before, .mk-chat *::after { box-sizing: border-box; }
@keyframes mkChatIn { from { opacity: 0; transform: translateY(14px) scale(.97); } to { opacity: 1; transform: none; } }

/* header */
.mk-chat-head {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 10px 10px 14px;
    background: linear-gradient(180deg, #15161e, #111219);
    border-bottom: 1px solid rgba(255, 255, 255, .07);
}
.mk-chat-back { display: none; }
.mk-chat-av { position: relative; flex: 0 0 38px; width: 38px; height: 38px; }
.mk-chat-av img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; background: #1a1c25; border: 1px solid rgba(var(--mk-accent-rgb), .45); }
.mk-chat-dot {
    position: absolute; right: -1px; bottom: -1px; width: 12px; height: 12px; border-radius: 50%;
    background: #22c55e; box-shadow: 0 0 0 2.5px #13141b;
}
.mk-chat-dot[hidden] { display: none !important; }
.mk-chat-who { flex: 1 1 auto; min-width: 0; }
.mk-chat-name { font-size: .98rem; font-weight: 800; line-height: 1.3; color: #ffffff !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mk-chat-sub { font-size: .74rem; line-height: 1.4; color: #9aa0b0 !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mk-chat-sub.is-on { color: #4ade80 !important; }
.mk-chat-icon {
    flex: 0 0 auto; width: 36px; height: 36px; margin: 0; padding: 0; border: 0; border-radius: 50%;
    display: grid; place-items: center; background: transparent; color: var(--mk-accent-hi) !important; cursor: pointer; text-decoration: none !important;
}
.mk-chat-icon:hover { background: rgba(var(--mk-accent-rgb), .14); }
.mk-chat-icon svg { width: 21px; height: 21px; display: block; }

/* messages */
.mk-chat-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding: 12px 12px 6px;
    scrollbar-width: thin;
    scrollbar-color: rgba(var(--mk-accent-rgb), .4) transparent;
}
.mk-chat-body::-webkit-scrollbar { width: 6px; }
.mk-chat-body::-webkit-scrollbar-thumb { background: rgba(var(--mk-accent-rgb), .4); border-radius: 9px; }
.mk-chat-intro { text-align: center; padding: 10px 8px 16px; }
.mk-chat-intro img { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; display: block; margin: 0 auto 8px; border: 1px solid rgba(var(--mk-accent-rgb), .5); background: #1a1c25; }
.mk-chat-intro b { display: block; font-size: 1rem; font-weight: 800; color: #ffffff !important; }
.mk-chat-intro span { display: block; font-size: .78rem; line-height: 1.5; color: #8d93a3 !important; }
.mk-chat-more {
    display: block; margin: 0 auto 10px; padding: 5px 12px; border-radius: 99px; border: 1px solid rgba(255, 255, 255, .12);
    background: transparent; color: #cbd5e1 !important; font: inherit; font-size: .76rem; cursor: pointer;
}
.mk-chat-more[hidden] { display: none !important; }
.mk-chat-sep { text-align: center; margin: 12px 0 8px; font-size: .7rem; font-weight: 600; color: #7d8394 !important; }
.mk-chat-row { display: flex; align-items: flex-end; gap: 7px; margin-top: 2px; }
.mk-chat-row.is-me { justify-content: flex-end; }
.mk-chat-row.is-first { margin-top: 8px; }
.mk-chat-ra { flex: 0 0 28px; width: 28px; height: 28px; }
.mk-chat-ra img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; display: block; background: #1a1c25; }
.mk-chat-row:not(.is-last) .mk-chat-ra img { visibility: hidden; }
.mk-chat-bub {
    position: relative;
    max-width: 76%;
    padding: 8px 12px;
    border-radius: 18px;
    font-size: .92rem;
    line-height: 1.5;
    white-space: pre-wrap;
    overflow-wrap: break-word;
    word-break: normal;
    background: #23252f;
    color: #f1f5f9 !important;
}
.mk-chat-bub a { color: inherit !important; text-decoration: underline !important; word-break: break-all; }
.mk-chat-row.is-me .mk-chat-bub {
    background: linear-gradient(135deg, var(--mk-accent-lo, var(--mk-accent)), var(--mk-accent));
    color: var(--mk-on-accent) !important;
}
/* Messenger-style joined corners inside a group */
.mk-chat-row:not(.is-me):not(.is-first) .mk-chat-bub { border-top-left-radius: 5px; }
.mk-chat-row:not(.is-me):not(.is-last) .mk-chat-bub { border-bottom-left-radius: 5px; }
.mk-chat-row.is-me:not(.is-first) .mk-chat-bub { border-top-right-radius: 5px; }
.mk-chat-row.is-me:not(.is-last) .mk-chat-bub { border-bottom-right-radius: 5px; }
.mk-chat-bub.is-img { padding: 0; background: transparent !important; overflow: hidden; line-height: 0; }
.mk-chat-bub.is-img img { display: block; max-width: 220px !important; max-height: 280px !important; width: auto !important; height: auto !important; border-radius: inherit; cursor: zoom-in; background: #1a1c25; min-width: 60px; min-height: 60px; object-fit: cover; }
.mk-chat-bub.is-img .mk-chat-cap { display: block; padding: 8px 12px; line-height: 1.5; }
.mk-chat-row.is-me .mk-chat-bub.is-img .mk-chat-cap { background: linear-gradient(135deg, var(--mk-accent-lo, var(--mk-accent)), var(--mk-accent)); }
.mk-chat-row:not(.is-me) .mk-chat-bub.is-img .mk-chat-cap { background: #23252f; }
.mk-chat-row.is-sending .mk-chat-bub { opacity: .6; }
.mk-chat-row.is-failed .mk-chat-bub { opacity: .55; outline: 1px solid rgba(239, 68, 68, .7); cursor: pointer; }
.mk-chat-note { text-align: right; font-size: .68rem; line-height: 1.4; margin: 3px 2px 0; color: #7d8394 !important; }
.mk-chat-note.is-err { color: #f87171 !important; cursor: pointer; }
.mk-chat-tm { font-size: .66rem; color: #6b7182 !important; margin: 0 4px 3px; white-space: nowrap; }

/* composer */
.mk-chat-compose {
    flex: 0 0 auto;
    display: flex;
    align-items: flex-end;
    gap: 6px;
    margin: 0;
    padding: 8px 10px 10px;
    border-top: 1px solid rgba(255, 255, 255, .06);
    background: #0d0e14;
}
.mk-chat-compose[hidden] { display: none !important; }
.mk-chat-field {
    flex: 1 1 auto; min-width: 0; display: flex; align-items: center;
    border-radius: 20px; background: #1d1f28; border: 1px solid rgba(255, 255, 255, .06); padding: 0 12px;
}
.mk-chat-field:focus-within { border-color: rgba(var(--mk-accent-rgb), .55); }
.mk-chat-field textarea {
    box-sizing: border-box; min-width: 0; width: 100%; min-height: 38px; max-height: 120px;
    -webkit-appearance: none; appearance: none; resize: none; border: 0; outline: 0; margin: 0;
    overflow-y: auto; scrollbar-width: none;
    padding: 8px 0; background: transparent; color: #ffffff; font: inherit; font-size: 16px; line-height: 1.4;
}
/* The shared focus glow belongs on the rounded field, not the inner textarea. */
.mk-chat-field textarea:focus { box-shadow: none !important; }
.mk-chat-field textarea::-webkit-scrollbar { display: none; }
.mk-chat-field textarea::placeholder { color: #747a8b; }
.mk-chat-btn {
    flex: 0 0 auto; width: 38px; height: 38px; margin: 0; padding: 0; border: 0; border-radius: 50%;
    display: grid; place-items: center; background: transparent; color: var(--mk-accent-hi); cursor: pointer;
}
.mk-chat-btn:hover { background: rgba(var(--mk-accent-rgb), .14); }
.mk-chat-btn:disabled { opacity: .4; cursor: default; background: transparent; }
.mk-chat-btn svg { width: 23px; height: 23px; display: block; }
.mk-chat-btn[hidden] { display: none !important; }

/* attached order (inside a bubble, in the picker and above the composer) */
.mk-chat-bub.has-ord { padding: 6px; }
.mk-chat-ord {
    display: flex; align-items: center; gap: 10px; min-width: 210px; max-width: 260px; padding: 8px; border-radius: 13px;
    background: rgba(0, 0, 0, .28); border: 1px solid rgba(255, 255, 255, .1); line-height: 1.4; white-space: normal; text-align: left;
}
.mk-chat-row:not(.is-me) .mk-chat-ord { background: #191b24; }
.mk-chat-ord-img {
    flex: 0 0 44px; width: 44px; height: 44px; border-radius: 10px; overflow: hidden; display: grid; place-items: center;
    background: rgba(var(--mk-accent-rgb), .18) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 8 12 3 3 8v8l9 5 9-5z'/%3E%3Cpath d='m3 8 9 5 9-5'/%3E%3Cpath d='M12 13v8'/%3E%3C/svg%3E") center / 22px no-repeat;
}
.mk-chat-ord-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mk-chat-ord-txt { min-width: 0; display: flex; flex-direction: column; }
.mk-chat-ord-txt b { font-size: .84rem; font-weight: 800; color: inherit !important; overflow-wrap: break-word; }
.mk-chat-ord-no { font-size: .72rem; font-family: ui-monospace, Menlo, Consolas, monospace; opacity: .85; color: inherit !important; overflow-wrap: anywhere; }
.mk-chat-ord-meta { font-size: .72rem; opacity: .8; color: inherit !important; }
.mk-chat-bub.has-ord .mk-chat-cap { display: block; padding: 6px 6px 2px; line-height: 1.5; }
.mk-chat-bub.is-img .mk-chat-ord { margin: 6px; }

/* quick topics to start a conversation */
.mk-chat-chips { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; margin: 14px 0 4px; }
.mk-chat-chips-h { flex: 0 0 100%; text-align: center; font-size: .74rem; line-height: 1.5; color: #8d93a3 !important; margin-bottom: 2px; }
.mk-chat-chip {
    margin: 0; padding: 7px 13px; border-radius: 999px; cursor: pointer; font: inherit; font-size: .84rem; font-weight: 700; line-height: 1.35;
    color: var(--mk-accent-hi) !important; background: rgba(var(--mk-accent-rgb), .1); border: 1px solid rgba(var(--mk-accent-rgb), .55);
    text-align: left; max-width: 100%;
}
.mk-chat-chip:hover { background: rgba(var(--mk-accent-rgb), .2); }

/* hold to copy */
.mk-chat.is-touch .mk-chat-bub { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.mk-chat-bub { transition: transform .18s ease, filter .18s ease; }
.mk-chat-bub.is-hold { transform: scale(.97); filter: brightness(1.15); }
.mk-chat-toast {
    position: absolute; z-index: 3; left: 50%; bottom: 84px; transform: translateX(-50%);
    padding: 8px 16px; border-radius: 999px; white-space: nowrap; max-width: calc(100% - 24px); overflow: hidden; text-overflow: ellipsis;
    background: rgba(20, 22, 30, .96); border: 1px solid rgba(var(--mk-accent-rgb), .55); color: #ffffff !important;
    font-size: .84rem; font-weight: 700; box-shadow: 0 10px 30px rgba(0, 0, 0, .5); pointer-events: none;
}
.mk-chat-toast[hidden] { display: none !important; }
.mk-chat-toast.is-in { animation: mkChatToast .2s ease-out both; }
@keyframes mkChatToast { from { opacity: 0; transform: translate(-50%, 6px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* composer area: attached order + order picker */
.mk-chat-foot { position: relative; flex: 0 0 auto; }
.mk-chat-att {
    display: flex; align-items: center; gap: 9px; margin: 0; padding: 8px 10px 8px 14px;
    border-top: 1px solid rgba(255, 255, 255, .06); background: rgba(var(--mk-accent-rgb), .08);
}
.mk-chat-att[hidden] { display: none !important; }
.mk-chat-att-ic { flex: 0 0 auto; color: var(--mk-accent-hi); display: grid; place-items: center; }
.mk-chat-att-ic svg { width: 20px; height: 20px; }
.mk-chat-att-txt { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; line-height: 1.35; }
.mk-chat-att-txt b { font-size: .76rem; font-weight: 800; color: var(--mk-accent-hi) !important; }
.mk-chat-att-txt span { font-size: .8rem; color: #e5e7eb !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mk-chat-att-x { flex: 0 0 auto; width: 28px; height: 28px; margin: 0; padding: 0; border: 0; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .08); color: #cbd5e1; cursor: pointer; }
.mk-chat-att-x svg { width: 13px; height: 13px; }
.mk-chat-sheet {
    position: absolute; z-index: 2; left: 8px; right: 8px; bottom: calc(100% + 6px);
    max-height: min(330px, 52vh); display: flex; flex-direction: column; overflow: hidden;
    border-radius: 16px; background: #13141b; border: 1px solid rgba(var(--mk-accent-rgb), .45); box-shadow: 0 -10px 40px rgba(0, 0, 0, .55);
    animation: mkChatToast0 .18s ease-out both;
}
@keyframes mkChatToast0 { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.mk-chat-sheet[hidden] { display: none !important; }
.mk-chat-sheet-head { flex: 0 0 auto; display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 14px; border-bottom: 1px solid rgba(255, 255, 255, .06); }
.mk-chat-sheet-head b { flex: 1 1 auto; font-size: .88rem; font-weight: 800; color: #ffffff !important; }
.mk-chat-sheet-list { flex: 1 1 auto; overflow-y: auto; overscroll-behavior: contain; padding: 8px; display: flex; flex-direction: column; gap: 6px; }
.mk-chat-sheet-item { display: block; width: 100%; margin: 0; padding: 0; border: 0; background: transparent; cursor: pointer; text-align: left; color: #ffffff; font: inherit; border-radius: 13px; }
.mk-chat-sheet-item .mk-chat-ord { max-width: none; width: 100%; background: #1b1d26; transition: border-color .15s ease, background .15s ease; }
.mk-chat-sheet-item:hover .mk-chat-ord, .mk-chat-sheet-item:focus-visible .mk-chat-ord { border-color: rgba(var(--mk-accent-rgb), .6); background: rgba(var(--mk-accent-rgb), .1); }
.mk-chat-sheet-empty { padding: 18px 8px; text-align: center; font-size: .82rem; color: #9aa0b0 !important; }

/* contact page: "แชทกับแอดมิน" card (full width, first) */
.contact-channel-card.contact-chat { grid-column: 1 / -1; border-color: rgba(var(--mk-accent-rgb), .55); background: linear-gradient(135deg, rgba(var(--mk-accent-rgb), .16), rgba(10, 10, 15, .8) 70%); cursor: pointer; }
.contact-channel-card.contact-chat:hover { border-color: rgba(var(--mk-accent-rgb), .85); box-shadow: 0 16px 40px rgba(0, 0, 0, .5), 0 0 24px rgba(var(--mk-accent-rgb), .25); }
.contact-chat .contact-channel-glow { background: linear-gradient(135deg, rgba(var(--mk-accent-rgb), .22), transparent 60%); }
.contact-chat .contact-channel-icon { background: linear-gradient(145deg, var(--mk-accent-lo, var(--mk-accent)), var(--mk-accent)) !important; border-color: rgba(var(--mk-accent-rgb), .6) !important; color: var(--mk-on-accent) !important; overflow: visible; }
.contact-chat .contact-channel-icon i { color: var(--mk-on-accent) !important; }
.contact-chat .mk-cc-dot { position: absolute; right: -3px; bottom: -3px; width: 13px; height: 13px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 2.5px #0b0c12; }
.contact-chat .mk-cc-dot[hidden] { display: none !important; }
.contact-chat .contact-channel-label { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.contact-chat .mk-chat-badge { margin-left: 0; }
.contact-chat .contact-channel-arrow { color: var(--mk-accent-hi) !important; }

/* purchase history: "แจ้งปัญหาคำสั่งซื้อนี้" */
.mk-order-help { display: flex; justify-content: flex-end; margin-top: 10px; }
.mk-order-help-btn {
    display: inline-flex; align-items: center; gap: 7px; margin: 0; padding: 7px 13px; border-radius: 999px; cursor: pointer;
    font: inherit; font-size: .8rem; font-weight: 700; line-height: 1.3; white-space: nowrap;
    color: var(--mk-accent-hi) !important; background: rgba(var(--mk-accent-rgb), .08); border: 1px solid rgba(var(--mk-accent-rgb), .45);
}
.mk-order-help-btn:hover { background: rgba(var(--mk-accent-rgb), .18); }
.mk-order-help-btn i, .mk-order-help-btn span { color: inherit !important; }

/* admin sidebar: conversations waiting for an answer */
.mk-chat-side-badge {
    display: inline-flex; align-items: center; justify-content: center; min-width: 19px; height: 19px; padding: 0 6px; margin-left: 4px;
    border-radius: 999px; background: var(--mk-accent); color: var(--mk-on-accent) !important; font-size: .7rem; font-weight: 800; line-height: 19px;
    box-shadow: 0 0 10px rgba(var(--mk-accent-rgb), .55);
}
.mk-chat-side-badge[hidden] { display: none !important; }

/* not logged in */
.mk-chat-guest { flex: 0 0 auto; padding: 14px; border-top: 1px solid rgba(255, 255, 255, .06); text-align: center; }
.mk-chat-guest p { margin: 0 0 10px; font-size: .86rem; line-height: 1.55; color: #cbd5e1 !important; }
.mk-chat-guest-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.mk-chat-guest a {
    display: flex; align-items: center; justify-content: center; min-height: 40px; padding: 8px 10px; border-radius: 11px;
    font-weight: 800; font-size: .88rem; text-decoration: none !important; white-space: nowrap;
}
.mk-chat-guest a.is-main { background: linear-gradient(135deg, var(--mk-accent-lo, var(--mk-accent)), var(--mk-accent)); color: var(--mk-on-accent) !important; }
.mk-chat-guest a.is-alt { border: 1px solid rgba(var(--mk-accent-rgb), .5); color: var(--mk-accent-hi) !important; }

/* picture viewer */
.mk-chat-view {
    position: fixed; inset: 0; z-index: 1080; display: grid; place-items: center; padding: 16px;
    background: rgba(0, 0, 0, .88); cursor: zoom-out;
}
.mk-chat-view[hidden] { display: none !important; }
.mk-chat-view img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 10px; }

/* new message bubble while the window is closed (Messenger chat head) */
.mk-chat-pop {
    position: fixed; z-index: 1071; right: 18px; bottom: 18px; max-width: min(320px, calc(100vw - 36px));
    display: flex; align-items: center; gap: 4px; padding: 6px 6px 6px 8px; border-radius: 999px;
    background: #15161e; border: 1px solid rgba(var(--mk-accent-rgb), .55);
    box-shadow: 0 14px 40px rgba(0, 0, 0, .6), 0 0 18px rgba(var(--mk-accent-rgb), .25);
    animation: mkChatPop .35s cubic-bezier(.3, 1.4, .5, 1) both;
}
.mk-chat-pop[hidden] { display: none !important; }
@keyframes mkChatPop { from { opacity: 0; transform: translateY(16px) scale(.9); } to { opacity: 1; transform: none; } }
.mk-chat-pop-main {
    display: flex; align-items: center; gap: 9px; min-width: 0; margin: 0; padding: 0; border: 0; background: transparent;
    color: #ffffff; font: inherit; text-align: left; cursor: pointer;
}
.mk-chat-pop-main img { flex: 0 0 38px; width: 38px; height: 38px; border-radius: 50%; object-fit: cover; border: 1px solid rgba(var(--mk-accent-rgb), .5); }
.mk-chat-pop-txt { min-width: 0; display: flex; flex-direction: column; }
.mk-chat-pop-txt b { font-size: .8rem; font-weight: 800; line-height: 1.3; color: var(--mk-accent-hi) !important; }
.mk-chat-pop-txt span { font-size: .84rem; line-height: 1.4; color: #e5e7eb !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mk-chat-pop-x { flex: 0 0 auto; width: 28px; height: 28px; margin: 0; padding: 0; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .06); color: #9aa0b0; display: grid; place-items: center; cursor: pointer; }
.mk-chat-pop-x svg { width: 14px; height: 14px; }

/* unread number on the "ติดต่อแอดมิน" links */
.mk-chat-badge {
    display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 5px; margin-left: 6px;
    border-radius: 999px; background: var(--mk-accent); color: var(--mk-on-accent) !important;
    font: 800 11px/18px system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; vertical-align: middle; flex: 0 0 auto;
    box-shadow: 0 0 10px rgba(var(--mk-accent-rgb), .6);
}
.mk-chat-badge[hidden] { display: none !important; }

/* phones: full screen like Messenger */
@media (max-width: 767.98px) {
    .mk-chat {
        inset: 0;
        right: 0; bottom: 0; left: 0; top: 0;
        width: 100%;
        height: 100%;
        height: 100dvh;
        border-radius: 0;
        border: 0;
        box-shadow: none;
        transform-origin: 50% 100%;
    }
    .mk-chat-head { padding: 8px 8px 8px 4px; padding-top: calc(8px + env(safe-area-inset-top, 0px)); }
    .mk-chat-back {
        display: grid; place-items: center; flex: 0 0 auto; width: 38px; height: 38px; margin: 0; padding: 0; border: 0;
        border-radius: 50%; background: transparent; color: var(--mk-accent-hi); cursor: pointer;
    }
    .mk-chat-back svg { width: 24px; height: 24px; }
    .mk-chat-x { display: none !important; }
    .mk-chat-compose { padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px)); }
    .mk-chat-guest { padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px)); }
    .mk-chat-bub { max-width: 80%; }
    .mk-chat-bub.is-img img { max-width: min(240px, 62vw) !important; }
    html.mk-chat-lock, html.mk-chat-lock body { overflow: hidden !important; }
}
@media (prefers-reduced-motion: reduce) {
    .mk-chat.is-in, .mk-chat-pop, .mk-chat-toast.is-in, .mk-chat-sheet { animation: none !important; }
    .mk-chat-bub { transition: none !important; }
}
