/* sajang-calc.css — 사장님 계산기 블로그용 스타일 (티스토리 스킨에 한 번 올림)
   모든 클래스는 sjc- 접두어. 스킨 CSS와 겹치지 않게 .sjc(계산기 자리)·.sjc-post(글 본문) 안에서만 적용한다.
   모바일 우선, 블로그 본문 폭(부모 너비) 안에서만 그린다. 외부 글꼴 없음.
   손으로 쓴 파일이다. 다음 버전 원본은 tistory/next/sajang-calc.css(스킨 업로드 확인 뒤 build_tistory.py --promote가 tistory/로 옮김).
   새 클래스를 쓰면 여기에도 정의해야 test_calcs.py가 통과한다. */

/* ---------- 계산기 자리 (스크립트가 그리는 부분) ----------
   디자인 v3 (2026-10-01 오너 피드백: 토스·카카오처럼 익숙한 금융앱 패턴 — 로고·브랜드 색·전용 글꼴·문구는 쓰지 않음)
   한 화면에 한 질문(질문형 큰 제목 + 큰 숫자 칸) · 연한 회색 바탕 위 흰 카드 · 포인트 블루 1색 · 아래 꽉 찬 버튼 1개 ·
   결과는 큰 숫자 + 한 줄 · 다크모드. 사이트판 style.css의 '계산기 카드 v3'과 같은 모양 */
