/* ============================================================
   언제 바꿀까 · 앱 스타일 v2 (2026-08-26 리디자인 이식)
   서체: Pretendard 단일 패밀리 (제목 800 / 본문 400·500 / 숫자 tabular).
        Pretendard를 못 받는 환경(아티팩트 CDN 차단)은 같은 한글 골격의 Noto Sans KR로 폴백.
   모양 규칙: 카드 20px / 입력·버튼 14px / 칩 8px (전 화면 동일)

   색 규칙 (2026-08-29 화이트 베이스 개편):
   - 바탕은 순백. 카드도 순백이고 구분은 경계선으로 한다. 돈 계산 화면이라
     색으로 분위기를 만들지 않고 선과 글자로만 구조를 만든다.
   - 중립축은 슬레이트(청회색)다. 이전 팔레트는 잉크·경계선까지 전부 녹색으로
     틀어져 있어 배경이 흰색이 아니라 연녹색으로 읽혔다.
   - 대표색 #3AFF5C는 면이 아니라 마커·타임라인·주 버튼에만. 넓은 면을 칠하지 않는다.
   - 다크 모드는 두지 않는다. 흰 바탕이 이 제품의 신뢰 근거라, 기기 설정이 다크여도
     화면은 흰색을 유지한다 (color-scheme: light).
   - 글자는 항상 잉크. 상태색(빨강·주황·초록)은 대표색과 별개이며,
     전부 자기 배경 위에서 4.5:1 이상으로 잡았다(이전 값은 2.75~3.91:1로 미달이었다).
   ============================================================ */
@font-face {
  font-family: 'Pretendard Variable';
  font-style: normal;
  font-weight: 45 920;
  font-display: swap;
  src: url('../fonts/PretendardVariable.woff2') format('woff2-variations');
}

:root {
  --bg: #ffffff;
  --card: #ffffff;
  --card-2: #f8fafc;  /* 입력 필드·보조 면 */
  --ink: #0f172a;     /* 17.9:1 */
  --ink-2: #475569;   /*  7.6:1 */
  --ink-3: #64748b;   /*  4.8:1 — 본문에 써도 AA */
  --line: #e2e8f0;    /* 장식 구분선·카드 테두리 */
  --line-2: #7c8ca0;  /* 컨트롤 경계 3.4:1 (WCAG 1.4.11) */
  --sig: #3aff5c;
  --sig-hover: #2fef50;
  --sig-active: #24dc46;
  --sig-line: #119642; /* 주 버튼 윤곽 3.8:1 — 네온은 흰 바탕에서 1.3:1이라 경계가 필요하다 */
  --sig-deep: #0b7a33; /* 링크·강조 글자 5.5:1 */
  --sig-ink: #0f172a;  /* 네온 위 글자 13.3:1 */
  --marker: #b0ffbe;   /* 형광펜 = 네온 40% over 흰색, 잉크 대비 15.2:1 */
  --tint: #f1f5f9;     /* 칩·아이콘 타일·안내 박스: 중립 면 (예전엔 연녹색이었다) */
  --pro: #334155;
  --pro-tint: #eef2f7;
  --pro-tint-2: #e2e8f0;
  --st-red: #b91c1c;
  --st-amber: #b45309;
  --st-green: #15803d;
  --st-red-bg: #fef2f2;
  --st-amber-bg: #fffbeb;
  --st-green-bg: #f0fdf4;
  --track: #e2e8f0;
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px -16px rgba(15, 23, 42, 0.16);
  --r-card: 20px;
  --r-ctl: 14px;
  --r-chip: 8px;
  --font: "Pretendard Variable", Pretendard, "Noto Sans KR", "Apple SD Gothic Neo", system-ui, sans-serif;
  /* 라이트 전용. 기기가 다크여도 폼 컨트롤·스크롤바까지 라이트로 그린다 */
  /* 'only'가 있어야 크롬 안드로이드의 다크 테마 자동 적용이 이 사이트를 건드리지 않는다.
     그냥 light면 강제 반전이 그대로 걸린다 (설치한 PWA가 검게 나오던 원인). */
  color-scheme: only light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; background: var(--bg); }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font); font-size: 15px; line-height: 1.65; font-weight: 400;
  -webkit-font-smoothing: antialiased; word-break: keep-all; overflow-wrap: anywhere; min-height: 100dvh;
  touch-action: manipulation;
}
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--sig-deep); text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--sig-deep); outline-offset: 2px; }
::selection { background: var(--marker); color: var(--ink); }
h1, h2, h3, p { margin: 0; }
p { text-wrap: pretty; }
.num { font-variant-numeric: tabular-nums; }
.display { font-weight: 800; letter-spacing: -0.02em; }

