/* 월급지킴이 · 화면 스타일
   레이아웃: 휴대폰은 한 열 + 아래 고정 버튼, 960px 이상은 상단 단계 표시 + 두 열(본문 · 옆 칸)
   디자인 토큰은 아래 :root 한 곳에만 둔다 → docs/디자인_시스템.md
   방향: 흰 종이 · 먹남색 잉크 · 노랑 형광펜. 색은 먹남색(글씨 · 주 단추)과 노랑(지금 고른 것 · 결과 금액) 둘만 쓴다.
   햇빛 아래 휴대폰에서도 보이게 뜻이 있는 테두리는 3:1, 글씨는 6:1 이상. 구형 안드로이드를 생각해 색은 hex 만 쓴다 */

/* 글꼴: Pretendard(OFL 1.1)를 한글 2,350자 · 라틴 · 베트남어만 남겨 줄인 파일. OFL 규칙대로 이름을 바꿨다 (fonts/OFL-Pretendard.txt) */
@font-face {
  font-family: "Noran Sans";
  src: url("../fonts/noran-sans.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  /* 색 */
  --bg: #FFFFFF;
  --surface: #F4F6FA;
  --surface-2: #E9EDF3;
  --fg: #111B2E;
  --muted: #4B5568;
  --line: #D5DBE5; /* 꾸밈 구분선. 뜻을 싣지 않는 곳에만 */
  --input-line: #6B7588; /* 입력 · 선택지 테두리. 흰 바탕 4.6:1 */
  --strong-line: #111B2E;
  --brand: #FFC21A;
  --brand-fg: #111B2E;
  --brand-soft: #FFF4CC;
  --brand-deep: #7A5600;
  --accent: #1D4FB8;
  --accent-soft: #E7EDF8;
  --btn-bg: #111B2E;
  --btn-fg: #FFFFFF;
  --btn-hover: #24334F;
  --btn-icon: #FFFFFF;
  --panel: #FFFFFF;
  --panel-fg: #111B2E;
  --panel-muted: #4B5568;
  --warn-bg: #FFF4CC;
  --warn-fg: #5C4200;
  --warn-line: #E0A800;
  --err: #B42318;
  --ok: #1E6B3C;
  --off-bg: #E4E8EF;
  --off-fg: #5F6878;
  --paper: #FFFFFF;
  --tr-bg: #F3F5F9;
  --scrim: rgba(10, 16, 28, 0.55);
  --qr-bg: #FFFFFF;
  /* 글자 */
  --font: "Noran Sans", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", "Segoe UI", system-ui, sans-serif;
  --fs-sm: 0.875rem;
  --fs-md: 1.0625rem; /* 본문 17px: 한글은 16px 보다 한 단계 큰 것이 읽기 쉽다 */
  --fs-lg: 1.1875rem;
  --fs-xl: 1.5rem;
  --fs-2xl: clamp(1.6875rem, 6vw, 2rem);
  --fs-3xl: clamp(2rem, 7vw, 2.75rem);
  --fs-num: clamp(2.5rem, 13vw, 4.5rem);
  /* 간격 (4px 단위) */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 64px;
  /* 모서리: 안쪽일수록 작게 */
  --r-xs: 4px;
  --r-sm: 8px;
  --r: 12px;
  --r-lg: 20px;
  /* 그림자는 아래에서 올라오는 시트 하나에만 쓴다. 나머지는 선으로 나눈다 */
  --sh-2: 0 12px 32px -12px rgba(17, 27, 46, 0.22), 0 2px 6px rgba(17, 27, 46, 0.06);
  /* 움직임 */
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --t-fast: 140ms;
  --t: 240ms;
  /* 겹침 순서 */
  --z-cta: 3; --z-top: 5; --z-safe: 10; --z-toast: 20;
}
:root[data-theme="dark"] {
  --bg: #0E1420; --surface: #161E2D; --surface-2: #1E283A; --fg: #EEF1F6; --muted: #A9B3C4; --line: #263044; --input-line: #7D879A;
  --strong-line: #EEF1F6; --brand-soft: #2E2711; --brand-deep: #FFD666; --accent: #9DB9F0; --accent-soft: #1A2740;
  --btn-bg: #FFC21A; --btn-fg: #111B2E; --btn-hover: #FFD25A; --btn-icon: #111B2E; --panel: #1A2436; --panel-fg: #EEF1F6; --panel-muted: #B8C2D6;
  --warn-bg: #2E2711; --warn-fg: #F5DC92; --warn-line: #9A7A1F; --err: #F4A9A3; --ok: #8FD3A8;
  --off-bg: #232C3D; --off-fg: #9AA3B3; --paper: #161E2D; --tr-bg: #1E283A; --scrim: rgba(0, 0, 0, 0.65);
  color-scheme: dark;
}

/* 바탕 */
html { font-size: 100%; }
html.big { font-size: 118.75%; }
*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--fg); font-family: var(--font);
  font-size: var(--fs-md); line-height: 1.6; word-break: keep-all; overflow-wrap: break-word;
  font-variant-numeric: tabular-nums; -webkit-text-size-adjust: 100%; -webkit-font-smoothing: antialiased;
}
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: var(--z-safe); background: var(--bg); }
::selection { background: var(--brand); color: var(--brand-fg); }
h1, h2, h3, p { margin: 0; }
h1 { font-size: var(--fs-2xl); line-height: 1.3; font-weight: 700; letter-spacing: -0.01em; text-wrap: balance; }
h1:focus { outline: none; }
h2 { font-size: var(--fs-lg); font-weight: 700; letter-spacing: -0.01em; line-height: 1.4; text-wrap: balance; }
p, li, dt, small, legend { text-wrap: pretty; } /* 마지막 줄에 한 어절만 남지 않게 */
a { color: inherit; text-underline-offset: 3px; }
button, input, select, textarea { font: inherit; color: inherit; }
input, textarea { caret-color: var(--fg); accent-color: var(--fg); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.nw { white-space: nowrap; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: var(--s2); top: var(--s2); z-index: var(--z-toast); min-height: 44px; display: inline-flex; align-items: center; padding: var(--s2) var(--s4); background: var(--btn-bg); color: var(--btn-fg); border-radius: var(--r-sm); transform: translateY(-200%); }
.skip:focus { transform: none; }
.ico { width: 1.25em; height: 1.25em; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.ico-lg { width: 28px; height: 28px; }

/* 화면 바뀔 때 살짝 올라오며 나타남 */
.enter > * { animation: rise var(--t) var(--ease) both; }
.enter > *:nth-child(2) { animation-delay: 40ms; }
.enter > *:nth-child(3) { animation-delay: 80ms; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }

/* 상단 */
.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: var(--z-top); background: var(--bg); border-bottom: 1px solid var(--line); }
.top-in {
  max-width: 1120px; margin: 0 auto; min-height: 60px; display: flex; align-items: center; gap: var(--s1);
  padding-left: max(var(--s4), env(safe-area-inset-left, 0px)); padding-right: max(var(--s4), env(safe-area-inset-right, 0px));
}
.icon-btn { width: 44px; height: 44px; flex-shrink: 0; margin-left: -10px; border: 0; background: none; display: grid; place-items: center; cursor: pointer; border-radius: var(--r-sm); transition: background var(--t-fast); }
.icon-btn:hover { background: var(--surface); }
.top-title { flex: 1 1 auto; min-width: 0; font-weight: 700; font-size: var(--fs-md); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand { display: inline-flex; align-items: center; gap: var(--s2); min-height: 44px; min-width: 44px; padding-inline: 6px; margin-inline: -6px; border-radius: var(--r-sm); font-weight: 700; font-size: var(--fs-md); letter-spacing: -0.01em; text-decoration: none; transition: background var(--t-fast); }
.brand:hover { background: var(--surface); }
.brand-mark { display: inline-flex; flex-shrink: 0; }
.brand-mark svg { width: 30px; height: 30px; }
.brand-mark.alt { display: none; } /* 한국어 글자 로고 안에 동전이 이미 있다 */
.brand-word svg { display: block; height: 26px; width: auto; }
/* 휴대폰 머리줄용 로고가 따로 있으면 959px 아래에서 그것으로 바꾼다 */
.brand-word-m { display: none; }
@media (max-width: 959px) { .brand-word:has(+ .brand-word-m) { display: none; } .brand-word-m { display: block; } .brand-word-m svg { display: block; height: 24px; width: auto; } }
.brand small { font-weight: 400; color: var(--muted); font-size: var(--fs-sm); }
.brand-desk { display: inline-flex; min-width: 0; }
.steps-nav { display: none; margin: 0 auto; padding: 0; list-style: none; gap: var(--s1); font-size: var(--fs-sm); color: var(--muted); }
.steps-nav li { display: flex; align-items: center; gap: var(--s2); padding: 6px 12px 6px 6px; border-radius: var(--r-sm); }
.steps-nav b { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 0.8125rem; background: var(--surface-2); color: var(--muted); }
.steps-nav li.done b { background: var(--fg); color: var(--bg); }
.steps-nav li[aria-current="step"] { color: var(--fg); font-weight: 700; background: var(--brand-soft); }
.steps-nav li[aria-current="step"] b { background: var(--brand); color: var(--brand-fg); }
.top-tools { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.big-btn { min-width: 44px; height: 44px; border: 0; box-shadow: inset 0 0 0 1px var(--input-line); background: var(--bg); font-weight: 700; color: var(--muted); cursor: pointer; border-radius: var(--r-sm); transition: background var(--t-fast); }
.big-btn:hover { background: var(--surface); }
.big-btn[aria-pressed="true"] { color: var(--brand-fg); background: var(--brand); }

/* 본문 */
.wrap { max-width: 1120px; margin: 0 auto; padding-left: max(var(--s4), env(safe-area-inset-left, 0px)); padding-right: max(var(--s4), env(safe-area-inset-right, 0px)); padding-block: var(--s5) 0; }
.col { max-width: 560px; margin-inline: auto; }
.stack { display: flex; flex-direction: column; gap: var(--s3); }
.stack-lg { display: flex; flex-direction: column; gap: var(--s6); }
.lead { color: var(--muted); font-size: var(--fs-md); max-width: 36em; }
.hint { font-size: var(--fs-sm); color: var(--muted); }
.banner { padding: var(--s3) var(--s4); border-radius: var(--r-sm); background: var(--accent-soft); font-size: var(--fs-sm); }
.proto { padding: var(--s3) var(--s4); border-radius: var(--r-sm); border: 1px dashed var(--input-line); font-size: var(--fs-sm); color: var(--muted); }
.mark { background: linear-gradient(transparent 62%, var(--brand) 62%, var(--brand) 92%, transparent 92%); padding-inline: 2px; }

/* 두 열: 넓은 화면에서 본문 + 옆 칸 */
@media (max-width: 959px) {
  .only-d { display: none !important; }
  .brand-desk .brand-t { display: none; } /* 휴대폰 안쪽 화면: 동전 표시만 (누르면 시작 화면) */
  .brand-desk .brand-mark.alt { display: inline-flex; }
}
.note .ico, .hint .ico { vertical-align: -4px; }
.brand-t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 400px) { .brand-t { white-space: normal; line-height: 1.15; font-size: var(--fs-sm); } }
@media (max-width: 400px) {
  .brand small { display: none; }
  .paper { padding: var(--s5) var(--s4); }
  .counsel .kv { grid-template-columns: 5.5em minmax(0, 1fr); }
}
.split { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s6); max-width: 560px; margin-inline: auto; }
.side { display: flex; flex-direction: column; gap: var(--s5); }

/* 진행 표시 */
.progress { display: flex; flex-direction: column; gap: var(--s2); }
.bar { display: grid; grid-template-columns: repeat(var(--n, 4), minmax(0, 1fr)); gap: 4px; }
.bar span { height: 6px; border-radius: 3px; background: var(--surface-2); transition: background var(--t); }
.bar span.on { background: var(--brand); }
.bar span.now { background: var(--fg); }
.progress .hint { font-weight: 600; }
.q-jump { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; margin: -8px 0; padding: 0 var(--s2) 0 0; border: 0; background: none; font-size: var(--fs-sm); font-weight: 600; color: var(--muted); text-decoration: underline; text-underline-offset: 4px; cursor: pointer; }
.q-jump .ico { width: 18px; height: 18px; }

/* 질문 목록 (넓은 화면 옆 칸) */
.qnav { padding: var(--s4); border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); }
.qlist { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 2px; }
.qlist-title { font-size: var(--fs-sm); font-weight: 700; color: var(--muted); padding: 0 var(--s2) var(--s2); }
.qlist li > * { display: flex; align-items: center; gap: var(--s3); width: 100%; min-height: 44px; padding: 0 var(--s2); border: 0; border-radius: var(--r-sm); background: none; text-align: left; font-size: var(--fs-md); color: var(--muted); }
.qlist button { cursor: pointer; }
.qlist button:hover { background: var(--surface-2); }
.qlist b { width: 26px; height: 26px; flex-shrink: 0; border-radius: 50%; display: grid; place-items: center; font-size: 0.8125rem; border: 1.5px solid var(--input-line); }
.qlist .done b { background: var(--fg); border-color: var(--fg); color: var(--bg); }
.qlist [aria-current="step"] { color: var(--fg); font-weight: 700; background: var(--bg); box-shadow: inset 0 0 0 1.5px var(--fg); }
.qlist [aria-current="step"] b { background: var(--brand); border-color: var(--brand); color: var(--brand-fg); }

