/* 공통 스타일 v2 "형광펜 메모장": 따뜻한 종이색 + 잉크 검정 + 형광 라임 한 가지. 초록·주황은 상태색 전용, 빨강은 쓰지 않음 */
:root {
  --paper: #f7f5ef;
  --card: #ffffff;
  --ink: #17171a;
  --text: #1f1f22;
  --muted: #625e56;
  --line: #e6e1d6;
  --line-strong: #cbc4b4;
  --field: #fbfaf7;
  --hl: #d6f25c;
  --hl-soft: #f0fac8;
  --hl-deep: #8fb31a;
  /* 예전 토큰 이름 유지(다른 파일·스크립트 호환) */
  --brand: var(--ink);
  --brand-strong: #000;
  --brand-tint: var(--hl-soft);
  --bg: var(--paper);
  --ok: #2b8a3e;
  --warn: #d9480f;
  /* 계산기별 타일 색 */
  --t-butter: #ffeeb0;
  --t-peach: #ffd9c4;
  --t-lilac: #e5dcfb;
  --t-sky: #d2e5fb;
  --t-mint: #cbeedb;
  --radius: 18px;
  --radius-s: 12px;
  --shadow: 0 1px 2px rgb(23 23 26 / .05), 0 6px 20px -8px rgb(23 23 26 / .12);
  font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", sans-serif;
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "tnum" 0;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); font-size: 16px; word-break: keep-all; overflow-wrap: anywhere; letter-spacing: -0.01em; }
a { color: var(--ink); text-decoration-color: var(--hl-deep); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { background: var(--hl-soft); }
img { max-width: 100%; }
[hidden] { display: none !important; }
mark { background: linear-gradient(transparent 58%, var(--hl) 58%, var(--hl) 92%, transparent 92%); color: inherit; padding: 0 2px; }
.small { font-size: 13px; color: var(--muted); }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
h1, h2, h3 { letter-spacing: -0.03em; color: var(--ink); }

/* 계산기별 타일 */
.tone-butter { --tone: var(--t-butter); }
.tone-peach { --tone: var(--t-peach); }
.tone-lilac { --tone: var(--t-lilac); }
.tone-sky { --tone: var(--t-sky); }
.tone-mint { --tone: var(--t-mint); }
.mini-tile { display: inline-grid; place-items: center; min-width: 34px; height: 24px; padding: 0 6px; border-radius: 7px; background: var(--tone, var(--hl)); color: var(--ink); font-size: 12px; font-weight: 800; letter-spacing: -0.02em; }

/* ① 헤더 60px */
.site-header { position: sticky; top: 0; z-index: 10; height: 60px; background: rgb(247 245 239 / .88); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 100%; }
.logo { display: flex; align-items: center; gap: 9px; min-height: 44px; text-decoration: none; color: var(--ink); }
.logo:hover { background: none; }
.logo img { display: block; width: 30px; height: 30px; }
.logo-text { font-size: 19px; font-weight: 600; letter-spacing: -0.04em; }
.logo-text b, .foot-logo b { font-weight: 850; background: linear-gradient(transparent 60%, var(--hl) 60%); }
.calc-menu { position: relative; }
.calc-menu summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 6px; padding: 8px 14px; min-height: 40px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--card); font-size: 15px; font-weight: 650; }
.calc-menu summary:hover { border-color: var(--ink); }
.calc-menu summary::-webkit-details-marker { display: none; }
.calc-menu summary::after { content: ""; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-2px) rotate(45deg); margin-left: 2px; }
.calc-menu[open] summary::after { transform: translateY(1px) rotate(-135deg); }
.menu-count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; border-radius: 999px; background: var(--ink); color: var(--hl); font-size: 11px; font-weight: 800; }
.calc-menu ul { position: absolute; right: 0; top: 50px; margin: 0; padding: 6px; list-style: none; background: var(--card); border: 1px solid var(--line); border-radius: 16px; min-width: 260px; box-shadow: 0 16px 40px -12px rgb(23 23 26 / .25); }
.calc-menu li a, .calc-menu li .soon { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px; text-decoration: none; color: var(--text); font-size: 15px; }
.calc-menu li a:hover { background: var(--paper); }
.calc-menu li a[aria-current="page"] { background: var(--hl-soft); font-weight: 700; }
.soon { color: var(--muted) !important; }

