/* 사업 도구 페이지 (style.css 다음에 불러요). 글자 크기는 calc(Npx * var(--fz)), 간격은 4의 배수 */
.tools-page .hero { margin-bottom: 16px !important; }
.tools-page .hero .banner { display: block; text-decoration: none; }
.tools-page .hero .banner .gname, .tools-page .hero .banner .tagline { display: block; }
.thead { margin: 24px 0 16px; }
.thead h1 { font-size: calc(26px * var(--fz)) !important; margin: 0 0 4px !important; font-weight: 700; }
.thead .lead { margin: 0; color: var(--ink2); font-size: calc(16px * var(--fz)); }
.tgroup { margin: 24px 0 8px; }
.tgroup h2 { font-size: calc(17px * var(--fz)); margin: 0 0 12px; font-weight: 700; }
.tgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.tlink { display: flex; flex-direction: column; gap: 4px; margin: 0; text-decoration: none; color: var(--ink); transition: border-color .15s; }
.tlink:hover { border-color: var(--selb); }
.tlink b { font-size: calc(16px * var(--fz)); }
.tlink .hint { font-size: calc(14px * var(--fz)); line-height: 1.5; }
.tcrumb { margin-top: 20px; display: flex; align-items: center; gap: 8px; }
.tcrumb .lnk { padding: 0; display: inline-flex; align-items: center; gap: 4px; font-weight: 500; color: var(--ink2); text-decoration: none; }

/* 배치: 넓은 화면은 왼쪽 입력 · 오른쪽 결과, 휴대폰은 결과 요약 → 입력 → 나머지 결과 */
.tlay { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); grid-template-rows: auto 1fr; grid-template-areas: "form main" "form rest"; gap: 0 16px; align-items: start; }
.tmain { grid-area: main; } .tform { grid-area: form; } .trest { grid-area: rest; min-width: 0; }
@media (max-width: 780px) { .tlay { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; grid-template-areas: "form" "main" "rest"; } } /* 휴대폰은 입력 → 결과 순서 (2026-11-23 대표님 요청) */
.tmain { display: flex; flex-direction: column; gap: 4px; border-color: var(--selb); }
.tmain small { color: var(--mut); font-size: calc(14px * var(--fz)); }
.tmain b { font-size: calc(30px * var(--fz)); line-height: 1.2; font-weight: 700; letter-spacing: -0.01em; word-break: keep-all; }
@media (max-width: 780px) { .tmain b { font-size: calc(24px * var(--fz)); } }

