/* A familiar conversation window, shared by the full page and the compact messenger. */
.messenger{--ms-chat:#c5d6e3;--ms-meta:#445869;--ms-own:#ffeb72;--ms-own-ink:#242522}
body.dark .messenger{--ms-chat:#253646;--ms-meta:#c2cdd8;--ms-own:#e8cf64;--ms-own-ink:#22251e}
.ms-room-copy b{font-size:15px;font-weight:700;margin-bottom:6px}.ms-room-copy>span{font-size:13px;line-height:1.5}.ms-room{padding:15px 11px;min-height:78px}.ms-room.on{box-shadow:inset 3px 0 var(--brand);background:var(--brand-soft,#edf1ff)}.ms-room-meta small{font-size:11px}.ms-avatar{width:43px;height:43px;border-radius:15px;background:#e8edf8;color:#3f5272;font-weight:700}.ms-unread{background:#db423b}
.ms-history{padding:18px 24px}.ms-text{font-size:15px;line-height:1.75;letter-spacing:.005em}.ms-bubble{padding:11px 15px;box-shadow:0 1px 3px #20354c13}.ms-person{width:36px;height:36px;background:#eef3f9;color:#3b4c62}.ms-sender{font-size:13px;font-weight:650;margin:0 0 7px;color:var(--ink,#202b38)}.ms-meta,.ms-receipt{font-size:11px}.ms-meta{max-width:72px;line-height:1.4}.ms-message-content{max-width:min(76%,660px)}.mine .ms-message-content{max-width:min(80%,690px)}.ms-message-body{gap:8px}.ms-message{margin-bottom:14px}.ms-day{font-size:12px;color:var(--ms-meta);background:#ffffff55;margin:10px 0 22px}.ms-header{min-height:74px}.ms-heading h2{font-size:18px}.ms-composer{padding:10px 16px 12px}.ms-composer>textarea{min-height:66px;font-size:16px;line-height:1.65}.ms-compose-tools>.btn{min-height:42px;font-size:14px;padding:8px 14px}#msSend{margin-left:auto;background:#ffe168;border-color:#edcf54;color:#302d1d;font-weight:750;min-width:78px}#msSend:hover{background:#ffdc50}
.ms-site-details{font-size:12px;color:var(--sub);border-bottom:1px solid var(--line);margin-bottom:6px}.ms-site-details>summary{cursor:pointer;padding:6px 0;min-height:30px;list-style:none}.ms-site-details>summary:before{content:'▸ ';color:var(--brand)}.ms-site-details[open]>summary:before{content:'▾ '}.ms-site-controls{padding:6px 0}.ms-deleted{font-size:13px;color:var(--ms-meta);font-style:italic}.ms-room-actions,.ms-message-actions{position:relative}.ms-room-actions>summary,.ms-message-actions>summary{list-style:none;cursor:pointer;font-size:20px;text-align:center;border-radius:8px;line-height:1;display:grid;place-items:center}.ms-room-actions>summary{width:36px;height:36px}.ms-message-actions>summary{width:34px;height:26px;color:var(--ms-meta);font-size:19px}.ms-message-actions{width:max-content;margin-top:3px}.mine .ms-message-actions{margin-left:auto}.ms-room-actions[open]>summary,.ms-message-actions[open]>summary{background:#ffffff80}.ms-room-actions>div,.ms-message-actions>div{position:absolute;top:100%;right:0;z-index:6;min-width:150px;background:var(--card,#fff);border:1px solid var(--line);padding:5px;border-radius:10px;box-shadow:0 8px 30px #1926352b;display:grid}.ms-message-actions>div{right:auto;left:0;top:auto;bottom:100%}.mine .ms-message-actions>div{right:0;left:auto}.ms-message-actions button{white-space:nowrap;text-align:left;min-height:39px;font-size:13px;padding:9px}.ms-danger{color:#b92f35!important}.ms-room-actions button{white-space:nowrap;text-align:left;min-height:40px}.ms-room-actions summary::-webkit-details-marker,.ms-message-actions summary::-webkit-details-marker{display:none}
.fab-wrap .ms-launcher{width:auto;min-width:112px;height:54px;border-radius:18px;display:flex;align-items:center;justify-content:center;gap:9px;padding:0 17px;background:#3f56bf;box-shadow:0 6px 24px #263b7c40;font-size:22px;transform:none}.ms-launcher b{font-size:14px;font-weight:650}.ms-launcher[aria-expanded=true]{background:#263a8f}.ms-launcher [data-messenger-count]{top:-6px;right:-5px;min-width:23px;height:23px;font-size:12px;line-height:23px}.ms-dock{position:fixed;right:24px;bottom:91px;width:420px;height:min(680px,calc(100dvh - 115px));z-index:90;display:flex;flex-direction:column;border:1px solid #8092c277;border-radius:18px;box-shadow:0 18px 70px #1b2d5440;overflow:hidden;background:var(--card,#fff);animation:ms-window-in .17s ease-out}.ms-dock-title{display:flex;align-items:center;gap:4px;padding:12px 12px 12px 16px;background:#334c98;color:#fff;flex:none}.ms-dock-title>div{flex:1;min-width:0;display:flex;align-items:center;gap:8px}.ms-dock-title b{font-size:14px;white-space:nowrap}.ms-dock-title small{font-size:10px;color:#e4ebff}.ms-status-dot{background:#78e4b5;width:7px;height:7px;border-radius:50%;box-shadow:0 0 0 3px #ffffff16}.ms-window-button{border:0;background:transparent;color:inherit;min-width:34px;height:34px;border-radius:8px;cursor:pointer;font:inherit;font-size:23px;display:grid;place-items:center;flex-shrink:0}.ms-window-button:hover{background:#ffffff25}.ms-dock-body{flex:1;min-height:0}.ms-dock .messenger{height:100%;min-height:0;border:0;border-radius:0;display:block;box-shadow:none}.ms-dock .ms-sidebar{height:100%;border:0}.ms-dock .ms-panel{height:100%;display:none}.ms-dock .has-room .ms-sidebar{display:none}.ms-dock .has-room .ms-panel{display:block}.ms-dock #msBack{display:block;min-width:35px}.ms-dock .ms-header{padding:9px 11px;min-height:61px;gap:7px}.ms-dock .ms-heading h2{font-size:15px}.ms-dock .ms-search{padding:8px 12px}.ms-dock .ms-history{padding:10px 12px}.ms-dock .ms-composer{padding:6px 12px 10px}.ms-dock .ms-message-content{max-width:calc(100% - 42px)}.ms-dock .mine .ms-message-content{max-width:92%}.ms-dock .ms-meta{font-size:10px;max-width:65px}.ms-dock .ms-text{font-size:14px}.ms-dock .ms-compose-foot{display:none}.ms-dock .ms-composer>textarea{min-height:58px;max-height:110px}.ms-dock #msConnection{display:none}.ms-dock .ms-site-controls>select{max-width:none}.ms-dock .ms-side-head{padding:16px 14px}.ms-dock .ms-room-copy b{font-size:14px}.ms-dock #msGallery{padding:7px;font-size:11px}.ms-dock .ms-bubble.with-photos{width:240px}.ms-dock #msNewMessages{bottom:148px}.ms-dock [hidden]{display:none!important}.ms-dock .ms-bubble{padding:10px 12px}.ms-dock .ms-bubble.with-photos{padding:0}
.ms-incoming{position:fixed;right:24px;bottom:91px;width:min(360px,calc(100vw - 28px));z-index:95;border:1px solid var(--line);border-radius:16px;background:var(--card,#fff);color:var(--ink,#263247);box-shadow:0 12px 45px #1b2d5433;animation:ms-window-in .18s ease-out;overflow:hidden}.ms-dock-open .ms-incoming{right:460px}.ms-incoming-top{display:flex;align-items:center;justify-content:space-between;font-size:12px;color:var(--sub);padding:4px 8px 0 15px}.ms-incoming-top .ms-window-button{font-size:21px}.ms-incoming-open{display:flex;gap:12px;text-align:left;padding:6px 16px 16px;border:0;background:transparent;color:inherit;width:100%;cursor:pointer}.ms-incoming-open>span:last-child{min-width:0;flex:1}.ms-incoming-open b{font-size:15px}.ms-incoming-open small{display:block;font-size:11px;color:var(--sub);margin:3px 0 8px}.ms-incoming-text{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;white-space:pre-wrap;overflow-wrap:anywhere;font-size:14px;line-height:1.6}.ms-incoming-open em{font-style:normal;display:block;color:var(--brand);font-size:12px;font-weight:650;margin-top:10px}.ms-sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}
@keyframes ms-window-in{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
@media(max-width:760px){.ms-history{padding:12px}.ms-text{font-size:16px;line-height:1.7}.ms-message-content{max-width:calc(100% - 43px)}.mine .ms-message-content{max-width:94%}.ms-meta,.ms-receipt{font-size:10px}.ms-heading h2{font-size:16px}.ms-header{gap:6px;padding:9px 10px}.ms-header #msGallery{font-size:11px;padding:7px;min-height:36px}.ms-room-actions>summary{width:32px}.ms-message-actions>summary{min-height:32px}.ms-composer>textarea{font-size:16px}.ms-dock{right:8px;bottom:83px;width:calc(100% - 16px);height:min(650px,calc(100dvh - 96px));border-radius:15px}.ms-dock-title{padding:7px 10px}.ms-dock-title small{font-size:10px}.ms-dock .ms-text{font-size:15px}.ms-dock .ms-composer>textarea,.ms-dock .ms-search input,.ms-dock .ms-sidebar>input{font-size:16px}.ms-dock .ms-compose-tools>.btn{min-height:42px}.ms-dock .ms-history{padding:10px}.ms-dock .ms-composer{padding-bottom:calc(9px + env(safe-area-inset-bottom))}.ms-dock .ms-site-controls{gap:5px}.ms-dock .ms-site-controls>input[type=date]{width:130px}.ms-incoming,.ms-dock-open .ms-incoming{right:12px;bottom:83px}.ms-dock-open .ms-incoming{bottom:auto;top:65px}.fab-wrap .ms-launcher{height:50px;min-width:106px;border-radius:17px}.ms-dock .ms-bubble.with-photos{width:min(220px,55vw)}}
@media(prefers-reduced-motion:reduce){.ms-dock,.ms-incoming{animation:none}}

#fabMenu[hidden]{display:none!important}.ms-dock .ms-room-actions>summary{min-height:36px}.ms-dock .ms-incoming-text{color:var(--ink)}@media(max-width:760px){.ms-message-actions>summary{min-width:40px;min-height:36px}}

@media(max-width:760px){body:not(:has(#view .messenger)) .fab-wrap{display:flex;bottom:calc(18px + env(safe-area-inset-bottom));right:16px}body:has(.ops-workspace) .content{padding-bottom:100px}}

/* Persistent unread state: color moves slowly; text never flashes or shakes. */
.ms-launch-icon{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;flex:none}
.fab-wrap .ms-launcher.has-unread,#btnMessenger.has-unread{border:2px solid #5bbaff;animation:ms-unread-glow 3.2s ease-in-out infinite}
@keyframes ms-unread-glow{0%,100%{border-color:#69b9ff;box-shadow:0 0 0 4px #56a5ff30,0 6px 24px #4263eb55}35%{border-color:#cd8eff;box-shadow:0 0 0 6px #b968f52d,0 6px 28px #9e4ce955}70%{border-color:#5be5c4;box-shadow:0 0 0 4px #28c8a933,0 6px 24px #19a78855}}
.ms-unread-expand{border:0;background:transparent;color:var(--ink);display:flex;align-items:center;gap:12px;width:100%;padding:13px 17px;text-align:left;cursor:pointer;font:inherit;font-size:14px;font-weight:650}.ms-unread-expand>b{min-width:31px;height:31px;border-radius:50%;display:grid;place-items:center;background:#da3342;color:#fff;font-size:13px}.ms-unread-expand>span:nth-child(2){flex:1}.ms-unread-expand small{font-size:11px;font-weight:450;color:var(--sub)}.ms-incoming-collapsed{width:260px;border:2px solid #5a70d5}.ms-incoming-top>span{font-size:13px;font-weight:700;color:var(--brand)}.ms-incoming-open{padding-bottom:17px}.ms-incoming-open b{font-size:16px}.ms-incoming-open em{font-size:13px}
.ms-room-filters{display:flex;gap:6px;padding:0 14px 10px}.ms-room-filters>button{flex:1;border:1px solid var(--line);background:var(--card);color:var(--sub);border-radius:9px;min-height:36px;font:inherit;font-size:13px;cursor:pointer}.ms-room-filters>button[aria-pressed=true]{background:var(--brand-soft);color:var(--brand);border-color:var(--brand);font-weight:700}.ms-room-filters b{font-size:12px;color:#c22f43;padding-left:3px}
.ms-admin-tools{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:5px 14px;border-bottom:1px solid var(--line);background:var(--card)}.ms-admin-tools>span{font-size:12px;color:var(--sub);font-weight:600}.ms-admin-tools>.btn{font-size:13px;min-height:34px;border:1px solid #edc6c9;background:#fff7f7}
.ms-message-toolbar{display:flex;align-items:center;gap:8px;margin-top:3px}.mine .ms-message-toolbar{justify-content:flex-end}.ms-message-toolbar .ms-message-actions{margin:0}.ms-delete-visible{font-family:inherit;font-size:12px;font-weight:600;min-height:32px;border:1px solid #c44b552e;color:#aa2634;background:#ffffffb8;border-radius:7px;padding:4px 9px;cursor:pointer}.ms-delete-visible:hover{background:#fff0f0;border-color:#c44b55}.ms-message-toolbar .ms-message-actions>summary{min-height:32px}
.messenger,.ms-dock,.ms-incoming{font-family:"Pretendard Variable",Pretendard,"Malgun Gothic",sans-serif}.ms-text,.ms-dock .ms-text{font-size:16px;font-weight:450;line-height:1.7;letter-spacing:0}.ms-sender{font-size:14px;font-weight:650}.ms-room-copy b,.ms-dock .ms-room-copy b{font-size:15px}.ms-room-copy>span{font-size:14px}.ms-meta,.ms-receipt,.ms-dock .ms-meta{font-size:11px}.ms-heading h2,.ms-dock .ms-heading h2{font-weight:700}.ms-composer>textarea,.ms-dock .ms-composer>textarea{font-size:16px}
.ms-offline .ms-status-dot{background:#ffd36b}.ms-offline [data-ms-connection]{color:#ffe4a7}
body.dark .ms-delete-visible{color:#ffbfc5;background:#50333b;border-color:#80535f}body.dark .ms-admin-tools>.btn{background:#402c34;border-color:#80535f;color:#ffbfc5!important}
@media(max-width:760px){.ms-delete-visible{min-height:36px;font-size:12px}.ms-admin-tools{padding:4px 11px}.ms-incoming-open .ms-incoming-text{font-size:15px}.ms-incoming-collapsed{width:260px;max-width:calc(100% - 24px)}}
@media(prefers-reduced-motion:reduce){.fab-wrap .ms-launcher.has-unread,#btnMessenger.has-unread{animation:none;border-color:#d95cff;box-shadow:0 0 0 4px #b968f52d}}