main { padding-block: 20px 56px; }
.page, .calc-page, .hub { max-width: 1120px; margin: 0 auto; padding-inline: 20px; }

/* 레이아웃: 모바일 1열 / 1024px 이상 입력·결과 2열(결과는 따라옴) */
.calc-grid { display: grid; gap: 24px; grid-template-columns: minmax(0, 1fr); }
.calc-main { width: 100%; min-width: 0; margin: 0 auto; }
.calc-work { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); align-items: start; margin-top: 20px; }
.intro, .from-friend, .explain, .sources-log, .related, .affiliate, .calc-main > .ad-slot { max-width: 760px; }
@media (min-width: 1024px) {
  .calc-work { grid-template-columns: minmax(0, 1fr) 440px; gap: 28px; }
  .calc-work .result { position: sticky; top: 80px; }
  .calc-grid:has(.calc-side) { grid-template-columns: minmax(0, 1fr) 300px; }
  .calc-grid:has(.calc-side) .calc-work { grid-template-columns: minmax(0, 1fr); }
  .calc-side .ad-slot { position: sticky; top: 80px; min-height: 600px; }
}
@media (max-width: 1023px) { .calc-side { display: none; } }

/* ② 인트로 */
.intro { padding-top: 8px; }
.intro-cat { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font-size: 13px; font-weight: 650; color: var(--muted); }
.intro h1 { font-size: clamp(28px, 4.2vw, 40px); line-height: 1.22; margin: 0 0 10px; font-weight: 850; }
.lead { margin: 0 0 12px; color: var(--muted); font-size: 17px; }
.badge-date { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 650; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--line-strong); color: var(--muted); background: var(--card); }
.badge-date::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--hl-deep); }
.from-friend { margin-top: 16px; background: var(--hl-soft); border: 1px solid var(--hl); padding: 12px 16px; border-radius: var(--radius-s); }

