.chat-work { display:grid;grid-template-columns:minmax(230px,.42fr) minmax(0,1fr);min-height:395px;height:clamp(395px,72dvh,780px);border:1px solid #b8c9ca;border-radius:22px;overflow:hidden;background:#f6faf9;color:#15333e;box-shadow:0 10px 38px #15333e10; }
.chat-work [hidden] {display:none!important}
.chat-master,.chat-detail {min-width:0;min-height:0;display:flex;flex-direction:column}
.chat-master {background:#fff;border-right:1px solid #dae4e4}
.chat-work header {display:flex;gap:12px;align-items:center;padding:16px 18px;min-height:72px;border-bottom:1px solid #d9e4e3}
.chat-master header,.chat-detail>header {background:linear-gradient(120deg,#15323f,#27565e);color:#fff}
.chat-master h1,.chat-detail h2 {margin:0;font-size:clamp(21px,2vw,29px);line-height:1.2;color:inherit}
.chat-master header {justify-content:space-between}.chat-master header .button{padding:7px 12px;min-height:40px;background:#f4faf7;color:#124748;border:0}
.chat-master [data-chat-list],.chat-create,.chat-log {overflow:auto;overscroll-behavior:contain;min-height:0}
.chat-person {display:flex;gap:11px;width:100%;align-items:center;min-height:59px;padding:9px 14px;text-align:left;background:transparent;color:inherit;border:0;border-bottom:1px solid #dfe9e9;font:inherit;cursor:pointer}
.chat-person:hover,.chat-person[aria-current=page],.chat-person[aria-pressed=true]{background:#e3f3ef}
.chat-avatar {display:grid;place-items:center;width:38px;height:38px;flex:none;border-radius:13px;background:#d9eae6;color:#205952;font-weight:700;font-size:14px}
.chat-avatar.group {background:#eae3f3;color:#594179}
.chat-name {min-width:0;flex:1;display:grid;gap:3px}.chat-name strong,.chat-name small, .chat-detail header small{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.chat-name small,.chat-create .chat-empty{color:#4c666a}.chat-detail header>div{min-width:0}.chat-detail header small{display:block;color:#d8e7e5}
.chat-unread,.chat-checkbox{min-width:22px;height:22px;padding:1px 5px;border-radius:8px;text-align:center}.chat-unread{background:#145a59;color:#fff}.chat-checkbox{border:1px solid #6b8d8b;color:#125953}
.chat-prompt {display:grid;justify-items:center;align-content:center;gap:10px;height:100%;padding:24px;text-align:center;background:radial-gradient(ellipse at 90% 0,#d7e9e3,transparent 65%)}
.chat-prompt>.ico{width:32px;height:32px;color:#237476}.chat-prompt p,.chat-empty{margin:0;padding:8px 16px;color:#4b656a}
.chat-back {color:white;flex:none;border:1px solid #ffffff5e;border-radius:10px;padding:6px 10px}
.chat-create {padding:16px;display:grid;align-content:start;gap:12px}
.chat-modes{display:flex;gap:4px;padding:3px;border-radius:13px;background:#e3eceb}.chat-modes button{flex:1;min-height:42px;border:0;border-radius:10px;color:#375456;background:transparent;font:inherit;cursor:pointer}.chat-modes [aria-pressed=true]{background:#143b49;color:white;font-weight:700}
.chat-log {flex:1;padding:14px;display:flex;flex-direction:column;align-items:flex-start;gap:7px;overflow-anchor:none}
.chat-message{max-width:min(86%,62ch);padding:9px 14px;border:1px solid #d6e5e4;border-radius:15px 15px 15px 4px;background:white;overflow-wrap:anywhere}.chat-message p{margin:2px 0;white-space:pre-wrap;line-height:1.4}.chat-message strong,.chat-message time{font-size:11px;color:#466466}.chat-message time{display:block;text-align:right}.chat-message.outgoing{align-self:flex-end;background:#dbefea;border-color:#c7e3dc;border-radius:15px 15px 4px 15px}
.chat-composer{display:flex;gap:8px;align-items:flex-end;padding:10px;background:white;border-top:1px solid #d4e1df}.chat-composer textarea{font:inherit;resize:vertical;min-height:45px;max-height:130px;flex:1;min-width:0;border:1px solid #a6bcba;border-radius:12px;padding:10px}
@media(max-width:760px){.chat-work{grid-template-columns:1fr;height:clamp(315px,calc(100dvh - 233px),720px);border-radius:16px}.chat-work[data-open=false] .chat-detail,.chat-work[data-open=true] .chat-master{display:none}.chat-composer button span{display:none}.chat-composer button{min-width:45px}.chat-master{border:0}.chat-detail header{min-height:58px;padding:8px 12px}.chat-back{min-height:40px}}