/* ---- 앱 셸 ---- */
.shell { display: flex; flex-direction: column; min-height: 100dvh; }
.view { width: 100%; min-width: 0; max-width: 520px; margin: 0 auto; padding: 0 20px 40px; flex: 1; }
.view--wide { max-width: 1040px; }
@media (prefers-reduced-motion: no-preference) {
  .view { animation: enter 0.22s cubic-bezier(0.16, 1, 0.3, 1); }
  @keyframes enter { from { opacity: 0; transform: translateY(8px); } }
}
.topbar {
  display: flex; align-items: center; gap: 10px; height: 60px; margin: 0 -20px; padding: 0 20px;
  position: sticky; top: 0; z-index: 10;
  background: var(--bg); border-bottom: 1px solid var(--line);
}
.wordmark { font-weight: 800; font-size: 15px; letter-spacing: -0.01em; color: var(--ink); text-decoration: none; }
.wordmark i { display: inline-block; width: 8px; height: 8px; background: var(--sig); border-radius: 2px; margin-right: 8px; transform: rotate(45deg) translateY(-1px); }
.iconbtn {
  width: 40px; height: 40px; border-radius: var(--r-ctl); border: 1px solid var(--line); background: var(--card); color: var(--ink);
  display: inline-flex; align-items: center; justify-content: center; padding: 0; transition: background 0.12s, transform 0.08s;
}
.iconbtn:hover { background: var(--card-2); }
.iconbtn:active { transform: scale(0.96); }
.topbar .spacer { flex: 1; }
.topbar .step { font-size: 12.5px; color: var(--ink-2); }

/* ---- 버튼 ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%; height: 52px; padding: 0 18px;
  border-radius: var(--r-ctl); border: 1px solid transparent; font-weight: 700; font-size: 15.5px; letter-spacing: -0.01em;
  transition: background 0.12s, transform 0.08s, border-color 0.12s; touch-action: manipulation;
}
.btn:active { transform: translateY(1px) scale(0.99); }
.btn-primary { background: var(--sig); color: var(--sig-ink); border-color: var(--sig-line); }
.btn-primary:hover { background: var(--sig-hover); }
.btn-primary:active { background: var(--sig-active); }
.btn-primary:disabled { opacity: 0.45; cursor: default; transform: none; }
.btn-secondary { background: var(--card); color: var(--ink); border-color: var(--line-2); }
.btn-secondary:hover { background: var(--card-2); }
.btn-ghost { background: transparent; color: var(--ink); border-color: transparent; height: 44px; font-size: 14px; }
.btn-ghost:hover { background: color-mix(in srgb, var(--ink) 6%, transparent); }
.btn-sm { height: 40px; width: auto; font-size: 13.5px; padding: 0 14px; }

/* ---- 칩 ---- */
.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px; border-radius: var(--r-chip);
  font-size: 11.5px; font-weight: 700; letter-spacing: 0.01em; line-height: 1; background: var(--tint); color: var(--ink);
}
.chip-pro { background: var(--pro-tint); color: var(--pro); }
.chip-status { background: var(--st-bg); color: var(--st); }
.chip-status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }

