/* 한국 업무 도구 탭 — 홈택스 세금계산서 정리 (scenes/hometax.html). 틀은 ta.css, 여기서는 .s-hometax 아래만.
   넓은 화면: 왼쪽 티파이브 대화 창 + 오른쪽 크롬(홈택스). 엑셀을 만들 때 티파이브 창이 넓어지며 크롬을 덮는다.
   휴대폰: 대화 창을 꽉 채우고, 크롬과 엑셀은 차례로 아래에서 올라온다. 홈택스 상징 그림은 그리지 않는다. */

/* ───────── 자리 ───────── */
/* 대화 칸 폭은 무대 폭에 따라 272~304px. 크롬은 그 오른쪽을 채우고, 엑셀을 열 때 티파이브 창이 끝까지 넓어진다. */
.s-hometax .ta-desk { --tw: clamp(272px, 39cqw, 304px); }
@container tadesk (min-width: 701px) {
  .s-hometax .ta-app, .s-hometax .ta-app.show { right: auto; z-index: 3; width: var(--tw); grid-template-columns: var(--tw) minmax(0, 1fr); transition: width .75s var(--ta-glide); }
  .s-hometax .ta-app.show { width: calc(100% - 32px); }
  .s-hometax .ht-cr { left: calc(var(--tw) + 26px); top: 30px; right: 16px; bottom: 30px; }
}

.s-hometax .ta-swap { display: none; }

/* 바탕화면 아이콘 */
.s-hometax .ht-icons { position: absolute; top: 34px; right: 30px; display: grid; gap: 14px; justify-items: center; }
.s-hometax .ht-icons li { display: grid; justify-items: center; gap: 4px; width: 92px; font-size: 11px; font-weight: 500; color: #2b2f36; text-align: center; }
.s-hometax .ht-icons svg { width: 34px; height: 38px; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .12)); }
.s-hometax .ht-icons span { padding: 0 4px; border-radius: 4px; overflow-wrap: anywhere; }