/* 버튼 */
.btn {
  min-height: 56px; width: 100%; padding: 0 var(--s5); border-radius: var(--r); border: 0; font-size: 1.125rem; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2); text-align: center; text-decoration: none; cursor: pointer; line-height: 1.3; text-wrap: balance;
  transition: background var(--t-fast), transform var(--t-fast), box-shadow var(--t-fast);
}
.btn-primary { background: var(--btn-bg); color: var(--btn-fg); }
.btn-primary:hover:not(:disabled) { background: var(--btn-hover); }
.btn-primary .ico { color: var(--btn-icon); width: 22px; height: 22px; transition: transform var(--t-fast) var(--ease); }
.btn-primary:hover:not(:disabled) .ico { transform: translateX(3px); }
.btn-primary:disabled { background: var(--off-bg); color: var(--off-fg); cursor: not-allowed; }
.btn-primary:disabled .ico { color: inherit; }
.btn-brand { background: var(--brand); color: var(--brand-fg); }
.btn-brand:hover:not(:disabled) { background: #FFD25A; }
.btn-line { background: var(--bg); color: var(--fg); border: 1.5px solid var(--input-line); font-weight: 600; font-size: var(--fs-md); min-height: 52px; }
.btn-line:hover:not(:disabled) { border-color: var(--fg); background: var(--surface); }
.btn-line:disabled { color: var(--off-fg); border-color: var(--line); cursor: not-allowed; }
.btn-text { background: none; border: 0; min-height: 44px; min-width: 44px; padding: 0 4px; font-size: var(--fs-md); font-weight: 600; text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 4px; cursor: pointer; align-self: center; }
.btn-text:hover { text-decoration-color: var(--brand); text-decoration-thickness: 3px; }
.btn-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s2); }
/* 주 버튼 영역: 휴대폰은 render() 가 아래 고정 영역(.dock)으로 옮긴다 */
.cta { margin-top: var(--s6); display: flex; flex-direction: column; gap: var(--s2); }
.cta .hint { text-align: center; }