/* ---- 카드 ---- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-card); box-shadow: var(--shadow); }
.card-pad { padding: 20px; }

/* ============ 홈 ============ */
.home-head { padding: 28px 0 22px; }
.home-head h1 { font-size: 28px; line-height: 1.3; text-wrap: balance; }
/* 둘째 줄은 한 단계 작게 — 첫 줄('지금 바꿀까, 더 쓸까?')이 먼저 읽혀야 한다 */
.home-head h1 .sub { font-size: 0.875em; }
.home-head h1 .mk { background: var(--marker); border-radius: 6px; padding: 0 6px; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.home-head p { margin-top: 14px; font-size: 15px; color: var(--ink-2); max-width: 36ch; }
/* 홈 상단 (2026-08-29 v2): 시그니처 색을 '면'이 아니라 '워시'로 쓴다. 위에서 아래로 스며들며
   사라져서 덩어리도 모서리도 남지 않는다. 앞서 풀 채도 밴드는 공간을 먹고 모양이 떠 보였다. 브랜드색은 워드마크 점과 '언제' 형광펜에만 남긴다.
   중고차 앱들(KB차차차·엔카)처럼 장식 없이 바로 고르는 화면으로 간다. */
.view--home { position: relative; isolation: isolate; }
.view--home::before {
  content: ""; position: absolute; left: -20px; right: -20px; top: 0; height: 360px; z-index: -1;
  background: linear-gradient(180deg, rgba(58, 255, 92, 0.72) 0%, rgba(58, 255, 92, 0.34) 42%, rgba(58, 255, 92, 0) 100%);
  pointer-events: none;
}
.view--home .topbar { background: transparent; border-bottom-color: transparent; }
.view--home .home-head { padding: 18px 0 20px; }
/* 워시가 진해지면서 초록 위 초록이 된 것들을 잉크로 돌린다. */
/* '언제' 형광펜은 워시보다 확실히 진해야 읽힌다. 결과 화면의 연한 마커(--marker)를
   그대로 쓰면 워시에 묻히므로, 홈에서는 시그니처 원색을 그대로 칠한다. 잉크 대비 13.3:1. */
.view--home .home-head h1 .mk { background: var(--sig); }
.view--home .wordmark i { background: var(--ink); }

.picker { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tile {
  position: relative; display: flex; flex-direction: column; justify-content: space-between; gap: 18px;
  min-height: 118px; padding: 16px; border-radius: var(--r-card); background: var(--card); color: var(--ink); box-shadow: var(--shadow);
  /* 워시가 흰색으로 사라지는 아래쪽에서는 흰 카드가 흰 바탕 위에 놓인다.
     그림자만으로는 경계가 없어지므로 컨트롤 경계선(3.4:1)을 실제로 그린다. */
  border: 1px solid var(--line-2); text-align: left; text-decoration: none; transition: transform 0.12s, border-color 0.12s, background 0.12s;
}
.tile:hover { border-color: var(--sig-line); transform: translateY(-1px); }
.tile:active { transform: scale(0.985); }
.tile .ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--tint); color: var(--ink); }
.tile .name { font-weight: 800; font-size: 18px; letter-spacing: -0.02em; line-height: 1.2; }
/* 이 제품군에서 '실제로 답을 가르는 것' 한 줄. 무엇을 보고 계산하는지 미리 보여줘
   결과를 받았을 때 근거를 납득할 수 있게 한다. 문구는 민감도 상위 항목을 따른다. */
.tile .nm { display: block; }
.tile .basis { display: block; margin-top: 5px; font-size: 11.5px; font-weight: 500; color: var(--ink-3); line-height: 1.4; letter-spacing: -0.01em; }
.tile .arrow { position: absolute; top: 16px; right: 16px; color: var(--ink-3); }
.tile:last-child { grid-column: 1 / -1; }
/* '어떻게 계산하나요' — 결과를 받기 전에 판단 방식을 먼저 밝힌다.
   무엇을 재료로 쓰는지가 아니라 무엇과 무엇을 견주는지를 말해야 납득이 된다. */
.how { margin-top: 24px; padding: 18px 18px 16px; border: 1px solid var(--line); border-radius: var(--r-card); background: var(--card-2); }
.how h2 { font-size: 14px; font-weight: 800; letter-spacing: -0.01em; }
.how ol { margin: 12px 0 0; padding: 0; list-style: none; counter-reset: how; }
.how li { position: relative; counter-increment: how; padding-left: 30px; margin-top: 12px; }
.how li::before {
  content: counter(how); position: absolute; left: 0; top: 1px;
  width: 20px; height: 20px; border-radius: 50%; background: var(--sig); color: var(--sig-ink);
  font-size: 11.5px; font-weight: 800; display: grid; place-items: center;
}
.how li b { display: block; font-size: 13.5px; font-weight: 700; line-height: 1.4; }
.how li span { display: block; margin-top: 2px; font-size: 12.5px; color: var(--ink-2); line-height: 1.55; }
.how-note { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 12px; color: var(--ink-2); line-height: 1.6; }

