/* 한국 업무 도구 — 카카오톡 휴무 안내 (scenes/kakao.html). 틀은 ta.css, 여기서는 .s-kakao 아래만.
   넓은 화면: 왼쪽 티파이브 창, 오른쪽에 카카오톡 채팅 목록 창과 방 창이 겹쳐 열린다.
   휴대폰: 창 하나씩 꽉 채워 앞뒤로 바뀐다(.lit 인 티파이브 창이 맨 앞). */

.s-kakao .ta-desk { --ta-h: 500px; --kk-bg: #bacbdc; --kk-yel: #fee500; }

/* 창 자리 */
.s-kakao .kk-t5 { inset: 16px auto 16px 16px; width: 36%; z-index: 3; }
.s-kakao .kk-list { left: calc(36% + 30px); top: 28px; right: 46px; height: 404px; z-index: 1; }
.s-kakao .kk-room { right: 16px; top: 50px; bottom: 16px; width: 41%; z-index: 2; }
.s-kakao .kk-bar { height: 26px; background: #f4f4f5; border-bottom-color: #e2e2e5; }
/* 채팅 목록 창은 처음부터 바탕화면에 떠 있다(뒤쪽 창: 신호등 회색). '카카오톡 열기' 단계에서 앞으로 나온다(.in). */
.s-kakao .kk-list { transition: transform .5s var(--ta-glide), box-shadow .5s; }
.s-kakao .kk-list:not(.in) .ta-lights i { background: #d4d4d7; }
.s-kakao .kk-list:not(.in) { box-shadow: 0 18px 40px -22px rgba(0, 0, 0, .3), 0 0 0 .5px rgba(0, 0, 0, .18); }
.s-kakao .kk-list.in { transform: translateY(-3px); }
.s-kakao .ta-ph { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ───────── 카카오톡 채팅 목록 ───────── */
.s-kakao .kk-lbody { flex: 1; min-height: 0; display: flex; }
.s-kakao .kk-rail { flex: none; width: 42px; display: flex; flex-direction: column; align-items: center; gap: 16px; padding-top: 14px; background: #ececee; }
.s-kakao .kk-rail svg { width: 18px; height: 18px; fill: none; stroke: #9a9aa0; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.s-kakao .kk-rail svg.on { fill: #3c3c40; stroke: #3c3c40; }
.s-kakao .kk-lmain { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.s-kakao .kk-lh { display: flex; align-items: center; justify-content: space-between; padding: 12px 12px 8px; }
.s-kakao .kk-lh b { font-size: 15px; font-weight: 800; letter-spacing: -.02em; }
.s-kakao .kk-lh svg { width: 14px; height: 14px; fill: none; stroke: #55555a; stroke-width: 1.5; stroke-linecap: round; }
.s-kakao .kk-rooms { display: grid; gap: 1px; padding: 0 4px; }
.s-kakao .kk-r { display: flex; align-items: center; gap: 9px; padding: 7px 8px; border-radius: 9px; transition: background .25s; }
.s-kakao .kk-r.lit { background: #eef0f3; }
.s-kakao .kk-r.hit { background: #e3e7ee; }
.s-kakao .kk-av { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 13px; background: var(--c, #dfe6ee); color: rgba(0, 0, 0, .55); font-size: 12px; font-weight: 700; }
.s-kakao .kk-grp { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; place-items: stretch; gap: 2px; padding: 6px; background: #dfe6ee; }
.s-kakao .kk-grp i { display: block; border-radius: 50%; background: #9db3c9; }
.s-kakao .kk-grp i:nth-child(2) { background: #f0b88f; }
.s-kakao .kk-grp i:nth-child(3) { background: #a8c99a; }
.s-kakao .kk-grp i:nth-child(4) { background: #c9a9d9; }
.s-kakao .kk-rt { flex: 1; min-width: 0; display: grid; line-height: 1.35; }
.s-kakao .kk-rt b { font-size: 12px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.s-kakao .kk-rt em, .s-kakao .kk-rhead em { font-style: normal; font-weight: 500; color: #8a8a8e; }
.s-kakao .kk-rt small { font-size: 11px; color: #7c7c80; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.s-kakao .kk-rm { flex: none; display: grid; justify-items: end; gap: 3px; }
.s-kakao .kk-rm time { font-size: 11px; color: #9a9a9e; }
.s-kakao .kk-badge { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: #ff5a36; color: #fff; font-size: 11px; font-style: normal; font-weight: 700; line-height: 18px; text-align: center; }

/* ───────── 카카오톡 방 ───────── */
.s-kakao .kk-room { background: var(--kk-bg); }
.s-kakao .kk-rhead { flex: none; display: flex; align-items: center; gap: 7px; height: 44px; padding: 0 12px; background: var(--kk-bg); }
.s-kakao .kk-sm { width: 28px; height: 28px; border-radius: 11px; padding: 5px; gap: 1.5px; }
.s-kakao .kk-rhead b { font-size: 13px; font-weight: 700; }
.s-kakao .kk-rhead em { font-size: 12px; }
.s-kakao .kk-rics { margin-left: auto; display: flex; gap: 10px; }
.s-kakao .kk-rics svg { width: 14px; height: 14px; fill: none; stroke: #3d4a57; stroke-width: 1.5; stroke-linecap: round; }
.s-kakao .kk-msgs { flex: 1; min-height: 0; display: flex; flex-direction: column; justify-content: flex-end; gap: 10px; padding: 8px 12px 12px; overflow: hidden; }
.s-kakao .kk-day { text-align: center; }
.s-kakao .kk-day span { display: inline-block; padding: 2px 10px; border-radius: 999px; background: rgba(0, 0, 0, .12); color: #fff; font-size: 11px; }
.s-kakao .kk-o { display: grid; grid-template-columns: 32px auto auto; justify-content: start; align-items: end; column-gap: 7px; }
.s-kakao .kk-o .kk-av { width: 32px; height: 32px; border-radius: 12px; align-self: start; }
.s-kakao .kk-o > div { min-width: 0; }
.s-kakao .kk-nm { margin-bottom: 3px !important; font-size: 11px; color: #3c4652; }
.s-kakao .kk-b { padding: 7px 10px; border-radius: 4px 13px 13px 13px; background: #fff; font-size: 12px; line-height: 1.5; color: #191919; word-break: keep-all; }
.s-kakao .kk-o time, .s-kakao .kk-meta time { font-size: 11px; color: #4f5c69; white-space: nowrap; }
.s-kakao .kk-old { display: flex; justify-content: flex-end; align-items: flex-end; gap: 5px; }
.s-kakao .kk-old .kk-b { max-width: 76%; border-radius: 13px 4px 13px 13px; background: var(--kk-yel); }
.s-kakao .kk-mine { display: none; justify-content: flex-end; align-items: flex-end; gap: 5px; }
.s-kakao .kk-mine.in { display: flex; animation: kk-pop .5s var(--ta-ovs) both; }
@keyframes kk-pop { from { opacity: 0; transform: translateY(10px) scale(.94); transform-origin: right bottom; } }
.s-kakao .kk-mine .kk-b { max-width: 76%; border-radius: 13px 4px 13px 13px; background: var(--kk-yel); }
.s-kakao .kk-meta { display: grid; justify-items: end; line-height: 1.2; }
.s-kakao .kk-unread { font-style: normal; font-size: 11px; font-weight: 700; color: #c89b00; }
.s-kakao .kk-input { flex: none; display: grid; gap: 4px; padding: 9px 12px 9px; background: #fff; }
.s-kakao .kk-field { position: relative; min-height: 34px; font-size: 12px; line-height: 1.45; color: #191919; }
.s-kakao .kk-field .say:empty { display: none; }
.s-kakao .kk-field .say:not(:empty) + .kk-ph { display: none; }
.s-kakao .kk-ph { color: #a1a1a6; }
.s-kakao .kk-field .caret { display: inline-block; width: 1.5px; height: 1.05em; margin-left: 1px; vertical-align: -0.15em; background: var(--cobalt); animation: ta-blink 1s steps(1) infinite; }
.s-kakao .kk-ibar { display: flex; align-items: center; gap: 10px; }
.s-kakao .kk-ibar svg { width: 15px; height: 15px; fill: none; stroke: #8a8a8e; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.s-kakao .kk-send { margin-left: auto; padding: 4px 11px; border-radius: 6px; background: #f1f1f2; color: #a1a1a6; font-size: 11.5px; font-weight: 700; transition: background .2s, color .2s, transform .2s var(--ta-spring); }
.s-kakao .kk-send.go { background: var(--kk-yel); color: #3a3000; }
.s-kakao .kk-send.hit { transform: scale(.88); }

/* ───────── 티파이브 확인 시트 ───────── */
.s-kakao .kk-t5 .ta-thread { padding: 0 12px 6px; }
.s-kakao .kk-ask { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 8px; align-items: start; padding-bottom: 14px; }
.s-kakao .kk-ava { width: 24px; height: 24px; margin-top: 12px; border-radius: 7px; background: #fff center / 22px no-repeat; box-shadow: 0 0 0 1px var(--ta-bd); }
.s-kakao .kk-sheet { display: grid; gap: 8px; padding: 12px 12px 11px; border-radius: 14px; background: #fff; box-shadow: 0 1px 2px rgba(17, 17, 16, .05), 0 14px 30px -18px rgba(17, 17, 16, .38), inset 0 0 0 1px var(--ta-bd); }
.s-kakao .kk-q { font-size: 13.5px; font-weight: 800; letter-spacing: -.02em; }
.s-kakao .kk-to { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.s-kakao .kk-lb { font-size: 11px; font-weight: 700; color: var(--ta-sub); }
.s-kakao .kk-chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px 3px 3px; border-radius: 999px; background: #f2f4f7; font-size: 12px; font-weight: 700; }
.s-kakao .kk-chip i { display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: #ffe27a; color: #3b2a00; font-style: normal; font-size: 11px; font-weight: 800; }
.s-kakao .kk-app { margin-left: auto; font-size: 11px; color: var(--ta-faint); }
.s-kakao .kk-msg { padding: 8px 10px; border-radius: 4px 11px 11px 11px; background: #fff4e5; font-size: 12px; line-height: 1.55; }
.s-kakao .kk-btns { display: flex; gap: 5px; }
.s-kakao .kk-btns span { flex: 1; padding: 6px 0; border-radius: 8px; background: #fff; box-shadow: inset 0 0 0 1px #e2e2e5; text-align: center; font-size: 11.5px; font-weight: 600; color: #3a3a3c; }
.s-kakao .kk-btns .kk-go { background: var(--cobalt); color: #fff; box-shadow: none; transition: transform .18s var(--ta-spring), background .2s; }
.s-kakao .kk-btns .kk-go.hit { transform: scale(.92); background: #0f47c7; }
.s-kakao .kk-done { display: none; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 700; color: var(--success); }
.s-kakao .kk-done svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.s-kakao .kk-sheet.go .kk-btns { display: none; }
.s-kakao .kk-sheet.go .kk-done { display: flex; animation: kk-pop .4s var(--ta-glide) both; }

/* 휴대폰 알림(넓은 화면에서는 대화 칸 답을 본다) */
.s-kakao .kk-toast { display: none; }

@container tadesk (max-width: 700px) {
  .s-kakao .kk-t5, .s-kakao .kk-list, .s-kakao .kk-room { inset: 10px; width: auto; height: auto; }
  .s-kakao .kk-t5 { z-index: 1; }
  .s-kakao .kk-list { z-index: 2; }
  .s-kakao .kk-room { z-index: 3; }
  .s-kakao .ta-other, .s-kakao .kk-list { opacity: 0; transform: translateX(28px); transition: transform .5s var(--ta-glide), opacity .22s; }
  .s-kakao .ta-other.in, .s-kakao .kk-list.in { opacity: 1; transform: none; }
  .s-kakao .kk-chip i { font-size: 12px; }
  .s-kakao .kk-t5.lit { z-index: 5; animation: kk-front .45s var(--ta-glide) both; }
  @keyframes kk-front { from { transform: scale(.96); opacity: .5; } }
  .s-kakao .kk-rt b, .s-kakao .kk-rt small, .s-kakao .kk-rm time, .s-kakao .kk-badge, .s-kakao .kk-nm, .s-kakao .kk-day span,
  .s-kakao .kk-o time, .s-kakao .kk-meta time, .s-kakao .kk-unread, .s-kakao .kk-send, .s-kakao .kk-lb, .s-kakao .kk-app,
  .s-kakao .kk-btns span, .s-kakao .kk-done { font-size: 12px; }
  .s-kakao .kk-b, .s-kakao .kk-field, .s-kakao .kk-msg, .s-kakao .kk-chip { font-size: 12.5px; }
  .s-kakao .kk-lh b { font-size: 16px; }
  .s-kakao .kk-q { font-size: 14px; }
  .s-kakao .kk-rhead b { font-size: 14px; }
  .s-kakao .kk-badge { height: 19px; line-height: 19px; }
  .s-kakao .kk-r { padding: 8px 8px; }
  .s-kakao .kk-toast { position: absolute; z-index: 8; left: 18px; right: 18px; top: 18px; display: flex; align-items: center; gap: 10px; padding: 11px 13px; border-radius: 14px; background: rgba(255, 255, 255, .94); box-shadow: 0 12px 30px -12px rgba(0, 0, 0, .35), 0 0 0 .5px rgba(0, 0, 0, .12); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); font-size: 12.5px; line-height: 1.45; opacity: 0; transform: translateY(-24px); transition: opacity .3s, transform .55s var(--ta-ovs); }
  .s-kakao .kk-toast.show { opacity: 1; transform: none; }
  .s-kakao .kk-toast .ta-logo { flex: none; width: 30px; height: 30px; border-radius: 8px; background: #fff center / 28px no-repeat; box-shadow: 0 0 0 1px var(--ta-bd); }
  .s-kakao .kk-toast span { display: grid; }
  .s-kakao .kk-toast b { font-size: 12px; font-weight: 700; color: var(--ta-sub); }
}
@media (max-width: 860px) {
  .s-kakao .ta-desk { --ta-h: 540px; }
}
@media (prefers-reduced-motion: reduce) {
  .s-kakao .kk-mine.in, .s-kakao .kk-sheet.go .kk-done, .s-kakao .kk-t5.lit { animation: none; }
}