/* 입력 */
.tfh { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.tfh h3 { margin: 0; font-size: calc(16px * var(--fz)); } .tfh .lnk { padding: 0; font-size: calc(13px * var(--fz)); color: var(--mut); font-weight: 400; }
.tfield { display: flex; flex-direction: column; gap: 4px; padding: 8px 0; }
.tfield > label { font-size: calc(14px * var(--fz)); font-weight: 600; color: var(--ink2); }
.tfield > .hint { font-size: calc(13px * var(--fz)); line-height: 1.5; }
.tin { display: flex; align-items: center; gap: 8px; }
.tin .inp { flex: 1; min-width: 0; width: auto; height: 40px; font-size: calc(16px * var(--fz)); font-variant-numeric: tabular-nums; }
.tin i { font-style: normal; color: var(--mut); font-size: calc(14px * var(--fz)); min-width: 16px; }
.tread { min-height: 1.2em; font-size: calc(12px * var(--fz)) !important; text-align: left; }
.tchk { display: flex; align-items: center; gap: 8px; font-size: calc(14px * var(--fz)); font-weight: 600; color: var(--ink2); cursor: pointer; }
.tchk input { width: 18px; height: 18px; accent-color: var(--acc); }
.tseg { display: flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: 10px; background: var(--btn); border: 1px solid var(--btnb); }
.tseg button { flex: 1; border: 0; background: transparent; border-radius: 7px; padding: 8px 12px; color: var(--mut); white-space: nowrap; font-size: calc(14px * var(--fz)); }
.tseg button.on { background: var(--sel); color: var(--ink); }
.trows .trow { position: relative; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 12px; border: 1px solid var(--line2); border-radius: 8px; margin-bottom: 8px; background: var(--soft); }
.trows .trow .tc-text { grid-column: 1 / -1; padding-right: 24px; }
.trows .trow .tcell { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.trows .trow .tcell > small { font-size: calc(12px * var(--fz)); color: var(--mut); display: flex; align-items: center; gap: 4px; }
.trows .tcell .tin .inp { height: 36px; font-size: calc(15px * var(--fz)); }
.trows .tcell.tc-text .inp { text-align: left; }
.trows .tcell select.inp { width: 100%; height: 36px; text-align: left; }
.trows .tcell.tc-bool .tchk { height: 36px; }
.trows .trow .tlab { font-size: calc(15px * var(--fz)); line-height: 36px; }
.tdel { position: absolute; top: 4px; right: 4px; border: 0; background: transparent; color: var(--mut); padding: 4px; border-radius: 6px; }
.tdel:hover { background: var(--hover); color: var(--ink); }
.tadd { padding: 0; display: inline-flex; align-items: center; gap: 4px; font-size: calc(14px * var(--fz)); }
.tq { color: var(--mut); cursor: help; display: inline-flex; }

/* 결과 */
.tstats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
.tstat { background: var(--card); border: 1px solid var(--cardb); border-radius: var(--r); padding: 12px 16px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tstat small { color: var(--mut); font-size: calc(13px * var(--fz)); line-height: 1.45; }
.tstat b { font-size: calc(17px * var(--fz)); font-weight: 700; word-break: keep-all; }
.tstat.bad b { color: var(--badtx); } .tstat.good b { color: var(--goodtx); }
.tcalc h3 { font-size: calc(15px * var(--fz)); margin: 0 0 12px; }
.tbars { display: flex; flex-direction: column; gap: 8px; }
.tbar { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr) auto; align-items: center; gap: 8px; font-size: calc(13px * var(--fz)); }
.tbar .tl { color: var(--ink2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tbar .tt { height: 10px; background: var(--track); border-radius: 5px; overflow: hidden; }
.tbar .tt i { display: block; height: 100%; background: var(--acc); border-radius: 5px; }
.tbar .tt i.neg { background: var(--bad); } .tbar .tt i.me { background: var(--ink); }
.tbar b { white-space: nowrap; font-weight: 600; text-align: right; } .tbar b.neg { color: var(--badtx); }
@media (max-width: 780px) { .tbar { grid-template-columns: minmax(0, 1fr) auto; } .tbar .tt { grid-column: 1 / -1; grid-row: 2; } }
.tstack { display: flex; height: 16px; border-radius: 6px; overflow: hidden; background: var(--track); }
.tstack i { display: block; height: 100%; }
.tlegend { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 8px; font-size: calc(12px * var(--fz)); color: var(--ink2); }
.tlegend span { display: inline-flex; align-items: center; gap: 4px; }
.tlegend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.c0 { background: var(--s2) !important; } .c1 { background: var(--s1) !important; } .c2 { background: var(--s3) !important; } .c3 { background: var(--s4) !important; } .c4 { background: var(--s7) !important; } .c5 { background: var(--s5) !important; }
.tstage { padding: 8px 0; border-top: 1px solid var(--line2); } .tstage:first-child { border-top: 0; padding-top: 0; }
.tsh { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: baseline; margin-bottom: 8px; font-size: calc(14px * var(--fz)); }
.tsh .hint { font-size: calc(12px * var(--fz)); }
.tchart { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px; }
.ty { display: flex; flex-direction: column; justify-content: space-between; font-size: calc(11px * var(--fz)); color: var(--mut); text-align: right; padding: 0 0 24px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ty .neg { color: var(--badtx); }
.tplot { min-width: 0; } .tplot svg { border-left: 1px solid var(--line); border-bottom: 1px solid var(--line); box-sizing: border-box; }
.tx { display: flex; justify-content: space-between; font-size: calc(11px * var(--fz)); color: var(--mut); padding: 4px 0 0; height: 24px; box-sizing: border-box; }
.tzhint { margin: 8px 0 0; font-size: calc(12px * var(--fz)); }
.tline { width: 100%; height: 160px; display: block; overflow: visible; }
.tline path { stroke-width: 2; vector-effect: non-scaling-stroke; } .tline .tl0 { stroke: var(--acc); } .tline .tl1 { stroke: var(--s1); }
.tline .tz { stroke: var(--bad); stroke-dasharray: 4 4; vector-effect: non-scaling-stroke; }
.tline text { font-size: 11px; fill: var(--mut); }
.tlegend i.l0 { background: var(--acc); } .tlegend i.l1 { background: var(--s1); }
.tsteps { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; font-size: calc(14px * var(--fz)); }
.tsteps li b { display: block; } .tsteps li span { color: var(--ink2); }
.tbasis { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; font-size: calc(13px * var(--fz)); color: var(--ink2); line-height: 1.6; }
.tgamebox { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 0 0; }
.tgamebox .hint { margin: 0; font-size: calc(13px * var(--fz)); }
.btn.tgame { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: var(--acc); border-color: var(--acc); padding: 8px 16px; }
.btn.tgame:hover { background: var(--accbg); }
.tools-page .fdonate .btn.donatebtn { text-decoration: none; display: inline-flex; align-items: center; gap: 8px; }
.tools-page .flinks a.lnk { text-decoration: none; }
@media (max-width: 480px) { .trows .trow .tc-money { grid-column: 1 / -1; } }
.thead .lead { word-break: keep-all; } .thead .lead span { display: inline-block; }

/* 사업 도구 첫 페이지 제목·문구는 게임 탭 소개 문구처럼 가운데 (2026-11-23 대표님 요청) */
.thead.thome { text-align: center; }
/* 화면에서는 숨기고 검색 로봇·화면 읽기 프로그램에는 남기는 제목 (2026-11-23 대표님 요청: '사업 도구' 큰 제목 빼기) */
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; margin: -1px; padding: 0; border: 0; }