/* 선택지 · 입력 */
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
legend { padding: 0; margin-bottom: var(--s2); }
.q-legend { font-size: var(--fs-2xl); font-weight: 700; line-height: 1.3; letter-spacing: -0.01em; margin-bottom: var(--s3); }
.q-legend h1 { font-size: inherit; }
.choices { display: flex; flex-direction: column; gap: var(--s2); }
.choice {
  position: relative; display: flex; align-items: center; gap: var(--s3); min-height: 60px; padding: var(--s3) var(--s4);
  border: 1.5px solid var(--input-line); border-radius: var(--r); background: var(--bg); cursor: pointer; font-size: var(--fs-md); font-weight: 600;
  transition: border-color var(--t-fast), background var(--t-fast);
}
.choice:hover { border-color: var(--fg); }
.choice:has(input:checked) { border-color: var(--fg); background: var(--brand-soft); box-shadow: inset 0 0 0 1px var(--fg); }
.choice:has(input:focus-visible) { outline: 3px solid var(--accent); outline-offset: 2px; }
.choice input { appearance: none; width: 22px; height: 22px; margin: 0; flex-shrink: 0; border: 2px solid var(--input-line); border-radius: 50%; background: var(--bg); display: grid; place-items: center; }
.choice input:checked { border-color: var(--fg); }
.choice input:checked::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--fg); }
.choice input:focus-visible { outline: none; }
.choice .ico { color: var(--muted); width: 26px; height: 26px; }
.choice small { display: block; font-weight: 400; color: var(--muted); font-size: var(--fs-sm); }
/* 상황 진단: 큰 그림 단추 여러 개 고르기 (6단계) */
.sit-grid { display: grid; grid-template-columns: minmax(0, 1fr); grid-auto-rows: 1fr; gap: var(--s2); }
/* 상황 카드: 문구 · 오른쪽 네모 체크(여러 개 고르는 칸이라 동그라미 대신 네모). 문구는 덩어리(.sit-t > span) 사이에서만 줄을 바꾼다 */
.sit {
  position: relative; display: flex; align-items: center; gap: var(--s3); min-height: 56px; padding: var(--s2) var(--s3) var(--s2) var(--s4);
  border: 1.5px solid var(--input-line); border-radius: var(--r); background: var(--bg); cursor: pointer; font-size: var(--fs-md); font-weight: 600; line-height: 1.35;
  transition: border-color var(--t-fast), background var(--t-fast);
}
.sit:hover { border-color: var(--fg); }
.sit-t { flex: 1 1 auto; min-width: 0; text-wrap: balance; }
.sit-t > span { display: inline-block; }
.gloss { display: block; font-size: var(--fs-sm); font-weight: 500; color: var(--muted); line-height: 1.4; }
.sit-t .gloss { margin-top: 2px; }
.sit-mark { width: 24px; height: 24px; flex-shrink: 0; border-radius: 6px; border: 1.5px solid var(--input-line); display: grid; place-items: center; color: transparent; }
.sit-mark .ico { width: 16px; height: 16px; stroke-width: 2.5; }
/* 휴대폰: 동그라미와 글 사이를 조금 좁혀 「그만둔 지 14일이 지났는데 못 받았어요」가 390px 에서 한 줄에 들어가게 */
@media (max-width: 959px) { .sit { gap: var(--s2); padding-left: var(--s3); } }
@media (min-width: 640px) {
  .sit-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sit:last-child:nth-child(odd) { grid-column: 1 / -1; } /* 11개라 남는 마지막 하나는 한 줄 전체 */
}
.sit:has(input:checked) { border-color: var(--fg); background: var(--brand-soft); box-shadow: inset 0 0 0 1px var(--fg); }
.sit:has(input:checked) .sit-mark { background: var(--fg); border-color: var(--fg); color: var(--bg); }
.sit:has(input:focus-visible) { outline: 3px solid var(--accent); outline-offset: 2px; }
.info-list { display: flex; flex-direction: column; gap: var(--s7); }
.info-card { padding: 0; }
.info-card .bring li { align-items: flex-start; padding: var(--s2) 0; min-height: 0; }
.info-card .bring .ico { margin-top: 3px; flex-shrink: 0; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label, .label { font-size: var(--fs-md); font-weight: 700; }
.opt { font-weight: 400; color: var(--muted); }
.input {
  min-height: 56px; width: 100%; padding: 0 var(--s4); border: 1.5px solid var(--input-line); border-radius: var(--r-sm); background: var(--bg); font-size: 1.1875rem;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.input:hover { border-color: var(--fg); }
.input:focus { outline: none; border-color: var(--fg); box-shadow: 0 0 0 3px var(--brand); }
textarea.input { padding: var(--s3) var(--s4); line-height: 1.6; resize: vertical; }
.input[aria-invalid="true"] { border: 2px solid var(--err); }
.err { color: var(--err); font-size: var(--fs-sm); font-weight: 600; }
.readable { font-size: var(--fs-md); font-weight: 700; color: var(--brand-deep); min-height: 1.6em; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s3); }
.days { display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 6px; }
.day { min-height: 52px; border: 1.5px solid var(--input-line); border-radius: var(--r-sm); background: var(--bg); font-size: var(--fs-md); font-weight: 600; cursor: pointer; transition: background var(--t-fast), color var(--t-fast); }
.day:hover { border-color: var(--fg); }
.day[aria-pressed="true"] { background: var(--fg); color: var(--bg); border-color: var(--fg); font-weight: 700; box-shadow: inset 0 -4px 0 var(--brand); }
details > summary { min-height: 48px; display: flex; align-items: center; cursor: pointer; font-weight: 700; list-style: none; gap: var(--s2); }
details > summary::-webkit-details-marker { display: none; }
details > summary::after { content: ""; width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-3px); margin-left: auto; transition: transform var(--t-fast); }
details[open] > summary::after { transform: rotate(-135deg) translateY(-1px); }
.more { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.more p, .more ul { padding-bottom: var(--s3); }
.note { padding: var(--s4); border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); font-size: var(--fs-md); }
.warnbox { padding: var(--s4); border-radius: var(--r); background: var(--warn-bg); color: var(--warn-fg); border: 1px solid var(--warn-line); }
.sumline { padding: var(--s4); border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); font-size: var(--fs-md); }
.sumline strong { font-size: var(--fs-lg); }

/* 시작 */
/* 시작: 노랑 띠 위에 제목과 단추 둘, 옆에 월급봉투. 봉투 앞면은 옛 월급봉투의 지급 내역 칸처럼 계산하는 돈 이름을 적는다.
   그 아래 머리줄 단계(1 서류 ~ 4 진정서)를 풀어 쓴 설명, 맨 아래 작은 링크 */
.wrap:has(.start) { padding-top: 0; }
.start { display: flex; flex-direction: column; gap: var(--s7); }
.start-band { --band: var(--brand); position: relative; display: flex; flex-direction: column; gap: var(--s7); padding-block: var(--s6) var(--s7); background: var(--band); box-shadow: 0 0 0 100vmax var(--band); clip-path: inset(0 -100vmax); }
:root[data-theme="dark"] .start-band { --band: var(--brand-soft); }
.hero { display: flex; flex-direction: column; gap: var(--s4); }
.hero h1 { font-size: clamp(2.125rem, 8.6vw, 3.5rem); line-height: 1.18; letter-spacing: -0.02em; font-weight: 800; max-width: 9em; }
.hero .lead { font-size: var(--fs-lg); line-height: 1.6; color: var(--fg); }
.start-cta { margin-top: var(--s2); }
.start-cta .btn-line { min-height: 56px; border-color: var(--fg); }
.trust { font-size: var(--fs-sm); font-weight: 600; color: var(--fg); line-height: 1.6; }
.trust a { display: inline-flex; align-items: center; min-height: 44px; font-size: var(--fs-md); font-weight: 700; color: inherit; text-underline-offset: 4px; }
/* 문서 미리보기: 실제로 인쇄되는 A4 두 장의 그림. 같은 크기, 같은 각도로 반듯하게 놓는다.
   뒷장(진정서)은 오른쪽으로 24px(종이 여백만 보이게), 위로 종이 높이의 12%(제목과 겹줄까지 보이게) 비킨다.
   그림자는 바닥에 놓인 종이처럼 두 겹. 휴대폰은 앞장 한 장만 단추 아래에 */
.docs { align-self: center; justify-self: center; width: 100%; margin: 0; display: flex; flex-direction: column; gap: var(--s3); pointer-events: none; user-select: none; }
.dp { display: block; width: 100%; height: auto; aspect-ratio: 900 / 1273; background: #FFFFFF; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.14), 0 10px 24px -6px rgba(0, 0, 0, 0.18); }
.dp-back { display: none; }
.docs figcaption { font-size: var(--fs-sm); color: var(--fg); }
@media (min-width: 960px) {
  .docs { max-width: 410px; justify-self: end; }
  /* 위 여백 = (폭 - 24px) x 1.4144(A4) x 12% */
  .docs-pile { position: relative; padding: calc(16.97% - 4px) 24px 0 0; }
  .docs-pile .dp-front { position: relative; }
  .dp-back { display: block; position: absolute; top: 0; right: 0; width: calc(100% - 24px); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08), 0 6px 16px -6px rgba(0, 0, 0, 0.12); }
}
@media (min-width: 1400px) {
  body .start-band { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } /* 아래 960 규칙보다 뒤에 오지 않아 한 단계 세게 */
  .docs { max-width: 480px; }
}
.flow h2 { font-size: var(--fs-xl); font-weight: 800; }
.flow ol { margin: var(--s5) 0 0; padding: 0; list-style: none; counter-reset: st; display: grid; gap: var(--s5); }
.flow li { counter-increment: st; display: grid; grid-template-columns: 26px minmax(0, 1fr); align-content: start; column-gap: var(--s3); row-gap: var(--s1); }
.flow li::before { content: counter(st); width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 0.8125rem; font-weight: 700; background: var(--surface-2); color: var(--muted); }
.flow li b { font-size: var(--fs-lg); font-weight: 700; line-height: 26px; }
.flow li span { grid-column: 2; color: var(--muted); }
.foot-bar { margin-top: var(--s5); padding-top: var(--s4); border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: var(--s2); }
.foot-links { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 0 var(--s5); }
.foot-links .btn-text { padding: 0; font-size: var(--fs-sm); font-weight: 500; text-decoration-thickness: 1px; }
/* 상황 고르기: 카드 11개 뒤에 참고용 확인 한 줄과 시작 단추 */
.sit-page { max-width: 880px; margin-inline: auto; }
.agree-row { display: flex; flex-direction: column; gap: var(--s1); padding-top: var(--s4); border-top: 1px solid var(--line); }
.agree-row p { color: var(--muted); }
.sit-cta { margin-top: 0; }
.check { display: flex; align-items: center; gap: var(--s3); min-height: 48px; font-weight: 700; cursor: pointer; }
.check input { width: 24px; height: 24px; margin: 0; accent-color: var(--fg); flex-shrink: 0; }

