/* 대표와 직원의 메신저(design/messenger.js). PC 스튜디오와 휴대폰 화면이 같이 쓴다. 색과 크기는 theme.css의 값이다. */
.messenger [hidden] { display: none !important; }
.messenger { position: relative; display: grid; grid-template-columns: var(--size340) minmax(0, 1fr); flex: 1; min-height: 0; background: var(--card); }
.chatList { display: flex; flex-direction: column; min-height: 0; border-right: var(--stroke) solid var(--line); background: var(--card); }
.chatListHead { display: flex; align-items: center; justify-content: space-between; gap: var(--size12); padding: var(--size18) var(--size20) var(--size10); }
.chatListHead h1 { flex: 1; margin: 0; font-size: var(--size20); }
.chatIcon { display: grid; place-items: center; flex: none; width: var(--size40); height: var(--size40); padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--ink); }
.chatIcon svg { width: var(--size22); height: var(--size22); fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.chatIcon[aria-expanded=true] { background: var(--soft); }
.chatInfo, .chatRead { margin-left: auto; }
.chatPower:not([hidden]) ~ .chatInfo, .chatPower:not([hidden]) ~ .chatRead, .chatRead:not([hidden]) ~ .chatInfo { margin-left: 0; }
/* 채팅방 위의 읽어 주기와 방 설정은 머리 줄 간격 없이 붙여 둔다(2026-11-14 대표 "메신저채팅방안에 아이콘끼리는갭을줄여"). */
.chatHead .chatRead, .chatHead .chatInfo { width: var(--size34); }
.chatHead .chatRead:not([hidden]) + .chatInfo { margin-left: calc(-1 * var(--chatHeadGap)); }
/* 말로 쓰기(마이크)와 읽어 주기는 켜져 있는 동안 색이 찬다. */
.chatRead { color: var(--muted); }
.chatRead[data-on=yes] { background: var(--soft); color: var(--action); }
.chatMake { display: flex; flex-direction: column; gap: var(--size8); padding: 0 var(--size20) var(--size12); border-bottom: var(--stroke) solid var(--line); }
.chatMake input, .chatMake textarea { box-sizing: border-box; width: 100%; padding: var(--size9) var(--size14); border: var(--stroke) solid var(--line); border-radius: var(--size12); background: var(--soft); color: var(--ink); font: inherit; resize: none; }
.chatMake .chatIssue { margin: 0; padding: 0; }
.chatMakePin { display: flex; flex-direction: column; gap: var(--size6); }
.chatMakePin b { font-size: var(--size12); color: var(--muted); }
.chatMakePin select { min-width: 0; flex: 1; padding: var(--size6) var(--size8); border: var(--stroke) solid var(--line); border-radius: var(--size8); background: var(--card); color: var(--ink); font: inherit; }
.chatMake button { align-self: flex-end; padding: var(--size8) var(--size18); border: 0; border-radius: var(--size20); background: var(--action); color: var(--actionInk); font-weight: 700; }
.chatSetting { display: flex; flex-direction: column; gap: var(--size2); }
.chatSetting b { color: var(--muted); font-size: var(--size12); font-weight: 700; }
.chatSetting ul { margin: 0; padding-left: var(--size18); }
.chatSetting p, .chatSetting li { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.chatPin { gap: var(--size6); }
.chatPinRow { display: flex; gap: var(--size16); align-items: center; }
.chatPin select, .chatPin input { min-width: 0; flex: 1; padding: var(--size6) var(--size8); border: var(--stroke) solid var(--line); border-radius: var(--size8); background: var(--card); color: var(--ink); font: inherit; }
.chatPinWhy { color: var(--stop); font-size: var(--size12); }
/* 방 설정의 저장 버튼은 고르는 것들 아래 하나다(2026-11-27 대표 "저장버튼은하나만하는게맞는거같은데"). 바꾼 것이 없으면 꺼져 있다. */
.chatSave { padding: var(--size8) var(--size18); border: 0; border-radius: var(--size20); background: var(--action); color: var(--actionInk); font-weight: 700; }
.chatSave:disabled { background: var(--soft); color: var(--disabled); }
.chatSheetLead .chatCloseRoom { align-self: flex-start; margin-top: var(--size8); color: var(--stop); }
.chatList ul { flex: 1; min-height: 0; margin: 0; padding: 0 0 var(--size8); overflow-y: auto; list-style: none; }
/* 메신저 맨 위 프로젝트 줄이다(2026-12-01 대표 "메신저 상단에 프로젝트단위를 설정할수있어야한다"). 고른 프로젝트는 색이 차고, 다른
   프로젝트의 답할 것 수와 안 읽은 표시가 단추 옆에 붙는다. 줄이 넘치면 옆으로 민다. */
.chatUnits { display: flex; flex-wrap: wrap; align-items: center; gap: var(--size6); padding: 0 var(--size20) var(--size10); }
.chatUnit { display: inline-flex; align-items: center; gap: var(--size6); height: var(--size32); padding: 0 var(--size14); border: var(--stroke) solid var(--line); border-radius: var(--size16); background: var(--card); color: var(--ink); font-size: var(--size13); font-weight: 600; }
.chatUnit:hover { background: var(--soft); filter: none; }
.chatUnit[aria-pressed=true] { border-color: var(--ink); background: var(--ink); color: var(--card); }
.chatUnitCount { min-width: var(--size18); height: var(--size18); padding: 0 var(--size5); border-radius: var(--size9); background: var(--stop); color: var(--bg); font-size: var(--size11); line-height: var(--size18); text-align: center; }
.chatUnitDot { width: var(--size6); height: var(--size6); border-radius: 50%; background: var(--action); }
.chatUnitAdd { width: var(--size32); padding: 0; justify-content: center; color: var(--muted); }
.chatUnitAdd svg { width: var(--size18); height: var(--size18); fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.chatUnitForm { display: inline-flex; flex-wrap: wrap; align-items: center; gap: var(--size6); }
.chatUnitForm select { padding: var(--size6) var(--size8); border: var(--stroke) solid var(--line); border-radius: var(--size8); background: var(--card); color: var(--ink); font: inherit; }
.chatUnits .chatUnitNote { flex-basis: 100%; margin: 0; padding: 0; }
.chatItem { display: flex; align-items: center; gap: var(--size12); width: 100%; padding: var(--size10) var(--size20); border: 0; border-radius: 0; background: transparent; color: var(--ink); font-weight: 400; text-align: left; }
.chatItem:hover:not(:disabled) { background: var(--soft); filter: none; }
.chatItem[aria-current] { background: var(--soft); }
.chatItemText { display: flex; flex: 1; flex-direction: column; gap: var(--size2); min-width: 0; }
.chatItemTop, .chatItemBottom { display: flex; align-items: center; gap: var(--size8); min-width: 0; }
.chatItemTop strong { flex: 1; min-width: 0; font-size: var(--size15); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chatItemTop time { flex: none; color: var(--muted); font-size: var(--size12); }
.chatPreview { flex: 1; min-width: 0; min-height: var(--size20); color: var(--muted); font-size: var(--size13); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chatPreview[data-tone=due] { color: var(--ok); font-weight: 700; }
.chatPreview[data-tone=draft] { color: var(--stop); }
.chatItem[data-unread] .chatPreview:not([data-tone]) { color: var(--ink); font-weight: 700; }
.chatItemTodo { flex: none; color: var(--muted); font-size: var(--size12); font-weight: 600; white-space: nowrap; }
.chatBadge { flex: none; min-width: var(--size20); height: var(--size20); padding: 0 var(--size6); border-radius: var(--size10); background: var(--stop); color: var(--bg); font-size: var(--size12); line-height: var(--size20); text-align: center; }
.chatAvatar { display: grid; place-items: center; flex: none; width: var(--size48); height: var(--size48); border-radius: 50%; background: var(--soft); color: var(--muted); font-size: var(--size17); font-weight: 700; }
.chatAvatar svg { width: 52%; height: 52%; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.chatAvatar[data-tone=sun] { background: var(--sun); color: var(--sunInk); }
.chatAvatar[data-tone=sand] { background: var(--sand); color: var(--sunInk); }
.chatAvatar[data-tone=spring] { background: var(--springSoft); color: var(--ok); }
.chatAvatar[data-tone=ok] { background: var(--okSoft); color: var(--ok); }
.chatAvatar[data-tone=accent] { background: var(--accent); color: var(--sunInk); }
.chatAvatar[data-tone=line] { background: var(--heroLine); color: var(--heroAccent); }
.chatAvatar[data-tone=hero] { background: var(--heroAccent); color: var(--sunInk); }
.chatAvatar[data-face=meeting] { background: var(--forest); color: var(--sun); }
.chatRoom { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--soft); }
/* 방의 실시간 창이다(design/messenger.js liveShow). 세션의 글은 보통 글, 도구 줄은 작게, 실패는 빨갛게 대화 아래에 흐른다. */
.chatLive { flex: none; padding: var(--size6) var(--chatSide) var(--size8); border-bottom: var(--stroke) solid var(--line); background: var(--soft); }
.chatLive > button { display: flex; justify-content: space-between; gap: var(--size8); width: 100%; padding: 0 0 var(--size2); border: 0; background: none; color: var(--muted); font-size: var(--size12); font-weight: 400; text-align: left; cursor: pointer; }
.chatLive ol { max-height: 45vh; margin: 0; padding: 0; overflow-y: auto; list-style: none; font-size: var(--size13); line-height: 1.45; }
.chatLive li { padding: var(--size1) 0; overflow-wrap: anywhere; white-space: pre-wrap; }
.chatLive:not(.chatLiveOpen) ol { overflow: hidden; cursor: pointer; }
.chatLive:not(.chatLiveOpen) li { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.chatLive:not(.chatLiveOpen) li:not(:nth-last-child(-n+2)) { display: none; }
.chatLiveTool { color: var(--muted); font-size: var(--size12); }
.chatLiveFail { color: var(--stop); font-size: var(--size12); }
.chatHead { --chatHeadGap: var(--size12); display: flex; align-items: center; gap: var(--chatHeadGap); min-height: var(--size64); padding: var(--size8) var(--size20); border-bottom: var(--stroke) solid var(--line); background: var(--card); }
.chatHead .chatAvatar { width: var(--size40); height: var(--size40); font-size: var(--size15); }
.chatTitle { min-width: 0; }
.chatTitle h2 { margin: 0; font-size: var(--size16); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* 방을 열 때 자판을 올리지 않으려고 방 이름에 둔 초점은 테두리를 그리지 않는다. */
.chatTitle h2:focus { outline: none; }
/* 상태 글은 한 줄이고 넘치면 말줄임이다. 작은 표시(할 일 수, 계정, 모델, 토큰)는 머리 바로 아래 제 줄(.chatChips)에 둔다. 상태 글 옆에
   두고 밀어서 보게 했더니 좁은 휴대폰에서 계정·모델 칩이 잘려 보이지 않았다(2026-11-14 대표 "상단에도투두랑 어느계정에물려있는지도알수가없다"). */
.chatTitle p { margin: 0; color: var(--muted); font-size: var(--size12); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* 방 이름 바로 옆의 수정 버튼과, 누르면 이름 대신 보이는 입력창이다(2026-11-27 대표 "방이름변경은 그방 이름있는데서수정버튼으로하는게
   직관적이겠구만"). 고치는 동안은 제목이 머리 줄의 남는 폭을 다 쓴다. 알림 글(거절한 까닭)은 빨갛고 줄을 바꿔 다 보인다. */
.chatNameLine { display: flex; align-items: center; gap: var(--size2); min-width: 0; }
.chatHead .chatRename { width: var(--size28); height: var(--size28); color: var(--muted); }
.chatHead .chatRename svg { width: var(--size16); height: var(--size16); }
.chatTitleEdit { flex: 1; }
.chatNameEdit { display: flex; align-items: center; gap: var(--size10); min-width: 0; }
.chatNameEdit input { min-width: 0; flex: 1; padding: var(--size4) var(--size8); border: var(--stroke) solid var(--line); border-radius: var(--size8); background: var(--card); color: var(--ink); font: inherit; font-size: var(--size15); font-weight: 700; }
.chatNameEdit .chatToggle { flex: none; }
.chatTitle .chatNameNote { color: var(--stop); white-space: normal; }
/* 제작자 방의 대화 바로 위 제작 차례 줄이다(renderSteps). 차례마다 점 하나를 가로줄로 연결하고 지난 차례까지 줄과 점을 채운다. 지금 차례는
   큰 점과 굵은 글이다. 차례는 같은 폭으로 나누고 좁은 휴대폰에서는 긴 이름(네이버 블로그)이 두 줄이 된다. */
.chatSteps { display: flex; flex-direction: column; gap: var(--size6); padding: var(--size8) var(--chatSide) var(--size10); border-bottom: var(--stroke) solid var(--line); background: var(--card); }
.chatStepTopic { margin: 0; font-size: var(--size13); font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chatStepLine { display: flex; margin: 0; padding: 0; list-style: none; }
.chatStepLine li { position: relative; flex: 1 1 0; min-width: 0; padding: var(--size18) var(--size2) 0; color: var(--muted); font-size: var(--size12); line-height: 1.3; text-align: center; word-break: keep-all; }
.chatStepLine li::before { content: ""; position: absolute; top: var(--size6); left: 0; right: 0; height: var(--size2); background: var(--line); }
.chatStepLine li:first-child::before { left: 50%; }
.chatStepLine li:last-child::before { right: 50%; }
.chatStepLine li::after { content: ""; position: absolute; top: var(--size3); left: 50%; box-sizing: border-box; width: var(--size8); height: var(--size8); border: var(--stroke) solid var(--line); border-radius: 50%; background: var(--card); transform: translateX(-50%); }
.chatStepLine li[data-step=done] { color: var(--ink); }
.chatStepLine li[data-step=done]::before { background: var(--ok); }
.chatStepLine li[data-step=now]:not(:first-child)::before { background: linear-gradient(to right, var(--ok) 50%, var(--line) 50%); }
.chatStepLine li[data-step=now]:last-child::before { background: var(--ok); }
.chatStepLine li[data-step=done]::after { border-color: var(--ok); background: var(--ok); }
.chatStepLine li[data-step=now] { color: var(--ok); font-weight: 700; }
.chatStepLine li[data-step=now]::after { top: 0; width: var(--size14); height: var(--size14); border: var(--size3) solid var(--ok); background: var(--card); }
/* 채팅방 맨 위 '투두리스트 N'을 누르면 펼쳐지는 이 방의 열린 일이다(renderRoomTodos). 제목은 두 줄까지 보이고 많으면 이 칸 안에서 내린다. */
.chatRoomTodos { display: flex; flex: none; flex-direction: column; align-items: flex-start; gap: var(--size4); padding: var(--size8) var(--chatSide); border-bottom: var(--stroke) solid var(--line); background: var(--card); }
.chatRoomTodos ol { align-self: stretch; max-height: 30vh; margin: 0; padding: 0; overflow-y: auto; list-style: none; }
.chatRoomTodos li { display: flex; align-items: baseline; gap: var(--size8); padding: var(--size3) 0; font-size: var(--size13); line-height: 1.4; }
.chatRoomTodos span { display: -webkit-box; flex: 1; min-width: 0; overflow: hidden; overflow-wrap: anywhere; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; }
.chatRoomTodos small { flex: none; color: var(--muted); font-size: var(--size12); }
@media (max-width: 700px) { .chatSteps, .chatRoomTodos { padding-inline: var(--size12); } }
/* 답할 카드로 가는 버튼은 대화 위에 늘 떠 있다(채팅방 맨 위 글에 두면 회사 켜기 버튼이 보일 때 잘렸다). */
.chatJump { position: absolute; top: var(--size10); left: 50%; z-index: 2; transform: translateX(-50%); min-height: var(--size36); padding: var(--size6) var(--size16); border: var(--stroke) solid var(--ok); border-radius: var(--size20); background: var(--card); color: var(--ok); font-size: var(--size13); font-weight: 700; white-space: nowrap; box-shadow: 0 var(--size2) var(--size8) var(--heroShadow); }
.chatPower { flex: none; margin-left: auto; padding: var(--size6) var(--size14); border-radius: var(--size20); font-size: var(--size13); }
.chatListHead .chatPower { margin-left: 0; }
.chatWho { padding: 0; border: 0; border-radius: 0; background: transparent; color: inherit; font-size: var(--size13); font-weight: 400; text-align: left; }
.chatWho:hover:not(:disabled) { filter: none; text-decoration: underline; }
.chatSheet { position: absolute; top: 0; right: 0; bottom: 0; z-index: 5; display: flex; flex-direction: column; width: min(100%, var(--size400)); border-left: var(--stroke) solid var(--line); background: var(--card); box-shadow: 0 0 var(--size24) var(--heroShadow); }
.chatSheet header { display: flex; align-items: center; gap: var(--size8); min-height: var(--size54); padding: var(--size6) var(--size8) var(--size6) var(--size20); border-bottom: var(--stroke) solid var(--line); }
.chatSheet h2 { flex: 1; min-width: 0; margin: 0; font-size: var(--size16); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chatSheetClose { flex: none; width: var(--size40); height: var(--size40); padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--muted); font-size: var(--size22); font-weight: 400; line-height: 1; }
.chatSheetLead:empty { display: none; }
.chatSheetLead { display: flex; flex-direction: column; gap: var(--size6); padding: var(--size12) var(--size20); border-bottom: var(--stroke) solid var(--line); font-size: var(--size13); }
.chatSheetLead p { margin: 0; white-space: pre-wrap; }
.chatSheet[data-mode=settings] .chatSheetLead { flex: 1; min-height: 0; gap: var(--size14); overflow-y: auto; border-bottom: 0; font-size: var(--size14); }
.chatSheetList { flex: 1; min-height: 0; margin: 0; padding: var(--size8) 0; overflow-y: auto; list-style: none; }
.chatSheetList > li { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 0 var(--size10); padding: var(--size6) var(--size20); font-size: var(--size13); line-height: 1.5; }
.chatSheetList time { color: var(--muted); font-size: var(--size12); }
.chatSheetList small { display: block; color: var(--muted); font-size: var(--size12); }
.chatSheetList > li.chatSheetQuiet { display: block; color: var(--muted); }
.chatSheetList > li[data-kind=act] { color: var(--muted); }
.chatSheetMore { margin: var(--size8) var(--size20) var(--size16); }
.chatBack { display: none; place-items: center; flex: none; width: var(--size40); height: var(--size40); padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--ink); }
.chatBack svg, .chatSend svg, .pickLink svg, .chatReplyButton svg { width: var(--size22); height: var(--size22); fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.chatView { position: relative; display: flex; flex: 1; flex-direction: column; min-height: 0; }
.chatLog { display: flex; flex: 1; flex-direction: column; gap: var(--size4); min-height: 0; margin: 0; padding: var(--size8) var(--size20) 0; overflow-y: auto; overscroll-behavior: contain; list-style: none; }
.chatLog::after { content: ''; flex: none; height: var(--size16); }
.chatLog > :first-child { margin-top: auto; }
.chatEmpty { display: flex; flex-direction: column; align-items: center; gap: var(--size6); margin: auto; padding: var(--size24) var(--size16); text-align: center; }
.chatEmpty .chatAvatar { width: var(--size72); height: var(--size72); margin-bottom: var(--size6); font-size: var(--size26); }
.chatEmpty strong { font-size: var(--size17); }
.chatEmpty p { margin: 0; color: var(--muted); font-size: var(--size14); }
.chatExamples { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--size8); margin-top: var(--size10); }
.chatExamples button { padding: var(--size7) var(--size14); border-color: var(--line); border-radius: var(--size20); background: var(--card); color: var(--ink); font-size: var(--size13); font-weight: 500; }
.chatDate { align-self: center; margin: var(--size16) 0 var(--size4); }
.chatDate span { display: block; padding: var(--size2) var(--size12); border-radius: var(--size12); background: var(--line); color: var(--muted); font-size: var(--size12); }
.chatSystem { align-self: center; max-width: 90%; margin: var(--size8) 0; color: var(--muted); font-size: var(--size12); text-align: center; overflow-wrap: anywhere; }
.chatSystem .chatMore { margin-top: var(--size4); }
.chatSystem .chatMore > p { max-width: 560px; margin: var(--size6) auto 0; padding: var(--size8) var(--size12); border-radius: var(--size16); background: var(--card); color: var(--ink); font-weight: 400; line-height: 1.55; text-align: left; }
.chatSystem .chatLinks { justify-content: center; margin-top: var(--size4); }
.chatSystem .chatButtons { justify-content: center; margin-top: var(--size6); }
.chatRow { display: flex; align-items: flex-start; gap: var(--size8); }
.chatRow[data-first] { margin-top: var(--size10); }
.chatRow[data-side=me] { justify-content: flex-end; }
.chatBody { display: flex; flex-direction: column; gap: var(--size4); min-width: 0; max-width: min(75%, var(--size640)); }
.chatRow[data-card] .chatBody { flex: 1; max-width: var(--size500); }
.chatName { margin: 0; font-size: var(--size13); }
.chatRow:not([data-first]) .chatName { display: none; }
.chatLine { display: flex; align-items: flex-end; gap: var(--size6); min-width: 0; }
.chatRow[data-side=me] .chatLine { flex-direction: row-reverse; }
.chatRow[data-card] .chatLine { flex-direction: column; align-items: stretch; gap: var(--size4); }
/* 말풍선 옆 시각 칸이다. 답장 버튼과 복사·듣기 묶음(chatTools)은 시각 위에 한 줄로 놓여 칸의 폭은 시각만큼이다. 칸은 말풍선 쪽으로 붙는다.
   복사는 듣기 위에 놓이고(chatToolStack), 답장은 아래 줄의 듣기와 높이를 맞춘다. 세 버튼은 아이콘보다 조금만 크게 두어 아이콘끼리 붙어
   보인다(2026-11-14 대표 "메신저채팅방안에 아이콘끼리는갭을줄여"). */
.chatMeta { display: flex; flex: none; flex-direction: column; align-items: flex-start; }
.chatRow[data-side=me] .chatMeta { align-items: flex-end; }
.chatTools { display: flex; align-items: flex-end; }
.chatToolStack { display: flex; flex-direction: column; align-items: center; }
.chatTime { flex: none; color: var(--muted); font-size: var(--size11); white-space: nowrap; }
.chatRow:not([data-last]) .chatTime { display: none; }
.chatState { display: flex; align-items: center; justify-content: flex-end; gap: var(--size4); min-width: 0; min-height: var(--size16); margin: 0; color: var(--muted); font-size: var(--size11); line-height: var(--size16); white-space: nowrap; }
.chatStateText { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.chatState[data-kind=halted] { color: var(--stop); }
/* AI가 일하는 동안 대화 끝 왼쪽에 두는 '작업 중' 말풍선이다(messenger.js busyNode). */
.chatBubble.chatBusy { display: inline-flex; align-items: center; gap: var(--size8); color: var(--muted); font-size: var(--size13); white-space: nowrap; }
.chatBusy .busyIndicator { flex: none; width: var(--size12); height: var(--size12); }
.chatBubble { min-width: 0; padding: var(--size8) var(--size12); border-radius: var(--size16); background: var(--card); font-size: var(--size14); line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.chatRow[data-side=them][data-first] .chatBubble, .chatRow[data-side=them][data-first] .chatCard { border-top-left-radius: var(--size4); }
.chatRow[data-side=me] .chatBubble { background: var(--sun); color: var(--sunInk); }
.chatRow[data-side=me][data-first] .chatBubble { border-top-right-radius: var(--size4); }
.chatBubble p { margin: 0; }
.chatShort small { display: block; color: var(--muted); font-size: var(--size12); }
.chatPicked { margin: var(--size4) 0 0; padding: 0; font-size: var(--size12); white-space: normal; list-style: none; opacity: .85; }
.chatPicked li { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chatFold[data-folded=yes] p { display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; max-height: 6lh; overflow: hidden; }
/* 직원이 쓴 표(messenger.js rich)다. 칸 글은 낱말 단위로 줄을 바꾸고, 그래도 넘치면 그 표만 옆으로 민다. */
.chatTable { max-width: 100%; margin: var(--size6) 0; overflow-x: auto; white-space: normal; }
.chatTable table { border-collapse: collapse; font-size: var(--size13); line-height: 1.45; }
.chatTable th, .chatTable td { padding: var(--size4) var(--size8); border: var(--stroke) solid var(--line); text-align: left; vertical-align: top; overflow-wrap: normal; word-break: keep-all; }
.chatTable th { background: color-mix(in srgb, currentColor 6%, transparent); font-weight: 700; }
/* 표 칸 안의 그림(대본 승인 카드 장면 컷의 그림 견본)이다. 칸 글 위에 작게 두고 누르면 크게 본다. */
.chatTable .chatCellPicture { margin-bottom: var(--size4); }
.chatTable .chatCellPicture img { display: block; width: var(--size140); max-width: none; height: auto; border-radius: var(--size6); background: var(--soft); }
/* 같은 견본을 카드 맨 위 제목 바로 아래에도 한 줄로 작게 늘어놓는다(휴대폰 카드 너비에 4장이 든다). */
.chatSamples { display: grid; grid-template-columns: repeat(auto-fill, minmax(var(--size64), 1fr)); gap: var(--size6); margin: var(--size8) 0; }
.chatSamples img { display: block; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border: var(--stroke) solid var(--line); border-radius: var(--size6); background: var(--soft); }
.chatToggle { padding: 0; border: 0; background: transparent; color: var(--sea); font-size: var(--size13); font-weight: 700; }
.chatLinks { display: flex; flex-wrap: wrap; gap: var(--size4) var(--size14); margin: 0; }
.chatBubble .chatLinks { margin-top: var(--size6); }
.chatLink { color: var(--sea); font-size: var(--size13); font-weight: 700; }
.chatTextLink { color: inherit; text-decoration: underline; overflow-wrap: anywhere; }
.chatReplyButton { display: grid; place-items: center; flex: none; width: var(--size28); height: var(--size24); padding: 0; border: 0; border-radius: var(--size12); background: transparent; color: var(--muted); opacity: 0; }
.chatRow:hover .chatReplyButton, .chatReplyButton:focus-visible { opacity: 1; }
.chatReplyButton svg { width: var(--size18); height: var(--size18); }
/* 대표가 골라 답한 말 위의 인용이다. 누르면 그 말로 간다. */
.chatQuote { display: flex; flex-direction: column; gap: 0; width: 100%; min-width: 0; margin: 0 0 var(--size6); padding: var(--size2) 0 var(--size2) var(--size8); border: 0; border-left: var(--size3) solid currentColor; background: transparent; color: inherit; font-size: var(--size12); line-height: 1.4; text-align: left; white-space: nowrap; opacity: .7; cursor: pointer; }
.chatQuote strong { font-weight: 700; }
.chatQuote span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
/* 직원의 말마다의 듣기다. 읽는 중인 말의 듣기는 늘 보이고 누르면 멈춘다. */
.chatListen { display: grid; place-items: center; flex: none; width: var(--size28); height: var(--size24); padding: 0; border: 0; border-radius: var(--size12); background: transparent; color: var(--muted); opacity: 0; }
.chatRow:hover .chatListen, .chatListen:focus-visible, .chatListen[data-on=yes] { opacity: 1; }
.chatListen[data-on=yes] { background: var(--soft); color: var(--action); }
.chatListen svg { width: var(--size18); height: var(--size18); fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
/* 말풍선마다의 글 복사다. 복사하면 잠깐 체크로 바뀐다. */
.chatCopy { display: grid; place-items: center; flex: none; width: var(--size28); height: var(--size24); padding: 0; border: 0; border-radius: var(--size12); background: transparent; color: var(--muted); opacity: 0; }
.chatRow:hover .chatCopy, .chatCopy:focus-visible, .chatCopy[data-done=yes] { opacity: 1; }
.chatCopy[data-done=yes] { color: var(--action); }
.chatCopy svg { width: var(--size18); height: var(--size18); fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.chatCopyArea { position: fixed; top: 0; left: 0; width: var(--size1); height: var(--size1); opacity: 0; }
.chatButtons, .chatActions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--size6); }
.chatButtons button, .chatActions button, .chatCardReply button { padding: var(--size7) var(--size14); border-radius: var(--size20); font-size: var(--size13); }
.chatMore summary { cursor: pointer; color: var(--sea); font-size: var(--size13); font-weight: 700; }
.chatMore > p { margin: var(--size6) 0 0; font-size: var(--size13); white-space: pre-wrap; }
.chatShort .chatMore { margin-top: var(--size4); white-space: normal; }
.chatCard { width: 100%; min-width: 0; padding: var(--size14) var(--size16) 0; border-radius: var(--size16); background: var(--card); box-shadow: 0 0 0 var(--stroke) var(--line); font-size: var(--size14); overflow-wrap: anywhere; }
.chatCard > * + * { margin-top: var(--size10); }
.chatCard header strong { display: block; font-size: var(--size15); line-height: 1.45; white-space: pre-wrap; }
.chatCard header small { display: block; margin-top: var(--size2); color: var(--muted); font-size: var(--size12); white-space: pre-line; }
.chatCardText, .chatFold p { margin: 0; white-space: pre-wrap; }
.messenger code { padding: 0 var(--size2); border-radius: var(--size4); background: color-mix(in srgb, currentColor 10%, transparent); font-family: ui-monospace, Consolas, monospace; font-size: .92em; }
.chatFold .chatToggle { margin-top: var(--size4); }
.chatHint { margin: 0; color: var(--muted); font-size: var(--size12); }
.chatCardIssue { margin: 0; color: var(--stop); font-size: var(--size13); white-space: pre-line; }
.chatCard .chatActions { position: sticky; bottom: 0; z-index: 1; margin: var(--size12) calc(var(--size16) * -1) 0; padding: var(--size10) var(--size16) var(--size14); border-top: var(--stroke) solid var(--line); border-radius: 0 0 var(--size16) var(--size16); background: var(--card); }
.chatLeft { margin-left: auto; color: var(--muted); font-size: var(--size12); }
.chatCardReply { display: flex; align-items: flex-end; gap: var(--size6); }
.chatCardReply textarea { flex: 1; min-width: 0; min-height: var(--size36); max-height: var(--size140); padding: var(--size7) var(--size12); border: var(--stroke) solid var(--line); border-radius: var(--size18); background: var(--soft); color: var(--ink); resize: none; field-sizing: content; }
.chatAttach, .chatMic { align-self: flex-end; width: var(--size34); height: var(--size42); color: var(--muted); }
.chatAttachMenu { position: absolute; bottom: calc(100% + var(--size6)); left: var(--size10); z-index: 3; display: flex; gap: var(--size8); padding: var(--size10); border: var(--stroke) solid var(--line); border-radius: var(--size18); background: var(--card); box-shadow: 0 var(--size2) var(--size12) var(--heroShadow); }
.chatAttachMenu[hidden] { display: none; }
.chatAttachMenu button { display: grid; justify-items: center; gap: var(--size6); width: var(--size72); padding: var(--size10) 0 var(--size8); border: 0; border-radius: var(--size14); background: var(--soft); color: var(--ink); font-size: var(--size13); font-weight: 700; }
.chatAttachMenu svg { width: var(--size28); height: var(--size28); fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.chatMic[data-on=yes] { background: var(--stop); color: var(--actionInk); }
.chatFiles { display: flex; flex-wrap: wrap; gap: var(--size6); padding: var(--size8) var(--size16) 0; border-top: var(--stroke) solid var(--line); background: var(--card); }
.chatFile { display: inline-flex; align-items: center; gap: var(--size4); max-width: 100%; padding: var(--size4) var(--size4) var(--size4) var(--size10); border-radius: var(--size14); background: var(--soft); font-size: var(--size12); }
.chatFile span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chatFile small { color: var(--muted); }
.chatFile[data-state=fail] small { color: var(--stop); }
.chatFile button { flex: none; width: var(--size24); height: var(--size24); padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--muted); font-size: var(--size16); line-height: 1; }
.chatFiles + .chatComposer { border-top: 0; }
.chatAttached { display: flex; flex-wrap: wrap; align-items: flex-start; gap: var(--size6); margin-top: var(--size6); white-space: normal; }
.chatAttachedImage { display: flex; flex-direction: column; align-items: flex-start; gap: var(--size4); max-width: 100%; }
.chatAttached img { display: block; max-width: min(100%, var(--size240)); max-height: var(--size240); border-radius: var(--size10); background: var(--soft); object-fit: cover; }
.chatPicture { display: block; max-width: 100%; padding: 0; border: 0; border-radius: var(--size10); background: transparent; cursor: zoom-in; }
/* 그림 보기 창이다. 말에 붙은 그림을 이 화면 안에서 화면 가득 크게 보이고, 위 줄에 이름, 받기, 닫기를 둔다. */
.chatViewer { width: 100vw; max-width: 100vw; height: 100vh; height: 100dvh; max-height: none; margin: 0; padding: 0; border: 0; border-radius: 0; background: #000; color: #fff; }
.chatViewer[open] { display: flex; flex-direction: column; }
.chatViewer::backdrop { background: #000; }
.chatViewerBar { flex: none; display: flex; align-items: center; gap: var(--size8); padding: max(var(--size8), env(safe-area-inset-top)) var(--size8) var(--size8) var(--size16); }
.chatViewerBar p { flex: 1; min-width: 0; margin: 0; font-size: var(--size14); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chatViewerBar .chatLink { flex: none; padding: var(--size8) var(--size18); border-radius: var(--size20); background: #fff; color: #000; font-size: var(--size14); font-weight: 700; text-decoration: none; }
.chatViewerClose { flex: none; width: var(--size44); height: var(--size44); padding: 0; border: 0; border-radius: 50%; background: transparent; color: #fff; font-size: var(--size28); font-weight: 400; line-height: 1; }
.chatViewerStage { position: relative; flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 0 0 env(safe-area-inset-bottom); overflow: hidden; touch-action: pan-y pinch-zoom; }
.chatViewerStage img { display: block; max-width: 100%; max-height: 100%; object-fit: contain; }
/* 그림이 여러 장이면 위 줄에 장 번호, 양옆에 앞 장·다음 장 단추가 있다. 첫 장의 앞, 끝 장의 다음 단추는 보이지 않는다. */
.chatViewerCount { flex: none; font-size: var(--size14); font-weight: 700; opacity: .85; }
.chatViewerMove { position: absolute; top: 50%; z-index: 1; width: var(--size44); height: var(--size44); padding: 0; border: 0; border-radius: 50%; background: rgba(0, 0, 0, .5); color: #fff; font-size: var(--size28); line-height: 1; transform: translateY(-50%); cursor: pointer; }
.chatViewerBefore { left: var(--size12); }
.chatViewerAfter { right: var(--size12); }
.chatViewerMove:disabled { visibility: hidden; }
.chatAttached .chatLink, .chatAttached span { display: inline-block; max-width: 100%; padding: var(--size4) var(--size10); border-radius: var(--size12); background: var(--soft); color: var(--ink); font-size: var(--size12); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* 그림이 여러 장인 말(캐러셀)이다. 한 장만 보이고 옆으로 넘기며, 오른쪽 위에 장 번호, 아래에 점과 보이는 장의 받기가 있다. */
.chatCarousel { display: flex; flex-direction: column; gap: var(--size6); width: min(100%, var(--size240)); }
.chatCarouselFrame { position: relative; width: 100%; aspect-ratio: 4 / 5; overflow: hidden; border-radius: var(--size10); background: var(--soft); }
.chatCarouselTrack { display: flex; width: 100%; height: 100%; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; scrollbar-width: none; }
.chatCarouselTrack::-webkit-scrollbar { display: none; }
.chatCarouselTrack .chatPicture { flex: 0 0 100%; width: 100%; height: 100%; border-radius: 0; scroll-snap-align: start; scroll-snap-stop: always; }
.chatAttached .chatCarouselTrack .chatPicture img { width: 100%; height: 100%; max-width: none; max-height: none; border-radius: 0; background: transparent; object-fit: contain; }
.chatAttached .chatCarouselTrack .chatPicture video { display: block; width: 100%; height: 100%; object-fit: contain; pointer-events: none; }
.chatCarouselMove { position: absolute; top: 50%; width: var(--size32); height: var(--size32); padding: 0; border: 0; border-radius: 50%; background: rgba(0, 0, 0, .45); color: #fff; font-size: var(--size20); line-height: 1; transform: translateY(-50%); cursor: pointer; }
.chatCarouselBefore { left: var(--size6); }
.chatCarouselAfter { right: var(--size6); }
.chatCarouselMove:disabled { visibility: hidden; }
.chatAttached .chatCarouselCount { position: absolute; top: var(--size8); right: var(--size8); padding: var(--size4) var(--size8); border-radius: var(--size12); background: rgba(0, 0, 0, .55); color: #fff; font-size: var(--size12); font-weight: 700; }
.chatCarouselFoot { display: flex; align-items: center; justify-content: space-between; gap: var(--size8); }
.chatCarouselDots { display: flex; flex-wrap: wrap; gap: var(--size4); min-width: 0; }
.chatCarouselDots i { width: var(--size6); height: var(--size6); border-radius: 50%; background: var(--line); }
.chatCarouselDots i.on { background: var(--ink); }
.chatThumbs { display: flex; gap: var(--size8); overflow-x: auto; }
.chatThumbs img { flex: none; width: var(--size80); aspect-ratio: 4 / 5; object-fit: cover; border: var(--stroke) solid var(--line); border-radius: var(--size6); background: var(--soft); }
.chatDetails { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: var(--size4) var(--size12); margin: 0; font-size: var(--size13); }
.chatDetails div { display: contents; }
.chatDetails dt { color: var(--muted); }
.chatDetails dd { margin: 0; }
.picks { display: flex; flex-direction: column; gap: var(--size2); margin-right: calc(var(--size8) * -1); margin-left: calc(var(--size8) * -1); padding: 0 0 var(--size8); list-style: none; }
.pick { position: relative; padding: var(--size8); border-radius: var(--size12); }
.pick[data-picked] { background: var(--okSoft); }
.pickMain { display: flex; align-items: flex-start; gap: var(--size10); }
label.pickMain { cursor: pointer; }
.pickMain input { appearance: none; display: grid; place-content: center; flex: none; width: var(--size22); height: var(--size22); margin: var(--size1) 0 0; border: var(--size2) solid var(--inputLine); border-radius: 50%; background: var(--card); cursor: pointer; }
.pickMain input::before { content: ''; width: var(--size10); height: var(--size5); margin-top: calc(var(--size2) * -1); border-bottom: var(--size2) solid var(--actionInk); border-left: var(--size2) solid var(--actionInk); transform: rotate(-45deg); opacity: 0; }
.pickMain input:checked { border-color: var(--action); background: var(--action); }
.pickMain input:checked::before { opacity: 1; }
.pickNumber { flex: none; min-width: var(--size16); color: var(--muted); font-size: var(--size13); font-weight: 700; }
.pickThumb { flex: none; width: var(--size54); height: var(--size54); object-fit: contain; border: var(--stroke) solid var(--line); border-radius: var(--size8); background: var(--soft); }
.pickText { display: flex; flex: 1; flex-direction: column; gap: var(--size2); min-width: 0; }
.pickCost { display: flex; align-items: center; gap: var(--size4); min-width: 0; }
.pickCost .pickPrice { flex: 1; }
.pickTitle { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: var(--size14); font-weight: 600; line-height: 1.45; }
.pickPrice { color: var(--muted); font-size: var(--size12); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pickPrice b { margin-right: var(--size6); color: var(--ink); font-size: var(--size14); }
.pickFacts { color: var(--muted); font-size: var(--size12); }
.pickTags { display: flex; flex-wrap: wrap; align-items: center; gap: var(--size4); font-size: var(--size11); }
.pickTags i { padding: 0 var(--size6); border-radius: var(--size4); background: var(--soft); color: var(--ink); font-style: normal; line-height: var(--size18); }
.pickTags i[data-tone=best] { background: var(--accent); color: var(--sunInk); }
.pickTags i[data-tone=low] { background: var(--sand); color: var(--sunInk); }
.pickTags i[data-tone=value] { background: var(--okSoft); color: var(--ok); box-shadow: inset 0 0 0 var(--stroke) var(--ok); }
.pickTags i[data-tone=fast] { background: var(--sun); color: var(--sunInk); }
.pickTags i[data-tone=premium] { background: var(--heroAccent); color: var(--sunInk); }
.pickTags i[data-tone=posted] { background: var(--seaSoft); color: var(--sea); font-weight: 700; box-shadow: inset 0 0 0 var(--stroke) var(--sea); }
.pickTags i[data-tone=ad] { background: transparent; color: var(--muted); box-shadow: inset 0 0 0 var(--stroke) var(--line); }
.pickTags small { color: var(--muted); font-size: var(--size11); }
.pickWhy { padding: 0 var(--size2); border: 0; background: transparent; color: var(--sea); font-size: var(--size11); font-weight: 700; }
.pickWhy::after { content: ' ▾'; }
.pickWhy[aria-expanded=true]::after { content: ' ▴'; }
.pickReason { margin: var(--size4) 0 0 var(--size32); color: var(--muted); font-size: var(--size12); white-space: pre-wrap; }
.pickLink { display: grid; place-items: center; flex: none; width: var(--size36); height: var(--size32); margin: calc(var(--size6) * -1) calc(var(--size4) * -1) calc(var(--size6) * -1) 0; border-radius: var(--size16); color: var(--muted); }
.pickLink:hover { background: var(--soft); color: var(--ink); }
.pickLink svg { width: var(--size18); height: var(--size18); }
.chatNew { position: absolute; bottom: var(--size12); left: 50%; transform: translateX(-50%); padding: var(--size6) var(--size16); border: var(--stroke) solid var(--line); border-radius: var(--size20); background: var(--card); color: var(--ink); font-size: var(--size13); box-shadow: 0 var(--size2) var(--size8) var(--heroShadow); }
.chatIssue { margin: 0; padding: var(--size6) var(--size20); border-top: var(--stroke) solid var(--line); background: var(--card); color: var(--stop); font-size: var(--size13); }
.chatReplyTo { display: flex; align-items: center; gap: var(--size8); padding: var(--size6) var(--size12) var(--size6) var(--size20); border-top: var(--stroke) solid var(--line); background: var(--card); color: var(--muted); font-size: var(--size13); }
.chatReplyTo span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chatReplyTo button { min-width: var(--size40); min-height: var(--size36); padding: 0 var(--size8); border: 0; background: transparent; color: var(--muted); font-size: var(--size20); font-weight: 400; line-height: 1; }
.chatComposer { position: relative; display: flex; align-items: flex-end; gap: var(--size4); padding: var(--size10) var(--size16) max(var(--size10), env(safe-area-inset-bottom)); border-top: var(--stroke) solid var(--line); background: var(--card); }
.chatComposer textarea { flex: 1; min-width: 0; min-height: var(--size42); max-height: var(--size140); padding: var(--size9) var(--size16); border: var(--stroke) solid var(--line); border-radius: var(--size21); background: var(--soft); color: var(--ink); line-height: 1.5; resize: none; field-sizing: content; }
/* 투두리스트 방의 칸도 다른 방처럼 한 줄로 시작하고, 길게 적으면 적는 만큼 화면 높이의 40%까지 늘어난다(2026-11-04 대표 "입력창을 충분히크게슬수있게",
   처음부터 크게 띄워 두었더니 "입력창을 미리키워놓으라했나"). */
.chatComposer[data-board=yes] textarea { max-height: 40vh; }
.chatSend { display: grid; place-items: center; flex: none; width: var(--size42); height: var(--size42); padding: 0; border: 0; border-radius: 50%; background: var(--action); color: var(--actionInk); }
.chatSend:disabled { border: 0; }
/* 대화는 가운데 한 줄이다(챗GPT 웹처럼). 넓은 화면에서도 말과 말하기 칸이 같은 폭(최대 800px) 안에 있고 좌우는 비운다. 스크롤 막대는
   방 끝에 둔다(2026-10-23 대표 "채팅은 너무넓게써버리면 직관적이지가않다 좌우공간을주고 챗지피티웹처럼"). */
.chatRoom { --chatSide: max(var(--size20), calc((100% - 800px) / 2)); }
.chatLog, .chatIssue, .chatFiles { padding-inline: var(--chatSide); }
.chatReplyTo { padding-inline: var(--chatSide) calc(var(--chatSide) - var(--size8)); }
.chatComposer { padding-inline: var(--chatSide); }
@media (min-width: 701px) {
  .chatComposer { padding-top: var(--size4); padding-bottom: var(--size16); border-top: 0; background: transparent; }
  .chatComposer textarea { background: var(--card); box-shadow: 0 var(--size2) var(--size8) var(--heroShadow); }
  .chatReplyTo, .chatIssue, .chatFiles { border-top: 0; background: transparent; }
}
/* 터치 화면은 진행 중인 일의 마지막 말 옆 답장 버튼과 직원의 말마다의 듣기가 늘 보인다. 다른 말은 길게 눌러 답장한다. */
@media (hover: none) { .chatReplyButton, .chatListen, .chatCopy { width: var(--size32); height: var(--size26); opacity: 1; } .chatReplyButton:not([data-work]), .chatRow:not([data-last]) .chatReplyButton { display: none; } }
@media (max-width: 700px) { .chatSheet { width: 100%; border-left: 0; } .messenger { grid-template-columns: minmax(0, 1fr); } .messenger[data-inside=yes] .chatList, .messenger[data-inside=no] .chatRoom { display: none; } .chatList { border-right: 0; } .chatListHead { padding: var(--size14) var(--size16) var(--size6); } .chatItem { padding: var(--size10) var(--size16); } .chatBack { display: grid; } .chatHead { --chatHeadGap: var(--size8); min-height: var(--size54); padding: var(--size6) var(--size12) var(--size6) var(--size4); } .chatLog { padding: var(--size4) var(--size12) 0; } .chatBody { max-width: none; } .chatRow[data-card] .chatBody { max-width: none; } .chatComposer { padding: var(--size8) var(--size10) max(var(--size8), env(safe-area-inset-bottom)); } .chatActions button { padding: var(--size7) var(--size12); } }
@media (min-width: 701px) { .chatListHead .chatPower { display: none; } }
/* 채팅방 맨 위의 작은 표시: 이 방이 맡은 할 일 수(누르면 방을 옮기지 않고 제목을 펼친다), 세션이 도는 계정, 모델, 오늘 토큰. 머리 바로 아래
   제 줄이고 넘치면 다음 줄로 내려가 좁은 휴대폰에서도 모두 보인다. 화면보다 긴 칩 하나(막힌 계정의 풀리는 때까지)는 그 칩 안에서 줄을
   바꾼다. 넓은 화면은 방 이름 글 아래에 맞춘다. */
.chatChips { display: flex; flex: none; flex-wrap: wrap; gap: var(--size4) var(--size6); padding: 0 var(--size20) var(--size8) calc(var(--size20) + var(--size40) + var(--size12)); border-bottom: var(--stroke) solid var(--line); background: var(--card); }
.chatChips .chatChip { max-width: 100%; white-space: normal; }
.chatChips:empty { display: none; }
.chatHead:has(+ .chatChips:not(:empty)) { border-bottom: 0; }
@media (max-width: 700px) { .chatChips { padding: 0 var(--size12) var(--size6); } }
.chatUsage { padding: 0 var(--size16) var(--size8); }
/* 구독 계정 사용량 링(design/companyFeed.js dongapUsageRings). 메신저 방 목록 머리와 사무실 사용량 줄이 같이 쓴다. 바깥 링은 주간, 안쪽 링은 5시간이다. */
/* 링은 접지 않고 한 줄에 둔다(2026-11-18 대표 "갭을줄여서 사용량을한줄에쓰는게좋지않나", 폭 384 휴대폰에서 7개가 6개와 1개로 접혔다). 칸 사이를 띄우지 않고 칸마다 54까지 같은 몫을 나눠 가지며, 몫이 링보다 좁으면 링이 함께 작아진다. */
.usageRings { display: flex; }
.usageRing { display: flex; flex: 1 1 0; flex-direction: column; align-items: center; gap: var(--size2); min-width: 0; max-width: var(--size54); padding: var(--size4) var(--size2); border: 0; border-radius: var(--size10); background: transparent; color: var(--muted); font: inherit; cursor: pointer; }
.usageRing:hover, .usageRing[aria-expanded=true] { background: var(--soft); }
.usageDial { position: relative; display: block; width: 100%; max-width: var(--size40); aspect-ratio: 1; }
.usageDial svg { display: block; width: 100%; height: 100%; }
.usageTrack { fill: none; stroke: var(--line); stroke-width: 3.5; }
.usageFill { fill: none; stroke: var(--action); stroke-width: 3.5; stroke-linecap: round; }
.usageFill.usageSession { stroke: var(--ok); opacity: .55; }
.usageRing[data-tone=stop] .usageFill { stroke: var(--stop); opacity: 1; }
.usageNumber { position: absolute; inset: 0; display: grid; place-items: center; color: var(--ink); font-size: var(--size10); font-weight: 700; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.usageName { font-size: var(--size11); line-height: 1.2; white-space: nowrap; }
.usageRing[data-next=yes] .usageName { color: var(--ink); font-weight: 700; }
.usageRing[data-tone=stop] .usageName { color: var(--stop); font-weight: 700; }
.usageDetail { display: flex; flex-direction: column; gap: var(--size6); margin-top: var(--size6); padding: var(--size10) var(--size12); border-radius: var(--size10); background: var(--soft); color: var(--muted); font-size: var(--size12); }
.usageDetail[hidden] { display: none; }
.usageDetail p { margin: 0; }
.usageDetailHead { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--size6); }
.usageDetailHead strong { color: var(--ink); font-size: var(--size14); }
.usageDetailNote[data-tone=stop] { color: var(--stop); font-weight: 700; }
.usageMeter p { display: flex; align-items: baseline; gap: var(--size6); }
.usageMeter b { color: var(--ink); font-variant-numeric: tabular-nums; }
.usageMeter small { margin-left: auto; font-size: var(--size11); }
.usageBar { display: block; width: 100%; height: var(--size4); margin-top: var(--size3); }
.usageBarTrack { fill: var(--line); }
.usageBarFill { fill: var(--action); }
.usageDetail[data-tone=stop] .usageBarFill { fill: var(--stop); }
.usageMeter[data-tone=stop] .usageBarFill { fill: var(--stop); }
.usageMeter[data-tone=stop] b { color: var(--stop); }
.chatChip { display: inline-flex; align-items: center; padding: 0 var(--size8); border: 0; border-radius: var(--size10); background: var(--soft); color: var(--muted); font-size: var(--size12); font-weight: 600; line-height: var(--size20); white-space: nowrap; }
.chatChip[data-ok=yes] { background: var(--okSoft); color: var(--ok); }
.chatChip[data-ok=no] { background: var(--stopSoft); color: var(--stop); }
button.chatChip { cursor: pointer; }
/* 방 세션이 고정한 링크(messenger.js renderLinks)는 누르는 것이 보이게 밑줄과 진한 글자다. 둘 이상이면 '링크 N ▾' 버튼 하나이고
   누르면 버튼 아래로 목록(.chatLinkMenu)이 대화 위에 펼쳐진다. 링크 이름은 줄마다 한 줄이고 긴 이름은 줄을 바꾼다. */
a.chatPinLink { color: var(--ink, inherit); text-decoration: underline; }
.chatLinks { position: relative; display: inline-flex; max-width: 100%; }
.chatLinkToggle { color: var(--ink); }
.chatLinkToggle::after { content: '▾'; margin-left: var(--size4); }
.chatLinkToggle[aria-expanded=true]::after { content: '▴'; }
.chatLinkMenu { position: absolute; top: calc(100% + var(--size4)); left: 0; z-index: 4; display: flex; flex-direction: column; width: max-content; min-width: var(--size200); max-width: min(90vw, var(--size400)); max-height: 60vh; padding: var(--size6); overflow-y: auto; border: var(--stroke) solid var(--line); border-radius: var(--size12); background: var(--card); box-shadow: 0 var(--size2) var(--size12) var(--heroShadow); }
.chatLinkMenu[hidden] { display: none; }
.chatLinkItem { padding: var(--size6) var(--size10); border-radius: var(--size8); color: var(--ink); font-size: var(--size13); line-height: 1.4; text-decoration: none; overflow-wrap: anywhere; }
.chatLinkItem:hover, .chatLinkItem:focus-visible { background: var(--soft); text-decoration: underline; }
/* 투두리스트 방(@todos): 담당 없는 일과 방마다 맡은 일, 접어 둔 끝낸 일. 대표는 줄마다 담당을 고르고 배정·끝·지우기를 누른다. 버튼 줄은
   휴대폰 폭에서 한 줄에 들도록 간격과 칸 폭을 줄였다(2026-11-04 대표 "아이콘 갭들좀줄여"). */
.chatLog[data-board] > :first-child { margin-top: 0; }
.chatTodoGroup { margin: var(--size10) 0 0; }
.chatTodoGroup h3 { margin: 0 0 var(--size6); color: var(--muted); font-size: var(--size12); font-weight: 700; }
.chatTodoGroup ul { display: flex; flex-direction: column; gap: var(--size6); margin: 0; padding: 0; list-style: none; }
.chatTodo { display: flex; flex-wrap: wrap; align-items: center; gap: var(--size8) var(--size12); padding: var(--size10) var(--size14); border-radius: var(--size12); background: var(--card); }
.chatTodo[data-running] { box-shadow: inset 0 0 0 var(--stroke) var(--ok); }
.chatTodo[data-done] { opacity: .7; }
.chatIdeaOpen { display: flex; flex-direction: column; gap: var(--size2); width: 100%; padding: 0; border: 0; background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.chatIdeaOpen p { margin: 0; }
.chatIdeaOpen small { color: var(--muted); }
.chatTodoText { flex: 1; min-width: min(100%, 220px); }
.chatTodoText p { display: -webkit-box; margin: 0; overflow: hidden; white-space: pre-wrap; overflow-wrap: anywhere; -webkit-box-orient: vertical; -webkit-line-clamp: 3; cursor: pointer; }
.chatTodo[data-open] .chatTodoText p { display: block; }
.chatTodoText small { color: var(--muted); font-size: var(--size12); }
.chatTodoActs { display: flex; align-items: center; gap: var(--size4); min-width: 0; max-width: 100%; }
.chatTodoActs select { flex: none; max-width: 8em; padding: var(--size4) var(--size2); border: var(--stroke) solid var(--line); border-radius: var(--size8); background: var(--soft); color: var(--ink); font: inherit; font-size: var(--size13); }
.chatTodoActs .chatToggle { flex: none; min-height: var(--size36); padding: 0 var(--size6); }
.chatTodoActs .chatTodoHour { flex: 0 1 auto; min-width: 0; }
.chatTodoAssign { color: var(--action); font-weight: 700; }
.chatTodo .chatAttached { width: 100%; margin-top: 0; }
.chatTodo .chatAttached img { max-width: min(100%, var(--size140)); max-height: var(--size140); }
.chatTodoDrop { color: var(--stop); }
.chatTodoDone summary { color: var(--muted); font-size: var(--size12); cursor: pointer; }
/* 완성 폴더의 영상을 말풍선 안에서 재생한다. 처음은 세로 칸이고 영상을 읽으면(data-shape) 영상의 비율을 따르며 가로 영상(wide)은 칸이 넓다. */
.chatClips { display: flex; flex-wrap: wrap; gap: var(--size8); margin-top: var(--size8); }
.chatClip { margin: 0; width: min(100%, 220px); }
.chatClip[data-shape=wide] { width: min(100%, 420px); }
.chatClip video { display: block; width: 100%; aspect-ratio: 9 / 16; background: #000; border-radius: var(--size8); }
.chatClip[data-shape] video { aspect-ratio: auto; }
.chatClip figcaption { margin-top: var(--size4); color: var(--muted); font-size: var(--size12); }
/* 휴대폰 화면의 '원본 받기'(트는 영상은 가벼운 사본이라 원본은 이 단추로 받는다). */
.chatClipGet { display: block; margin-top: var(--size6); padding: var(--size6) var(--size10); border-radius: var(--size8); background: var(--action); color: var(--actionInk); font-size: var(--size13); font-weight: 700; text-align: center; text-decoration: none; }
/* PC 화면의 'PC에서 바로 재생' 단추(이 PC의 영상 플레이어로 연다)와 열지 못한 까닭. */
.chatClipPlay { width: 100%; margin-top: var(--size6); padding: var(--size6) var(--size10); font-size: var(--size13); font-weight: 600; }
.chatClipIssue { margin: var(--size4) 0 0; color: var(--stop); font-size: var(--size12); }
/* 릴스 완성 영상 아래 그 릴스에 거는 제품 목록(번호·사진·이름). */
.chatReelGoods { margin-top: var(--size8); }
.chatReelHeading { margin: 0 0 var(--size6); font-size: var(--size13); font-weight: 700; }
/* 완성 폴더의 캡션·제목·설명 글. 이름 줄의 '복사'·'고치기', 글, 고치는 칸(글·까닭·저장·그만)이 말풍선 안에 있다. */
.chatTexts { display: grid; gap: var(--size8); margin-top: var(--size8); }
.chatText { margin: 0; padding: var(--size8) var(--size10); border: var(--stroke) solid var(--line); border-radius: var(--size8); background: var(--soft); }
.chatTextHead { display: flex; flex-wrap: wrap; align-items: center; gap: var(--size6); color: var(--muted); font-size: var(--size12); }
.chatTextName { flex: 1; font-weight: 600; }
.chatTextBody { margin: var(--size6) 0 0; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 40vh; overflow: auto; font: inherit; font-size: var(--size13); line-height: 1.5; }
.chatTextEditor { display: grid; gap: var(--size6); margin-top: var(--size6); }
.chatTextEditor textarea, .chatTextEditor input { width: 100%; box-sizing: border-box; padding: var(--size6) var(--size8); border: var(--stroke) solid var(--line); border-radius: var(--size8); background: var(--card); color: var(--ink); font: inherit; font-size: var(--size13); }
.chatTextActs { display: flex; flex-wrap: wrap; align-items: center; gap: var(--size6); }
.chatTextIssue { color: var(--stop); font-size: var(--size12); }
.chatQuiet { padding: var(--size4) var(--size10); border: var(--stroke) solid var(--line); border-radius: var(--size20); background: transparent; color: inherit; font: inherit; font-size: var(--size12); cursor: pointer; }
.chatTextSave { background: var(--ink); color: var(--bg); border-color: transparent; }
.chatArticle { display: grid; gap: var(--size16); }
.chatArticleSection { padding: var(--size10); border: var(--stroke) solid var(--line); border-radius: var(--size8); background: var(--card); }
.chatArticleHead { display: flex; align-items: start; gap: var(--size8); margin-bottom: var(--size10); }
.chatArticleHead h3 { flex: 1; margin: 0; font-size: var(--size16); line-height: 1.5; }
.chatArticlePictures img { display: block; width: 100%; height: auto; border-radius: var(--size6); margin-bottom: var(--size10); }
.chatArticleBody { white-space: pre-wrap; overflow-wrap: anywhere; font-size: var(--size14); line-height: 1.8; }
.chatArticle .chatTextEditor { margin-bottom: var(--size10); }
.chatArticle textarea { min-height: 12em; resize: vertical; }
.chatArticle .chatTextIssue[data-saved] { color: var(--ok); }
/* 대표가 보낸 말의 상태 줄 끝 '중지'(전달됨·처리 중인 말에만). */
.chatStop { margin-left: var(--size4); padding: 0 var(--size4); color: var(--stop); font-size: var(--size11); line-height: var(--size16); }