.sjc {
  --sjc-ink: #1b2130; --sjc-sub: #5d6676; --sjc-line: #e4e7ec; --sjc-field: #d5dae2; --sjc-soft: #eef1f5; --sjc-bg: #f3f5f8;
  --sjc-card: #ffffff; --sjc-accent: #2f5bd3; --sjc-accent-soft: #edf2fd; --sjc-on-accent: #ffffff; --sjc-warn: #8a5a00;
  box-sizing: border-box; display: block; width: 100%; max-width: 100%; margin: 24px 0; padding: 0;
  color: var(--sjc-ink); font-size: 16px; line-height: 1.6; text-align: left; color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Pretendard", "Malgun Gothic", "Noto Sans KR", sans-serif;
  word-break: keep-all; overflow-wrap: anywhere; -webkit-text-size-adjust: 100%;
}
@media (prefers-color-scheme: dark) {
  .sjc {
    --sjc-ink: #e8eaef; --sjc-sub: #a3abb9; --sjc-line: #2c323e; --sjc-field: #3d4554; --sjc-soft: #252b37; --sjc-bg: #0e1117;
    --sjc-card: #1a1f29; --sjc-accent: #8fb0ff; --sjc-accent-soft: #23304d; --sjc-on-accent: #0f1420; --sjc-warn: #f0c36b;
    color-scheme: dark;
  }
}
.sjc *, .sjc *::before, .sjc *::after { box-sizing: border-box; }
.sjc [hidden] { display: none !important; }
.sjc p { margin: 0 0 8px; padding: 0; text-indent: 0; }
/* 회색 바탕 판 1장 */
.sjc .sjc-card {
  display: block; width: 100%; max-width: 100%; margin: 0; padding: 10px;
  background: var(--sjc-bg); color: var(--sjc-ink); border: 0; border-radius: 22px; box-shadow: none;
}
.sjc .sjc-calc fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.sjc .sjc-top-bar { display: flex; justify-content: flex-end; margin: 0 6px 4px; padding: 0; }
.sjc .sjc-link-btn {
  width: auto; min-height: 44px; margin: 0; padding: 6px 2px; font: inherit; font-size: 14px; font-weight: 600; line-height: 1.3;
  color: var(--sjc-accent); -webkit-text-fill-color: var(--sjc-accent); background: none; border: 0; box-shadow: none; cursor: pointer;
}
/* 질문 1개 = 흰 카드 1장 */
.sjc .sjc-step { display: block; margin: 0 0 10px; padding: 24px 20px; background: var(--sjc-card); border-radius: 18px; }
.sjc .sjc-step:not([hidden]):not([data-step="1"]) { animation: sjc-in .28s ease-out; }
@keyframes sjc-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .sjc .sjc-step:not([hidden]):not([data-step="1"]) { animation: none; } }
.sjc .sjc-q, .sjc label.sjc-q {
  display: block; margin: 0 0 16px; padding: 0; font-size: 22px; font-weight: 700; line-height: 1.4; letter-spacing: -0.02em; color: var(--sjc-ink);
}
.sjc .sjc-hint { display: block; margin: 8px 0 0; font-size: 14px; line-height: 1.55; color: var(--sjc-sub); }
.sjc .sjc-top-hint { margin: -10px 0 14px; }
.sjc .sjc-sub, .sjc label.sjc-sub { display: block; margin: 0 0 4px; padding: 0; font-size: 14px; font-weight: 500; line-height: 1.45; color: var(--sjc-sub); }
.sjc .sjc-field { margin: 16px 0 0; padding: 0; }
.sjc .sjc-row { display: flex; gap: 16px; margin: 0; padding: 0; }
.sjc .sjc-row > .sjc-field { flex: 1 1 0; min-width: 0; margin-top: 0; }
.sjc .sjc-step > .sjc-row + .sjc-field { margin-top: 18px; }
.sjc .sjc-field-msg { display: block; margin-top: 8px; font-size: 14px; line-height: 1.5; color: var(--sjc-warn); font-weight: 600; }
.sjc input[type="text"], .sjc select {
  display: block; width: 100% !important; max-width: 100% !important; min-height: 48px; height: 48px; margin: 0;
  padding: 0 14px; font-size: 18px; line-height: 1.3; font-family: inherit; font-variant-numeric: tabular-nums;
  color: var(--sjc-ink); -webkit-text-fill-color: var(--sjc-ink); background: var(--sjc-card);
  border: 1px solid var(--sjc-field); border-radius: 12px; box-shadow: none; -webkit-appearance: none; appearance: none;
}
.sjc input[type="text"]::placeholder { color: var(--sjc-sub); -webkit-text-fill-color: var(--sjc-sub); opacity: .6; }
.sjc input[aria-invalid="true"] { border-color: var(--sjc-warn); }
.sjc select {
  padding-right: 36px;
  background-image: linear-gradient(45deg, transparent 50%, var(--sjc-sub) 50%), linear-gradient(135deg, var(--sjc-sub) 50%, transparent 50%);
  background-position: calc(100% - 19px) 50%, calc(100% - 13px) 50%; background-size: 6px 6px; background-repeat: no-repeat;
}
/* 단위(원·시간)는 칸 안 오른쪽 */
.sjc .sjc-unit { position: relative; display: block; margin: 0; padding: 0; }
.sjc .sjc-unit input[type="text"] { padding-right: 52px; text-align: right; }
.sjc .sjc-unit .sjc-u {
  position: absolute; top: 0; right: 14px; height: 48px; display: flex; align-items: center;
  font-size: 15px; color: var(--sjc-sub); pointer-events: none;
}
/* 큰 숫자 칸: 밑줄형, 왼쪽 정렬, 28px 굵게 */
.sjc .sjc-big-in input[type="text"], .sjc .sjc-mid-in input[type="text"] {
  height: 60px; min-height: 60px; padding: 0 44px 0 2px; text-align: left; font-size: 28px; font-weight: 700; letter-spacing: -0.01em;
  background: transparent; border: 0; border-bottom: 2px solid var(--sjc-field); border-radius: 0;
}
.sjc .sjc-mid-in input[type="text"] { height: 52px; min-height: 52px; font-size: 24px; }
.sjc .sjc-big-in input[type="text"]::placeholder, .sjc .sjc-mid-in input[type="text"]::placeholder { font-size: 20px; font-weight: 500; }
.sjc .sjc-big-in .sjc-u, .sjc .sjc-mid-in .sjc-u { right: 2px; height: 60px; font-size: 22px; font-weight: 600; color: var(--sjc-ink); }
.sjc .sjc-mid-in .sjc-u { height: 52px; font-size: 18px; }
.sjc .sjc-big-in input[type="text"]:focus, .sjc .sjc-mid-in input[type="text"]:focus { border-bottom-color: var(--sjc-accent); outline: none; }
.sjc .sjc-say { display: block; margin: 6px 0 0; font-size: 14px; line-height: 1.5; color: var(--sjc-sub); font-variant-numeric: tabular-nums; }
.sjc .sjc-say:empty { display: none; }
.sjc .sjc-quick-btns { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 0; padding: 0; }
.sjc .sjc-qb {
  display: inline-block; width: auto; min-height: 44px; margin: 0; padding: 0 16px; font: inherit; font-size: 14px; font-weight: 600; line-height: 1.2;
  color: var(--sjc-ink); -webkit-text-fill-color: var(--sjc-ink); background: var(--sjc-soft); border: 0; border-radius: 999px; box-shadow: none; cursor: pointer;
}
/* 고르는 질문: 큰 칩 */
.sjc .sjc-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; }
.sjc .sjc-chips .sjc-chip, .sjc .sjc-step .sjc-chips label.sjc-chip {
  position: relative; display: flex; align-items: center; justify-content: center; flex: 1 1 calc(50% - 8px); min-width: 0;
  min-height: 52px; margin: 0; padding: 10px 12px; cursor: pointer; text-align: center;
  font-size: 15px; font-weight: 500; line-height: 1.35; color: var(--sjc-ink);
  background: var(--sjc-soft); border: 0; border-radius: 14px;
}
.sjc .sjc-chips-2 .sjc-chip { flex-basis: calc(50% - 8px); }
.sjc .sjc-chip input, .sjc .sjc-seg-opt input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; }
.sjc .sjc-step .sjc-chips label.sjc-chip:has(input:checked) {
  color: var(--sjc-accent); background: var(--sjc-accent-soft); box-shadow: inset 0 0 0 1.5px var(--sjc-accent); font-weight: 700;
}
.sjc .sjc-chip:has(input:focus-visible), .sjc .sjc-seg-opt:has(input:focus-visible) { outline: 2px solid var(--sjc-accent); outline-offset: 2px; }
/* 두 가지 중 하나: 탭형 */
.sjc .sjc-seg { display: flex; gap: 4px; margin: 0 0 20px; padding: 4px; background: var(--sjc-soft); border-radius: 14px; }
.sjc .sjc-seg label.sjc-seg-opt {
  position: relative; flex: 1 1 0; min-width: 0; display: flex; align-items: center; justify-content: center; min-height: 44px; margin: 0;
  padding: 6px 8px; cursor: pointer; text-align: center; font-size: 15px; font-weight: 600; line-height: 1.3; color: var(--sjc-sub); border-radius: 11px;
}
.sjc .sjc-seg label.sjc-seg-opt:has(input:checked) { color: var(--sjc-ink); background: var(--sjc-card); box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
/* 예/아니오 질문: 체크 상자가 든 큰 줄 */
.sjc .sjc-checks { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.sjc .sjc-checks.sjc-stack { flex-direction: column; }
.sjc .sjc-field label.sjc-toggle, .sjc label.sjc-toggle {
  display: flex; align-items: flex-start; gap: 12px; margin: 0; padding: 14px 16px; min-height: 52px; cursor: pointer;
  font-size: 15px; font-weight: 500; line-height: 1.5; color: var(--sjc-ink);
  background: var(--sjc-soft); border: 0; border-radius: 14px;
}
.sjc .sjc-field label.sjc-toggle:has(input:checked), .sjc label.sjc-toggle:has(input:checked) { background: var(--sjc-accent-soft); box-shadow: inset 0 0 0 1.5px var(--sjc-accent); }
.sjc input[type="checkbox"] { width: 20px; height: 20px; margin: 2px 0 0; flex: 0 0 auto; accent-color: var(--sjc-accent); }
.sjc .sjc-step .sjc-checks:not(.sjc-stack) { margin-top: 10px; }
/* 덜 쓰는 설정(연도·달·1원 처리)은 접어 둔다 */
.sjc .sjc-opts { display: block; margin: 0 0 10px; padding: 0 20px; background: var(--sjc-card); border-radius: 18px; }
.sjc .sjc-opts summary {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; padding: 16px 0; cursor: pointer;
  font-size: 15px; font-weight: 600; color: var(--sjc-sub);
}
.sjc .sjc-opts-now { font-weight: 600; color: var(--sjc-ink); }
.sjc .sjc-opts[open] { padding-bottom: 20px; }
.sjc .sjc-opts > .sjc-row, .sjc .sjc-opts > .sjc-field:first-of-type { margin-top: 0; }
/* 아래 꽉 찬 버튼 1개 (입력하는 동안 화면 아래에 붙어 있음) */
.sjc .sjc-actions { position: sticky; bottom: 0; z-index: 1; margin: 0; padding: 10px 0 2px; background: var(--sjc-bg); }
.sjc .sjc-btn {
  display: block; width: 100%; min-height: 56px; margin: 0; padding: 0 16px; cursor: pointer;
  font-size: 17px; font-weight: 700; font-family: inherit; line-height: 1.2; border-radius: 16px; box-shadow: none;
  color: var(--sjc-on-accent); -webkit-text-fill-color: var(--sjc-on-accent); background: var(--sjc-accent); border: 0;
}
.sjc input:focus-visible, .sjc select:focus-visible, .sjc button:focus-visible, .sjc summary:focus-visible {
  outline: 2px solid var(--sjc-accent); outline-offset: 2px;
}
.sjc input[type="text"]:focus, .sjc select:focus { border-color: var(--sjc-accent); }
/* 결과: 흰 카드, 큰 숫자 + 한 줄 설명, 나머지는 작은 줄과 '자세히 보기' */
.sjc .sjc-result { margin: 10px 0 0; padding: 26px 20px 20px; background: var(--sjc-card); border-radius: 18px; }
.sjc .sjc-sum { display: flex; flex-direction: column; margin: 0; padding: 0; background: transparent; }
.sjc .sjc-sum .sjc-sum-row[data-main="1"] { order: -2; }
.sjc .sjc-sum .sjc-why { order: -1; }
.sjc .sjc-sum-row {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0; padding: 12px 0;
  border-top: 1px solid var(--sjc-line);
}
.sjc .sjc-sum-k { font-size: 15px; color: var(--sjc-sub); }
.sjc .sjc-sum-k small { font-size: 12px; }
.sjc .sjc-sum-v { font-size: 17px; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; color: var(--sjc-ink); }
.sjc .sjc-sum-row[data-main="1"] { flex-direction: column; align-items: flex-start; gap: 4px; padding: 0 0 4px; border-top: 0; }
.sjc .sjc-sum-row[data-main="1"] .sjc-sum-k { font-size: 16px; color: var(--sjc-ink); font-weight: 600; }
.sjc .sjc-sum-row[data-main="1"] .sjc-sum-v { font-size: 32px; font-weight: 800; letter-spacing: -0.02em; color: var(--sjc-accent); }
.sjc .sjc-why { margin: 2px 0 16px; font-size: 15px; font-weight: 500; line-height: 1.6; color: var(--sjc-ink); }
.sjc .sjc-how { margin: 8px 0 0; font-size: 14px; line-height: 1.55; color: var(--sjc-sub); }
.sjc .sjc-note, .sjc-post .sjc .sjc-note {
  margin: 10px 0 0; padding: 10px 12px; font-size: 14px; line-height: 1.55; color: var(--sjc-ink);
  background: var(--sjc-soft); border-left: 3px solid var(--sjc-warn); border-radius: 0 10px 10px 0;
}
.sjc .sjc-more { margin: 12px 0 0; padding: 0; }
/* 다시 계산하기: 결과 카드 맨 아래, 큰 버튼보다 한 단계 약한 회색 버튼 (2026-10-02 추가 — 옛 묶음 JS에는 이 버튼이 없어 영향 없음) */
.sjc .sjc-again { margin: 20px 0 0; padding: 16px 0 0; border-top: 1px solid var(--sjc-line); }
.sjc .sjc-btn-sub {
  display: block; width: 100%; min-height: 48px; margin: 0; padding: 0 16px; cursor: pointer;
  font: inherit; font-size: 16px; font-weight: 700; line-height: 1.2; border-radius: 14px; box-shadow: none;
  color: var(--sjc-ink); -webkit-text-fill-color: var(--sjc-ink); background: var(--sjc-soft); border: 0;
}
.sjc .sjc-more summary { cursor: pointer; padding: 10px 0; font-size: 15px; font-weight: 600; color: var(--sjc-accent); }
.sjc .sjc-sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.sjc .sjc-table-scroll { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.sjc table {
  display: table; width: 100% !important; max-width: 100%; margin: 0; table-layout: auto;
  border-collapse: collapse; border: 0; font-size: 14px; background: transparent;
}
.sjc th, .sjc td {
  padding: 8px 6px; text-align: left; vertical-align: top; color: var(--sjc-ink); background: transparent;
  border: 0; border-bottom: 1px solid var(--sjc-line); font-weight: 400;
}
.sjc th { color: var(--sjc-sub); font-weight: 600; }
.sjc .sjc-num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.sjc tfoot td, .sjc tfoot th { font-weight: 700; color: var(--sjc-ink); }
.sjc .sjc-fallback {
  margin: 0; padding: 14px 16px; font-size: 15px; color: var(--sjc-ink); background: var(--sjc-bg);
  border: 0; border-radius: 16px;
}
.sjc .sjc-open { color: var(--sjc-accent); text-decoration: underline; white-space: nowrap; }

/* ---------- 글 본문 (설명·기준표·출처) ---------- */
.sjc-post { max-width: 100%; word-break: keep-all; overflow-wrap: anywhere; }
.sjc-post .sjc-lead { font-weight: 500; }
.sjc-post > .sjc-card { margin: 20px 0; padding: 16px; border: 1px solid #dfe3ea; border-radius: 12px; }
.sjc-post .sjc-basis { font-size: 14px; }
.sjc-post .sjc-quick { font-size: 15px; }
.sjc-post .sjc-quick .sjc-who { margin: 0 0 12px; line-height: 1.6; }
.sjc-post .sjc-quick h2 { margin-top: 0; font-size: 17px; }
.sjc-post .sjc-quick table { width: 100%; min-width: 480px; margin: 0; border-collapse: collapse; font-size: 14px; }
.sjc-post .sjc-quick th, .sjc-post .sjc-quick td { padding: 7px 6px; text-align: left; vertical-align: top; border: 0; border-bottom: 1px solid #dfe3ea; }
.sjc-post .sjc-quick td:nth-child(2) { font-weight: 700; white-space: nowrap; }
.sjc-post .sjc-basis h2 { margin-top: 0; font-size: 17px; }
.sjc-post .sjc-table-scroll { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.sjc-post .sjc-basis table { width: 100%; min-width: 540px; margin: 0; border-collapse: collapse; font-size: 14px; }
.sjc-post .sjc-basis th, .sjc-post .sjc-basis td { padding: 7px 6px; text-align: left; vertical-align: top; border: 0; border-bottom: 1px solid #dfe3ea; }
.sjc-post .sjc-basis td:first-child { min-width: 11em; }
.sjc-post .sjc-num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.sjc-post .sjc-how { font-size: 14px; color: #5a6475; }
.sjc-post .sjc-badge {
  display: inline-block; padding: 1px 7px; font-size: 12px; white-space: nowrap; border-radius: 999px;
  color: #5a6475; background: #eef1f6;
}
.sjc-post .sjc-badge.sjc-fixed { color: #1d6b3a; background: #e9f6ee; }
.sjc-post .sjc-badge.sjc-wait { color: #7a4b00; background: #fff6e0; }
.sjc-post .sjc-note { padding: 10px 12px; font-size: 14px; color: #7a4b00; background: #fff6e0; border-radius: 10px; }
.sjc-post .sjc-example { margin: 10px 0; padding: 10px 12px; background: #f6f7f9; color: #1d2433; border-radius: 10px; }
.sjc-post .sjc-faq dt { margin-top: 14px; font-weight: 700; }
.sjc-post .sjc-faq dd { margin: 4px 0 0; }
.sjc-post .sjc-sources { font-size: 14px; }
.sjc-post .sjc-sources li { margin: 6px 0; }
.sjc-post .sjc-excel { border-style: dashed; }
.sjc-post .sjc-guide h2 { margin-top: 28px; }
.sjc-post .sjc-excel h2 { margin: 0 0 6px; font-size: 17px; }
.sjc-post .sjc-links ul { padding-left: 1.2em; }
.sjc-post .sjc-disclaimer { margin-top: 20px; padding-top: 12px; font-size: 13px; color: #5a6475; border-top: 1px solid #dfe3ea; }

@media (min-width: 640px) {
  .sjc .sjc-step, .sjc .sjc-result { padding: 28px; }
  .sjc .sjc-opts { padding: 0 28px; }
  .sjc .sjc-q, .sjc label.sjc-q { font-size: 24px; }
  .sjc .sjc-chips .sjc-chip, .sjc .sjc-step .sjc-chips label.sjc-chip { flex: 1 1 calc(33.333% - 8px); }
  .sjc .sjc-chips-2 .sjc-chip, .sjc .sjc-step .sjc-chips-2 label.sjc-chip { flex-basis: calc(50% - 8px); }
}
@media print {
  .sjc .sjc-actions, .sjc .sjc-link-btn, .sjc .sjc-quick-btns, .sjc .sjc-opts, .sjc .sjc-again { display: none !important; }
}
