/* 티파이브 앱 화면 공용 틀 (A안 새 장면들이 함께 씀) — 2026-11-16
   실제 앱 화면(assets/proposal/screens/*.webp)을 HTML로 다시 그린 것: 왼쪽 대화 칸 + 오른쪽 자료 칸.
   장면마다 scenes/<이름>.css 에서 .s-<이름> 아래로 이 틀을 넓힌다. 모든 선택자는 .ta- 로 시작한다.
   움직임 상태는 공용 되돌리기가 지우는 클래스(.in .show .busy .checked .go .lit .hit .half)만 쓴다.
   곡선은 KINETICS 네 가지(glide·spring·overshoot·in-out). 넓은 화면 글자 11px 이상, 휴대폰 12px 이상. */

.ta-desk {
  --ta-glide: cubic-bezier(0.16, 1, 0.3, 1);
  --ta-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ta-ovs: cubic-bezier(0.18, 1.25, 0.4, 1);
  --ta-inout: cubic-bezier(0.65, 0, 0.35, 1);
  --ta-h: 470px;
  --ta-shadow: 0 30px 60px -20px rgba(0, 0, 0, .35), 0 0 0 .5px rgba(0, 0, 0, .22);
  --ta-tx: #1d1d1f;
  --ta-sub: #6e6e73;
  --ta-faint: #8a8a8e;
  --ta-bd: #e5e5e8;
  container: tadesk / inline-size;
  position: relative; height: var(--ta-h); border-radius: 16px; overflow: hidden; isolation: isolate;
  background: radial-gradient(120% 90% at 85% 0%, #dfe8f8 0%, rgba(223, 232, 248, 0) 60%), linear-gradient(155deg, #eef2f9 0%, #e1e7f1 100%);
  box-shadow: inset 0 0 0 1px rgba(17, 17, 16, .05);
  font-size: 12px; line-height: 1.5; color: var(--ta-tx); letter-spacing: -.005em; text-align: left;
}
.ta-desk p { margin: 0; }
.ta-desk ul, .ta-desk ol { list-style: none; margin: 0; padding: 0; }

/* ───────── macOS 창 ───────── */
.ta-win { position: absolute; display: flex; flex-direction: column; background: #fff; border-radius: 11px; box-shadow: var(--ta-shadow); overflow: hidden; }
.ta-bar { position: relative; flex: none; display: flex; align-items: center; gap: 10px; height: 30px; padding: 0 11px; background: linear-gradient(#f8f8f9, #efeff2); border-bottom: 1px solid #dcdce0; }
.ta-lights { display: flex; gap: 7px; flex: none; }
.ta-lights i { width: 12px; height: 12px; border-radius: 50%; background: #ff5f57; box-shadow: inset 0 0 0 .5px rgba(0, 0, 0, .14); }
.ta-lights i:nth-child(2) { background: #febc2e; }
.ta-lights i:nth-child(3) { background: #28c840; }
.ta-title { position: absolute; inset: 0 70px; display: grid; place-items: center; font-size: 12px; font-weight: 600; color: #3b3b3e; white-space: nowrap; overflow: hidden; pointer-events: none; }

/* ───────── 티파이브 앱: 대화 칸 | 자료 칸 ─────────
   자료 칸은 결과가 생기면 열린다(.ta-app.show). 열린 비율은 --ta-side 로 장면마다 정한다. */
.ta-app { inset: 16px; flex-direction: row; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0fr); transition: grid-template-columns .7s var(--ta-glide); }
.ta-app.show, .ta-app.open { grid-template-columns: minmax(0, 1fr) minmax(0, var(--ta-side, 1.15fr)); }
/* .open 은 처음부터 열린 자료 칸(공용 되돌리기가 지우지 않음). 휴대폰에서는 .show 일 때만 올라온다. */
.ta-chat { position: relative; display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.ta-side { position: relative; display: flex; flex-direction: column; min-width: 0; min-height: 0; overflow: hidden; border-left: 1px solid var(--ta-bd); background: #fff; }
.ta-swap { position: absolute; z-index: 3; right: -12px; top: 50%; width: 23px; height: 23px; margin-top: -12px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 1px var(--ta-bd), 0 2px 6px -2px rgba(0, 0, 0, .15); display: grid; place-items: center; }
.ta-swap svg { width: 12px; height: 12px; fill: none; stroke: #55555a; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }

.ta-swap { transition: opacity .3s; }
.ta-app:not(.show):not(.open) .ta-swap { opacity: 0; }

/* 빈 대화 — 첫 말을 보내면 사라진다 */
.ta-empty { position: absolute; left: 0; right: 0; top: 40%; display: grid; justify-items: center; gap: 8px; text-align: center; color: var(--ta-sub); font-size: 12.5px; transition: opacity .3s; pointer-events: none; }
.ta-empty .ta-logo { width: 34px; height: 34px; border-radius: 10px; background: #fff center / 30px no-repeat; box-shadow: 0 0 0 1px var(--ta-bd); }
.ta-chat:has(.ta-thread .ta-m.in, .ta-thread .ta-m.pre) .ta-empty { opacity: 0; }

/* 대화 칸 머리: 신호등 · 대화 제목 · 찾기 */
.ta-head { flex: none; display: flex; align-items: center; gap: 10px; height: 38px; padding: 0 12px; border-bottom: 1px solid #ececef; background: #fff; }
.ta-head b { min-width: 0; font-size: 12.5px; font-weight: 700; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ta-head .ta-ics { margin-left: auto; display: flex; gap: 9px; flex: none; }
.ta-ics svg { width: 14px; height: 14px; fill: none; stroke: #6e6e73; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.ta-ics .ta-dot { width: 6px; height: 6px; margin: 4px 2px; border-radius: 50%; background: #2f8f5b; }
.ta-folder { flex: none; display: flex; align-items: center; height: 34px; padding: 0 12px; border-bottom: 1px solid #f1f1f3; }
.ta-folder span { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px 0 8px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--ta-bd); font-size: 11.5px; font-weight: 700; color: #3a3a3c; }
.ta-folder svg { width: 13px; height: 11px; }

/* 대화 줄기: 새 말은 아래에 붙고, 위 글은 부드럽게 밀려 올라간다(높이 0→자기 높이) */
.ta-thread { flex: 1; min-height: 0; display: flex; flex-direction: column; justify-content: flex-end; gap: 0; padding: 0 14px 6px; overflow: hidden; -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 22px); mask-image: linear-gradient(to bottom, transparent 0, #000 22px); }
.ta-m { display: grid; grid-template-rows: 0fr; opacity: 0; transition: grid-template-rows .5s var(--ta-glide), opacity .35s ease .08s; }
.ta-m > .ta-mi { min-height: 0; overflow: hidden; }
.ta-m.in { grid-template-rows: 1fr; opacity: 1; }
.ta-m.pre { grid-template-rows: 1fr; opacity: 1; } /* 처음부터 보이는 지난 대화 */
.ta-mi > :first-child { margin-top: 12px; }

/* 내가 보낸 말 */
.ta-me { display: flex; flex-direction: column; align-items: flex-end; }
.ta-me p.ta-bub { max-width: 88%; padding: 8px 12px; border-radius: 15px; background: #f4f4f5; box-shadow: inset 0 0 0 1px #e4e4e7; font-size: 12.5px; line-height: 1.5; color: var(--ta-tx); }
.ta-me .ta-time { margin-top: 4px; padding-right: 4px; font-size: 11px; color: var(--ta-faint); }

/* 작업 과정 보기 — 단계마다 돌다가 체크 */
.ta-steps { padding: 2px 0 0; }
.ta-steps-h { display: flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--ta-sub); }
.ta-steps-h svg { width: 9px; height: 9px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; transform: rotate(90deg); }
.ta-steps ol { display: grid; gap: 4px; margin: 6px 0 0 4px !important; padding-left: 10px !important; border-left: 1.5px solid #ececef; }
.ta-steps li { display: flex; align-items: center; gap: 7px; min-height: 19px; font-size: 11.5px; color: var(--ta-faint); opacity: .45; transition: opacity .3s, color .3s; }
.ta-steps li.busy, .ta-steps li.checked { opacity: 1; color: #3a3a3c; }
.ta-steps li i { position: relative; flex: none; width: 13px; height: 13px; border-radius: 50%; box-shadow: inset 0 0 0 1.4px #c9c9ce; }
.ta-steps li.busy i { box-shadow: inset 0 0 0 1.6px rgba(22, 89, 239, .18); }
.ta-steps li.busy i::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 1.6px solid transparent; border-top-color: var(--cobalt); animation: ta-spin .7s linear infinite; }
.ta-steps li.checked i { background: var(--success); box-shadow: none; }
.ta-steps li.checked i::after { content: ""; position: absolute; left: 4.2px; top: 2.2px; width: 3.4px; height: 6.2px; border: solid #fff; border-width: 0 1.6px 1.6px 0; transform: rotate(45deg); animation: ta-tick .3s var(--ta-spring) both; }
@keyframes ta-spin { to { transform: rotate(1turn); } }
@keyframes ta-tick { from { transform: rotate(45deg) scale(.2); opacity: 0; } }

/* 티파이브 답 */
.ta-who { font-size: 11px; color: var(--ta-faint); }
.ta-who b { font-weight: 500; margin-right: 6px; color: var(--ta-sub); }
.ta-p { margin-top: 4px !important; font-size: 12.5px; line-height: 1.6; color: var(--ta-tx); }
.ta-p strong { font-weight: 700; }
.ta-p code { padding: 1px 5px; border-radius: 5px; background: #f1f1f3; font: inherit; font-size: 11.5px; }
.ta-acts { display: flex; gap: 12px; margin-top: 6px !important; }
.ta-acts svg { width: 13px; height: 13px; fill: none; stroke: #8a8a8e; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }

/* 만든 파일 카드 */
.ta-file { display: flex; align-items: center; gap: 10px; margin-top: 8px !important; padding: 9px 11px; border-radius: 12px; background: #fff; box-shadow: inset 0 0 0 1px var(--ta-bd), 0 1px 2px rgba(0, 0, 0, .03); }
.ta-ft { flex: none; display: grid; place-items: center; width: 40px; height: 36px; border-radius: 8px; background: #e9f5ee; color: #1f7a45; font-size: 11px; font-weight: 800; letter-spacing: -.01em; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .04); }
.ta-ft.hwp { background: #e6f2fa; color: #0f6f9e; }
.ta-ft.ppt { background: #fdeee6; color: #b4471b; }
.ta-ft.mp4 { background: #efeafd; color: #5b3fc4; }
.ta-ft.pdf { background: #fde9e9; color: #b42318; }
.ta-ft.img { width: 36px; padding: 0; overflow: hidden; background: #eee center / cover no-repeat; }
.ta-fn { display: grid; min-width: 0; line-height: 1.35; }
.ta-fn b { font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ta-fn small { font-size: 11px; color: var(--ta-faint); }
.ta-fa { margin-left: auto; flex: none; display: flex; align-items: center; gap: 9px; font-size: 11.5px; color: #3a3a3c; }
.ta-fa span { padding: 3px 8px; border-radius: 7px; background: #f1f1f3; }
.ta-fa svg { width: 13px; height: 13px; fill: none; stroke: #55555a; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.ta-undo { display: flex; align-items: center; gap: 5px; margin-top: 8px !important; font-size: 11.5px; color: var(--ta-sub); }
.ta-undo svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }

/* 입력 칸 — 글자가 들어오면 보내기 단추가 코발트로(.go) */
.ta-comp { flex: none; display: flex; align-items: center; gap: 8px; margin: 6px 12px 12px; min-height: 40px; padding: 7px 7px 7px 11px; border-radius: 14px; background: #fff; box-shadow: inset 0 0 0 1px #d9d9de, 0 1px 2px rgba(0, 0, 0, .03); transition: box-shadow .25s; }
.ta-comp.lit { box-shadow: inset 0 0 0 1.5px var(--cobalt), 0 0 0 4px rgba(22, 89, 239, .1); }
.ta-comp > svg { flex: none; width: 15px; height: 15px; fill: none; stroke: #6e6e73; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.ta-in { position: relative; flex: 1; min-width: 0; font-size: 12.5px; line-height: 1.45; color: var(--ta-tx); }
.ta-in .ta-ph { display: block; color: #a1a1a6; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ta-in .say:not(:empty) + .ta-ph, .ta-in .say:not(:empty) ~ .ta-ph { display: none; }
.ta-in .say { display: inline; }
.ta-in .say:empty { display: none; }
.ta-in .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; }
@keyframes ta-blink { 50% { opacity: 0; } }
.ta-send { flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: #d4d4d8; transition: background .2s, transform .2s var(--ta-spring); }
.ta-send svg { width: 12px; height: 12px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ta-send.go { background: var(--cobalt); }
.ta-send.hit { transform: scale(.82); }

/* ───────── 자료 칸 ───────── */
.ta-tabs { flex: none; display: flex; align-items: center; gap: 4px; height: 38px; padding: 0 10px; border-bottom: 1px solid #ececef; white-space: nowrap; }
.ta-tabs span { padding: 4px 10px; border-radius: 8px; font-size: 11.5px; color: var(--ta-sub); }
.ta-tabs span.on { background: #f1f1f3; color: var(--ta-tx); font-weight: 700; }
.ta-tabs svg { margin-left: auto; width: 15px; height: 15px; fill: none; stroke: #55555a; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.ta-ftab { flex: none; display: flex; align-items: flex-end; gap: 4px; height: 34px; padding: 0 10px; border-bottom: 1px solid #ececef; white-space: nowrap; }
.ta-ftab > span { padding: 0 8px 8px; font-size: 11px; color: var(--ta-sub); }
.ta-ftab .ta-fcur { position: relative; display: inline-grid; padding: 7px 24px 7px 10px; border-radius: 8px 8px 0 0; background: #fff; box-shadow: inset 0 0 0 1px #e2e2e6; font-size: 11.5px; font-weight: 600; color: var(--ta-tx); margin-bottom: -1px; min-width: 0; overflow: hidden; }
.ta-ftab .ta-fcur::after { content: "×"; position: absolute; right: 8px; top: 6px; font-weight: 400; color: #8a8a8e; }
.ta-fcur > span { grid-area: 1 / 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: opacity .3s; }
.ta-tool { flex: none; display: flex; align-items: center; gap: 10px; height: 30px; padding: 0 12px; font-size: 11px; color: #3a3a3c; border-bottom: 1px solid #f1f1f3; white-space: nowrap; }
.ta-tool .ta-note { min-width: 0; overflow: hidden; text-overflow: ellipsis; color: var(--ta-faint); }
.ta-tool .ta-ver { margin-left: auto; display: inline-flex; align-items: center; gap: 3px; flex: none; }
.ta-tool svg { width: 12px; height: 12px; flex: none; fill: none; stroke: #55555a; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.ta-saved { display: inline-flex; align-items: center; gap: 4px; flex: none; color: var(--success); font-weight: 600; opacity: 0; transform: translateY(3px); transition: opacity .3s, transform .4s var(--ta-spring); }
.ta-saved::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.ta-saved.show { opacity: 1; transform: none; }
.ta-view { position: relative; flex: 1; min-height: 0; overflow: hidden; background: #f5f5f7; }

/* ───────── 커서 ─────────
   티파이브 커서: 코발트 화살표 + 이름표. 사람 커서(.ta-ucur): 검은 macOS 화살표. 위치는 ta.js 가 transform 으로 옮긴다. */
.ta-cur, .ta-ucur { position: absolute; z-index: 30; left: 0; top: 0; width: 18px; height: 22px; opacity: 0; pointer-events: none; transition-property: transform, opacity; transition-duration: .6s, .25s; transition-timing-function: var(--ta-inout), ease; }
.ta-cur.show, .ta-ucur.show { opacity: 1; }
.ta-cur > svg, .ta-ucur > svg { position: absolute; left: -2px; top: -2px; width: 18px; height: 22px; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .28)); transform-origin: 2px 2px; transition: transform .12s; }
.ta-cur.hit > svg, .ta-ucur.hit > svg { transform: scale(.8); }
.ta-cur .ta-tag { position: absolute; left: 14px; top: 19px; display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 7px 0 3px; border-radius: 6px; background: var(--cobalt); color: #fff; font-size: 11px; font-weight: 700; line-height: 1; white-space: nowrap; box-shadow: 0 4px 10px -4px rgba(0, 0, 0, .35); }
.ta-cur .ta-tag i { flex: none; width: 15px; height: 15px; border-radius: 4px; background: #fff center / 13px no-repeat; }

/* 무대 오른쪽 끝 가까이에서는 이름표를 커서 왼쪽으로(ta.js 가 .ta-flip 을 붙인다) */
.ta-cur.ta-flip .ta-tag { left: auto; right: 10px; }

/* 클릭한 자리 물결 */
.ta-ripple { position: absolute; z-index: 29; width: 26px; height: 26px; margin: -13px 0 0 -13px; border-radius: 50%; background: rgba(22, 89, 239, .28); pointer-events: none; animation: ta-ripple .55s var(--ta-glide) forwards; }
@keyframes ta-ripple { from { transform: scale(.3); opacity: 1; } to { transform: scale(1.6); opacity: 0; } }

/* 다른 앱 창(크롬·카카오톡·Finder 등)을 티파이브 창 옆에 둘 때 — 장면 css 에서 자리와 크기를 정한다 */
.ta-other { transform: translateY(14px) scale(.97); opacity: 0; transition: transform .6s var(--ta-glide), opacity .4s; }
.ta-other.in { transform: none; opacity: 1; }

/* ───────── 휴대폰 ─────────
   한 칸씩: 대화 칸을 꽉 채우고, 자료 칸(.ta-side)은 3막에 아래에서 올라와 덮는다. */
@container tadesk (max-width: 700px) {
  .ta-app { inset: 10px; grid-template-columns: minmax(0, 1fr) !important; }
  .ta-side { position: absolute; z-index: 4; inset: var(--ta-side-top, 34%) 0 0 0; border-left: 0; border-top: 1px solid var(--ta-bd); border-radius: 14px 14px 0 0; box-shadow: 0 -12px 30px -14px rgba(0, 0, 0, .3); transform: translateY(102%); transition: transform .6s var(--ta-glide); }
  .ta-app.show .ta-side { transform: none; }
  .ta-swap { display: none; }
  .ta-head .ta-ics { display: none; }
  .ta-desk, .ta-me p.ta-bub, .ta-p, .ta-in { font-size: 12.5px; }
  .ta-steps li, .ta-steps-h, .ta-undo, .ta-folder span, .ta-tabs span, .ta-ftab > span, .ta-ftab .ta-fcur, .ta-fn b, .ta-fa { font-size: 12px; }
  .ta-who, .ta-me .ta-time, .ta-fn small, .ta-tool, .ta-cur .ta-tag { font-size: 12px; }
  .ta-tool .ta-note { display: none; }
  .ta-p code { font-size: 12px; }
  .ta-ft { width: 44px; font-size: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .ta-desk *, .ta-desk *::before, .ta-desk *::after { transition-duration: 0s !important; animation-duration: 0s !important; animation-iteration-count: 1 !important; }
}
