/* PetBill 공통 스타일 v4 — 모바일 390px 우선, 가로 스크롤 금지. 토큰은 tokens.css.
   디자인 캔버스(docs/design/canvas_v4)를 그대로 옮긴 것: 둥근 카드 16~24px, 행동 색 파랑 하나, 판정 빨강은 왼쪽 바+칩만, 펫 순간에만 복숭아색. */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 500 var(--fs-md)/var(--lh) var(--font-sans); word-break: keep-all; overflow-wrap: anywhere;
  overflow-x: hidden; min-height: 100vh; display: flex; flex-direction: column;
}
main { flex: 1 0 auto; }
img, svg, canvas, video { max-width: 100%; height: auto; }
a { color: var(--link); text-underline-offset: 2px; }
h1, h2, h3, h4 { line-height: 1.15; margin: 0 0 var(--sp-3); font-weight: 800; letter-spacing: -.02em; }
h1 { font-size: var(--fs-2xl); } h2 { font-size: var(--fs-xl); } h3 { font-size: var(--fs-lg); } h4 { font-size: var(--fs-md); }
p { margin: 0 0 var(--sp-3); }
small, .small { font-size: var(--fs-sm); }
.muted { color: var(--ink-3); }
.center { text-align: center; }
.num, .amount, [data-num] { font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: var(--sp-4); top: -48px; background: var(--card); color: var(--ink); padding: var(--sp-2) var(--sp-3); border-radius: var(--radius-sm); z-index: 2000; box-shadow: var(--shadow); }
.skip-link:focus { top: var(--sp-2); }
svg.ico { width: 20px; height: 20px; flex: none; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.narrow { max-width: 600px; }
.section { padding: var(--sp-5) 0; }
.section--tight { padding: var(--sp-4) 0; }
.stack > * + * { margin-top: var(--sp-4); }
.row { display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-3); align-items: center; }
.row--between { justify-content: space-between; }
.grid { display: grid; gap: var(--sp-4); grid-template-columns: 1fr; }
.grid--2 { grid-template-columns: 1fr 1fr; }
@media (min-width: 640px) { .grid--3 { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 379px) { .grid--2 { grid-template-columns: 1fr; } }

/* ---------- 심볼(개·고양이·발자국) ---------- */
.pet-face { display: block; width: 36px; height: 36px; color: var(--ink); }
.pet-avatar { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--peach); flex: none; color: var(--ink); }
.pet-avatar .pet-face { width: 30px; height: 30px; }
.pet-avatar--sm { width: 30px; height: 30px; } .pet-avatar--sm .pet-face { width: 22px; height: 22px; }
.pet-avatar--md { width: 56px; height: 56px; } .pet-avatar--md .pet-face { width: 36px; height: 36px; }
.pet-chip { display: inline-flex; align-items: center; gap: 8px; padding: 3px 12px 3px 3px; border: 1px solid var(--line); border-radius: var(--radius-pill); font-size: var(--fs-sm); font-weight: 700; color: var(--ink); background: var(--card); }
.pet-chip[hidden] { display: none; }
.paw-ico { width: 22px; height: 22px; flex: none; }