/* ③ 입력폼 */
.calc-form { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; display: grid; gap: 20px; box-shadow: var(--shadow); }
.field label, .field legend { display: block; font-weight: 700; font-size: 15px; margin-bottom: 8px; padding: 0; color: var(--ink); }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
select, input[type="text"], input[type="number"], .date-row input[type="date"] { font: inherit; font-size: 16px; width: 100%; min-height: 48px; padding: 10px 14px; border: 1px solid var(--line-strong); border-radius: var(--radius-s); background: var(--field); color: var(--text); transition: border-color .15s, background .15s; }
select { appearance: none; -webkit-appearance: none; padding-right: 40px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%2317171a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 16px center; }
select:hover, input[type="text"]:hover, input[type="number"]:hover, .date-row input[type="date"]:hover { border-color: #9e9686; }
select:focus, input:focus { border-color: var(--ink); background-color: #fff; outline: none; }
select:focus-visible, input:focus-visible, button:focus-visible, summary:focus-visible, a:focus-visible, .seg input:focus-visible + span { outline: 3px solid var(--hl); outline-offset: 2px; }
input::placeholder { color: #a39d90; }
.seg-row { display: flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: 14px; background: var(--paper); border: 1px solid var(--line); }
.seg { position: relative; flex: 1 1 auto; }
.seg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.seg span { display: flex; align-items: center; justify-content: center; min-height: 42px; padding: 6px 12px; border-radius: 10px; text-align: center; font-size: 15px; font-weight: 550; color: var(--muted); transition: background .15s, color .15s; }
.seg input:hover + span { color: var(--ink); background: rgb(255 255 255 / .7); }
.seg input:checked + span { background: var(--ink); color: #fff; font-weight: 700; box-shadow: 0 2px 6px rgb(23 23 26 / .2); }
.seg input:checked:hover + span { background: #000; }
.field > .help { margin-top: 6px; }
.help { margin: 8px 0 0; font-size: 13px; color: var(--muted); line-height: 1.5; }
.money-aux { display: block; font-size: 13px; color: var(--muted); min-height: 1.2em; margin-top: 6px; font-weight: 600; }
.stepper { display: flex; gap: 6px; }
.stepper button { width: 48px; flex: none; font-size: 18px; font-weight: 700; }
.stepper input { text-align: center; font-weight: 700; }
/* 행 번호는 왼쪽에 따로 띄우고, 칸은 2열로 흘림(칸이 3개 이상이어도 번호 칸에 끼지 않게) */
.repeat-row { position: relative; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; align-items: start; padding: 14px 14px 14px 52px; margin-top: 8px; border-radius: 14px; background: var(--paper); border: 1px solid var(--line); }
.repeat-row > .field { min-width: 0; }
.repeat-row .field label, .repeat-row .field legend { font-weight: 600; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.repeat-row .seg-row { background: var(--card); }
.repeat-row select, .repeat-row input[type="text"], .repeat-row input[type="number"] { background-color: var(--card); }
.row-no { position: absolute; left: 14px; top: 14px; width: 28px; height: 28px; border-radius: 9px; background: var(--ink); color: var(--hl); display: grid; place-items: center; font-size: 13px; font-weight: 800; }
.row-del { grid-column: -2 / -1; align-self: end; color: var(--muted); }
.repeat-row select { padding-right: 32px; background-position: right 12px center; }
@media (max-width: 599px) { .repeat-row { padding-left: 48px; gap: 8px; } .repeat-row select, .repeat-row input[type="text"] { padding-left: 12px; } }
button { font: inherit; font-size: 15px; font-weight: 600; min-height: 48px; padding: 8px 16px; border-radius: var(--radius-s); border: 1px solid var(--line-strong); background: var(--card); color: var(--ink); cursor: pointer; transition: border-color .15s, background .15s, transform .05s; }
button:hover { border-color: var(--ink); }
button:active { transform: translateY(1px); }
.row-add { width: 100%; border-style: dashed; border-width: 1.5px; font-weight: 700; margin-top: 4px; background: transparent; }
.row-add:hover { background: var(--hl-soft); }
.advanced { border-top: 1px dashed var(--line-strong); padding-top: 4px; }
.advanced summary { cursor: pointer; font-weight: 700; min-height: 44px; display: flex; align-items: center; gap: 8px; list-style: none; }
.advanced summary::-webkit-details-marker { display: none; }
.advanced summary::before { content: "+"; display: grid; place-items: center; width: 22px; height: 22px; flex: none; border-radius: 7px; background: var(--hl); font-weight: 800; }
.advanced[open] summary::before { content: "−"; }
.advanced[open] { display: grid; gap: 20px; }
.link-btn { border: 0; background: none; padding: 0; min-height: 0; color: var(--ink); text-decoration: underline; text-decoration-color: var(--hl-deep); text-decoration-thickness: 2px; text-underline-offset: 3px; font-size: inherit; font-weight: 650; }

/* ④ 결과 카드: 잉크 테두리 + 라임 그림자, 숫자에 형광펜 */
.result-empty { color: var(--muted); text-align: center; padding: 24px; border: 1.5px dashed var(--line-strong); border-radius: var(--radius); }
.result-card { position: relative; background: var(--card); border: 1.5px solid var(--ink); border-radius: var(--radius); padding: 22px 22px 18px; box-shadow: 6px 6px 0 var(--hl); }
.rc-label { margin: 0; font-size: 14px; font-weight: 600; color: var(--muted); }
.rc-headline { width: fit-content; max-width: 100%; margin: 6px 0 8px; font-size: clamp(32px, 6vw, 42px); font-weight: 850; line-height: 1.18; letter-spacing: -0.04em; color: var(--ink); background: linear-gradient(transparent 60%, var(--hl) 60%, var(--hl) 94%, transparent 94%); font-variant-numeric: tabular-nums; }
.rc-headline[data-tone="good"] { color: var(--ok); background-image: linear-gradient(transparent 60%, var(--t-mint) 60%, var(--t-mint) 94%, transparent 94%); }
.rc-headline[data-tone="warn"] { color: var(--warn); background-image: linear-gradient(transparent 60%, var(--t-peach) 60%, var(--t-peach) 94%, transparent 94%); }
.rc-comment { margin: 0 0 6px; font-size: 16px; font-weight: 600; color: var(--ink); }
.rc-chart:empty { display: none; }
.chart { margin: 14px 0 0; padding: 12px; border-radius: var(--radius-s); background: var(--paper); }
.chart figcaption { font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.chart svg { width: 100%; height: auto; display: block; }
.chart text { font-size: 10px; fill: var(--muted); }
.chart text.cur { font-size: 11px; font-weight: 700; fill: var(--ink); }
.chart .zero { stroke: var(--line-strong); stroke-width: 1; }
.chart .bar { opacity: .35; }
.chart .bar.is-current { opacity: 1; }
.bar-good { fill: var(--ok); }
.bar-warn { fill: var(--warn); }
.hbar ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.hbar li { display: grid; grid-template-columns: 7.5em minmax(0, 1fr) minmax(4em, max-content); align-items: center; gap: 8px; font-size: 13px; }
.hb-name { font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hb-track { height: 12px; border-radius: 999px; background: var(--line); overflow: hidden; }
.hb-fill { display: block; height: 100%; background: var(--ink); opacity: .35; border-radius: inherit; }
.hbar .is-top .hb-fill { opacity: 1; background: var(--ok); }
.hb-val { white-space: nowrap; text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; }
.rc-range { margin: 0; font-size: 15px; color: var(--muted); }
.rc-badges:empty { display: none; }
.rc-badges { margin: 8px 0 0; }
.badge { display: inline-block; font-size: 12px; font-weight: 650; padding: 3px 9px; border-radius: 999px; background: #fff1e6; color: #a63c06; margin: 0 4px 4px 0; }
.rc-table table { width: 100%; border-collapse: collapse; margin: 14px 0 4px; font-size: 15px; font-variant-numeric: tabular-nums; }
.rc-table th { font-size: 12px; font-weight: 650; color: var(--muted); }
.rc-table th, .rc-table td { text-align: left; padding: 9px 4px; border-bottom: 1px solid var(--line); }
.rc-table tr:last-child td { border-bottom: 0; }
.rc-table td:last-child, .rc-table th:last-child { text-align: right; font-weight: 750; }
.rc-block { border-top: 1px dashed var(--line-strong); margin-top: 14px; padding-top: 12px; }
.rc-block h3, .rc-awards h3 { font-size: 13px; font-weight: 750; margin: 0 0 6px; color: var(--muted); letter-spacing: 0; }
.rc-block ul, .rc-notes { margin: 0; padding-left: 18px; font-size: 14px; }
.rc-block li + li { margin-top: 2px; }
.rc-notes:empty { display: none; }
.rc-notes { margin-top: 12px; color: var(--warn); }
.rc-tips { margin: 8px 0 0; padding-left: 18px; font-size: 14px; color: var(--muted); }
.rc-tips:empty { display: none; }
.rc-foot { border-top: 1px dashed var(--line-strong); margin-top: 14px; padding-top: 10px; font-size: 12px; color: var(--muted); line-height: 1.55; }
.rc-foot p { margin: 0; }
.rc-sources { margin: 6px 0 0; padding-left: 18px; }
.rc-watermark { margin-top: 8px !important; display: flex; justify-content: flex-end; align-items: center; gap: 6px; font-weight: 750; color: var(--ink); }
.rc-watermark::before { content: "≈"; display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 5px; background: var(--ink); color: var(--hl); font-size: 13px; line-height: 1; }

/* ⑤ 공유 바 */
.share-bar { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 16px; align-items: center; }
.share-bar button { width: 100%; }
.share-kakao { background: #fee500; border-color: #fee500; color: #191919; font-weight: 750; }
.share-kakao:hover { border-color: #191919; }
.share-bar .ghost { background: transparent; border-color: transparent; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.share-bar .ghost:hover { color: var(--ink); }
.share-names { grid-column: 1 / -1; font-size: 13px; color: var(--muted); display: flex; gap: 6px; align-items: center; }
.share-names input { accent-color: var(--ink); width: 16px; height: 16px; }
.toast { grid-column: 1 / -1; margin: 0; padding: 10px 14px; background: var(--ink); color: #fff; border-radius: var(--radius-s); font-size: 14px; }

/* ⑥ 제휴 · ⑦ 광고 */
.affiliate { margin-top: 28px; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
.aff-disclosure { margin: 0 0 6px; font-size: 12px; color: var(--muted); }
.ad-slot { display: block; margin: 28px 0; min-height: 280px; background: #efece4; border-radius: var(--radius-s); position: relative; }
@media (min-width: 1024px) { .ad-slot { min-height: 250px; } }
.ad-label { position: absolute; top: 4px; left: 8px; font-size: 12px; color: var(--muted); }

/* ⑧ 설명 섹션 · 공통 본문 */
.explain, .sources-log, .prose { margin-top: 48px; }
.explain { font-size: 16.5px; line-height: 1.8; }
.explain h2, .sources-log h2, .related h2, .hub-list h2 { display: flex; align-items: center; gap: 10px; font-size: 22px; font-weight: 800; margin: 40px 0 12px; }
.explain h2::before, .sources-log h2::before, .related h2::before { content: ""; width: 14px; height: 14px; flex: none; border-radius: 4px; background: var(--hl); box-shadow: 2px 2px 0 var(--ink); }
.explain > h2:first-child { margin-top: 0; }
.explain h3 { font-size: 17px; font-weight: 750; margin: 24px 0 6px; }
/* 긴 본문 문단만 양쪽맞춤(목록·표·카드 제외) */
.explain p, .prose p { text-align: justify; text-justify: inter-word; }
.explain strong { background: linear-gradient(transparent 62%, var(--hl-soft) 62%); }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--card); }
table.values { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 1.5; font-variant-numeric: tabular-nums; }
table.values th { background: var(--paper); font-size: 12px; font-weight: 700; color: var(--muted); }
table.values th, table.values td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
table.values tr:last-child td { border-bottom: 0; }
.conf { font-size: 12px; font-weight: 650; padding: 2px 8px; border-radius: 999px; }
.conf-확인 { background: #e6f6ea; color: #2b8a3e; }
.conf-2차 { background: #e6f0fb; color: #1b5aa0; }
.conf-추정 { background: #fff1e6; color: #a63c06; }
.source-list, .changelog { padding-left: 18px; font-size: 14px; }
.source-list li + li, .changelog li + li { margin-top: 4px; }
.sources-log { padding-top: 8px; border-top: 1px solid var(--line); }
.prose { max-width: 720px; margin-inline: auto; }
.prose h1 { font-size: clamp(28px, 4vw, 36px); font-weight: 850; line-height: 1.25; }

/* ⑩ 관련 계산기 · 허브 카드 */
.card-grid { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); }
.calc-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); transition: transform .15s, box-shadow .15s, border-color .15s; }
.calc-card > a, .calc-card > .cc-body { position: relative; display: flex; flex-direction: column; gap: 2px; padding: 18px 18px 20px; height: 100%; text-decoration: none; color: var(--text); border-radius: inherit; }
.calc-card > a:hover { background: none; }
.calc-card:has(> a:hover) { transform: translateY(-2px); border-color: var(--ink); box-shadow: 5px 5px 0 var(--tone, var(--hl)); }
.cc-tile { display: grid; place-items: center; width: 56px; height: 56px; margin-bottom: 14px; border-radius: 16px; background: var(--tone, var(--hl)); color: var(--ink); font-size: 17px; font-weight: 850; letter-spacing: -0.04em; }
.cc-cat { font-size: 12px; font-weight: 650; color: var(--muted); }
.cc-name { font-size: 17px; font-weight: 750; color: var(--ink); letter-spacing: -0.02em; }
.cc-desc { font-size: 14px; color: var(--muted); line-height: 1.5; padding-right: 24px; }
.cc-go { position: absolute; top: 18px; right: 18px; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--line); font-weight: 700; transition: background .15s, border-color .15s; }
.calc-card > a:hover .cc-go { background: var(--ink); color: var(--hl); border-color: var(--ink); }
.cc-soon { margin-top: 8px; align-self: flex-start; font-size: 12px; padding: 1px 8px; border-radius: 999px; background: var(--paper); color: var(--muted); }
.is-soon { opacity: .75; }
.calc-card.is-next { background: transparent; border-style: dashed; border-color: var(--line-strong); }
.is-next .cc-tile { background: transparent; border: 1.5px dashed var(--line-strong); color: var(--muted); }
.is-next .cc-name { color: var(--muted); }
.related { margin-top: 48px; }

/* 허브 */
.hub-hero { display: grid; gap: 32px; align-items: center; padding: 28px 0 40px; }
.hero-kicker { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 16px; padding: 5px 12px 5px 6px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); font-size: 14px; font-weight: 700; }
.hero-kicker::before { content: "≈"; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--ink); color: var(--hl); font-size: 14px; line-height: 1; }
.hub-hero h1 { font-size: clamp(34px, 6.4vw, 60px); line-height: 1.14; letter-spacing: -0.05em; font-weight: 880; margin: 0 0 16px; }
.hub-hero .lead { max-width: 30em; font-size: 18px; margin-bottom: 24px; }
.hero-cta { display: inline-flex; align-items: center; gap: 8px; min-height: 52px; padding: 0 22px; border-radius: 999px; background: var(--ink); color: #fff; font-weight: 700; text-decoration: none; }
.hero-cta:hover { background: #000; color: var(--hl); }
.hero-sample { position: relative; justify-self: center; width: min(100%, 380px); padding: 12px 12px 24px; }
.sample-card { background: var(--card); border: 1.5px solid var(--ink); border-radius: var(--radius); padding: 22px; box-shadow: 8px 8px 0 var(--hl); transform: rotate(-2deg); }
.sample-label { margin: 0; font-size: 13px; font-weight: 600; color: var(--muted); }
.sample-num { margin: 6px 0; font-size: 36px; font-weight: 880; letter-spacing: -0.04em; line-height: 1.2; }
.sample-num span { background: linear-gradient(transparent 60%, var(--hl) 60%, var(--hl) 94%, transparent 94%); }
.sample-note { margin: 0 0 12px; font-size: 14px; font-weight: 600; }
.sample-rows { list-style: none; margin: 0; padding: 10px 0 0; border-top: 1px dashed var(--line-strong); font-size: 13px; color: var(--muted); }
.sample-rows li { display: flex; justify-content: space-between; padding: 3px 0; }
.sample-rows b { color: var(--ink); }
.sticker { position: absolute; right: -4px; bottom: 6px; padding: 8px 14px; border-radius: 999px; background: var(--t-peach); border: 1.5px solid var(--ink); font-size: 13px; font-weight: 800; transform: rotate(6deg); }
.hub-list { padding-top: 8px; }
.hub-list-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; margin-bottom: 16px; }
.hub-list-head h2 { margin: 0; }
.hub-list-head p { margin: 0; }
@media (min-width: 880px) {
  .hub-hero { grid-template-columns: 1.25fr 1fr; padding: 56px 0 64px; }
  .card-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .related .card-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ⑫ 푸터 */
.site-footer { background: var(--ink); color: #d9d6cf; padding: 36px 0 40px; font-size: 14px; }
.foot-top { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 16px; }
.foot-logo { margin: 0; font-size: 20px; font-weight: 600; color: #fff; letter-spacing: -0.04em; }
.foot-logo b { color: var(--ink); background: var(--hl); padding: 0 3px; border-radius: 3px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 16px 0 10px; }
.site-footer nav a { color: #d9d6cf; text-decoration-color: rgb(214 242 92 / .5); }
.site-footer nav a:hover { color: var(--hl); background: none; }
.site-footer .small { color: #9d998f; }
.fun { margin: 0; font-weight: 600; }

/* 이미지 저장용 4:5 틀 */
.capture-frame { position: fixed; left: -10000px; top: 0; width: 540px; height: 675px; padding: 24px 30px 30px 24px; overflow: hidden; background: var(--paper); display: flex; flex-direction: column; justify-content: center; }
.capture-frame .link-btn { display: none; }

/* ?notrack=1 안내 */
.notrack-notice { position: fixed; left: 50%; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 20; margin: 0; padding: 10px 16px; border-radius: 12px; background: var(--ink); color: #fff; font-size: 14px; box-shadow: 0 6px 20px rgb(0 0 0 / .2); }
.date-row { display: flex; gap: 8px; }
.date-row input[type="date"] { flex: 1; min-width: 0; }
.date-today { flex: none; min-width: 68px; }
.rc-links { margin: 12px 0 0; font-size: 14px; }
.capture-frame .rc-links { display: none; }

/* 오늘의 상장(정산) */
.rc-awards:empty { display: none; }
.rc-awards { border-top: 1px dashed var(--line-strong); margin-top: 14px; padding-top: 12px; }
.rc-awards ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.award { display: grid; grid-template-columns: 28px 1fr; column-gap: 6px; align-items: baseline; padding: 10px 12px; border-radius: var(--radius-s); background: var(--hl-soft); border: 1px solid #e2f09f; font-size: 14px; }
.award-icon { grid-row: span 3; font-size: 22px; line-height: 1; }
.award strong { color: var(--ink); }
.award-who { font-weight: 750; }
.award-text { color: var(--muted); font-size: 13px; }

@media (max-width: 599px) {
  .wrap, .page, .calc-page, .hub { padding-inline: 16px; }
  .calc-form { padding: 16px; gap: 18px; }
  .result-card { padding: 18px 18px 16px; box-shadow: 4px 4px 0 var(--hl); }
  .logo-text { font-size: 18px; }
  .hub-hero { padding-top: 12px; }
  .hub-hero .lead { font-size: 16px; }
  .hub-hero { gap: 20px; padding-bottom: 28px; }
  .sample-card { padding: 18px; }
  .sample-num { font-size: 30px; }
  .card-grid { gap: 10px; }
  .calc-card > a, .calc-card > .cc-body { display: grid; grid-template-columns: 52px minmax(0, 1fr); column-gap: 14px; row-gap: 0; align-items: center; padding: 14px 52px 14px 14px; }
  .cc-tile { grid-row: 1 / span 3; width: 52px; height: 52px; margin: 0; border-radius: 14px; font-size: 15px; }
  .cc-desc { padding-right: 0; }
  .cc-go { top: 50%; right: 14px; transform: translateY(-50%); width: 30px; height: 30px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* 2차: 송금 정리·항목별 내역 (룸메이트에서 처음 씀, 여행 정산 재사용) */
.rc-transfers:empty { display: none; }
.rc-transfers { border-top: 1px dashed var(--line-strong); margin-top: 14px; padding-top: 12px; }
.rc-transfers h3 { font-size: 13px; font-weight: 750; margin: 0 0 6px; color: var(--muted); letter-spacing: 0; }
.rc-transfers ol { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.rc-transfers li { padding: 10px 12px; border-radius: var(--radius-s); background: var(--paper); border: 1px solid var(--line); font-weight: 750; font-variant-numeric: tabular-nums; }
.rc-transfers li::before { content: "💸 "; }
.rc-transfers p { margin: 0; font-size: 14px; }
.rc-transfers-note { margin-top: 6px !important; font-size: 12px !important; color: var(--muted); }
.rc-breakdown { margin-top: 10px; font-size: 14px; }
.rc-breakdown summary { cursor: pointer; font-weight: 650; color: var(--muted); padding: 6px 0; }
.rc-scroll { overflow-x: auto; }
.rc-breakdown table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rc-breakdown th, .rc-breakdown td { padding: 6px 4px; border-bottom: 1px solid var(--line); text-align: right; }
.rc-breakdown th[scope="row"], .rc-breakdown thead th:first-child { text-align: left; font-weight: 600; }
.rc-breakdown thead th { font-size: 12px; color: var(--muted); font-weight: 650; }

/* 2차: 여행 정산 personMulti(함께 쓴 사람 체크) · 지출 행 배치 */
.person-multi legend { font-weight: 600; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.pm-row { display: flex; flex-wrap: wrap; gap: 6px; }
.pm { position: relative; }
.pm input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.pm span { display: inline-flex; align-items: center; min-height: 36px; padding: 4px 12px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--card); font-size: 14px; font-weight: 600; color: var(--muted); }
.pm input:checked + span { background: var(--ink); border-color: var(--ink); color: #fff; }
.pm input:checked + span::before { content: "✓ "; color: var(--hl); }
.pm input:focus-visible + span { outline: 3px solid var(--hl); outline-offset: 2px; }
/* 반복 행은 2열 그리드(번호는 따로 띄움): 메모·함께 쓴 사람은 한 줄 전체 */
[data-key="expenses"] .repeat-row > .field-text, [data-key="expenses"] .repeat-row > .field-personMulti { grid-column: 1 / -1; }
[data-key="expenses"] .money-aux { display: none; } /* 금액이 외화일 수 있어 "6만 원" 보조 표기는 숨김 */