.home-foot { margin-top: 22px; font-size: 12.5px; color: var(--ink-2); line-height: 1.6; }
@media (min-width: 640px) {
  .home-head h1 { font-size: 34px; }
  .picker { grid-template-columns: repeat(5, 1fr); }
  .tile:last-child { grid-column: auto; }
}

/* ============ 입력 ============ */
.form-head { padding: 22px 0 18px; }
.form-head h1 { font-size: 28px; line-height: 1.25; text-wrap: balance; }
.form-head p { margin-top: 8px; font-size: 14px; color: var(--ink-2); }
.form-head p b { color: var(--sig-deep); font-weight: 700; }
.group { margin-top: 12px; }
.group-title { display: flex; align-items: baseline; gap: 10px; padding: 18px 20px 6px; }
.group-title .tag { font-size: 11.5px; font-weight: 700; color: var(--sig-deep); letter-spacing: 0.04em; }
.group-title h2 { font-weight: 800; font-size: 16.5px; letter-spacing: -0.02em; }
.field { padding: 12px 20px 14px; }
.field + .field { border-top: 1px solid var(--line); }
.field .lbl { display: block; font-size: 14px; font-weight: 500; color: var(--ink); }
.field .lbl .star { color: var(--sig-deep); margin-right: 3px; }
.ctl {
  margin-top: 8px; display: flex; align-items: center; gap: 8px; height: 50px; padding: 0 14px; border-radius: var(--r-ctl);
  background: var(--card-2); border: 1px solid var(--line); transition: border-color 0.12s, background 0.12s;
}
.ctl:focus-within { border-color: var(--sig-deep); background: var(--card); }
.ctl input, .ctl select { flex: 1 1 0; width: 0; min-width: 0; border: 0; outline: 0; background: transparent; padding: 0; font-size: 16px; color: var(--ink); }
.ctl input { font-variant-numeric: tabular-nums; }
.ctl input::placeholder { color: var(--ink-3); }
.ctl select { appearance: none; -webkit-appearance: none; padding-right: 22px; }
.ctl .unit { font-size: 13px; color: var(--ink-2); flex: none; }
.ctl .chev { position: absolute; right: 14px; pointer-events: none; color: var(--ink-3); }
.ctl.has-select { position: relative; }
.ctl.err { border-color: var(--st-red); background: var(--st-red-bg); }
.help { margin-top: 7px; font-size: 12.5px; color: var(--ink-2); line-height: 1.55; }
.err-msg { margin-top: 7px; font-size: 12.5px; color: var(--st-red); font-weight: 600; }
.seg { margin-top: 8px; display: flex; gap: 6px; }
.seg button { flex: 1; height: 44px; border-radius: var(--r-ctl); border: 1px solid var(--line); background: var(--card-2); color: var(--ink); font-size: 14px; transition: background 0.12s, border-color 0.12s; }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--card); border-color: var(--ink); font-weight: 700; }
details.optional { margin-top: 12px; border-radius: var(--r-card); background: var(--card-2); border: 1px dashed var(--line-2); }
details.optional summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; padding: 16px 20px; }
details.optional summary::-webkit-details-marker { display: none; }
details.optional summary .t { font-weight: 700; font-size: 14.5px; flex: 1; }
details.optional summary .chev { transition: transform 0.15s; color: var(--ink-3); }
details.optional[open] summary .chev { transform: rotate(180deg); }
details.optional .field:first-of-type { border-top: 1px solid var(--line); }
.acct { display: inline-flex; align-items: center; gap: 8px; }
.acct .who { font-size: 12.5px; color: var(--ink-2); max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct .btn-sm { padding: 6px 12px; font-size: 12.5px; }
.sheet-bg { position: fixed; inset: 0; background: rgba(15,23,42,.42); display: flex; align-items: flex-end; justify-content: center; z-index: 40; }
.sheet { width: 100%; max-width: 520px; background: var(--card); border-radius: 22px 22px 0 0; padding: 22px 20px calc(24px + env(safe-area-inset-bottom)); box-shadow: 0 -12px 40px rgba(15,23,42,.18); }
.sheet h2 { font-size: 19px; margin: 0 0 6px; }
.sheet p { color: var(--ink-2); font-size: 14px; margin: 0 0 16px; }
.sheet .stack { display: grid; gap: 10px; }
.btn-oauth { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; padding: 14px; border-radius: var(--r-ctl); font-weight: 700; font-size: 15px; border: 1px solid var(--line-2); background: var(--card); color: var(--ink); cursor: pointer; }
.btn-oauth.kakao { background: #FEE500; border-color: #e5cf00; color: #191919; }
.btn-oauth.google { background: #fff; }
.btn-oauth.apple { background: #000; color: #fff; border-color: #000; }
.btn-oauth svg { width: 20px; height: 20px; }
.sheet .fine { font-size: 12px; color: var(--ink-3); margin: 14px 0 0; line-height: 1.55; }
.sheet .fine a { color: var(--sig-deep); }
.consent { display: grid; gap: 10px; margin: 14px 0 6px; }
.consent label { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--ink); cursor: pointer; }
.consent label input { margin-top: 3px; accent-color: var(--sig-deep); width: 18px; height: 18px; }
.consent label small { display: block; color: var(--ink-3); font-size: 12px; margin-top: 2px; }
.hist { display: grid; gap: 10px; }
.hist .row { display: grid; grid-template-columns: 1fr auto; gap: 8px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
.hist .row .t { font-weight: 700; font-size: 15px; }
.hist .row .d { font-size: 12.5px; color: var(--ink-3); margin-top: 3px; }
.hist .row .del { align-self: start; }
.danger { border-color: var(--st-red) !important; color: var(--st-red) !important; background: var(--card) !important; }
.home-legal { display: inline-block; margin-top: 6px; color: var(--ink-3); font-size: 12.5px; text-decoration: underline; text-underline-offset: 3px; }
/* 입력 칸 안쪽에 붙는 접이식. 형제로 두면 바로 아래 칸에 딸린 것처럼 보여서 이 칸 안에 박스로 앉힌다 */
.field details.sub { margin-top: 11px; border: 1px solid var(--line); border-radius: var(--r-ctl); background: var(--card-2); overflow: hidden; }
.field details.sub summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; padding: 11px 14px; }
.field details.sub summary::-webkit-details-marker { display: none; }
.field details.sub summary .t { flex: 1; font-size: 13.5px; font-weight: 700; color: var(--sig-deep); }
.field details.sub summary .chev { transition: transform 0.15s; color: var(--ink-3); }
.field details.sub[open] summary .chev { transform: rotate(180deg); }
.field details.sub .sub-help { padding: 0 14px 12px; font-size: 12.5px; color: var(--ink-2); line-height: 1.55; }
.field details.sub .field { padding: 11px 14px 12px; }
.field details.sub .field:first-of-type { border-top: 1px solid var(--line); }
.form-alert { margin-top: 12px; padding: 12px 16px; border-radius: var(--r-ctl); background: var(--st-red-bg); color: var(--st-red); font-size: 13.5px; font-weight: 600; }
.form-alert:focus { outline: 2px solid var(--st-red); outline-offset: 2px; }
.form-actions {
  position: sticky; bottom: 0; margin: 14px -20px 0; padding: 12px 20px calc(16px + env(safe-area-inset-bottom));
  background: var(--bg); border-top: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 8px;
}

/* ============ 결과 ============ */
.res-grid { display: grid; grid-template-columns: minmax(0, 1fr); min-width: 0; gap: 16px; padding-top: 6px; }
@media (min-width: 860px) {
  .res-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 24px; align-items: start; padding-top: 14px; }
  .res-grid > .res-left { position: sticky; top: 74px; }
}
.res-left, .res-right { min-width: 0; }
.res-meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.res-meta .t { font-weight: 700; font-size: 14px; color: var(--ink-2); }
.res-meta .d { font-size: 12px; color: var(--ink-3); }
.answer { margin-top: 14px; font-size: 30px; line-height: 1.3; text-wrap: balance; }
.answer .mk { background: var(--marker); border-radius: 8px; padding: 0 7px; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.answer-sub { margin-top: 10px; font-size: 14.5px; color: var(--ink-2); white-space: pre-line; }
.hold-chips { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }

/* 타임라인 */
.tl { margin-top: 22px; }
.tl-cap { display: flex; justify-content: space-between; align-items: baseline; font-size: 12px; color: var(--ink-2); }
.tl-cap b { color: var(--ink); font-weight: 700; }
.tl-track { position: relative; height: 12px; margin-top: 10px; border-radius: 6px; background: var(--track); }
.tl-win { position: absolute; top: 0; bottom: 0; border-radius: 6px; background: var(--sig); transform-origin: left center; }
@media (prefers-reduced-motion: no-preference) {
  .tl-win { animation: grow 0.55s cubic-bezier(0.16, 1, 0.3, 1) both; }
  @keyframes grow { from { transform: scaleX(0); } }
}
.tl-hatch { position: absolute; top: 0; bottom: 0; right: 0; background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--st-red) 26%, transparent) 0 3px, transparent 3px 8px); border-radius: 0 6px 6px 0; pointer-events: none; }
.tl-dead { position: absolute; top: -5px; bottom: -5px; width: 3px; border-radius: 2px; background: var(--st-red); transform: translateX(-50%); }
.tl-dot { position: absolute; top: 50%; width: 14px; height: 14px; border-radius: 50%; background: var(--ink); border: 2.5px solid var(--card); box-shadow: 0 0 0 1px var(--ink); transform: translate(-50%, -50%); }
.tl-years { position: relative; display: grid; margin-top: 10px; font-size: 11.5px; color: var(--ink-3); }
.tl-years span { text-align: center; font-variant-numeric: tabular-nums; }
.tl-years span.on { color: var(--ink); font-weight: 700; }
.tl-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 10px; font-size: 12px; color: var(--ink-2); }
.tl-legend i { display: inline-block; width: 12px; height: 8px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.tl-legend .lw i { background: var(--sig); }
.tl-legend .lk i { background: var(--ink); width: 8px; height: 8px; border-radius: 50%; }
.tl-legend .ld i { background: var(--st-red); width: 3px; }

/* 핵심 숫자 타일 */
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 18px; }
.stat { position: relative; padding: 14px 14px 12px; border-radius: var(--r-ctl); background: var(--card-2); border: 1px solid var(--line); min-width: 0; overflow: hidden; }
.stat .k { font-size: 12px; color: var(--ink-2); line-height: 1.4; }
.stat .v { margin-top: 6px; font-weight: 800; font-size: 21px; letter-spacing: -0.03em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat .v small { font-size: 13px; font-weight: 600; color: var(--ink-2); margin-left: 2px; letter-spacing: 0; }
.stat .s { margin-top: 5px; font-size: 11.5px; color: var(--ink-2); line-height: 1.45; }
.stat--wide { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.stat--wide .v { margin-top: 4px; }
.stat.locked-tile .v, .stat.locked-tile .s, .stat.locked-tile .chip { filter: blur(6px); user-select: none; opacity: 0.7; }
.stat.locked-tile .lock { position: absolute; right: 12px; top: 12px; display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 8px; border-radius: var(--r-chip); background: var(--pro-tint); color: var(--pro); font-size: 11.5px; font-weight: 700; }
.warnbox { margin-top: 14px; display: flex; gap: 10px; padding: 12px 14px; border-radius: var(--r-ctl); background: var(--tint); font-size: 13.5px; line-height: 1.55; white-space: pre-line; }
.warnbox svg { flex: none; margin-top: 3px; color: var(--sig-deep); }

/* 상세 섹션 */
.sections { display: flex; flex-direction: column; }
.sec { padding: 18px 20px; min-width: 0; }
.sec + .sec { border-top: 1px solid var(--line); }
.sec h3 { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 15.5px; letter-spacing: -0.02em; }
.sec h3 .chip { margin-left: auto; }
.sec p { margin-top: 8px; font-size: 15px; line-height: 1.7; white-space: pre-line; }
.mk { background: var(--marker); border-radius: 5px; padding: 0 4px; box-decoration-break: clone; -webkit-box-decoration-break: clone; font-weight: 700; }
.sec .sub { margin-top: 10px; font-size: 12.5px; color: var(--ink-2); line-height: 1.6; }
.quote { margin-top: 14px; padding: 14px; border-radius: var(--r-ctl); background: var(--card-2); border: 1px solid var(--line); }
.quote label { font-size: 12.5px; color: var(--ink-2); }
.quote .ctl { height: 46px; background: var(--card); }
.quote .verdict { margin-top: 10px; font-size: 13.5px; font-weight: 600; line-height: 1.55; display: flex; gap: 8px; align-items: flex-start; }
.quote .verdict.keep { color: var(--st-green); }
.quote .verdict.swap { color: var(--st-red); }
.quote .verdict svg { flex: none; margin-top: 2px; }
/* 무료 잠금: 본문 블러 + PRO 유도 (원본 app.js lockedBlock) */
.locked { position: relative; margin-top: 8px; }
.locked .blur { filter: blur(5px); user-select: none; pointer-events: none; opacity: 0.7; }
.locked .blur p { margin-top: 0; }
.locked-cta {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 14px; border-radius: var(--r-ctl);
  border: 0; background: var(--pro-tint); color: var(--pro); font-size: 13.5px; font-weight: 700; white-space: nowrap; box-shadow: var(--shadow);
}
.locked-cta:hover { background: var(--pro-tint-2); }
.probox {
  margin: 8px 20px 20px; width: calc(100% - 40px); display: flex; gap: 12px; align-items: flex-start; text-align: left;
  padding: 16px; border-radius: var(--r-ctl); border: 0; background: var(--pro-tint); color: var(--pro); transition: transform 0.08s, background 0.12s;
}
.probox:hover { background: var(--pro-tint-2); }
.probox:active { transform: scale(0.99); }
.probox .t { font-weight: 800; font-size: 15px; }
.probox .d { margin-top: 4px; font-size: 13px; line-height: 1.55; }
.probox .go { margin-left: auto; align-self: center; flex: none; }
.disc { padding: 0 20px 20px; font-size: 11.5px; color: var(--ink-3); line-height: 1.6; }
.res-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }

/* ============ PRO 리포트 ============ */
.pro-head { padding: 22px 0 6px; }
.pro-head h1 { font-size: 28px; line-height: 1.25; display: flex; align-items: center; gap: 10px; }
.pro-head h1 svg { color: var(--sig-deep); }
.pro-head .lead { margin-top: 8px; font-size: 14.5px; color: var(--ink-2); }
.pro-list { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.pro-item { padding: 18px 20px; }
.pro-item .row { display: flex; align-items: center; gap: 12px; }
.pro-item .ic { width: 36px; height: 36px; border-radius: 11px; background: var(--pro-tint); color: var(--pro); display: grid; place-items: center; flex: none; }
.pro-item h2 { font-weight: 800; font-size: 15.5px; letter-spacing: -0.02em; }
.pro-item .body { margin-top: 12px; font-size: 14.5px; line-height: 1.7; white-space: pre-line; }
.pro-item .subline { margin-top: 8px; font-size: 12.5px; color: var(--ink-2); line-height: 1.6; }
.pro-item .d { margin-top: 6px; font-size: 13px; color: var(--ink-2); line-height: 1.55; }
.tbl-wrap { margin-top: 12px; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-ctl); }
.pro-tbl { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
.pro-tbl th, .pro-tbl td { padding: 9px 12px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
.pro-tbl tr:last-child td { border-bottom: 0; }
.pro-tbl th { color: var(--ink-2); font-weight: 600; font-size: 12px; background: var(--card-2); }
.pro-note { margin-top: 14px; text-align: center; font-size: 12px; color: var(--ink-2); line-height: 1.6; }

/* 토스트 */
.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translateX(-50%) translateY(8px); z-index: 60; background: var(--ink); color: var(--card); padding: 10px 16px; border-radius: 12px; font-size: 13.5px; opacity: 0; pointer-events: none; transition: opacity 0.18s, transform 0.18s; white-space: nowrap; max-width: calc(100vw - 32px); }
.toast.on { opacity: 1; transform: translateX(-50%); }

/* 상태 색 매핑 */
.st-red { --st: var(--st-red); --st-bg: var(--st-red-bg); }
.st-yellow { --st: var(--st-amber); --st-bg: var(--st-amber-bg); }
.st-green { --st: var(--st-green); --st-bg: var(--st-green-bg); }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--st); flex: none; }