/* ---------- 머리글 ---------- */
.site-header { position: sticky; top: 0; z-index: 1000; background: color-mix(in srgb, var(--paper) 94%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.header-row { display: flex; align-items: center; gap: var(--sp-3); min-height: var(--header-h); flex-wrap: wrap; padding: var(--sp-2) 0; }
.brand { display: inline-flex; align-items: center; gap: var(--sp-2); color: var(--ink); text-decoration: none; font-weight: 800; font-size: 18px; letter-spacing: -.01em; margin-right: auto; }
.brand__mark { width: 30px; height: 30px; border-radius: 9px; background: var(--accent); color: #fff; display: inline-grid; place-items: center; flex: none; }
.brand__mark svg { width: 18px; height: 18px; }
.nav { display: flex; gap: var(--sp-1); flex-wrap: wrap; width: 100%; order: 3; }
.nav a { color: var(--ink-2); text-decoration: none; padding: 6px 12px; border-radius: var(--radius-pill); font-size: var(--fs-sm); font-weight: 600; }
.nav a:hover, .nav a[aria-current="page"] { background: var(--paper-2); color: var(--ink); }
.header-tools { display: flex; align-items: center; gap: var(--sp-2); }
@media (min-width: 720px) { .nav { width: auto; order: 0; margin-left: var(--sp-3); } }
@media (max-width: 479px) { .nav a { padding: 5px 10px; font-size: var(--fs-xs); } .header-row { gap: var(--sp-2); } .select-sm, select.select-sm { padding: 5px 22px 5px 10px; font-size: var(--fs-xs); background-position: right 8px center; } .brand { font-size: var(--fs-lg); } }
.select-sm, select.select-sm { appearance: none; -webkit-appearance: none; border: 1px solid var(--line); background: var(--card) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path d='M1 1l4 4 4-4' fill='none' stroke='%2364748B' stroke-width='1.6'/></svg>") no-repeat right 10px center; color: var(--ink-2); border-radius: var(--radius-pill); padding: 7px 26px 7px 12px; font: 600 var(--fs-xs)/1.3 var(--font-sans); max-width: 100%; min-height: 32px; }
.icon-btn { border: 1px solid var(--line); background: var(--card); color: var(--ink); width: 32px; height: 32px; border-radius: var(--radius-pill); display: inline-grid; place-items: center; cursor: pointer; padding: 0; }
.icon-btn svg { width: 16px; height: 16px; }

/* ---------- 바닥글 ---------- */
.site-footer { border-top: 1px solid var(--line); margin-top: var(--sp-7); padding: var(--sp-5) 0 var(--sp-6); color: var(--ink-3); font-size: var(--fs-xs); line-height: 1.5; }
.site-footer p { margin-bottom: var(--sp-2); }
.site-footer .independence { color: var(--ink-2); font-weight: 600; font-size: var(--fs-sm); }
.site-footer .footer-links { display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-4); margin: var(--sp-3) 0; }
.site-footer .footer-links a { color: var(--ink-2); font-weight: 600; text-decoration: none; }
.site-footer .legal-fixed { background: transparent; border: 0; padding: 0; color: var(--ink-3); font-size: var(--fs-xs); }

/* ---------- 버튼·폼 ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2); border: 1.5px solid var(--line); background: var(--card); color: var(--ink); border-radius: var(--radius); padding: 10px 18px; font: 700 var(--fs-md)/1.2 var(--font-sans); cursor: pointer; text-decoration: none; min-height: 48px; transition: background .15s, border-color .15s, transform .05s; }
.btn:hover { background: var(--paper-2); }
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
.btn--primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); box-shadow: var(--accent-shadow); }
.btn--primary:hover { background: color-mix(in srgb, var(--accent) 90%, var(--ink)); }
.btn--outline { border-color: var(--ink); }
.btn--ghost { background: transparent; border-color: transparent; color: var(--ink-2); }
.btn--sm { padding: 6px 14px; min-height: 40px; font-size: var(--fs-sm); border-radius: var(--radius-sm); }
.btn--lg { padding: 14px 22px; font-size: var(--fs-lg); min-height: 56px; }
.btn--block { width: 100%; }
.btn svg { width: 20px; height: 20px; }
.btn-row { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
@media (max-width: 479px) { .btn-row--stack .btn { width: 100%; } }
.field { display: block; margin-bottom: var(--sp-4); min-width: 0; }
.field > .label, label.label { display: block; font-weight: 700; font-size: var(--fs-sm); margin-bottom: 6px; color: var(--ink); }
.input, select.input, textarea.input { width: 100%; min-width: 0; border: 1px solid var(--line); background: var(--card); color: var(--ink); border-radius: var(--radius-sm); padding: 10px 12px; font: 600 var(--fs-md)/1.4 var(--font-sans); min-height: 48px; }
textarea.input { min-height: 120px; font-family: var(--font-mono); font-weight: 500; font-size: var(--fs-sm); resize: vertical; }
.input:focus { border-color: var(--focus); }
.input--sm { min-height: 40px; padding: 6px 10px; font-size: var(--fs-sm); }
.hint { font-size: var(--fs-xs); color: var(--ink-3); margin-top: var(--sp-1); line-height: 1.5; }
.check { display: flex; gap: var(--sp-2); align-items: flex-start; font-size: var(--fs-sm); color: var(--ink-2); }
.check input { width: 20px; height: 20px; margin: 1px 0 0; flex: none; accent-color: var(--accent); }
.seg--full { display: flex; width: 100%; padding: 4px; background: var(--fair-bg); border-radius: 14px; margin-bottom: var(--sp-3); }
.seg--full button { flex: 1; min-height: 44px; border: 0; border-radius: 11px; background: transparent; color: var(--ink-3); font: 600 var(--fs-sm)/1.2 var(--font-sans); cursor: pointer; }
.seg--full button[aria-selected="true"] { background: var(--card); color: var(--ink); font-weight: 700; box-shadow: 0 1px 3px rgba(15, 23, 42, .12); }
.dropzone { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--sp-3); position: relative; min-height: 180px; border: 2px dashed var(--line-strong); border-radius: var(--radius-lg); background: var(--paper-2); padding: var(--sp-5) var(--sp-4); text-align: center; cursor: pointer; transition: border-color .15s, background .15s; }
.dropzone:hover, .dropzone.is-over { border-color: var(--accent); background: var(--accent-soft); }
.dropzone input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.dropzone__cam { width: 56px; height: 56px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; box-shadow: var(--accent-shadow); }
.dropzone__cam svg { width: 26px; height: 26px; }
.dropzone__title { font-size: 16px; font-weight: 700; }
.dropzone__hint { font-size: var(--fs-sm); color: var(--ink-3); }
.thumbs { display: flex; gap: var(--sp-2); flex-wrap: wrap; margin-top: var(--sp-3); }
.thumbs:empty { display: none; }
.thumb { position: relative; width: 84px; height: 84px; border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--line); background: var(--paper-2); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb button { position: absolute; top: 4px; right: 4px; width: 24px; height: 24px; border-radius: 50%; border: 0; background: rgba(15, 23, 42, .7); color: #fff; cursor: pointer; font-size: 13px; line-height: 1; }
.tipchips { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; list-style: none; padding: 0; margin: var(--sp-3) 0 0; }
.tipchips li { display: flex; align-items: center; gap: 8px; padding: 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); font-size: var(--fs-xs); font-weight: 600; line-height: 1.25; }
.tipchips svg { width: 18px; height: 18px; flex: none; color: var(--ink-3); }
.privacy-box { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; background: var(--paper-2); border-radius: 14px; font-size: var(--fs-xs); color: var(--ink-2); line-height: 1.5; }
.privacy-box svg { width: 20px; height: 20px; flex: none; margin-top: 1px; color: var(--ink); }
.notice { border-radius: 14px; padding: var(--sp-3) var(--sp-4); font-size: var(--fs-sm); border: 1px solid var(--line); background: var(--paper-2); color: var(--ink-2); line-height: 1.5; }
.notice--warn { border-color: transparent; background: var(--high-bg); color: var(--high-ink); }
.notice--ok { border-color: transparent; background: var(--low-bg); color: var(--low-ink); }
.progress { height: 4px; background: var(--paper-2); border-radius: var(--radius-pill); overflow: hidden; }
.progress > i { display: block; height: 100%; width: 40%; background: var(--accent); animation: slide 1.2s infinite linear; }
@keyframes slide { from { transform: translateX(-100%); } to { transform: translateX(250%); } }
#modePhoto[hidden], #modeText[hidden], .field[hidden], [hidden] { display: none !important; }

/* ---------- 카드·배지·칩 ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 18px; }
.badge { display: inline-flex; align-items: center; gap: 4px; border-radius: var(--radius-pill); padding: 4px 10px; font-size: var(--fs-xs); font-weight: 800; line-height: 1.4; white-space: nowrap; }
.badge--low { background: var(--low-bg); color: var(--low-ink); }
.badge--fair { background: var(--fair-bg); color: var(--fair-ink); }
.badge--high { background: var(--high); color: var(--badge-ink); }
.badge--na { background: var(--na-bg); color: var(--na-ink); }
.badge--soft { background: var(--fair-bg); color: var(--ink-2); font-weight: 600; }
.badge--verified { background: transparent; color: var(--low-ink); padding-left: 0; }
.badge--verified svg { width: 14px; height: 14px; }
.badge--lg { font-size: var(--fs-sm); padding: 5px 12px; }
.verdict-text--low { color: var(--low-ink); } .verdict-text--fair { color: var(--fair-ink); } .verdict-text--high { color: var(--high-ink); font-weight: 800; } .verdict-text--na { color: var(--na-ink); }
.chip { display: inline-flex; align-items: center; gap: 6px; border: 0; background: var(--fair-bg); border-radius: var(--radius-pill); padding: 6px 10px; font-size: var(--fs-xs); font-weight: 600; color: var(--ink); text-decoration: none; }
.chip--peach { background: var(--peach); color: var(--peach-ink); }
.chip--ok { background: var(--low-bg); color: var(--low-ink); }
.chip svg { width: 14px; height: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.tier-chip { display: inline-flex; align-items: center; gap: var(--sp-2); background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-pill); padding: 4px 12px 4px 6px; font-size: var(--fs-sm); }
.tier-chip .tier-chip__idx { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--lit); color: #1f1d19; font-weight: 700; font-size: var(--fs-xs); }
.xp-bar { height: 6px; background: var(--paper-2); border-radius: var(--radius-pill); overflow: hidden; }
.xp-bar > i { display: block; height: 100%; background: var(--lit); }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: var(--paper); padding: 12px 18px; border-radius: 14px; box-shadow: var(--shadow); z-index: 3000; font-size: var(--fs-sm); font-weight: 600; max-width: calc(100vw - 32px); }
.legal-fixed { font-size: var(--fs-xs); color: var(--ink-3); line-height: 1.5; margin: 0; }

/* ---------- 발자국 진행 표시 ---------- */
.paws { display: flex; align-items: center; justify-content: center; gap: 8px; padding: var(--sp-3) 0 0; }
.paw { position: relative; display: inline-grid; place-items: center; width: 22px; height: 22px; color: var(--line-strong); }
.paw svg { width: 22px; height: 22px; }
.paw--todo svg { color: var(--line-strong); }
.paw--done { color: var(--ink); }
.paw--done .chk { position: absolute; inset: 0; width: 22px; height: 22px; color: #fff; }
.paw--now { width: 34px; height: 34px; border-radius: 50%; background: var(--peach); color: var(--accent); }
.paw:nth-of-type(odd) svg:first-child { transform: rotate(-12deg); } .paw:nth-of-type(even) svg:first-child { transform: rotate(12deg); }
.paw--done .chk { transform: none !important; }
.paw-link { width: 36px; border-top: 2px dotted var(--line-strong); }
.paws__label { padding: 6px 0 0; text-align: center; font-size: var(--fs-xs); font-weight: 700; color: var(--accent-text); letter-spacing: .04em; text-transform: uppercase; }
.steps-strip { display: flex; justify-content: center; align-items: center; gap: 16px; flex-wrap: wrap; margin: var(--sp-4) 0 0; }
.steps-strip span { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-sm); font-weight: 700; white-space: nowrap; }
.steps-strip svg { width: 20px; height: 20px; color: var(--ink); }
.steps-strip span:nth-child(odd) svg { transform: rotate(-12deg); } .steps-strip span:nth-child(even) svg { transform: rotate(12deg); }

/* ---------- 홈 ---------- */
.hero-pet { position: relative; margin: var(--sp-2) 0 0; padding: 26px 20px 0; background: var(--peach); border-radius: var(--radius-xl); overflow: hidden; min-height: 430px; display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
.hero-pet__badge { font-size: var(--fs-xs); font-weight: 700; padding: 6px 12px; border-radius: var(--radius-pill); background: var(--card); color: var(--peach-ink); }
.hero-pet h1 { font-size: var(--fs-3xl); line-height: 1.08; margin: 0; max-width: 320px; letter-spacing: -.025em; }
.hero-pet .lede { margin: 0; font-size: var(--fs-md); line-height: 1.55; color: var(--peach-body); max-width: 300px; }
.hero-pet .btn { position: relative; z-index: 1; }
.hero-pet__sub { position: relative; z-index: 1; margin: 0; font-size: var(--fs-xs); color: var(--peach-muted); }
.hero-pet__art { position: absolute; right: 6px; bottom: -4px; width: 240px; height: 200px; color: var(--ink); }
@media (min-width: 640px) { .hero-pet { padding: 36px 32px 0; min-height: 420px; } .hero-pet h1 { font-size: 40px; max-width: 420px; } .hero-pet .lede { max-width: 380px; } .hero-pet__art { width: 300px; height: 250px; right: 20px; } }
.example-card { margin-top: var(--sp-4); padding: 16px 18px 18px; border: 1px solid var(--line); border-radius: var(--radius-lg); display: flex; flex-direction: column; gap: 14px; }
.example-card__label { font-size: var(--fs-xs); font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-3); }
.example-card__row { display: flex; align-items: center; gap: 12px; }
.example-card__row .t { font-weight: 800; font-size: var(--fs-md); }
.example-card__row .s { font-size: var(--fs-xs); color: var(--ink-3); }
.example-card__row .r { margin-left: auto; text-align: right; }
.example-card__lines { display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.example-card__lines > div { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.example-card__lines b { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-variant-numeric: tabular-nums; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--ink-3); flex: none; }
.dot--high { background: var(--high-bar); } .dot--low { background: var(--low); }
.example-card__foot { display: flex; align-items: center; gap: 8px; font-size: var(--fs-xs); color: var(--ink-3); }
.example-card__foot svg { width: 14px; height: 14px; color: var(--peach-ink); flex: none; }
.trust-line { margin: var(--sp-5) 0 0; text-align: center; font-size: var(--fs-sm); color: var(--ink-3); line-height: 1.5; }
.market-note { font-size: var(--fs-xs); color: var(--ink-3); text-align: center; margin: var(--sp-3) 0 0; }
.hero { padding: var(--sp-6) 0 var(--sp-4); }
.hero h1 { font-size: clamp(26px, 6vw, 40px); }
.hero .lede { font-size: var(--fs-lg); color: var(--ink-2); max-width: 36em; }
.stat-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-2); }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--sp-3); }
.stat b { display: block; font-size: var(--fs-2xl); line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat span { font-size: var(--fs-xs); color: var(--ink-3); }
.ind-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; list-style: none; padding: 0; margin: 0; }
.ind-strip li { display: flex; flex-direction: column; gap: 2px; padding: 12px; background: var(--paper-2); border-radius: var(--radius); font-size: var(--fs-sm); }
.ind-strip li span { color: var(--ink-3); font-size: var(--fs-xs); }
@media (max-width: 640px) { .ind-strip { grid-template-columns: 1fr; } }