/* 서류 올리기 */
.capture { position: relative; padding: var(--s5) var(--s4) var(--s4); border-radius: var(--r-lg); background: var(--surface); display: flex; flex-direction: column; gap: var(--s4); }
.capture .btn-row { grid-template-columns: minmax(0, 1fr); }
.capture .hint { text-align: center; }
/* 찍기 전 안내 그림 · 여러 장 카드 · QR */
.howto { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s2); }
.howto li { display: flex; flex-direction: column; align-items: center; gap: var(--s2); padding: var(--s2) 0; text-align: center; font-weight: 600; line-height: 1.4; }
.howto svg { width: 72px; height: 52px; flex-shrink: 0; fill: none; stroke: var(--fg); stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.howto .pf { fill: var(--bg); }
.howto .hl { stroke: var(--brand-deep); stroke-width: 2.25; }
@media (max-width: 400px) {
  .howto { grid-template-columns: minmax(0, 1fr); }
  .howto li { flex-direction: row; text-align: left; padding: var(--s2) var(--s3); }
}
.capture.drag { background: var(--brand-soft); box-shadow: inset 0 0 0 3px var(--fg); }
.pages { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: var(--s3); }
.pg { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: var(--s3); padding: var(--s3); border: 1.5px solid var(--input-line); border-radius: var(--r); background: var(--bg); }
.pg.ok { border-color: var(--ok); }
.pg.fail, .pg.bad { border-color: var(--warn-line); }
.pg-thumb { position: relative; width: 76px; height: 100px; border-radius: var(--r-sm); overflow: hidden; background: var(--surface); display: grid; place-items: center; color: var(--muted); }
.pg-thumb img { width: 100%; height: 100%; object-fit: cover; }
.pg.reading .pg-thumb::after, .pg.prep .pg-thumb::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--brand); animation: scan-pg 1.2s ease-in-out infinite alternate; }
@keyframes scan-pg { to { transform: translateY(97px); } }
.pg-body { min-width: 0; display: flex; flex-direction: column; gap: var(--s2); }
.pg-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px var(--s2); }
.pg-state { font-size: var(--fs-sm); font-weight: 700; color: var(--muted); }
.pg.ok .pg-state { color: var(--ok); }
.pg.fail .pg-state { color: var(--warn-fg); }
.pg-name { font-size: var(--fs-sm); color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pg-type { min-height: 48px; }
.pg-acts { display: flex; flex-wrap: wrap; gap: var(--s2); }
.pg-btn { min-height: 44px; padding: 0 var(--s3); display: inline-flex; align-items: center; gap: 6px; border-radius: var(--r-sm); border: 1.5px solid var(--input-line); background: var(--bg); color: var(--fg); font-size: var(--fs-md); font-weight: 600; cursor: pointer; }
.pg-btn:hover:not(:disabled) { border-color: var(--fg); background: var(--surface); }
.pg-btn:disabled { color: var(--off-fg); border-color: var(--line); cursor: not-allowed; }
.pg-btn .ico { width: 18px; height: 18px; }
.qual { padding: var(--s2) var(--s3); border-radius: var(--r-sm); background: var(--warn-bg); color: var(--warn-fg); box-shadow: inset 4px 0 0 var(--warn-line); }
.qual ul { margin: 0; padding-left: 1.1em; font-weight: 600; }
.qual p { font-size: var(--fs-sm); }
.qr { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: var(--s4); align-items: start; padding: var(--s4); border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--bg); margin-bottom: var(--s4); }
.qr-code { width: 120px; height: 120px; padding: 8px; border-radius: var(--r-sm); background: var(--qr-bg); }
.qr-code svg { display: block; width: 100%; height: 100%; }
.filecard { border: 1.5px solid var(--input-line); border-radius: var(--r); padding: var(--s4); display: flex; flex-direction: column; gap: var(--s3); }
.filecard-head { display: flex; align-items: center; gap: var(--s3); font-weight: 700; min-width: 0; }
.filecard-head span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.filecard.done { border-color: var(--ok); }
.filecard.done .ico { color: var(--ok); }
.scan { display: flex; flex-direction: column; gap: 8px; position: relative; overflow: hidden; padding: var(--s2) 0; }
.scan i { display: block; height: 10px; border-radius: 5px; background: var(--surface-2); }
.scan i:nth-child(2) { width: 82%; } .scan i:nth-child(3) { width: 64%; }
.scan::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--brand); animation: scan 1.4s ease-in-out infinite alternate; }
@keyframes scan { to { transform: translateY(46px); } }

/* 내용 확인 */
.legend-row { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s4); font-size: var(--fs-sm); color: var(--muted); }
.tag { display: inline-block; padding: 1px 8px; border-radius: var(--r-xs); font-size: var(--fs-sm); font-weight: 700; line-height: 1.6; border: 1px solid var(--input-line); color: var(--fg); white-space: nowrap; }
.tag.self { background: var(--surface-2); border-color: var(--surface-2); }
.tag.warn { background: var(--warn-bg); border-color: var(--warn-line); color: var(--warn-fg); }
.group h2 { font-size: var(--fs-sm); color: var(--muted); font-weight: 700; margin-bottom: var(--s1); letter-spacing: 0.02em; }
.rows { margin: 0; border-top: 2px solid var(--strong-line); }
.row { padding: var(--s3) 0; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: var(--s2); }
.row.low { background: var(--warn-bg); padding: var(--s3); margin-inline: calc(-1 * var(--s3)); border-radius: var(--r-sm); border-bottom-color: transparent; box-shadow: inset 0 0 0 1px var(--warn-line); }
.row-main { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s3); } /* 글자를 크게 키우면 값이 이름 아래 줄로 내려간다 */
.row dt { width: 6.5em; flex-shrink: 0; font-size: var(--fs-sm); color: var(--muted); }
.row.low dt, .row.low .row-note { color: var(--warn-fg); }
.row dd { margin: 0; flex: 1 1 8em; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-weight: 700; }
.row .empty { color: var(--muted); font-weight: 400; }
.row-edit { min-width: 44px; min-height: 44px; margin: -10px 0; display: flex; align-items: center; justify-content: flex-end; font-size: var(--fs-sm); font-weight: 600; background: none; border: 0; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.row-note { font-size: var(--fs-sm); font-weight: 600; }
.row .ok-btn { align-self: flex-start; min-height: 44px; padding: 0 var(--s4); border-radius: var(--r-sm); border: 1.5px solid var(--warn-fg); background: var(--bg); color: var(--fg); font-weight: 700; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.checked { display: inline-flex; align-items: center; gap: 2px; font-size: var(--fs-sm); color: var(--ok); font-weight: 700; }

/* 결과 */
.result-grid { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-areas: "sum" "items"; gap: var(--s5); align-items: start; }
.r-sum { grid-area: sum; }
.r-items { grid-area: items; }
/* 합계: 흰 종이 한 장(선으로만 구분, 그림자 없음). 금액 아래 노랑 형광펜 띠가 이 화면에서 가장 먼저 보인다 */
.receipt { border: 1.5px solid var(--input-line); border-radius: var(--r); background: var(--panel); }
.receipt-in { container-type: inline-size; padding: var(--s5) var(--s5) var(--s4); color: var(--panel-fg); display: flex; flex-direction: column; gap: var(--s2); }
.total-label { font-size: var(--fs-md); font-weight: 600; color: var(--muted); }
.receipt .total-label, .receipt .total-read, .receipt .disclaim { color: var(--panel-muted); }
.total { font-size: var(--fs-num); font-size: clamp(2rem, 15cqi, 3.5rem); line-height: 1.2; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.total b { font-weight: inherit; padding-inline: 4px; margin-left: -4px; background: linear-gradient(transparent 58%, var(--brand) 58%, var(--brand) 92%, transparent 92%); }
:root[data-theme="dark"] .total b { background: none; }
.total small { font-size: 0.45em; font-weight: 700; margin-left: 6px; letter-spacing: 0; }
.total-read { font-size: var(--fs-md); font-weight: 600; }
.disclaim { font-size: var(--fs-sm); color: var(--muted); }
.disclaim button { font-size: var(--fs-sm); color: inherit; padding: 12px 2px; margin: -12px 0; min-height: 0; } /* 줄 높이는 그대로, 누르는 범위는 44px */
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.chips li { padding: 4px 10px; border-radius: var(--r-xs); background: var(--surface); font-size: var(--fs-sm); font-weight: 600; }
.items-head { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s2); flex-wrap: wrap; margin-bottom: var(--s2); }
.items { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--strong-line); }
.items li { border-bottom: 1px solid var(--line); }
/* 항목 한 줄: 이름(+읽기 쉬운 금액) · 금액 · 꺾쇠. 줄 전체가 단추 */
.item-row { width: 100%; min-height: 64px; padding: var(--s3) var(--s1); display: flex; align-items: center; gap: var(--s3); border: 0; background: none; text-align: left; cursor: pointer; border-radius: var(--r-sm); transition: background var(--t-fast), transform var(--t-fast); }
.item-row:hover { background: var(--surface); }
.item-name { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; font-weight: 700; }
.item-name small { font-size: var(--fs-sm); font-weight: 600; color: var(--muted); }
.item-amt { font-size: var(--fs-lg); font-weight: 700; letter-spacing: -0.02em; white-space: nowrap; }
.item-status { font-size: var(--fs-md); font-weight: 600; color: var(--muted); white-space: nowrap; }
.kv { margin: 0; display: grid; grid-template-columns: 8em minmax(0, 1fr); gap: var(--s2); font-size: var(--fs-md); }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 600; }

