#dmM{backdrop-filter:blur(6px);background:#20152c55;z-index:220}
#dmM>.gcard{width:min(580px,94vw)!important;max-height:90dvh!important;border-radius:24px!important;border:1px solid #dfc8df!important;background:#dcd0e4!important;box-shadow:0 24px 80px #1f102f66!important;padding:0!important;overflow:hidden;display:flex;flex-direction:column}
#dmM .dm-heading{position:relative;display:flex;align-items:center;gap:14px;padding:20px 22px!important;background:linear-gradient(120deg,#594368,#88647e)!important;border-bottom:1px solid #b89abb;color:#fff5ec!important;flex-shrink:0}
#dmM .dm-heading:before,#dmM .dm-heading:after{display:none!important}#dmM .dm-heading .contact-avatar{width:58px;height:62px;border-radius:16px;background:linear-gradient(130deg,#c9b6d6,#e9c5d5)}#dmM .dm-heading canvas{width:54px;height:54px}.dm-identity{flex:1;min-width:0}.dm-identity small{font-size:9px;letter-spacing:2px;display:block;color:#d9bbd8;margin-bottom:8px}#dmM #dmTitle{color:#fff5ef!important;font-size:20px!important;display:block;overflow-wrap:anywhere}#dmM .gx{background:#ffffff18!important;border:1px solid #ffffff45!important;border-radius:10px!important;color:#fff!important;width:34px;height:34px;box-shadow:none!important}
#dmM .dm-body{padding:0!important;min-height:0;display:flex;flex-direction:column}#dmM #dmLog{box-sizing:border-box;height:min(400px,48dvh)!important;min-height:190px;border-radius:0!important;background:radial-gradient(ellipse at top left,#bca7d533,transparent 70%),repeating-linear-gradient(135deg,#ffffff0a 0 16px,#9e83ae09 16px 17px),#e7dce9!important;padding:24px!important;line-height:1.75!important;scrollbar-width:thin;scrollbar-color:#b59cba transparent}
#dmLog:empty{display:grid;place-content:center;text-align:center}#dmLog:empty:before{content:'✦';color:#aa83ac;font-size:38px}#dmLog:empty:after{content:'從一句招呼開始吧。';color:#957b9c;font-size:14px;margin-top:14px}
#dmM #dmLog .dm-message{margin:12px 0!important}#dmM #dmLog .dm-message .dm-bubble{padding:12px 16px!important;max-width:100%!important;box-sizing:border-box;display:block;border-radius:4px 17px 17px 17px!important;background:#faf3f7!important;color:#604b6e;box-shadow:0 3px 8px #6547750c;font-size:14px}#dmM #dmLog .dm-message.is-mine .dm-bubble{background:linear-gradient(120deg,#80648e,#9a7897)!important;color:#fff6f3;border-radius:17px 4px 17px 17px!important}
#dmM .dm-composer{position:relative;margin:0!important;padding:18px 20px 25px;align-items:center;gap:10px!important;border-top:1px solid #c8b3ce;background:#ddcee2}#dmM #dmIn{border:1px solid #bda6c6!important;border-radius:13px!important;background:#f9f0f6!important;padding:13px 15px!important;font:inherit!important;color:#60496c;box-shadow:none;outline-offset:2px}#dmM .dm-composer button{border-radius:12px;background:#765580;color:#fff5ee;border:1px solid #94749f;padding:12px 16px;white-space:nowrap;box-shadow:0 3px 0 #68457433}.dm-count{position:absolute;bottom:5px;right:115px;font-size:10px;color:#9b81a2}#dmM .dm-footer{margin:0!important;padding:8px 20px 13px;background:#ddcee2;border-top:1px solid #c9b3cd55}#dmM .dm-footer span{color:#957b9b!important;font-size:10px}
@keyframes messageArrive{from{opacity:0;transform:translateY(5px)}to{opacity:1;transform:none}}
@media(max-width:600px){#dmM>.gcard{width:calc(100vw - 24px)!important}#dmM .dm-heading{padding:16px!important}#dmM #dmLog{padding:17px!important}#dmM .dm-composer{padding:14px 14px 25px}#dmM .dm-footer{padding:8px 14px 12px}#dmM .dm-composer button{padding:12px}}
@media(prefers-reduced-motion:reduce){#dmM .dm-message{animation:none!important}}
/* Private message avatar must fit the artist frame's calibrated inner box. */
#dmM .dm-heading .contact-avatar.ttf{background:none;box-shadow:none;height:58px}
#dmM .dm-heading .contact-avatar.ttf .ttfAva canvas{width:100%;height:100%;object-fit:contain}
#dmM .dm-composer{display:grid!important;grid-template-columns:40px minmax(0,1fr) auto;gap:8px!important}
#dmM .dm-composer #dmIn{width:100%;min-width:0;box-sizing:border-box}
#dmM .dm-composer .dm-sticker-toggle{padding:8px;width:40px;height:44px;font-size:22px;background:#c9b2d1;color:#654774;box-shadow:none}
#dmM .dm-sticker-tray{padding:12px 18px;background:linear-gradient(135deg,#dac9e3,#ead4de);border-top:1px solid #bea2c9;flex-shrink:0}
#dmM .dm-sticker-tray[hidden]{display:none}
#dmM .dm-sticker-heading{display:flex;justify-content:space-between;align-items:center;color:#634571;font-size:13px;margin-bottom:8px}
#dmM .dm-sticker-heading button{border:0;background:none;color:#634571;font-size:22px;cursor:pointer}
#dmM .dm-sticker-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;max-height:160px;overflow:auto}
#dmM .dm-sticker-grid button{padding:7px;border:1px solid #ae8eb735;background:#fff5;border-radius:12px;cursor:pointer;color:#745b7c;font:inherit;font-size:10px}
#dmM .dm-sticker-grid button:hover,#dmM .dm-sticker-grid button:focus-visible{background:#fffc;border-color:#9974ad}
#dmM .dm-sticker-grid img{display:block;width:100%;height:58px;object-fit:contain;margin-bottom:4px}
#dmM .dm-sticker-tray p{font-size:11px;color:#634571;margin:4px 0 0}
#dmM #dmLog .dm-message.dm-is-sticker .dm-bubble{padding:0!important;background:none!important;box-shadow:none}
#dmM .dm-is-sticker img{display:block;width:100px;height:100px;object-fit:contain}
#dmM:has(.dm-sticker-tray:not([hidden])) #dmLog{height:min(250px,30dvh)!important;min-height:100px}
@media(max-width:600px){#dmM .dm-sticker-grid img{height:50px}#dmM .dm-sticker-grid{max-height:145px}#dmM .dm-composer{padding-left:12px;padding-right:12px}#dmM .dm-sticker-tray{padding:10px 14px}}

/* Keep the name beside the avatar rather than centered across the header. */
#dmM .dm-heading{gap:10px;justify-content:flex-start}
#dmM .dm-identity,#dmM #dmTitle{text-align:left!important}
#dmM #dmTitle{margin:0!important;width:auto!important}
#dmM .dm-heading>.contact-avatar,#dmM .dm-heading>.gx{flex-shrink:0}

#dmM #dmLog .dm-message.dm-new{animation:messageArrive .16s ease-out}
#dmM .dm-text{display:block;white-space:pre-wrap;overflow-wrap:anywhere}
#dmM .dm-message-content{max-width:82%;min-width:0}
#dmM .dm-time{display:block;text-align:right;font-size:10px;line-height:1.2;margin-top:5px;padding-right:2px;color:#76617f;font-variant-numeric:tabular-nums}

#dmM .dm-composer button:disabled{opacity:.65;cursor:wait}