/* ---------- 업로드: 환자 선택 ---------- */
.bar-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
.species { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: var(--sp-4); }
.species__card { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 8px; border: 2px solid var(--line); border-radius: 18px; background: var(--card); font-weight: 700; font-size: var(--fs-sm); cursor: pointer; }
.species__card input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.species__card:has(input:checked) { border-color: var(--accent); }
.species__card:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
.species__face { width: 56px; height: 56px; border-radius: 50%; background: var(--peach); display: grid; place-items: center; color: var(--ink); }
.species__face svg { width: 36px; height: 36px; }
.species__check { position: absolute; top: 8px; right: 8px; width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: #fff; display: none; place-items: center; }
.species__check svg { width: 13px; height: 13px; }
.species__card:has(input:checked) .species__check { display: grid; }
.h-bill { margin: var(--sp-2) 0 var(--sp-3); font-size: var(--fs-xl); }

/* ---------- 확인 표(업로드 뒤 수정) ---------- */
.line-cards { display: flex; flex-direction: column; gap: 8px; }
.line-card { display: grid; grid-template-columns: minmax(0, 1fr) 96px 44px; gap: 8px; align-items: center; padding: 10px 6px 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
.line-card__main { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.line-card .line-name { width: 100%; min-width: 0; border: 0; padding: 0; margin: 0; font: 700 var(--fs-md)/1.3 var(--font-sans); background: transparent; color: var(--ink); resize: none; overflow: hidden; }
.line-card .line-cat { align-self: flex-start; appearance: none; -webkit-appearance: none; border: 0; border-radius: var(--radius-pill); background: var(--accent-soft) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path d='M1 1l4 4 4-4' fill='none' stroke='%231D4ED8' stroke-width='1.6'/></svg>") no-repeat right 8px center; color: var(--accent-text); font: 700 var(--fs-xs)/1.4 var(--font-sans); padding: 3px 22px 3px 10px; max-width: 100%; cursor: pointer; }
.line-card .line-amt { width: 100%; min-width: 0; min-height: 44px; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 0 8px; font: 700 var(--fs-md)/1 var(--font-sans); text-align: right; font-variant-numeric: tabular-nums; background: var(--paper-2); color: var(--ink); }
.line-card .del { width: 44px; height: 44px; border: 0; border-radius: var(--radius-sm); background: transparent; color: var(--ink-3); font-size: 22px; line-height: 1; cursor: pointer; }
.line-card .del:hover { background: var(--paper-2); color: var(--ink); }
.add-line { width: 100%; min-height: 44px; border: 1px dashed var(--line-strong); border-radius: var(--radius); background: var(--card); font: 700 var(--fs-sm)/1.2 var(--font-sans); color: var(--accent-text); cursor: pointer; }
.sum-card { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 16px; background: var(--paper-2); border-radius: var(--radius); margin-top: var(--sp-3); }
.sum-card__label { font-size: var(--fs-sm); color: var(--ink-2); }
.sum-card__val { text-align: right; }
.sum-card__sum { font-weight: 800; font-size: var(--fs-xl); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.sum-card__state { display: flex; align-items: center; justify-content: flex-end; gap: 5px; font-size: var(--fs-xs); font-weight: 700; color: var(--low-ink); }
.sum-card__state svg { width: 14px; height: 14px; }
.sum-card__state--bad { color: var(--high-ink); }
.edit-table .e-row { display: grid; grid-template-columns: minmax(0, 1.4fr) 100px minmax(0, 1fr); gap: var(--sp-2); align-items: center; padding: var(--sp-2) 0; border-bottom: 1px dashed var(--line); }

/* ---------- 결과: 판정 카드 ---------- */
.verdict-card { display: flex; align-items: center; gap: 14px; padding: 18px; background: var(--dark-card); color: var(--dark-card-ink); border-radius: var(--radius-lg); margin: 0 0 var(--sp-4); }
.verdict-card__main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.verdict-card__chip { align-self: flex-start; padding: 4px 12px; border-radius: var(--radius-pill); background: #fff; color: #0F172A; font-size: var(--fs-sm); font-weight: 800; }
.verdict-card__big { font-size: 26px; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.verdict-card__big--sm { font-size: var(--fs-lg); }
.verdict-card__sub { font-size: var(--fs-sm); color: var(--dark-card-muted); line-height: 1.45; }
.verdict-card__pet { width: 72px; height: 72px; flex: none; color: #fff; --card: var(--dark-card); }
.bar5 { display: flex; gap: 4px; }
.bar5 i { flex: 1; height: 10px; border-radius: 5px; background: rgba(255, 255, 255, .18); }
.bar5 i.on { background: var(--dark-card-bar); }
.bar5--light i { background: var(--line); } .bar5--light i.on { background: var(--high-bar); }

/* 결과: 항목 카드 */
.r-groups { display: flex; flex-direction: column; gap: 8px; }
.r-group { display: flex; justify-content: space-between; align-items: center; padding: 8px 4px 2px; font-size: var(--fs-xs); font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--ink); }
.r-group .muted { font-weight: 700; }
.hi-card { position: relative; padding: 14px 14px 10px 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); display: flex; flex-direction: column; gap: 8px; }
.hi-card::before { content: ""; position: absolute; left: 0; top: 16px; bottom: 16px; width: 3px; border-radius: 2px; background: var(--high-bar); }
.hi-card__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.hi-card__name { font-weight: 700; font-size: var(--fs-md); }
.hi-card__sub { font-size: var(--fs-xs); color: var(--ink-3); }
.hi-card__amts { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.hi-card__amt { font-size: var(--fs-xl); font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.hi-card__base { font-size: var(--fs-sm); color: var(--ink-2); }
.hi-card__base b { font-variant-numeric: tabular-nums; }
.expand { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 44px; margin: -6px 0 -8px; padding: 0; border: 0; background: transparent; color: var(--accent-text); font: 700 var(--fs-sm)/1.2 var(--font-sans); cursor: pointer; text-align: left; }
.expand svg { width: 18px; height: 18px; flex: none; transition: transform .15s; }
.expand[aria-expanded="true"] svg { transform: rotate(90deg); }
.line-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); flex-wrap: wrap; }
.line-row__main { min-width: 0; flex: 1 1 160px; }
.line-row__name { font-weight: 700; font-size: var(--fs-md); }
.line-row__sub { font-size: var(--fs-xs); color: var(--ink-3); }
.line-row__right { display: flex; align-items: center; gap: 10px; }
.line-row__amt { font-weight: 800; font-size: 16px; font-variant-numeric: tabular-nums; }
.line-row .expand { width: auto; min-height: 36px; margin: 0; flex: 0 0 auto; gap: 4px; }
.r-explain { font-size: var(--fs-sm); color: var(--ink-2); background: var(--paper-2); border-radius: var(--radius-sm); padding: 10px 12px; line-height: 1.55; }
.hi-card .r-explain { margin-top: 10px; }
.line-row .r-explain { flex-basis: 100%; }
.r-explain[hidden] { display: none; }
.r-explain p { margin: 0 0 4px; }
.footnote { display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: var(--fs-xs); color: var(--ink-3); padding: 0 4px; line-height: 1.5; margin: var(--sp-3) 0 var(--sp-3); }
.footnote .badge--verified { font-weight: 700; padding: 0; }
.footnote .num { color: var(--ink-3); }

/* 결과: 3단계 보험 카드 */
.step3-card { padding: 18px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--card); display: flex; flex-direction: column; gap: 12px; }
.step3-card__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.step3-card__label { display: flex; align-items: center; gap: 8px; font-size: var(--fs-xs); font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--accent-text); }
.step3-card__label svg { color: var(--accent); transform: rotate(-12deg); }
.step3-card h2 { margin: 0; font-size: var(--fs-xl); line-height: 1.2; }
.step3-card .cover { margin: 0; font-size: var(--fs-sm); color: var(--ink-2); line-height: 1.55; }
.ext-links { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.ext-links a { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 56px; padding: 10px 16px; background: var(--paper-2); border-radius: 14px; text-decoration: none; color: var(--ink); }
.ext-links a:hover { background: var(--accent-soft); }
.ext-links a > span { display: flex; flex-direction: column; min-width: 0; }
.ext-links b { font-size: var(--fs-md); }
.ext-links .sub { font-size: var(--fs-xs); color: var(--ink-3); }
.ext-links svg { width: 20px; height: 20px; flex: none; }
.disclosure { margin: 0; font-size: var(--fs-xs); color: var(--ink-3); line-height: 1.5; }

/* 결과: 잠금 카드·열람 뒤 ---------- */
.lock { position: relative; }
.lock__body { display: flex; flex-direction: column; gap: 14px; }
.lock.is-locked .lock__body { filter: blur(12px); opacity: .4; user-select: none; pointer-events: none; min-height: 420px; max-height: 420px; overflow: hidden; }
.lock__veil { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center; padding: 22px 18px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: color-mix(in srgb, var(--paper) 72%, transparent); }
.lock:not(.is-locked) .lock__veil { display: none; }
.lock__veil h3 { margin: 0; font-size: var(--fs-lg); line-height: 1.3; letter-spacing: -.01em; }
.lock__veil .lock-icon { width: 44px; height: 44px; border-radius: 50%; background: var(--ink); color: var(--paper); display: grid; place-items: center; }
.lock__veil .lock-icon svg { width: 20px; height: 20px; }
.lock__veil .lock__desc { margin: 0; font-size: var(--fs-sm); color: var(--ink-2); line-height: 1.5; max-width: 320px; }
.lock__veil .lock__buttons { display: flex; flex-direction: column; gap: 8px; width: 100%; max-width: 360px; }
.lock__veil .consent { margin: 0; font-size: var(--fs-xs); color: var(--ink-3); max-width: 340px; line-height: 1.5; }
.unlock-banner { display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: var(--low-bg); border-radius: var(--radius); color: var(--low-ink); font-size: 14px; line-height: 1.45; }
.unlock-banner .pet-face { width: 40px; height: 40px; flex: none; }
.unlock-banner[hidden] { display: none; }
.over-card { padding: 18px; background: var(--paper-2); border-radius: var(--radius-lg); }
.over-card h2 { margin: 0 0 8px; font-size: var(--fs-xl); }
.over-list { list-style: none; padding: 0; margin: 0; }
.over-list li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.over-list li:last-child { border-bottom: 0; }
.over-list .n { font-weight: 700; font-size: var(--fs-md); }
.over-list .s { font-size: var(--fs-xs); color: var(--ink-3); }
.over-list .d { text-align: right; color: var(--high-ink); font-weight: 800; font-variant-numeric: tabular-nums; }
.over-list .d small { display: block; font-size: var(--fs-xs); font-weight: 700; }
.over-list li.muted { display: block; }
.over-total { display: flex; justify-content: space-between; align-items: center; padding-top: 12px; border-top: 2px solid var(--ink); font-weight: 800; }
.over-total .v { font-size: var(--fs-xl); color: var(--high-ink); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.over-total[hidden] { display: none; }
.copy-card { padding: 18px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--card); display: flex; flex-direction: column; gap: 12px; }
.copy-card__head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.copy-card__head h2 { margin: 0; font-size: 18px; }
.copy-card__head .btn { min-height: 44px; }
.copy-card ol { margin: 0; padding-left: 20px; font-size: 14px; line-height: 1.55; display: flex; flex-direction: column; gap: 8px; }
.copy-card pre { margin: 0; padding: 14px; background: var(--paper-2); border-radius: 14px; font: 500 var(--fs-sm)/1.65 var(--font-sans); white-space: pre-wrap; color: var(--ink); }
.questions-list li, .savings-list li { margin-bottom: var(--sp-2); }

/* 공유 카드(비 SIMPLE) */
.share-card { display: grid; gap: var(--sp-3); }
.share-card__preview { width: 100%; aspect-ratio: 1 / 1; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper-2); overflow: hidden; }
.share-card__preview canvas, .share-card__preview img { width: 100%; height: 100%; display: block; object-fit: contain; }
@media (min-width: 640px) { .share-card { grid-template-columns: 280px 1fr; align-items: start; } }
.affiliate { border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 18px; background: var(--card); }
.affiliate ul { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--sp-2); }
.affiliate li a { display: flex; justify-content: space-between; align-items: center; gap: var(--sp-2); padding: var(--sp-3); border: 1px solid var(--line); border-radius: var(--radius-sm); text-decoration: none; color: var(--ink); font-weight: 600; }

/* ---------- 지도 ---------- */
.map-page { display: grid; grid-template-columns: 1fr; gap: 0; }
.map-toolbar { display: flex; flex-wrap: wrap; gap: var(--sp-2); align-items: center; padding: var(--sp-2) 0; }
.map-toolbar .seg { display: inline-flex; border: 1px solid var(--line); border-radius: var(--radius-pill); overflow: hidden; background: var(--card); }
.map-toolbar .seg a, .map-toolbar .seg button { padding: 6px 12px; font-size: var(--fs-sm); text-decoration: none; color: var(--ink-2); border: 0; background: transparent; cursor: pointer; font-family: inherit; }
.map-toolbar .seg a[aria-current="page"], .map-toolbar .seg button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.map-wrap { position: relative; }
#map { height: 52vh; min-height: 300px; background: var(--map-bg); border: 1px solid var(--line); border-radius: var(--radius); z-index: 0; }
.leaflet-container { font: inherit; background: var(--map-bg); }
.leaflet-container a { color: var(--link); }
.leaflet-bar a { background: var(--card); color: var(--ink); border-bottom-color: var(--line); }
.leaflet-bar a:hover { background: var(--paper-2); }
.leaflet-tooltip { background: var(--card); color: var(--ink); border: 1px solid var(--line); box-shadow: var(--shadow); font-size: var(--fs-sm); }
.leaflet-tooltip-top::before { border-top-color: var(--line); }
.legend { position: absolute; left: var(--sp-2); bottom: var(--sp-2); z-index: 500; background: color-mix(in srgb, var(--card) 92%, transparent); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: var(--sp-2) var(--sp-3); font-size: var(--fs-xs); color: var(--ink-2); max-width: 60%; }
.legend b { color: var(--ink); display: block; margin-bottom: 2px; }
.legend i { display: inline-block; width: 14px; height: 10px; margin-right: 5px; vertical-align: -1px; border: 1px solid rgba(0,0,0,.1); }
.legend .lit-swatch { background: var(--card); border: 2px solid var(--lit); }
.legend .mine-swatch { background: var(--card); border: 2px solid var(--mine); }
@media (max-width: 599px) {
  .legend { left: var(--sp-2); right: var(--sp-2); max-width: none; display: flex; flex-wrap: wrap; gap: 2px 10px; padding: 6px 8px; font-size: 11px; }
  .legend b { width: 100%; margin: 0; font-size: 11px; }
  .legend > div { white-space: nowrap; }
}
.map-panel { padding: var(--sp-4) 0; }
.map-panel .tier-row { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2); flex-wrap: wrap; margin-bottom: var(--sp-3); }
.region-stats .table { margin-bottom: var(--sp-3); }
.board ol { padding-left: 1.4em; margin: 0; }
.board li { padding: 4px 0; border-bottom: 1px dashed var(--line); display: flex; justify-content: space-between; gap: var(--sp-2); }
@media (min-width: 900px) {
  .map-page { grid-template-columns: minmax(0, 1fr) 380px; gap: var(--sp-4); align-items: start; }
  #map { height: calc(100vh - var(--header-h) - 120px); min-height: 480px; }
  .map-panel { max-height: calc(100vh - var(--header-h) - 120px); overflow: auto; padding: 0 0 var(--sp-4); }
}
.grid-fallback { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 6px; }
.grid-fallback button { aspect-ratio: 1; border: 2px solid var(--dim); background: var(--choro-0); border-radius: var(--radius-sm); font: 600 var(--fs-xs)/1.2 var(--font-sans); color: var(--ink); cursor: pointer; padding: 4px; overflow: hidden; }
.grid-fallback button.is-lit { border-color: var(--lit); }
.grid-fallback button.is-mine { border-color: var(--mine); }
.grid-fallback button[aria-pressed="true"] { outline: 3px solid var(--focus); }

/* ---------- 표(공개 가격·관리) ---------- */
.table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--card); }
.table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.table th, .table td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; overflow-wrap: normal; }
.table td:first-child, .table th:first-child { min-width: 10em; }
.table th { background: var(--paper-2); color: var(--ink-2); font-weight: 700; white-space: nowrap; font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .03em; }
.table td.num, .table th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: color-mix(in srgb, var(--paper-2) 50%, transparent); }
.meta-line { display: flex; flex-wrap: wrap; gap: var(--sp-1) var(--sp-3); font-size: var(--fs-xs); color: var(--ink-3); }
.kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--sp-2); }
@media (min-width: 640px) { .kpis { grid-template-columns: repeat(4, 1fr); } }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--sp-3); }
.kpi b { display: block; font-size: var(--fs-xl); font-variant-numeric: tabular-nums; }
.kpi span { font-size: var(--fs-xs); color: var(--ink-3); }
.region-list { columns: 2; column-gap: var(--sp-4); list-style: none; padding: 0; margin: 0; }
@media (min-width: 640px) { .region-list { columns: 3; } }
.region-list li { break-inside: avoid; padding: 3px 0; font-size: var(--fs-sm); }
details.acc { border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--card); padding: 0 var(--sp-3); margin-bottom: var(--sp-2); }
details.acc summary { cursor: pointer; padding: var(--sp-3) 0; font-weight: 700; }
details.acc[open] summary { border-bottom: 1px dashed var(--line); }
details.acc > div { padding: var(--sp-3) 0; }