/* 진정서 */
.seg { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; padding: 4px; border-radius: var(--r); background: var(--surface); }
.seg button { min-height: 44px; border: 0; border-radius: var(--r-sm); background: none; color: var(--muted); font-weight: 600; cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--bg); color: var(--fg); font-weight: 700; box-shadow: inset 0 0 0 1.5px var(--fg); }
.paper-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s5); align-items: start; }
.paper { background: var(--paper); border: 1px solid var(--input-line); border-radius: var(--r-xs); padding: var(--s6) var(--s5); display: flex; flex-direction: column; gap: var(--s5); font-size: max(0.9375rem, var(--fs-sm)); line-height: 1.75; }
.paper h2.doc-title { text-align: center; font-size: 1.375rem; letter-spacing: 0.3em; padding-bottom: var(--s3); border-bottom: 3px double var(--strong-line); }
.paper section { display: flex; flex-direction: column; gap: 6px; }
.paper h3 { margin: 0; font-size: inherit; font-weight: 700; border-bottom: 1px solid var(--strong-line); padding-bottom: 4px; display: flex; justify-content: space-between; gap: var(--s2); align-items: baseline; }
.paper h3 span { font-size: var(--fs-sm); font-weight: 600; color: var(--brand-deep); }
.paper table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.paper th, .paper td { padding: 6px 0; border-bottom: 1px solid var(--line); text-align: left; font-weight: 400; }
.paper td.n, .paper th.n { text-align: right; }
.paper tr.sum th, .paper tr.sum td { font-weight: 700; border-bottom: 0; }
.paper .sign { text-align: right; }
.paper .foot { font-size: var(--fs-sm); color: var(--muted); border-top: 1px solid var(--line); padding-top: var(--s3); }
.paper p { white-space: pre-line; }
.tr-inline { padding: var(--s3); border-radius: var(--r-sm); background: var(--tr-bg); font-size: var(--fs-sm); line-height: 1.6; color: var(--muted); white-space: pre-line; border: 1px dashed var(--input-line); }
.tr-col { display: none; background: var(--tr-bg); border-style: dashed; color: var(--muted); box-shadow: none; }
.tr-col h3 { border-bottom-color: var(--input-line); }
.small-btn { align-self: flex-start; min-height: 44px; padding: 0 var(--s3); border: 1.5px solid var(--input-line); border-radius: var(--r-sm); background: var(--bg); cursor: pointer; font-size: var(--fs-sm); font-weight: 700; display: inline-flex; align-items: center; gap: 6px; }
.copybox { width: 100%; min-height: 160px; }

/* 절차 */
.timeline { margin: 0; padding: 0; list-style: none; }
.timeline li { display: flex; gap: var(--s4); }
.tl-mark { display: flex; flex-direction: column; align-items: center; flex-shrink: 0; }
.tl-num { width: 36px; height: 36px; border-radius: var(--r-sm); background: var(--brand); color: var(--brand-fg); font-size: var(--fs-md); font-weight: 700; display: grid; place-items: center; }
.tl-line { width: 2px; flex: 1 1 auto; background: var(--line); margin: 6px 0; }
.tl-body { padding: 4px 0 var(--s5); display: flex; flex-direction: column; gap: 4px; }
.tl-body strong { font-size: var(--fs-lg); }
.tl-body p { font-size: var(--fs-md); color: var(--muted); }
.callout { display: flex; align-items: center; gap: var(--s3); padding: var(--s4); border: 2px solid var(--fg); border-radius: var(--r); background: var(--panel); color: var(--panel-fg); text-align: left; cursor: pointer; width: 100%; transition: transform var(--t-fast); }
.callout > .ico { color: var(--fg); }
.callout span { flex: 1 1 auto; display: flex; flex-direction: column; gap: 2px; }
.callout small { color: var(--panel-muted); font-size: var(--fs-sm); }
.phones { display: flex; flex-direction: column; gap: var(--s2); }
/* 전화 카드: 이름 · 설명 아래 줄에 번호를 크게 (옆에 두면 좁은 칸에서 설명이 서너 글자씩 끊긴다) */
.phone { min-height: 60px; padding: var(--s3) var(--s4); border-radius: var(--r-sm); background: var(--bg); border: 1px solid var(--input-line); display: grid; grid-template-columns: 24px minmax(0, 1fr); align-items: start; gap: 2px var(--s3); text-decoration: none; transition: border-color var(--t-fast); }
.phone b { grid-column: 2; }
.phone:hover { border-color: var(--fg); }
.phone > .ico { color: var(--muted); }
.phone span { display: flex; flex-direction: column; flex: 1 1 auto; min-width: 0; }
.phone small { color: var(--muted); font-size: var(--fs-sm); }
.phone b { font-size: var(--fs-lg); font-weight: 700; }
.bring { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; }
.bring li { display: flex; gap: var(--s3); align-items: center; min-height: 48px; border-bottom: 1px solid var(--line); }
.bring .ico { color: var(--fg); }

/* 상담원 */
.counsel { font-size: 1.0625rem; }
.counsel .kv { font-size: var(--fs-md); grid-template-columns: 6.5em minmax(0, 1fr); gap: 10px var(--s2); }
.counsel .total { font-size: 2.25rem; }
.counsel table th, .counsel table td { padding: var(--s2) 0; border-top: 1px solid var(--line); }
.counsel caption { text-align: left; font-weight: 700; padding-bottom: 6px; }
.big-sum { display: flex; flex-direction: column; gap: 2px; padding-block: var(--s4); border-block: 1px solid var(--line); }

/* 확인 창 */
dialog { border: 0; border-radius: var(--r-lg); padding: 0; width: min(520px, calc(100% - 32px)); max-height: 86dvh; overflow: auto; overscroll-behavior: contain; background: var(--bg); color: var(--fg); box-shadow: var(--sh-2); }
.sheet-in { padding: var(--s2) var(--s5) var(--s5); }
dialog::backdrop { background: var(--scrim); }
dialog[open] { animation: rise var(--t) var(--ease); }
dialog .stack { gap: var(--s4); }

