.mission-dialog:has(.chat-window) {
  width: 980px; max-width: calc(100% - 24px); overflow: hidden;
  background: #fff; border-color: #353535; border-radius: 3px;
}
.chat-bar,.thread-heading,.compose-label,.reply-actions,.room-meta,.inbox-label {display:flex;align-items:center;justify-content:space-between}
.chat-bar {height:48px;padding:0 16px;background:#161616;color:white;gap:10px}
.chat-brand {display:flex;align-items:center;gap:10px;margin-right:auto}
.chat-brand i {display:grid;place-items:center;width:23px;height:23px;background:var(--brand);color:#111;font:700 22px/1 Arial}
.chat-brand b {font-size:14px;letter-spacing:-.4px}
.chat-bar>span {font-size:10px;color:#c3c3c3}
.chat-bar .close-button {width:27px;height:27px;font-size:20px}
.chat-window {display:grid;grid-template-columns:218px minmax(0,1fr);height:min(690px,calc(90dvh - 48px));min-height:0}
.chat-inbox {padding:22px 14px;background:#f8f8f6;border-right:1px solid #d4d5d2;display:flex;flex-direction:column;min-height:0}
.inbox-label {font:10px var(--mono);letter-spacing:.1em;color:#606260;padding:0 2px}
.inbox-label span {font-size:10px}
.chat-inbox h2 {font-size:19px;letter-spacing:-1px;margin:15px 2px 5px}
.chat-inbox>p {font-size:11px;color:#666;margin:0 2px 20px}
.room-tabs {display:grid;gap:7px}
.room-tab {width:100%;text-align:left;padding:12px;background:#fff;border:1px solid #d9dbd7;border-left:3px solid #d9dbd7;border-radius:2px}
.room-tab[aria-pressed=true] {background:#fff0e9;border-color:#eebcaa;border-left-color:var(--brand)}
.room-tab b {display:block;font-size:13px;line-height:1.45;letter-spacing:-.3px;margin:6px 0}
.room-meta {font-size:10px;color:#535652}.room-meta time {font:9px var(--mono);color:#686b68}
.room-tab small {font-size:10px;color:#655b55}
.chat-skill {margin-top:auto;padding:14px 2px 0;text-align:left;border-top:1px solid #cecfca}
.chat-skill small,.chat-skill b {display:block}.chat-skill small {color:#64665f;font-size:10px;margin-bottom:5px}.chat-skill b {font-size:12px}
.chat-thread {min-width:0;min-height:0;display:flex;flex-direction:column}
.thread-heading {padding:10px 20px;gap:10px;border-bottom:1px solid #d8dbd9;background:white}
.avatar {display:grid;place-items:center;width:35px;height:35px;border-radius:11px;font-weight:600;font-size:12px;background:#dfebe5;color:#274c3d}
.avatar-1 {background:#e9e3f0;color:#584264}.avatar-2 {background:#dfe9f3;color:#314f69}
.thread-heading h3 {font-size:15px;line-height:1.4}.thread-heading p {font-size:10px;color:#666;margin-top:1px}
.online {margin-left:auto;font-size:10px;color:#607267}.online::before {content:'';display:inline-block;margin-right:4px;width:5px;height:5px;border-radius:50%;background:#508465}
.chat-history {flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;background:#f1f2f0;padding:13px 22px 18px;scrollbar-width:thin;scrollbar-color:#c2c5bf transparent}
.chat-date {font-size:10px;text-align:center;color:#71746e;margin:0 0 12px}
.incoming,.outgoing {max-width:92%;width:fit-content;font-size:13px;line-height:1.65;word-break:keep-all;overflow-wrap:anywhere}
.incoming>small,.outgoing>small {display:block;font-size:10px;color:#585d58;margin:0 0 4px}.incoming time {font:9px var(--mono);margin-left:5px}
.incoming p,.outgoing p {padding:9px 12px;border:1px solid #d9ddd7;border-radius:0 10px 10px;background:#fff}
.outgoing {margin:16px 0 11px auto}.outgoing>small,.outgoing>span {text-align:right}.outgoing>span {display:block;color:#62665f;font-size:9px;margin-top:3px}
.outgoing p {background:#ffe4d6;border-color:#efc4b0;border-radius:10px 0 10px 10px}
.attachment {margin:7px 0;max-width:96%;width:fit-content;border:1px solid #cbd1c9;background:#fbfcfa;border-radius:6px;padding:9px 12px}
.attachment>small {display:block;color:#666e61;font:10px var(--mono),'IBM Plex Sans KR',sans-serif;margin-bottom:3px}
.attachment>b {font-size:12px}.attachment dl {margin:7px 0 0;border-top:1px solid #dfe2dc;padding-top:4px}
.attachment dl>div {display:grid;grid-template-columns:minmax(58px,auto) 1fr;gap:9px;margin-top:3px;font-size:11px;line-height:1.6}
.attachment dt {color:#62665f}.attachment dd {margin:0;font-weight:500}
.decision-note {margin:10px 0 0;border-left:3px solid #ae7850;background:#f7efe7;padding:8px 11px;color:#513c29;font-size:12px;line-height:1.65}
.decision-note.cleared {border-color:#59806a;background:#e7efe8;color:#274334}.decision-note b {font-size:11px}.decision-note p {margin-top:2px}
.chat-compose {padding:12px 18px 14px;border-top:1px solid #cdd1cb;background:#fff;flex-shrink:0}
.compose-label {gap:8px;margin-bottom:8px}.compose-label b {font-size:13px}.compose-label small {font-size:10px;color:#676962}
.reply-list {display:grid;gap:5px}.reply-choice {display:flex;align-items:center;width:100%;gap:10px;text-align:left;padding:8px 10px;min-height:44px;border:1px solid #d1d4d0;border-radius:5px}
.reply-choice>span {font:10px var(--mono);color:#626660}.reply-choice b {font-size:13px;font-weight:500;line-height:1.55;flex:1;word-break:keep-all}.reply-choice i {font:16px Arial;color:#737770}
.reply-choice:hover:not(:disabled),.reply-choice:focus-visible {background:#fff4ed;border-color:#e17958;filter:none}
.reply-actions {gap:9px}.reply-actions button {font-size:12px;min-height:41px;padding:9px 12px;border-radius:3px}.revise {border:1px solid #bfc4bc}.chat-next {background:var(--ink);color:#fff;font-weight:600}
.success-copy .review-room {display:block;margin:15px 0 0;text-decoration:underline;text-underline-offset:4px;font-size:12px}
@media(max-width:740px){
 .chat-window {grid-template-columns:162px minmax(0,1fr)}.chat-inbox {padding:15px 9px}.chat-inbox h2 {font-size:17px}.chat-history {padding:10px 13px 13px}.chat-compose {padding:10px 13px}.room-tab {padding:9px}
}
@media(max-width:600px){
 .mission-dialog:has(.chat-window) {max-width:calc(100% - 12px);max-height:96dvh}.chat-bar {height:39px;padding:0 10px}.chat-brand b {font-size:13px}
 .chat-window {display:flex;flex-direction:column;height:calc(94dvh - 39px);max-height:820px}
 .chat-inbox {display:block;position:relative;border:0;border-bottom:1px solid #d5d7d1;padding:8px 10px;flex-shrink:0}
 .chat-inbox h2 {font-size:12px;margin:0 0 6px}.inbox-label,.chat-inbox>p {display:none}
 .room-tabs {grid-template-columns:1fr 1fr;gap:5px}.room-tab {padding:5px 7px}.room-meta {font-size:9px}.room-meta time {font-size:8px}
 .room-tab b {font-size:11px;margin:2px 0;line-height:1.35}.room-tab small {font-size:9px}.chat-skill {position:absolute;right:11px;top:7px;padding:0;border:0}.chat-skill small {margin:0;font-size:10px}.chat-skill b {display:none}
 .chat-thread {flex:1}.thread-heading {padding:6px 12px;gap:7px}.avatar {width:26px;height:26px;font-size:10px;border-radius:7px}
 .thread-heading h3 {font-size:12px}.thread-heading p {font-size:9px}.chat-date {margin-bottom:6px;font-size:9px}
 .chat-history {padding:8px 11px 11px}.incoming,.outgoing {max-width:96%;font-size:12px}.incoming p,.outgoing p {padding:7px 9px}
 .attachment {max-width:100%;padding:6px 9px}.attachment dl>div {font-size:10px;gap:5px}.chat-compose {padding:8px 10px}
 .compose-label {margin-bottom:5px}.compose-label small {font-size:9px}.reply-choice {padding:6px 8px;gap:7px;min-height:44px}.reply-choice b {font-size:12px}
}
@media(max-height:560px){.mission-dialog:has(.chat-window){overflow:auto}.chat-window{height:auto;max-height:none}.chat-history{flex:auto;max-height:50vh;min-height:120px}}