/* ---------- 본문 글(콘텐츠 페이지) ---------- */
.prose { max-width: 720px; }
.prose h1 { font-size: var(--fs-2xl); margin-top: var(--sp-5); } .prose h2 { margin-top: var(--sp-6); } .prose h3 { margin-top: var(--sp-5); }
.prose p, .prose li { color: var(--ink-2); } .prose li { margin-bottom: var(--sp-1); }
.prose table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); margin: var(--sp-4) 0; }
.prose th, .prose td { border: 1px solid var(--line); padding: 6px 10px; text-align: left; }
.prose blockquote { margin: var(--sp-4) 0; padding: var(--sp-2) var(--sp-4); border-left: 3px solid var(--accent); background: var(--paper-2); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.prose code { font-family: var(--font-mono); font-size: .92em; background: var(--paper-2); padding: 1px 5px; border-radius: 4px; }
.prose img { border-radius: var(--radius); }
.price-cards { display: grid; gap: var(--sp-3); grid-template-columns: 1fr; }
@media (min-width: 640px) { .price-cards { grid-template-columns: 1fr 1fr; } }
.price-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 18px; }
.price-card .price { font-size: var(--fs-2xl); font-weight: 800; font-variant-numeric: tabular-nums; }
.price-card--accent { border-color: var(--accent); }