/* ── 스플래시: 앱을 켜고 홈이 뜨기까지 1.5초 (2026-08-27)
   앱 배경색 위에 아이콘·워드마크·한 줄 태그, 아래에 대표색 진행선(1.5초에 맞춰 차오름).
   1.5초 뒤 .out → 0.3초 페이드 후 DOM에서 제거. 움직임 줄이기 설정이면 애니메이션 없이 정지 화면. */
/* ── 스플래시 5b (2026-09-01 모션 핸드오프) ────────────────────────────
   교환 화살표를 끝에서 끝으로 그린 뒤, 화살표가 42%로 흐려지면서 동시에
   '바꿀래?' 워드마크가 좌→우로 닦이며 나타난다. 전체 1.95초.
   중앙 정렬은 반드시 레이아웃(grid)으로. breathe 가 transform 을 쓰기 때문에
   transform 으로 중앙을 잡으면 애니메이션이 translate 를 덮어써 마크가 밀린다. */
@font-face {
  font-family: 'Gothic A1';
  font-style: normal;
  font-weight: 900;
  font-display: block;  /* 워드마크가 다른 서체로 잠깐 떴다 바뀌는 걸 막는다 */
  src: url('../fonts/GothicA1-900-subset.woff2') format('woff2');
}
.splash {
  position: fixed; inset: 0; z-index: 1000;
  display: grid; place-items: center;
  background: #3CE83C;
  transition: opacity .25s ease;
}
.splash.out { opacity: 0; pointer-events: none; }
.splash .mark { width: min(52vw, 240px); aspect-ratio: 1; }
.splash .mark svg { width: 100%; height: 100%; overflow: visible; }
.splash .word text { font-family: 'Gothic A1', var(--font); }
.splash .arrow path { stroke-dasharray: 1; }
@media (prefers-reduced-motion: no-preference) {
  .splash .mark { animation: sp-breathe 3.4s ease-in-out 1.9s infinite; }
  .splash .arrow { animation: sp-dim .45s ease-out 1.42s both; }
  .splash .p1 { animation: sp-draw .65s cubic-bezier(.65, 0, .35, 1) .15s both; }
  .splash .p2 { animation: sp-draw .16s ease-out .78s both; }
  .splash .p3 { animation: sp-draw .30s cubic-bezier(.65, 0, .35, 1) 1.02s both; }
  .splash .p4 { animation: sp-draw .16s ease-out 1.30s both; }
  .splash .p5 { animation: sp-draw .60s cubic-bezier(.65, 0, .35, 1) .62s both; }
  .splash .word { animation: sp-wipe .5s cubic-bezier(.3, 0, .2, 1) 1.42s both; }
}
/* 모션을 끈 환경에서는 최종 상태를 바로 보여준다. 표시 시간은 그대로 유지 */
@media (prefers-reduced-motion: reduce) {
  .splash .arrow { opacity: .42; }
  .splash .arrow path { stroke-dasharray: none; }
}
@keyframes sp-draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes sp-dim { from { opacity: 1; } to { opacity: .42; } }
@keyframes sp-wipe {
  from { clip-path: inset(0 100% 0 0); opacity: 0; }
  20% { opacity: 1; }
  to { clip-path: inset(0 0 0 0); opacity: 1; }
}
@keyframes sp-breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.035); } }
  @keyframes splash-fill { from { transform: scaleX(0); } }
}