/* 알림 */
.toast { position: fixed; left: 50%; bottom: calc(var(--dock-h, 0px) + var(--kb, 0px) + 16px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: var(--z-toast); width: max-content; max-width: min(460px, calc(100% - 32px)); padding: var(--s3) var(--s4); border-radius: var(--r); background: var(--fg); color: var(--bg); font-size: var(--fs-md); font-weight: 600; box-shadow: var(--sh-2); }

@media (min-width: 640px) {
  .capture .btn-row:has(> :nth-child(2)) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 960px) {
  .only-m { display: none !important; }
  .steps-nav { display: flex; }
  .top-title { display: none; }
  .wrap { padding-block: var(--s7) var(--s8); }
  .split { max-width: none; grid-template-columns: minmax(0, 1fr) 340px; gap: var(--s7); align-items: start; }
  .side { position: sticky; top: 92px; }
  .wide { max-width: 1120px; }
  .split .cta { margin-top: 0; }
  .start-band { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); align-items: center; gap: var(--s8); padding-block: var(--s8); }
  .flow ol { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .start-cta { flex-direction: row; flex-wrap: wrap; align-items: center; }
  .start-cta .btn { width: auto; min-width: 15rem; }
  .start-cta .trust { flex-basis: 100%; }
  .sit-cta { flex-direction: row; }
  .sit-cta .btn { width: auto; min-width: 15rem; }
  .row dt { width: 11em; }
  /* 진정서: 문서는 A4 처럼 좁게, 단추는 옆 칸. 번역을 나란히 볼 때는 문서 둘이 폭을 다 쓴다 */
  .split.cp-both { grid-template-columns: minmax(0, 1fr); }
  .split.cp-both .side { position: static; max-width: 420px; }
  .side .qr { grid-template-columns: 96px minmax(0, 1fr); gap: var(--s3); }
  .side .qr .qr-code { width: 96px; height: 96px; padding: 6px; }
  .side .qr h2 { font-size: var(--fs-md); }
  .side .qr p { font-size: var(--fs-sm); }
  .result-grid { grid-template-columns: minmax(0, 400px) minmax(0, 1fr); grid-template-areas: "sum items"; gap: var(--s5) var(--s7); }
  .r-sum { position: sticky; top: 92px; } /* 합계 · 진정서 단추는 항목을 내려 봐도 옆에 남는다 */
  .paper-grid.tr-on { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .paper-grid .tr-inline { display: none; }
  .paper-grid.tr-on .tr-col { display: flex; }
  .paper { padding: var(--s7) var(--s6); }
  .toast { bottom: var(--s6); }
}
@media print {
  body::before, .top, .cta, .no-print, .proto, .banner, .tr-col, .tr-inline, .toast, .progress, .side, .skip { display: none !important; }
  .wrap { padding: 0; max-width: none; }
  .paper { border: 0; padding: 0; box-shadow: none; }
  .receipt, .receipt-in { background: none; color: #000000; box-shadow: none; }
  .receipt-in { border: 2px solid #000000; }
  .dock, .chart { display: none !important; }
  body { background: #FFFFFF; color: #000000; }
}

/* ---------- v2 3단계: 달력 · 그래프 · 사전 · 도움받을 곳 · 준비물 · 대지급금 ---------- */
:root { --chart: #2F5BB5; } /* 막대 색: dataviz 검사(밝기 · 채도 · 바탕 대비 3:1) 통과 */
:root[data-theme="dark"] { --chart: #5F8BEA; }
.plain { margin: 0; padding: 0; list-style: none; }
/* 쉬운 말: 누르면 풀이 창 */
.term { display: inline; min-height: 0; padding: 0; border: 0; background: none; font: inherit; font-weight: 700; color: inherit; cursor: help; text-decoration: underline dotted; text-decoration-thickness: 2px; text-underline-offset: 4px; text-decoration-color: var(--brand-deep); }
.term:hover { text-decoration-style: solid; }
dialog small, .words small { font-weight: 400; color: var(--muted); font-size: var(--fs-sm); }
/* 아래 줄: 저장 안내 · 내 정보 지우기 */
.resume { padding: var(--s4); border-radius: var(--r); background: var(--surface); }
.resume .btn { min-height: 48px; font-size: var(--fs-md); }
/* 질문 6: 달력 안내 · 더한 달 */
.calcard { padding: var(--s4); border-radius: var(--r); border: 1.5px solid var(--line); }
.calcard > .ico { color: var(--brand-deep); }
.months { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: var(--s3); }
.month-row { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s2); padding: var(--s3); border-radius: var(--r); background: var(--surface); }
.month-row .pg-btn { justify-self: start; }
/* 근무 달력 */
.cal { padding: var(--s3); border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--bg); }
.cal-head { font-weight: 700; font-size: var(--fs-lg); padding: 0 var(--s1) var(--s2); }
.cal-week, .cal-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal-week span { text-align: center; font-size: var(--fs-sm); font-weight: 700; color: var(--muted); padding-bottom: 4px; }
.cal-day { min-height: 52px; padding: 4px 0; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--bg); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0; cursor: pointer; font-variant-numeric: tabular-nums; }
.cal-day b { font-size: var(--fs-md); line-height: 1.2; }
.cal-day small { font-size: 0.8125rem; font-weight: 700; line-height: 1.2; }
.cal-day.we b { color: var(--muted); }
.cal-day:hover:not(:disabled) { border-color: var(--fg); }
.cal-day.has { background: var(--brand-soft); border-color: var(--warn-line); }
.cal-day.has b { color: var(--fg); }
.cal-day.hol { background: var(--accent-soft); border-color: var(--accent); }
.cal-day[aria-pressed="true"] { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.cal-day[aria-pressed="true"] b { color: var(--bg); }
.cal-day:disabled { background: var(--surface); color: var(--off-fg); cursor: not-allowed; border-style: dashed; }
.cal-edit { padding: var(--s4); border-radius: var(--r); background: var(--surface); }
.cal-edit h2:focus { outline: none; }
.cal-edit .btn { min-height: 48px; font-size: var(--fs-md); }
@media (max-width: 400px) { .cal { padding: var(--s2); } .cal-week, .cal-days { gap: 3px; } } /* 375px 에서 날짜 한 칸이 44px */
@media (max-width: 360px) { .cal { padding: var(--s2) 2px; } .cal-week, .cal-days { gap: 2px; } .cal-day small { font-size: 0.6875rem; } }
/* 결과: 읽기 쉬운 금액 · 달별 그래프 · 단계 풀이 · 다음 할 일 */
.chart summary .ico { color: var(--muted); }
.chart-in { padding-bottom: var(--s4); }
.chart-table { width: 100%; border-collapse: collapse; font-size: var(--fs-md); }
.chart-table th, .chart-table td { padding: var(--s2) 0; border-top: 1px solid var(--line); text-align: left; font-weight: 600; }
.chart-table td { text-align: right; font-weight: 700; }
.chart-in svg { display: block; width: 100%; height: auto; overflow: visible; }
.bar-m { fill: var(--chart); }
.bar-base { stroke: var(--line); stroke-width: 1; }
.bar-v { fill: var(--fg); font-size: 15px; font-weight: 700; font-family: var(--font); }
.bar-l { fill: var(--muted); font-size: 14px; font-weight: 600; font-family: var(--font); }
.chart g:hover .bar-m { fill: var(--fg); }
.why { margin: 0 0 var(--s3); padding: var(--s3) var(--s3) var(--s3) 1.6em; border-radius: var(--r-sm); background: var(--surface); display: flex; flex-direction: column; gap: var(--s2); font-size: var(--fs-sm); }
.why li { display: flex; flex-direction: column; gap: 2px; }
.why b { font-weight: 700; }
.why span { overflow-wrap: anywhere; }
.why a { display: inline-flex; align-items: center; gap: 2px; font-weight: 700; min-height: 44px; }
.speak { min-height: 48px; }
.speak[aria-pressed="true"] { background: var(--brand-soft); border-color: var(--fg); }
.warnbox ul { margin: 0; padding-left: 1.1em; }
.weeks { margin: 0; padding-left: 1.1em; font-weight: 400; font-size: var(--fs-sm); display: flex; flex-direction: column; gap: 4px; }
/* 노동청 · 도움받을 곳 */
.office { padding: var(--s5); border-radius: var(--r); background: var(--surface); } /* 고른 노동청 하나: 노란 상자 대신 옅은 바탕 */
.office h2 { font-size: var(--fs-xl); }
.addr-actions { display: flex; flex-wrap: wrap; gap: var(--s2); }
a.small-btn { color: var(--fg); text-decoration: none; }
.small-btn[aria-pressed="true"] { border-color: var(--brand); background: var(--brand-soft); }
.phones li + li { margin-top: var(--s2); }
.phone small { line-height: 1.5; }
.phone b { white-space: nowrap; }
/* 준비물 */
.ready li { border-bottom: 1px solid var(--line); }
.ready-item { align-items: flex-start; padding: var(--s3) 0; }
.ready-item input { margin-top: 3px; }
.ready-item span { display: flex; flex-direction: column; gap: 2px; }
.ready-item small { font-weight: 400; color: var(--muted); font-size: var(--fs-sm); }
/* 대지급금 */
/* 대지급금 · 계약서 점검 · 기한 결과: 줄 목록. 줄마다 상자 · 색 띠 없이 앞 표시와 첫 낱말 색으로 상태를 나눈다
   (문제 · 지난 기한 = 빨강 X, 빠짐 = 갈색 i, 괜찮음 = 초록 체크) */
.dj-result { padding-top: var(--s2); }
.dj-result ul.stack { gap: 0; border-top: 1px solid var(--line); }
.dj-result li { padding: var(--s3) 0; border-bottom: 1px solid var(--line); }
.dj-bad > .ico, .dj-bad strong { color: var(--err); }
.dj-warn > .ico, .dj-warn strong { color: var(--warn-fg); }
.dj-ok > .ico { color: var(--ok); }
.dj-step > .ico { color: var(--accent); }
.ct-list li { display: flex; gap: var(--s2); align-items: flex-start; overflow-wrap: anywhere; }
.ct-list li > .ico { flex-shrink: 0; margin-top: 2px; }
.ct-list small { font-size: var(--fs-sm); }
.ct-list small a { color: inherit; display: inline-flex; align-items: center; min-height: 44px; } /* 기한 화면 근거 링크도 누르는 높이 44px */
/* 사전 */
.words li { border-bottom: 1px solid var(--line); }
.word summary { font-size: var(--fs-lg); gap: var(--s2); flex-wrap: wrap; }
.word p { padding-bottom: var(--s3); }
/* 상담원 화면: 창구에서 읽기 쉽게 더 크게 */
.counsel { font-size: 1.125rem; }
.counsel h1 { font-size: 1.75rem; }
.counsel .total { font-size: clamp(2.25rem, 10vw, 3rem); }
.counsel-lang { font-weight: 700; padding: var(--s2) var(--s3); border-radius: var(--r-sm); background: var(--brand-soft); }
.counsel-months { margin: 0; padding-left: 1.1em; }
.counsel table { font-size: var(--fs-md); }
.counsel caption { font-size: var(--fs-lg); }
@media (min-width: 960px) {
  .month-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; align-items: end; }
  .cal-day { min-height: 64px; }
}
@media print {
  .term { text-decoration: none; }
  .counsel { font-size: 12pt; }
}

/* ---------- v2 4~5단계: 휴대폰은 설치한 앱처럼 (위 앱바 · 아래 고정 영역 · 탭 막대 · 시트 · 옆으로 미는 전환) ---------- */
/* 위 앱바: 언어 단추 (누르면 아래 시트) */
.lang-btn { height: 44px; padding: 0 12px 0 10px; display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--input-line); border-radius: var(--r-sm); background: var(--bg); font-size: var(--fs-sm); font-weight: 700; cursor: pointer; max-width: 9.5em; }
.lang-btn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lang-btn .ico { width: 18px; height: 18px; color: var(--muted); }
/* 좁은 휴대폰 안쪽 화면: 화면 제목이 잘리지 않게 언어 단추는 지구 표시만(이름은 aria-label), 동전 표시는 조금 작게 */
@media (max-width: 400px) {
  .top-in:has(.brand-desk) .lang-btn { padding: 0; width: 44px; justify-content: center; }
  .top-in:has(.brand-desk) .lang-btn span { display: none; }
  .brand-desk .brand-mark svg { width: 24px; height: 24px; }
  .brand-desk { margin-right: var(--s1); }
  .top-title { white-space: normal; text-overflow: clip; line-height: 1.2; text-wrap: balance; word-break: keep-all; }
}
/* 아래 고정 영역: 주 버튼 + 탭 막대. 본문은 그 높이만큼 아래를 비운다 */
.dock:empty { display: none; }
.tabbar { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.tab { min-height: 56px; padding: 6px 2px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; border: 0; background: none; color: var(--muted); font-size: var(--fs-sm); font-weight: 600; line-height: 1.25; cursor: pointer; transition: color var(--t-fast), transform var(--t-fast); }
.tab .ico { width: 24px; height: 24px; padding: 0; border-radius: 12px; }
.tab[aria-current="page"] { color: var(--fg); font-weight: 700; }
.tab[aria-current="page"] .ico { width: 48px; padding: 0 12px; background: var(--brand-soft); color: var(--brand-deep); }
.tabs-top { display: none; }
/* 목록 줄: 왼쪽 아이콘 · 글 · 오른쪽 꺾쇠 */
.nav-list { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.nav-row { min-height: 56px; padding: var(--s2) var(--s1); display: flex; align-items: center; gap: var(--s3); border: 0; border-bottom: 1px solid var(--line); background: none; color: var(--fg); text-align: left; text-decoration: none; font-size: var(--fs-md); font-weight: 600; cursor: pointer; border-radius: 0; transition: background var(--t-fast), transform var(--t-fast); }
.nav-row:hover { background: var(--surface); }
.nav-row > span { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.nav-row small { font-size: var(--fs-sm); font-weight: 400; color: var(--muted); }
.chev { color: var(--muted); width: 20px; height: 20px; }
.nav-row[aria-pressed="true"] { font-weight: 700; }
/* 누를 때 눌린 느낌 */
.btn:active:not(:disabled), .callout:active, .nav-row:active, .item-row:active, .tab:active, .choice:active, .day:active, .cal-day:active:not(:disabled) { transform: scale(0.98); }
.nav-row:active, .item-row:active { background: var(--surface-2); }
.btn-danger { background: var(--err); color: #FFFFFF; }
:root[data-theme="dark"] .btn-danger { color: #111B2E; }
/* 읽는 중 뼈대 */
.skel-lines { display: flex; flex-direction: column; gap: 10px; }
.skel { display: block; height: 14px; border-radius: 7px; background: var(--surface-2); animation: pulse 1.2s ease-in-out infinite alternate; }
.skel.short { width: 60%; }
.skel.tall { height: 56px; border-radius: var(--r); }
@keyframes pulse { to { opacity: 0.45; } }
/* 시트 손잡이 (넓은 화면에서는 가운데 창이라 숨김) */
.grab { position: sticky; top: 0; z-index: 1; height: 28px; display: grid; place-items: center; background: var(--bg); cursor: grab; touch-action: none; }
.grab::before { content: ""; width: 40px; height: 5px; border-radius: 3px; background: var(--input-line); }
.sheet-amt { display: flex; flex-direction: column; font-size: var(--fs-xl); font-weight: 700; letter-spacing: -0.02em; }
.sheet-amt small { font-size: var(--fs-md); font-weight: 600; color: var(--brand-deep); letter-spacing: 0; }
dialog h3.label { margin: 0; }
#sheet-t:focus { outline: none; }
.confirm-list { margin: 0; padding-left: 18px; }
.term { position: relative; }
.term::after { content: ""; position: absolute; inset: -12px -8px; } .terms { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s5); } /* 글 속 낱말 단추도 누르는 범위는 44px */

@media (max-width: 959px) {
  :root { --fs-sm: 1rem; } /* 휴대폰은 작은 글자도 16px (본문 17px) */
  html, body { overscroll-behavior-y: none; }
  /* 입력 칸에 들어가면 위 앱바 · 아래 고정 단추에 가리지 않는 자리까지 스크롤한다 */
  html { scroll-padding-top: 72px; scroll-padding-bottom: calc(var(--dock-h, 0px) + var(--s4)); }
  .top-in { min-height: 56px; }
  .wrap { padding-bottom: calc(var(--dock-h, 0px) + var(--s6)); overflow-x: clip; }
  .dock { position: fixed; left: 0; right: 0; bottom: var(--kb, 0px); z-index: var(--z-cta); background: var(--bg); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom, 0px); }
  .dock .cta { margin: 0; padding: var(--s3) max(var(--s4), env(safe-area-inset-left, 0px)) var(--s3) max(var(--s4), env(safe-area-inset-right, 0px)); }
  .dock .cta + .tabbar { border-top: 1px solid var(--line); }
  .dock .cta .btn-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dock .btn { min-height: 52px; }
  /* 키보드가 올라와 화면이 낮아지면 탭 막대는 접고 주 단추만 남긴다 */
  .kb .dock .tabbar { display: none; }
  .kb .dock .cta .btn-text, .kb .dock .cta .hint { display: none; }
  /* 화면 이동: 앞으로는 오른쪽에서, 뒤로는 왼쪽에서 밀려 들어옴 (움직임 줄이기면 위 규칙이 끔) */
  .enter > * { animation: none; }
  .enter.from-r { animation: slide-r 280ms var(--ease) both; }
  .enter.from-l { animation: slide-l 280ms var(--ease) both; }
  .enter.fade { animation: fade 200ms ease-out both; }
  /* 시트: 아래에서 올라옴 */
  dialog { margin: auto 0 0; width: 100%; max-width: 100%; max-height: 88dvh; border-radius: 20px 20px 0 0; padding-bottom: env(safe-area-inset-bottom, 0px); box-shadow: 0 -8px 32px -12px rgba(17, 27, 46, 0.3); transition: transform 160ms var(--ease); }
  dialog[open] { animation: sheet-up 300ms var(--ease); }
  .sheet-in { padding: 0 max(var(--s5), env(safe-area-inset-left, 0px)) var(--s5); }
}
@keyframes slide-r { from { opacity: 0; transform: translateX(32px); } }
@keyframes slide-l { from { opacity: 0; transform: translateX(-32px); } }
@keyframes fade { from { opacity: 0; } }
@keyframes sheet-up { from { transform: translateY(100%); } }
@media (min-width: 960px) {
  .dock, .grab { display: none; }
  .sheet-in { padding: var(--s5); }
  .tabs-top { display: flex; margin: 0 auto; gap: 2px; }
  .tabs-top .tab { flex-direction: row; min-height: 44px; padding: 0 14px; gap: 6px; border-radius: var(--r-sm); font-size: var(--fs-sm); }
  .tabs-top .tab .ico { width: 20px; height: 20px; }
  .tabs-top .tab[aria-current="page"] { background: var(--brand-soft); }
  .tabs-top .tab[aria-current="page"] .ico { width: 20px; padding: 0; background: none; }
  .r-sum .cta { margin-top: 0; }
}
/* 설치형(standalone)으로 열면: 주소창이 없으니 앱바가 상태 표시줄 바로 아래 */
@media (display-mode: standalone) { .top { -webkit-user-select: none; user-select: none; } }

/* 질문 화면 아래 단추: 이전(좁게) · 다음(넓게) */
.q-nav { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }
.q-nav .btn-line { gap: 6px; }
.input-short { max-width: 10rem; }

/* 질문 6: 꼭 적을 것(못 받은 달 · 받은 돈) → 더 정확하게(선택) 고르는 줄 */
.paid-box { padding: var(--s4); border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); }
.paid-grid { align-items: start; }
.paid-grid .hint { margin-top: 4px; }
.input-money { font-size: var(--fs-lg); font-weight: 700; }
.opt-sec { gap: var(--s3); }
.opt-list { display: flex; flex-direction: column; gap: var(--s2); }
.opt-row { width: 100%; min-height: 64px; padding: var(--s3) var(--s4); display: flex; align-items: center; gap: var(--s3); border: 1.5px solid var(--line); border-radius: var(--r); background: var(--bg); color: var(--fg); text-align: left; font: inherit; cursor: pointer; list-style: none; transition: border-color var(--t-fast), background var(--t-fast); }
.opt-row::-webkit-details-marker { display: none; }
.opt-row:hover { border-color: var(--input-line); background: var(--surface); }
.opt-row > .ico:first-child { width: 24px; height: 24px; color: var(--brand-deep); }
.opt-row .chev { color: var(--muted); transition: transform var(--t-fast); }
.opt-t { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.opt-t b { font-size: var(--fs-md); }
.opt-t small { font-size: var(--fs-sm); color: var(--muted); }
.opt-row-d[open] > .opt-row { border-color: var(--fg); border-bottom-left-radius: 0; border-bottom-right-radius: 0; background: var(--surface); }
.opt-row-d[open] > .opt-row .chev { transform: rotate(90deg); }
.opt-body { padding: var(--s4); border: 1.5px solid var(--fg); border-top: 0; border-radius: 0 0 var(--r) var(--r); }

/* 결과: 더 할 수 있는 일 (저장 · 다음 할 일 · 알아 두기 세 묶음). 상자 대신 선으로 나눈 목록 */
.next-sec { margin-top: var(--s8); }
.act-group { gap: var(--s2); }
.act-group > .label { color: var(--muted); font-size: var(--fs-sm); }
.act-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 var(--s5); border-top: 1px solid var(--line); }
.act { width: 100%; min-height: 64px; padding: var(--s3) var(--s1); display: flex; align-items: center; gap: var(--s3); border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: none; color: var(--fg); text-align: left; font: inherit; cursor: pointer; transition: border-color var(--t-fast), background var(--t-fast), transform var(--t-fast); }
.act:hover { background: var(--surface); }
.act:active { transform: scale(0.98); }
.act-t { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.act-t b { font-size: var(--fs-md); line-height: 1.35; }
.act-t small { font-size: var(--fs-sm); color: var(--muted); line-height: 1.45; }
.act .chev { color: var(--muted); }
.act-foot { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s5); }
.act-foot .btn-text { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-sm); color: var(--muted); align-self: auto; }
.act-foot .ico { width: 18px; height: 18px; }
@media (min-width: 640px) {
  .act-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .paid-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); }
}
@media (max-width: 639px) {
  .paid-grid { grid-template-columns: minmax(0, 1fr); }
}
@media print { .next-sec { display: none !important; } }

/* 요일 단추 7개는 한 줄에 (휴대폰에서 '일'만 다음 줄로 떨어지지 않게) */
.days { grid-template-columns: repeat(7, minmax(0, 1fr)); }

.input-time { font-variant-numeric: tabular-nums; letter-spacing: 0.02em; }
.opt-row-d > summary.opt-row::after { content: none; }
.opt-row-d > summary.opt-row { font-weight: inherit; }

/* 결과: 적지 않아 계산하지 않은 것 한 줄 · 0원 항목은 작은 단추로 */
.miss-row .item-name small { color: var(--muted); }
.miss-row .item-status { color: var(--accent); font-weight: 700; }
.zero-box { margin-top: var(--s3); display: flex; flex-direction: column; gap: var(--s2); }
.chips { display: flex; flex-wrap: wrap; gap: var(--s2); }
.chip { min-height: 36px; padding: 4px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--fg); font: inherit; font-size: var(--fs-sm); cursor: pointer; }
.chip:hover { border-color: var(--input-line); }
.paper h3 .raw { background: var(--warn-bg); color: var(--warn-fg); padding: 1px 8px; border-radius: var(--r-xs); }

.card-note ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: var(--s1); }
.card-note .btn-text { font-size: var(--fs-sm); min-height: 36px; }

