/* 업무 대화 (2026-12-02, 1단계) */
.main[data-view="talk"] { grid-template-columns: minmax(560px, 1fr) minmax(330px, 400px); }
@media (max-width: 860px) { .main[data-view="talk"] { grid-template-columns: 1fr; } }
.viewseg .seg-n { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; margin-left: 3px; border-radius: 9px; background: var(--red); color: #fff; font-size: 11px; font-style: normal; font-weight: 800; vertical-align: 1px; }
.viewseg .seg-n[hidden] { display: none; }

.talk { display: grid; grid-template-columns: 210px 1fr; height: calc(100vh - 150px); min-height: 420px; border: 1px solid var(--line); border-radius: var(--radius, 12px); background: var(--surface); overflow: hidden; }
.tk-rooms { border-right: 1px solid var(--line); overflow-y: auto; padding: 6px; background: var(--bg); }
.tk-sec { font-size: 11.5px; font-weight: 800; color: var(--text-3); padding: 10px 8px 4px; }
.tk-room { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; border: 0; background: none; padding: 7px 8px; border-radius: 9px; cursor: pointer; color: var(--text); }
.tk-room:hover { background: var(--line-2); }
.tk-room.on { background: var(--primary-soft); }
.tk-room .ico { flex: none; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; background: var(--surface); font-size: 14px; }
.tk-room .txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.tk-room .txt b { font-size: 13.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tk-room .txt small { font-size: 11.5px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tk-room .n { flex: none; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--red); color: #fff; font-size: 11.5px; font-style: normal; font-weight: 800; display: grid; place-items: center; }

.tk-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.tk-head { display: flex; align-items: baseline; gap: 8px; padding: 11px 14px; border-bottom: 1px solid var(--line); }
.tk-head b { font-size: 15px; } .tk-head small { color: var(--text-3); font-size: 12px; }
.tk-msgs { flex: 1; overflow-y: auto; padding: 10px 14px; display: flex; flex-direction: column; gap: 3px; }
.tk-day { align-self: center; font-size: 11.5px; color: var(--text-3); background: var(--line-2); border-radius: 10px; padding: 2px 10px; margin: 10px 0 6px; }
.tk-sys { align-self: center; font-size: 12px; color: var(--text-2); background: var(--amber-soft, #fff3bf); border-radius: 9px; padding: 4px 10px; margin: 4px 0; max-width: 90%; text-align: center; }
.tk-msg { display: flex; flex-direction: column; align-items: flex-start; max-width: 78%; }
.tk-msg.mine { align-self: flex-end; align-items: flex-end; }
.tk-msg .who { font-size: 12px; font-weight: 700; color: var(--text-2); margin: 8px 0 2px 2px; }
.tk-msg .line { display: flex; align-items: flex-end; gap: 6px; }
.tk-msg.mine .line { flex-direction: row-reverse; }
.tk-bub { padding: 7px 11px; border-radius: 4px 14px 14px 14px; background: var(--line-2); font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; }
.tk-msg.mine .tk-bub { background: var(--primary); color: #fff; border-radius: 14px 4px 14px 14px; }
.tk-msg .meta { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; flex: none; }
.tk-msg.mine .meta { align-items: flex-end; }
.tk-msg .time { font-size: 10.5px; color: var(--text-3); }
.tk-act { border: 1px solid var(--line); background: var(--surface); color: var(--text-2); font-size: 11px; font-weight: 700; border-radius: 7px; padding: 1px 6px; cursor: pointer; opacity: 0; transition: opacity .15s; white-space: nowrap; }
.tk-msg:hover .tk-act, .tk-act.ask, .tk-act:focus-visible { opacity: 1; }
.tk-act.ask { border-color: var(--amber, #f59f00); background: var(--amber-soft, #fff3bf); color: #8a5a00; }
.tk-act:hover { border-color: var(--primary); color: var(--primary); }
.tk-done { font-size: 11px; color: var(--green, #2f9e44); font-weight: 700; white-space: nowrap; }
@media (hover: none) { .tk-act { opacity: 1; } }

.tk-comp { display: flex; gap: 6px; padding: 10px 12px 4px; border-top: 1px solid var(--line); }
.tk-comp textarea { flex: 1; resize: none; border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px; font: inherit; font-size: 14px; background: var(--surface); color: var(--text); max-height: 120px; }
.tk-hint { margin: 2px 14px 10px; font-size: 11.5px; color: var(--text-3); }

@media (max-width: 640px) {
  .talk { grid-template-columns: 1fr; grid-template-rows: auto 1fr; height: calc(100vh - 170px); }
  .tk-rooms { display: flex; gap: 4px; overflow-x: auto; overflow-y: hidden; border-right: 0; border-bottom: 1px solid var(--line); padding: 6px; }
  .tk-sec { display: none; }
  .tk-room { flex: none; width: auto; max-width: 150px; }
  .tk-room .txt small { display: none; }
  .tk-msg { max-width: 92%; }
}
