#messenger-launch{margin-top:24px;width:100%;display:flex;align-items:center;gap:8px;color:white;background:#244773;border:1px solid #41658e;padding:13px;border-radius:8px;text-align:left}.msg-badge{display:inline-block;background:#df3c4b;color:white;border-radius:20px;padding:2px 7px;font-size:11px;white-space:nowrap}.msg-badge[hidden]{display:none}
#messenger-panel{position:fixed;right:22px;bottom:20px;width:min(860px,calc(100vw - 30px));height:min(740px,calc(100dvh - 95px));z-index:1100;background:white;border:1px solid #bbccdf;box-shadow:0 14px 60px #18344b44;border-radius:14px;overflow:hidden;display:flex;flex-direction:column;color:#183451}#messenger-panel[hidden]{display:none}#messenger-panel header{display:flex;align-items:center;justify-content:space-between;background:#183451;color:white;padding:14px 18px}#messenger-panel header small{display:block;font-size:11px;color:#c8daec}.msg-layout{display:grid;grid-template-columns:220px minmax(0,1fr);flex:1;min-height:0}.msg-layout>aside{overflow:auto;background:#f3f6fa;padding:12px;border-right:1px solid #dce5ee}.msg-layout button{max-width:100%}#msg-new{width:100%;margin-bottom:12px}#msg-people>div{max-height:180px;overflow:auto;margin:8px 0}#msg-people button{display:block;background:transparent;border:0;padding:6px;font-size:12px;text-align:left}#msg-people i{display:inline-block;width:7px;height:7px;background:#a2adba;border-radius:50%;margin-right:6px}#msg-people i.online{background:#20a36a}.msg-room{display:block;position:relative;width:100%;text-align:left;padding:12px 8px;margin-bottom:6px;overflow-wrap:anywhere}.msg-room.selected{background:#dceafd;border-color:#719bda}.msg-room small{display:block;max-height:35px;overflow:hidden;color:#69819a}.msg-room .msg-badge{margin-left:5px}.msg-conversation{display:flex;flex-direction:column;min-height:0;min-width:0}#msg-room-title{padding:12px;border-bottom:1px solid #ddd;font-weight:bold;font-size:13px;max-height:72px;overflow:auto;overflow-wrap:anywhere}#msg-messages{flex:1;overflow:auto;padding:16px;background:#edf3f9;min-height:60px;overscroll-behavior:contain}.msg-message{max-width:87%;margin:0 0 15px;overflow-wrap:anywhere}.msg-message.mine{margin-left:auto}.msg-message>small{font-size:10px;color:#61758d;display:block;margin-bottom:4px}.msg-message.mine>small{text-align:right}.msg-bubble{padding:11px 13px;border-radius:12px;background:white;border:1px solid #dce4ed}.mine .msg-bubble{background:#dcedff;border-color:#c4dcf7}.msg-body{white-space:pre-wrap;font-size:13px;line-height:1.65}.msg-attachment,.msg-task{display:block;margin-top:6px;overflow-wrap:anywhere;white-space:normal;text-align:left;font-size:12px}.msg-attachment small{display:block;color:#61758d}#msg-compose{padding:12px;border-top:1px solid #ddd;flex-shrink:0}#msg-compose[hidden]{display:none}#msg-compose textarea{width:100%;max-height:100px;resize:vertical;box-sizing:border-box}.msg-compose-actions{display:flex;justify-content:space-between;align-items:center}.msg-file-button{cursor:pointer;color:#2464ad;margin:5px 0}.msg-file-button input{display:block;max-width:220px;font-size:11px}#msg-compose small{font-size:10px;color:#61758d}#msg-files-label,#msg-share{max-height:65px;overflow:auto;overflow-wrap:anywhere;font-size:12px}#msg-error{color:#be2935;margin:4px 0;font-size:12px}.msg-person-choice{display:flex;gap:10px;margin:12px}.msg-person-choice input{width:auto}#staff-comment-notice{position:fixed;left:16px;bottom:18px;width:310px;max-width:calc(100vw - 32px);padding:14px;background:white;border:1px solid #adc7e9;border-left:4px solid #2b69cb;border-radius:10px;box-shadow:0 8px 30px #1234;z-index:1050}#staff-notice-open{display:block;width:100%;text-align:left;border:0;background:white;padding:10px 0}#staff-notice-open span,#staff-notice-open small{display:block;margin-top:6px;overflow-wrap:anywhere}#staff-notice-open span{max-height:75px;overflow:auto}body:has(#staff-comment-notice) #request-notice{bottom:250px}
@media(max-width:650px){#messenger-panel{right:5px;bottom:5px;width:calc(100vw - 10px);height:calc(100dvh - 75px)}.msg-layout{grid-template-columns:135px minmax(0,1fr)}.msg-layout>aside{padding:5px}.msg-room{font-size:11px}#msg-messages{padding:8px}.msg-file-button input{max-width:145px}#msg-people button{font-size:10px}.msg-message{max-width:96%}}
#messenger-panel>header{cursor:move;touch-action:none}.msg-window-tools{display:flex;gap:5px}.msg-window-tools button{min-width:30px;padding:5px 8px;cursor:pointer}#msg-resize{position:absolute;right:0;bottom:0;width:18px;height:18px;cursor:nwse-resize;touch-action:none;background:linear-gradient(135deg,transparent 50%,#94abc4 52%,transparent 57%,transparent 65%,#94abc4 67%,transparent 72%)}#msg-room-title{display:flex;align-items:center;justify-content:space-between;gap:8px;max-height:110px}#msg-room-title small{display:block;font-size:10px;font-weight:normal;margin-top:4px}.msg-room-tools{display:flex;gap:4px;flex-shrink:0}.msg-room-tools button{font-size:11px;padding:5px}#msg-people summary{cursor:pointer;font-size:12px;font-weight:bold}.msg-people-fold{font-weight:normal;font-size:10px;color:#637c97}#msg-people details>div{max-height:180px;overflow:auto;margin:8px 0}.msg-person{font-size:12px;padding:6px;cursor:default}.msg-edited{display:block;text-align:right;color:#77899d;font-size:10px;margin-top:5px}#msg-action{position:absolute;z-index:4;top:75px;right:15px;left:15px;max-height:calc(100% - 95px);overflow:auto;background:white;border:1px solid #b5c8de;border-radius:10px;padding:18px;box-shadow:0 10px 35px #1234}#msg-action textarea{width:100%;box-sizing:border-box}#msg-context{position:fixed;z-index:1500;background:white;box-shadow:0 3px 20px #1234;border:1px solid #ccc;border-radius:6px;padding:4px;width:130px}#msg-context button{display:block;border:0;width:100%;text-align:left;padding:9px}#msg-context button:hover{background:#eaf2ff}@media(max-width:650px){.msg-person{font-size:10px}#msg-room-title{flex-wrap:wrap}.msg-window-tools{gap:2px}}
.msg-room-folder{margin-top:10px}.msg-room-folder>summary{font-size:12px;font-weight:bold;padding:9px 2px;cursor:pointer;color:#355572}.msg-room-folder>summary small{color:#7890a6;margin-left:5px}.msg-room-drop{min-height:38px;padding:3px 0}.msg-drop-hint{font-size:10px;color:#8296aa;padding:10px 5px;border:1px dashed #bbcddd;border-radius:6px}.msg-room[draggable=true]{cursor:grab}.msg-room.dragging{opacity:.45}.msg-room.drop-before{border-top:3px solid #3477d6}.msg-room-folder.drag-over{outline:2px dashed #6998d7;border-radius:7px}
.msg-resize-edge{position:absolute;z-index:6;touch-action:none}.msg-resize-n,.msg-resize-s{height:6px;left:12px;right:12px;cursor:ns-resize}.msg-resize-n{top:0}.msg-resize-s{bottom:0}.msg-resize-e,.msg-resize-w{width:6px;top:12px;bottom:12px;cursor:ew-resize}.msg-resize-e{right:0}.msg-resize-w{left:0}.msg-resize-nw,.msg-resize-ne,.msg-resize-sw,.msg-resize-se{width:12px;height:12px}.msg-resize-nw{top:0;left:0;cursor:nwse-resize}.msg-resize-ne{top:0;right:0;cursor:nesw-resize}.msg-resize-sw{bottom:0;left:0;cursor:nesw-resize}.msg-resize-se{bottom:0;right:0;cursor:nwse-resize}
#msg-action{left:50%;right:auto;transform:translateX(-50%);width:400px;max-width:calc(100% - 32px);box-sizing:border-box;padding:16px}#msg-action h3{margin:0 0 12px;font-size:16px}#msg-action p{line-height:1.6}#msg-action .error:empty{display:none}#msg-action button+button{margin-left:6px}
body.messenger-detached{margin:0;overflow:hidden;background:#edf3f9}body.messenger-detached>#app{display:none}body.messenger-detached #messenger-panel{inset:0!important;width:100vw!important;height:100dvh!important;max-width:none;border:0;border-radius:0;box-shadow:none}body.messenger-detached #messenger-panel>header{cursor:default}body.messenger-detached #msg-detach,body.messenger-detached #msg-maximize,body.messenger-detached .msg-resize-edge{display:none}body.messenger-detached #request-notice{display:none}

body.messenger-detached{background:#e6edf5}body.messenger-detached #messenger-panel{inset:8px!important;width:calc(100vw - 16px)!important;height:calc(100dvh - 16px)!important;border:1px solid #bdccdd;border-radius:16px;box-shadow:0 2px 8px #16345018;box-sizing:border-box}

.msg-home-list{display:grid;gap:12px}.msg-home-room{text-align:left;padding:16px;width:100%;min-width:0;background:white;border:1px solid #d6e1ef;border-radius:12px}.msg-home-room:hover{border-color:#6f9bcf;background:#f6faff}.msg-home-title{display:flex;justify-content:space-between;gap:12px;align-items:center}.msg-home-title strong{overflow-wrap:anywhere}.msg-home-title>span{white-space:nowrap;font-size:12px;color:#58728d}.msg-home-room p{font-size:12px;color:#526b83;line-height:1.6;margin:8px 0;overflow-wrap:anywhere}.msg-home-room>small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#7a8fa4}#msg-back-list{display:block;font-size:11px;padding:4px 7px;margin-bottom:6px}

#messenger-panel.msg-file-drag .msg-conversation{position:relative}#messenger-panel.msg-file-drag .msg-conversation::after{content:'여기에 파일을 놓으면 첨부됩니다. 전송 버튼으로 보내세요.';position:absolute;inset:8px;z-index:7;pointer-events:none;display:flex;align-items:center;justify-content:center;padding:24px;text-align:center;background:#eaf3fff2;border:3px dashed #3477d6;border-radius:12px;color:#173e71;font-weight:bold}

/* Keep message bubbles proportional to their content at every window size. */
#msg-messages .msg-message{display:flex;flex-direction:column;align-items:flex-start;width:fit-content;max-width:min(80%,520px);margin-bottom:14px;min-width:0}
#msg-messages .msg-message.mine{align-items:flex-end;margin-left:auto}
#msg-messages .msg-message>small{max-width:100%;font-size:11px;line-height:1.4;margin-bottom:5px;overflow-wrap:anywhere}
#msg-messages .msg-bubble{width:fit-content;max-width:100%;min-width:0;box-sizing:border-box;padding:9px 12px;border-radius:14px}
#msg-messages .msg-message:not(.mine) .msg-bubble{border-top-left-radius:5px}
#msg-messages .msg-message.mine .msg-bubble{border-top-right-radius:5px}
#msg-messages .msg-body{font-size:13px;line-height:1.55;overflow-wrap:anywhere;word-break:normal}
#msg-messages .msg-bubble .msg-attachment:first-child,#msg-messages .msg-bubble .msg-task:first-child{margin-top:0}
#msg-messages .msg-attachment,#msg-messages .msg-task{max-width:100%;box-sizing:border-box}
@media(max-width:650px){#msg-messages .msg-message{max-width:90%}}

.msg-photo-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;width:300px;max-width:100%;margin-top:6px}.msg-photo-grid.single{grid-template-columns:minmax(0,1fr);width:260px}.msg-photo-item{min-width:0}.msg-photo-open{padding:0;border:0;background:#e5edf6;border-radius:9px;overflow:hidden;width:100%;display:block;cursor:zoom-in}.msg-photo-open img{display:block;width:100%;aspect-ratio:1;object-fit:cover}.msg-photo-grid.single img{aspect-ratio:auto;max-height:280px;object-fit:contain}.msg-photo-download{display:block;font-size:10px;margin-top:4px}.msg-photo-grid:first-child{margin-top:0}#msg-action.msg-photo-viewer{top:80px;width:calc(100% - 32px);max-height:calc(100% - 96px)}.msg-photo-viewer strong{min-width:0;overflow-wrap:anywhere}.msg-photo-viewer .msg-photo-large{display:block;max-width:100%;width:auto;max-height:min(55vh,520px);object-fit:contain;margin:12px auto}.msg-photo-viewer .msg-photo-large[hidden]{display:none}

/* Pending attachments: removable list and capacity summary. */
#msg-files-label{max-height:108px;margin-top:7px;overflow:auto}
.msg-pending-file{display:flex;align-items:center;gap:8px;padding:7px 9px;margin-bottom:5px;background:#edf4ff;border:1px solid #bad0ef;border-radius:7px;min-width:0}
.msg-pending-file strong{flex:1;min-width:0;color:#183e70;font-size:13px;font-weight:700;overflow-wrap:anywhere}
.msg-pending-file>span{flex-shrink:0;font-size:11px;color:#48617d}
#msg-files-label .msg-pending-file button{flex-shrink:0;width:26px;height:26px;padding:0;line-height:1;font-size:18px;background:#fff;border:1px solid #adc4e3;border-radius:5px;color:#405e81;cursor:pointer}
#msg-files-label .msg-pending-file button:hover{background:#fff0f0;color:#b12636;border-color:#cf7c84}
#msg-files-label .msg-pending-file button:disabled{opacity:.45;cursor:default}
#msg-files-total{margin:6px 0;font-size:12px;font-weight:700;color:#234f85;line-height:1.5;overflow-wrap:anywhere}
#msg-files-total.over-limit{color:#be2935}

.msg-file-controls{display:flex;flex-direction:column;align-items:flex-start;gap:4px;margin:5px 0}
#msg-add-files{border:0;background:none;padding:0;color:#2464ad;font-size:13px;font-weight:700;cursor:pointer}
#msg-select-files{font-size:12px;padding:6px 10px}
#msg-file-count{color:#496786;margin-left:6px}
.msg-pending-popup-list{max-height:300px;overflow:auto;margin-top:12px}
.msg-pending-popup-total{font-size:12px;font-weight:700;color:#234f85}
#msg-people summary,.msg-room-folder>summary{font-size:14px!important;font-weight:700}
#msg-people .msg-person{font-size:13px!important;line-height:1.6}
#msg-room-title small{font-size:12px!important;line-height:1.5}
#msg-messages .msg-message>small{font-size:12px!important}
#msg-room-title.has-project{max-height:150px;flex-wrap:wrap}
#msg-room-title.has-project .msg-room-tools{display:flex;flex-wrap:wrap;gap:4px;margin-top:6px}
#msg-project-folder [data-project-add]{width:100%;font-weight:700;margin-bottom:7px}
.project-dialog{position:fixed;inset:auto;left:8vw;top:8vh;width:min(1000px,84vw);height:min(780px,84vh);max-width:96vw;max-height:94vh;margin:0;background:#fff;border:1px solid #9eb7d5;border-radius:12px;padding:0;box-shadow:0 15px 55px #1236;resize:both;overflow:hidden;min-width:min(370px,90vw);min-height:250px;color:#183451}
.project-dialog[open]{display:flex;flex-direction:column}
.project-dialog-heading{display:flex;justify-content:space-between;align-items:center;padding:12px 18px;background:#183451;color:white;cursor:move;flex-shrink:0}
.project-dialog-heading button{padding:4px 10px}
.project-dialog-body{overflow:auto;padding:18px;min-height:0;flex:1}
.project-dialog-body input:not([type=checkbox]),.project-dialog-body select,.project-dialog-body textarea{max-width:100%;box-sizing:border-box}
.project-dialog-body label{display:block;margin:8px 0}
.project-dialog-body textarea{width:100%}
.project-dialog-body .msg-person-choice{display:flex}
.project-dialog-body [data-link-row]{display:flex;gap:6px;margin:5px 0}
.project-dialog-body [data-link-row] input{width:43%}
.project-task-sections{margin:16px 0}
.project-task-sections>details,.project-dialog-body>details{border:1px solid #ccdbee;border-radius:8px;padding:14px;margin:12px 0}
.project-task-sections summary,.project-dialog-body>details>summary{font-size:15px;font-weight:700;cursor:pointer}
.project-asset-list{max-height:280px;overflow:auto}
.project-asset-list p{padding:8px;border-bottom:1px solid #e5edf6;overflow-wrap:anywhere}
.project-asset-list small,.project-message-record small{display:block;color:#607894;font-size:12px}
.project-room-record,.project-message-record,.project-note{border:1px solid #d4e0ed;border-radius:7px;margin:10px 0;padding:12px;overflow-wrap:anywhere}
.project-message-record>input{margin-right:9px}
.project-note{background:#f4f8fd}
.project-note blockquote{margin:8px 0;padding-left:12px;border-left:3px solid #b4cce7}
[data-project-task]{cursor:grab}
@media(max-width:650px){.project-dialog{left:2vw;top:4vh;width:96vw;height:90vh}.project-dialog-body{padding:10px}}


/* Keep sender names distinct from timestamps without enlarging message bubbles. */
#msg-messages .msg-author-name{font-size:14px;font-weight:600;color:#36516d}
#msg-messages .msg-message-time{font-size:12px;font-weight:400;color:#61758d}

#msg-messages .msg-bubble{position:relative}
#msg-messages .msg-unread-count{position:absolute;left:calc(100% + 6px);bottom:3px;color:#9a6800;font-size:12px;font-weight:700;line-height:1.2;white-space:nowrap}
#msg-messages .mine .msg-unread-count{left:auto;right:calc(100% + 6px)}

/* Show the complete staff list; the sidebar itself can scroll on small windows. */
#msg-people details>div{max-height:none;overflow:visible}#msg-people button.msg-person{width:100%;cursor:pointer;border-radius:6px}#msg-people button.msg-person:hover,#msg-people button.msg-person:focus-visible{background:#dceafd}
.staff-work-list{display:grid;gap:10px}.staff-work-item{padding:14px;border:1px solid #dce5ee;border-radius:10px}.staff-work-item .business-track{margin:8px 0}.staff-work-summary{display:flex;gap:18px;flex-wrap:wrap;margin:14px 0}

/* Header shortcut next to the system name. */
#messenger-top-launch{display:inline-flex;align-items:center;gap:8px;flex-shrink:0;margin-left:8px;font-size:14px;font-weight:500;letter-spacing:normal;white-space:nowrap;color:#244773;background:#f3f7fc;border:1px solid #ccd9e9}
@media(max-width:700px){.topbar .brand{flex-wrap:wrap}#messenger-top-launch{margin-left:0}}

#staff-comment-notice.completion-notice{width:400px;padding:12px 14px;border-left:4px solid #2b69cb}
.completion-notice>.row>strong{font-size:14px}
.completion-notice #staff-notice-open{padding:8px 0 0}
.completion-notice #staff-notice-open b{font-size:16px}
.completion-notice #staff-notice-open .completion-notice-message{font-size:13px;line-height:1.6;max-height:none;overflow:visible;word-break:keep-all;margin-top:10px}
.completion-notice #staff-notice-open .completion-notice-status{font-size:12px;color:#64758b;margin-top:10px}
.completion-notice-status i{display:inline-block;background:#e4f5ee;color:#166747;font-style:normal;font-size:11px;padding:2px 6px;border-radius:4px;margin-right:8px}
.completion-notice #staff-notice-open small{border-top:1px solid #dce5ef;padding-top:10px;margin-top:12px;font-size:13px;color:#235ed0}