/* 절차 화면 '어려운 말' 줄: 무엇인지 알 수 있게 앞에 이름 */
.terms { align-items: center; }
.terms-label { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-weight: 600; }
.terms-label .ico { width: 18px; height: 18px; }
/* 결과의 0원 단추 · '이유 보기'도 누르는 높이 44px */
.chip, .card-note .btn-text { min-height: 44px; }
/* 노동청 화면의 전화 목록: 넓은 화면은 두 줄로 나란히 */
@media (min-width: 960px) {
  .phones.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s2) var(--s4); }
}
/* 결과: 접어 둔 '계산할 때 알아 둘 점' */
.warn-d { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.warn-d > summary { display: flex; gap: var(--s2); align-items: center; font-weight: 700; min-height: 48px; }
.warn-d[open] > summary { margin-bottom: var(--s2); }
.warn-n { font-weight: 400; color: var(--muted); font-variant-numeric: tabular-nums; }
.warn-d ul { margin: 0; padding-left: 1.2em; display: flex; flex-direction: column; gap: var(--s1); }

/* ===== 11/26 디자인 손질 ===== */

/* 위쪽 메뉴의 '쉬운 말' 표시 (켜져 있을 때만 보이고, 누르면 끈다) */
.easy-chip { height: 44px; padding: 0 12px 0 10px; display: inline-flex; align-items: center; gap: 4px; border: 0; border-radius: var(--r-sm); background: var(--fg); color: var(--bg); font: inherit; font-size: var(--fs-sm); font-weight: 700; cursor: pointer; white-space: nowrap; }
.easy-chip .ico { width: 16px; height: 16px; stroke-width: 2.25; }
.easy-chip:hover { background: var(--btn-hover); }
.easy-chip[aria-pressed="false"] { padding: 0 12px; background: var(--bg); color: var(--fg); box-shadow: inset 0 0 0 1px var(--input-line); }
.easy-chip[aria-pressed="false"]:hover { background: var(--surface); }

/* 요일: 한 줄 묶음 단추. 고른 요일만 진하게 채우고 다른 강조(밑줄 · 그림자)는 없다 */
.days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 0; padding: 0; border: 1.5px solid var(--input-line); border-radius: var(--r); overflow: hidden; background: var(--bg); }
.day { min-height: 48px; border: 0; border-left: 1px solid var(--line); border-radius: 0; background: none; color: var(--fg); font-weight: 600; box-shadow: none; transition: background var(--t-fast), color var(--t-fast); }
.day:first-child { border-left: 0; }
.day:hover { background: var(--surface); border-color: var(--line); }
.day[aria-pressed="true"] { background: var(--fg); color: var(--bg); font-weight: 700; box-shadow: none; border-left-color: var(--fg); }
.day[aria-pressed="true"] + .day[aria-pressed="true"] { border-left-color: rgba(255, 255, 255, 0.18); }
.day:active { transform: none; }
.day:focus-visible { position: relative; z-index: 1; }