/* ───────── 크롬 창 ───────── */
.s-hometax .ht-cr { z-index: 2; background: #dfe3e8; opacity: 0; transform: translateY(14px) scale(.97); transition: transform .6s var(--ta-glide), opacity .4s; }
.s-hometax .ht-cr.show { opacity: 1; transform: none; }
.s-hometax .ht-top { flex: none; display: flex; align-items: flex-end; gap: 2px; height: 38px; padding: 0 8px; }
.s-hometax .ht-top .ta-lights { align-self: center; padding: 0 8px 0 3px; }
.s-hometax .ht-tab { display: inline-flex; align-items: center; gap: 6px; min-width: 0; max-width: 200px; height: 30px; padding: 0 12px 0 11px; border-radius: 9px 9px 0 0; background: #fff; font-size: 11.5px; font-weight: 600; color: var(--ta-tx); white-space: nowrap; box-shadow: 0 -1px 2px rgba(0, 0, 0, .05); }
.s-hometax .ht-fav { flex: none; width: 14px; height: 14px; }
.s-hometax .ht-tn { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.s-hometax .ht-load { display: none; flex: none; width: 12px; height: 12px; border-radius: 50%; border: 1.6px solid #d2d5da; border-top-color: #1f4e9c; animation: ta-spin .7s linear infinite; }
.s-hometax .ht-cr.busy .ht-load { display: block; }
.s-hometax .ht-bar { flex: none; display: flex; align-items: center; padding: 6px 10px; background: #fff; }
.s-hometax .ht-addr { flex: 1; min-width: 0; display: flex; align-items: center; gap: 7px; height: 28px; padding: 0 11px; border-radius: 999px; background: #f1f3f4; font-size: 12px; color: #5f6368; white-space: nowrap; overflow: hidden; }
.s-hometax .ht-addr b { font-weight: 600; color: var(--ta-tx); }
.s-hometax .ht-addr svg { width: 13px; height: 13px; flex: none; fill: none; stroke: #5b6066; stroke-width: 1.4; }

.s-hometax .ht-note { flex: none; display: grid; align-items: center; padding: 4px 11px 4px 33px; position: relative; background: #eef4ff; border-top: 1px solid #e3ebfb; border-bottom: 1px solid #e3ebfb; font-size: 11.5px; font-weight: 600; color: #35466e; white-space: nowrap; }
.s-hometax .ht-note .ta-logo { position: absolute; left: 11px; top: 50%; width: 15px; height: 15px; margin-top: -7.5px; border-radius: 4px; background: #fff center / 13px no-repeat; }
.s-hometax .ht-note > span { grid-area: 1 / 1; overflow: hidden; text-overflow: ellipsis; transition: opacity .3s; }
.s-hometax .ht-note b { color: var(--cobalt); font-weight: 700; }
.s-hometax .ht-n1 { opacity: 0; }
.s-hometax .ht-cr.in .ht-n0 { opacity: 0; }
.s-hometax .ht-cr.in .ht-n1 { opacity: 1; }

/* ───────── 홈택스 화면(느낌만) ───────── */
.s-hometax .ht-page { position: relative; flex: 1; min-height: 0; overflow: hidden; background: #fff; }
.s-hometax .ht-gnb { position: relative; z-index: 2; }
.s-hometax .ht-site { display: flex; align-items: center; gap: 7px; height: 34px; padding: 0 12px; border-bottom: 1px solid #edf0f4; }
.s-hometax .ht-site > i { flex: none; width: 16px; height: 16px; border-radius: 50%; background: conic-gradient(from 200deg, #1f4e9c, #3c7be0, #1f4e9c); }
.s-hometax .ht-site > b { font-size: 13.5px; font-weight: 800; letter-spacing: -.02em; color: #1d3567; }
.s-hometax .ht-user { margin-left: auto; display: grid; font-size: 11.5px; font-weight: 600; color: #3a4a66; }
.s-hometax .ht-user > span { grid-area: 1 / 1; justify-self: end; white-space: nowrap; transition: opacity .3s; }
.s-hometax .ht-u0 { padding: 3px 10px; border-radius: 6px; box-shadow: inset 0 0 0 1px #c9d3e3; }
.s-hometax .ht-u1 { opacity: 0; color: #1d3567; }
.s-hometax .ht-cr.in .ht-u0 { opacity: 0; }
.s-hometax .ht-cr.in .ht-u1 { opacity: 1; }
.s-hometax .ht-menu { display: flex; gap: 14px; height: 30px; align-items: center; padding: 0 12px; background: #f5f7fb; border-bottom: 1px solid #e6eaf1; font-size: 11.5px; font-weight: 700; color: #2c3b57; white-space: nowrap; overflow: hidden; }
.s-hometax .ht-menu span { position: relative; padding: 6px 0; }
.s-hometax .ht-cr.lit .ht-m1, .s-hometax .ht-cr.hit .ht-m1 { color: #1f4e9c; box-shadow: inset 0 -2px 0 #1f4e9c; }
.s-hometax .ht-dd { position: absolute; left: 8px; top: 66px; width: 168px; padding: 6px; border-radius: 9px; background: #fff; box-shadow: 0 14px 30px -12px rgba(0, 0, 0, .3), 0 0 0 1px rgba(0, 0, 0, .06); opacity: 0; transform: translateY(-4px); transition: opacity .2s, transform .3s var(--ta-glide); pointer-events: none; }
.s-hometax .ht-cr.lit .ht-dd { opacity: 1; transform: none; }
.s-hometax .ht-dd p { padding: 5px 8px; border-radius: 6px; font-size: 11.5px; color: #2c3b57; }
.s-hometax .ht-dd .ht-dd-h { padding-top: 6px; font-size: 11px; font-weight: 700; color: #7a8599; }
.s-hometax .ht-dd .ht-dd-i { font-weight: 700; color: #1d3567; }
.s-hometax .ht-dd .ht-dd-i.hit { background: #eaf0fb; }

/* 로그인 */
.s-hometax .ht-login { position: absolute; left: 50%; top: 82px; width: min(calc(100% - 24px), 280px); transform: translateX(-50%); display: grid; gap: 8px; padding: 14px 14px 16px; border-radius: 12px; background: #fff; box-shadow: 0 0 0 1px #e3e7ee, 0 12px 28px -18px rgba(0, 0, 0, .25); transition: opacity .3s; }
.s-hometax .ht-cr.in .ht-login { opacity: 0; visibility: hidden; }
.s-hometax .ht-lt { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 4px !important; border-bottom: 1px solid #e6eaf1; }
.s-hometax .ht-lt span { padding: 5px 0 6px; font-size: 11px; font-weight: 600; color: #7a8599; text-align: center; white-space: nowrap; }
.s-hometax .ht-lt .on { color: #1d3567; box-shadow: inset 0 -2px 0 #1f4e9c; font-weight: 700; }
.s-hometax .ht-field { display: grid; grid-template-columns: 52px minmax(0, 1fr); align-items: center; height: 32px; padding: 0 10px; border-radius: 7px; box-shadow: inset 0 0 0 1px #d6dce6; font-size: 11.5px; transition: box-shadow .2s; }
.s-hometax .ht-field span { color: #7a8599; }
.s-hometax .ht-field b { font-weight: 600; color: var(--ta-tx); white-space: nowrap; overflow: hidden; letter-spacing: .02em; }
.s-hometax .ht-pw.lit { box-shadow: inset 0 0 0 1.5px #1f4e9c, 0 0 0 3px rgba(31, 78, 156, .12); }
.s-hometax .ht-pw .say { letter-spacing: .1em; font-size: 11px; }
.s-hometax .ht-pw .caret { display: inline-block; width: 1.5px; height: 13px; margin-left: 2px; vertical-align: -2px; background: #111; animation: ta-blink 1s steps(1) infinite; }
.s-hometax .ht-go { display: grid; place-items: center; height: 32px; margin-top: 2px !important; border-radius: 7px; background: #1f4e9c; color: #fff; font-size: 12px; font-weight: 700; transition: transform .15s, background .2s; }
.s-hometax .ht-go.hit { transform: scale(.97); background: #173d7c; }

/* 목록조회 */
.s-hometax .ht-list { position: absolute; left: 0; right: 0; top: 64px; bottom: 0; padding: 10px 12px 0; opacity: 0; visibility: hidden; transform: translateY(8px); transition: opacity .3s, transform .5s var(--ta-glide); }
.s-hometax .ht-cr.hit .ht-list { opacity: 1; visibility: visible; transform: none; }
.s-hometax .ht-lh { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; white-space: nowrap; }
.s-hometax .ht-lh > b { font-size: 12.5px; font-weight: 800; color: #1d3567; letter-spacing: -.01em; }
.s-hometax .ht-cnt { font-size: 11.5px; color: #3a4a66; }
.s-hometax .ht-cnt b { color: #1f4e9c; font-weight: 800; font-variant-numeric: tabular-nums; }
.s-hometax .ht-flt { display: flex; align-items: center; gap: 6px; margin: 7px 0 8px !important; padding: 6px 8px; border-radius: 7px; background: #f5f7fb; font-size: 11px; color: #3a4a66; white-space: nowrap; overflow: hidden; }
.s-hometax .ht-rad { display: inline-flex; align-items: center; gap: 4px; }
.s-hometax .ht-rad::before { content: ""; width: 9px; height: 9px; border-radius: 50%; box-shadow: inset 0 0 0 1.3px #9aa6ba; }
.s-hometax .ht-rad.on::before { box-shadow: inset 0 0 0 3px #1f4e9c; }
.s-hometax .ht-date { margin-left: auto; font-variant-numeric: tabular-nums; }
.s-hometax .ht-tb { width: 100%; border-collapse: collapse; font-size: 11px; font-variant-numeric: tabular-nums; table-layout: fixed; }
.s-hometax .ht-tb th { height: 24px; padding: 0 6px; background: #eef2f8; border-top: 1.5px solid #1f4e9c; border-bottom: 1px solid #d6dce6; font-weight: 700; color: #2c3b57; text-align: left; white-space: nowrap; }
.s-hometax .ht-tb th:nth-child(1) { width: 52px; }
.s-hometax .ht-tb th:nth-child(3) { width: 82px; }
.s-hometax .ht-tb th:nth-child(4) { width: 64px; }
.s-hometax .ht-tb td { height: 25px; padding: 0 6px; border-bottom: 1px solid #edf0f4; color: #2b2f36; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.s-hometax .ht-tb .n { text-align: right; }
.s-hometax .ht-tb tbody tr { opacity: 0; }
.s-hometax .ht-cr.hit .ht-tb tbody tr { animation: ht-row .4s var(--ta-glide) both; animation-delay: calc(var(--i) * 55ms + 120ms); }
@keyframes ht-row { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }

/* ───────── 자료 칸의 엑셀 ───────── */
.s-hometax .ht-xl { background: #fff; }
.s-hometax .ht-sheet { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 11px; font-variant-numeric: tabular-nums; }
.s-hometax .ht-sheet col.c0 { width: 24px; }
.s-hometax .ht-sheet col.c1 { width: 17%; }
.s-hometax .ht-sheet col.c3 { width: 24%; }
.s-hometax .ht-sheet col.c4 { width: 21%; }
.s-hometax .ht-sheet th { height: 22px; background: #f3f4f6; border: 1px solid #e2e4e8; font-weight: 500; color: #6e6e73; text-align: center; }
.s-hometax .ht-sheet td { height: 25px; padding: 0 6px; border: 1px solid #e8eaed; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #1d1d1f; }
.s-hometax .ht-sheet .n { text-align: right; }
.s-hometax .ht-cap td { font-weight: 700; font-size: 11.5px; }
.s-hometax .ht-hd td { background: #e9f5ee; font-weight: 700; color: #1f5f3b; }
.s-hometax .ht-gap td { color: #8a8a8e; text-align: center; }
.s-hometax .ht-sum td { background: #fbf6e3; font-weight: 700; }
.s-hometax .ht-sum small { font-size: 11px; font-weight: 500; color: #8a8a8e; margin-left: 4px; }
.s-hometax .ht-sum b { font-weight: 800; }
.s-hometax .ht-sheet .ht-r, .s-hometax .ht-sheet .ht-sum { opacity: 0; }
.s-hometax .ta-app.show .ht-r, .s-hometax .ta-app.show .ht-sum { animation: ht-row .4s var(--ta-glide) both; animation-delay: calc(var(--i) * 60ms + 350ms); }
.s-hometax .ht-sheets { position: absolute; left: 0; right: 0; bottom: 0; display: flex; gap: 2px; padding: 0 8px; height: 26px; align-items: flex-start; background: #f3f4f6; border-top: 1px solid #e2e4e8; }
.s-hometax .ht-sheets span { padding: 3px 10px; font-size: 11px; color: #6e6e73; }
.s-hometax .ht-sheets .on { background: #fff; color: #1f7a45; font-weight: 700; box-shadow: 0 1px 0 #fff, inset 0 -2px 0 #1f7a45; }

/* 받은 파일 — 한 번 반짝 */
.s-hometax .ht-file.hit { animation: ht-flash 1.4s var(--ta-glide) both; }
@keyframes ht-flash { 40% { box-shadow: inset 0 0 0 1.5px var(--cobalt); background: #f3f7ff; } }

/* ───────── 휴대폰 ───────── */
@container tadesk (max-width: 700px) {
  .s-hometax .ht-icons { display: none; }
  .s-hometax .ta-side { inset: 9% 0 0 0; }
  .s-hometax .ta-side .ta-tool { display: none; }
  .s-hometax .ht-login { top: 74px; gap: 7px; padding: 12px 12px 14px; }
  .s-hometax .ta-ft { font-size: 12px; }
  .s-hometax .ht-cr { left: 10px; right: 10px; top: 12%; bottom: 10px; z-index: 4; border-radius: 14px; opacity: 1; box-shadow: 0 -12px 30px -14px rgba(0, 0, 0, .3), 0 0 0 .5px rgba(0, 0, 0, .2); transform: translateY(106%); }
  .s-hometax .ht-cr.show { transform: none; }
  .s-hometax .ht-top .ta-lights i { width: 9px; height: 9px; }
  .s-hometax .ht-tab { flex: 1; max-width: none; font-size: 12px; }
  .s-hometax .ht-addr, .s-hometax .ht-note, .s-hometax .ht-user, .s-hometax .ht-menu, .s-hometax .ht-dd p, .s-hometax .ht-dd .ht-dd-h, .s-hometax .ht-lt span, .s-hometax .ht-field, .s-hometax .ht-go, .s-hometax .ht-cnt, .s-hometax .ht-flt, .s-hometax .ht-tb, .s-hometax .ht-sheet, .s-hometax .ht-sum small, .s-hometax .ht-sheets span, .s-hometax .ht-cap td { font-size: 12px; }
  .s-hometax .ht-menu span:nth-child(4) { display: none; }
  .s-hometax .ht-tb th:nth-child(1) { width: 48px; }
  .s-hometax .ht-tb th:nth-child(3) { width: 84px; }
  .s-hometax .ht-tb th:nth-child(4) { width: 66px; }
  .s-hometax .ht-sheet col.c0 { width: 24px; }
  .s-hometax .ht-sheet col.c1 { width: 60px; }
  .s-hometax .ht-sheet col.c3 { width: 96px; }
  .s-hometax .ht-sheet col.c4 { width: 84px; }
  .s-hometax .ht-pw .say { font-size: 11px; }
}
/* 좁은 휴대폰: 세액 열을 빼서 거래처 이름이 다 보이게 */
@container tadesk (max-width: 480px) {
  .s-hometax .ht-sheet col.c4 { width: 0; }
  .s-hometax .ht-sheet tr > :nth-child(5) { display: none; }
  .s-hometax .ht-sheet col.c1 { width: 56px; }
  .s-hometax .ht-sheet col.c3 { width: 98px; }
  .s-hometax .ht-cap-d { display: none; }
  .s-hometax .ht-tb th:nth-child(4), .s-hometax .ht-tb td:nth-child(4) { display: none; }
  .s-hometax .ht-tb th:nth-child(3) { width: 92px; }
}
@media (prefers-reduced-motion: reduce) {
  .s-hometax .ht-tb tbody tr, .s-hometax .ht-r, .s-hometax .ht-sum { animation: none !important; opacity: 1 !important; }
  .s-hometax .ht-file.hit { animation: none; }
}