/* ---------- 404·기타 ---------- */
.empty { text-align: center; padding: var(--sp-8) var(--sp-4); color: var(--ink-3); }
.empty svg { width: 64px; height: 64px; color: var(--line-strong); }
@media print { .site-header, .site-footer, .lock__veil, .btn, .nav { display: none !important; } .lock.is-locked .lock__body { filter: none; opacity: 1; } body { background: #fff; color: #000; } }

/* ---------- 동작: 캐릭터와 판정만 움직인다(모션 최소화 설정이면 맨 위 규칙으로 전부 꺼짐) ---------- */
@keyframes pb-rise { from { transform: translateY(70px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes pb-fade-up { from { transform: translateY(14px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes pb-pop { 0% { transform: scale(.6); opacity: 0; } 70% { transform: scale(1.08); opacity: 1; } 100% { transform: scale(1); } }
@keyframes pb-paw-step { 0%, 100% { opacity: .25; transform: scale(.9); } 50% { opacity: 1; transform: scale(1.1); } }
@keyframes pb-sniff { 0%, 100% { transform: rotate(0); } 30% { transform: rotate(-7deg) translateY(2px); } 60% { transform: rotate(6deg); } }
@keyframes pb-bar { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes pb-wiggle { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-9deg); } 75% { transform: rotate(9deg); } }
.hero-pet__art { animation: pb-rise .9s cubic-bezier(.2, .8, .2, 1) both; }
.hero-pet > :not(.hero-pet__art) { animation: pb-fade-up .5s ease both; }
.hero-pet > :nth-child(2) { animation-delay: .06s; } .hero-pet > :nth-child(3) { animation-delay: .12s; } .hero-pet > :nth-child(4) { animation-delay: .18s; } .hero-pet > :nth-child(5) { animation-delay: .24s; }
.steps-strip, .example-card, .trust-line { animation: pb-fade-up .6s .25s ease both; }
.species__card:has(input:checked) .species__face { animation: pb-pop .35s ease; }
.paw--now { animation: pb-pop .4s ease both; }
.reading-pet { width: 64px; height: 64px; margin: 0 auto; animation: pb-sniff 1.6s infinite ease-in-out; transform-origin: 50% 80%; }
.reading-paws { display: flex; justify-content: center; gap: 14px; padding: 6px 0 2px; }
.reading-paws svg { width: 26px; height: 26px; color: var(--accent); animation: pb-paw-step 1.2s infinite ease-in-out; }
.reading-paws svg:nth-child(1) { transform: rotate(-12deg); } .reading-paws svg:nth-child(2) { animation-delay: .2s; transform: rotate(12deg); } .reading-paws svg:nth-child(3) { animation-delay: .4s; transform: rotate(-12deg); } .reading-paws svg:nth-child(4) { animation-delay: .6s; transform: rotate(12deg); }
.verdict-card { animation: pb-fade-up .5s ease both; }
.verdict-card__pet { animation: pb-pop .5s .35s ease both; }
.bar5 i.on { transform-origin: left center; animation: pb-bar .6s .45s cubic-bezier(.2, .8, .2, 1) both; }
.r-groups > * { animation: pb-fade-up .45s ease both; animation-delay: calc(.07s * var(--i, 0) + .2s); }
.unlock-banner:not([hidden]) { animation: pb-fade-up .5s ease both; }
.unlock-banner .pet-face { animation: pb-wiggle .8s .45s ease both; }
.btn--primary:active { transform: translateY(1px) scale(.99); }
/* 화면 전환(같은 출처 문서 간, 지원 브라우저만): 다음 단계로 밀려 들어가는 느낌 */
@view-transition { navigation: auto; }
@keyframes pb-vt-out { to { opacity: 0; transform: translateX(-20px); } }
@keyframes pb-vt-in { from { opacity: 0; transform: translateX(20px); } }
::view-transition-old(root) { animation: 160ms ease-out both pb-vt-out; }
::view-transition-new(root) { animation: 240ms ease-out both pb-vt-in; }