/* 결과 합계: 형광펜 없이 크기 · 굵기만 */
.total b { background: none; padding: 0; margin: 0; }

/* 질문 6: 꼭 적을 칸은 바탕 상자 없이, 아래 '해당되면 누르는 목록'과는 구분선 하나로 */
.paid-box { padding: 0; background: none; border: 0; }
.opt-sec { padding-top: var(--s4); border-top: 1px solid var(--line); gap: var(--s2); }
.opt-line { font-size: var(--fs-md); font-weight: 700; }
.opt-row { min-height: 60px; }

/* 입력하면 나타나는 줄이 아래를 밀어내지 않게 자리를 미리 잡는다 */
.readable { min-height: 1.5em; }
[data-q4sum]:empty { min-height: 0; }

/* 진정서 칸: 넓은 화면은 두 칸씩 (주소는 한 줄 전체), 옆 칸은 한 상자 */
@media (min-width: 960px) {
  .form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s3) var(--s4); }
  .form-grid .wide-f { grid-column: 1 / -1; }
}
.form-grid { display: flex; flex-direction: column; gap: var(--s3); }
@media (min-width: 960px) { .form-grid { display: grid; } }
.auto-box { gap: var(--s2); }
.auto-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); }
.auto-head .btn-text { font-size: var(--fs-sm); min-height: 36px; align-self: auto; }
.auto-box .nav-list { border-top: 1px solid var(--line); margin-top: var(--s1); }
.auto-box .nav-row { min-height: 52px; border-bottom: 0; padding-inline: 0; }
.privacy { line-height: 1.55; }

/* 결과 더보기: 휴대폰에서만 접는다 */
.m-more-btn { width: 100%; min-height: 48px; display: flex; align-items: center; justify-content: center; gap: 6px; border: 1.5px solid var(--line); border-radius: var(--r); background: var(--bg); color: var(--fg); font: inherit; font-weight: 700; cursor: pointer; }
.m-more-btn .chev { width: 18px; height: 18px; transform: rotate(90deg); transition: transform var(--t-fast); }
.m-more-btn[aria-expanded="true"] .chev { transform: rotate(-90deg); }
@media (max-width: 959px) {
  .wide.col:not(.more-open) .m-more { display: none; }
}
@media (min-width: 960px) {
  .m-more-btn { display: none; }
}

/* 쉬운 말 + 휴대폰: 덜 중요한 설명을 접어 질문 · 단추에 집중 */
@media (max-width: 959px) {
  .easy-m .banner, .easy-m .q-legend ~ details.more, .easy-m [data-next-hint], .easy-m .items-head .hint,
  .easy-m .foot-bar > .hint { display: none !important; }
}

/* 주소 찾기 · 가게 찾기 */
.addr-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--s2); }
.addr-row .btn { width: auto; min-height: 56px; padding: 0 var(--s4); white-space: nowrap; }
.addr-row .btn .ico { width: 20px; height: 20px; }
.pl-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--s2); }
.pl-form .btn { width: auto; padding: 0 var(--s5); }
.pl-list { min-height: 96px; max-height: min(420px, 50dvh); overflow-y: auto; }
.pl-item { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; width: 100%; min-height: 56px; padding: var(--s3) var(--s2); background: none; border: 0; border-bottom: 1px solid var(--line); color: inherit; font: inherit; text-align: left; cursor: pointer; transition: background var(--t-fast); }
.pl-item:hover { background: var(--surface); }
.pl-item strong { font-size: var(--fs-md); }
.pl-item small { font-size: var(--fs-sm); font-weight: 400; color: var(--muted); }
.field > label .req { font-size: var(--fs-sm); font-weight: 600; color: var(--muted); margin-left: 2px; }
.input[readonly][data-act] { cursor: pointer; }
.pc-box { height: min(470px, 62dvh); border: 1px solid var(--line); border-radius: var(--r-sm); overflow: hidden; }
