:root {
  --paper: #ECEFEA; --card: #FFFFFF; --sunk: #F5F7F3;
  --ink: #13201B; --ink2: #3F4D46; --mute: #6F7C75; --faint: #A1ABA5;
  --line: #D3DAD4; --line2: #E5EAE5;
  --green: #0F4A3A; --green-d: #0A3429; --green-t: #E0ECE5; --green-m: #2F6B58;
  --brass: #96702B; --brass-l: #D9B66A; --brass-t: #F4ECDC;
  --red: #A33A27; --red-t: #F7E4DF;
  --slate: #3E5A78; --slate-t: #E3EAF2;
  --sans: 'Gothic A1', -apple-system, 'Apple SD Gothic Neo', sans-serif;
  --mono: 'DM Mono', ui-monospace, Menlo, monospace;
  --band: 34px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { background: var(--paper); color: var(--ink); font: 15px/1.55 var(--sans); word-break: keep-all; -webkit-font-smoothing: antialiased; min-height: 100vh; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--brass); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.muted { color: var(--mute); }
.sm { font-size: 13px; }

.demo { height: var(--band); background: #111418; color: #C9CCD1; font-size: 13px; line-height: 18px; text-align: center; padding: 8px 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; position: relative; z-index: 30; }
.demo a { color: #fff; text-decoration: underline; text-underline-offset: 2px; }
.demo b { color: #FF5A36; font-family: Menlo, monospace; }
.demo button { color: #fff; text-decoration: underline; text-underline-offset: 2px; font-size: 13px; }

/* 상단 */
.top { position: sticky; top: 0; z-index: 20; background: var(--green-d); color: #E6EEE9; display: flex; align-items: center; gap: 28px; padding: 0 28px; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; flex: none; }
.brand svg { width: 30px; height: 30px; box-shadow: 0 0 0 1px rgba(217, 182, 106, .35); border-radius: 6px; }
.brand b { display: block; font-weight: 800; font-size: 17px; letter-spacing: -.02em; color: #fff; line-height: 1.2; }
.brand small { display: block; font-size: 11.5px; color: #9FB7AC; line-height: 1.2; }
.nav { display: flex; align-items: center; gap: 2px; flex: 1; min-width: 0; }
.nav a { padding: 7px 12px; border-radius: 6px; font-size: 14.5px; color: #C3D3CB; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.nav a:hover { color: #fff; background: rgba(255, 255, 255, .06); }
.nav a.on { color: #fff; background: rgba(255, 255, 255, .1); box-shadow: inset 0 -2px 0 var(--brass-l); }
.nav-grp { font-size: 11px; color: #7E998D; letter-spacing: .08em; padding: 0 4px 0 6px; }
.nav-grp.adm { margin-left: 18px; border-left: 1px solid #2A5244; padding-left: 18px; }
.badge { font: 500 11px/1 var(--mono); background: var(--brass-l); color: var(--green-d); border-radius: 99px; padding: 3px 6px; }
.badge:empty { display: none; }
.who select { background: #143F33; color: #E6EEE9; border: 1px solid #2E5B4C; border-radius: 6px; padding: 6px 10px; font-size: 13.5px; }
body:not(.is-admin) .who { display: none; }

.wrap { max-width: 1240px; margin: 0 auto; padding: 32px 28px 64px; }
h1 { font-size: 26px; font-weight: 800; letter-spacing: -.03em; line-height: 1.25; }
h2 { font-size: 16px; font-weight: 800; letter-spacing: -.02em; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 40px; padding: 0 16px; border-radius: 6px; font-size: 14.5px; font-weight: 600; white-space: nowrap; border: 1px solid transparent; }
.btn.primary { background: var(--green); color: #fff; }
.btn.primary:hover { background: var(--green-d); }
.btn.ghost { border-color: var(--line); background: var(--card); color: var(--ink2); }
.btn.ghost:hover { border-color: var(--green-m); color: var(--green); }
.btn.sm { height: 32px; padding: 0 12px; font-size: 13px; }
.btn.wide { width: 100%; height: 48px; font-size: 16px; }
.btn:disabled { opacity: .45; cursor: default; }
.panel, .card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; }
.card { padding: 20px 22px; }
.card h2 { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.note { font-size: 13px; color: var(--mute); margin-top: 12px; }
.empty { text-align: center; padding: 56px 20px; color: var(--mute); }
.empty h1 { color: var(--ink); margin-bottom: 8px; }
.empty .btn { margin-top: 16px; }

/* 계산기 */
.linked { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; background: var(--brass-t); border: 1px solid #E3D2AE; border-radius: 8px; padding: 10px 14px; margin-bottom: 20px; font-size: 14px; }
.calc-head { margin-bottom: 22px; }
.calc-head p { color: var(--mute); margin-top: 4px; }
.calc-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 22px; align-items: start; }
.inputs { padding: 22px; }
.seg { display: flex; background: var(--sunk); border: 1px solid var(--line2); border-radius: 8px; padding: 3px; gap: 3px; }
.seg button { flex: 1; height: 38px; border-radius: 6px; font-size: 14.5px; font-weight: 600; color: var(--mute); }
.seg button[aria-selected="true"], .seg button.on { background: var(--card); color: var(--green); box-shadow: 0 1px 2px rgba(15, 40, 30, .12), 0 0 0 1px var(--line); }
.seg.mode button[aria-selected="true"] { background: var(--green); color: #fff; box-shadow: none; }
.seg.prod { margin-top: 10px; }
.prod-note { font-size: 13px; color: var(--mute); margin: 10px 2px 2px; }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 18px; margin-top: 16px; }
.f { padding: 6px 0; min-width: 0; }
.f label, .f .lbl { display: block; font-size: 13.5px; font-weight: 600; color: var(--ink2); margin-bottom: 6px; }
.in { position: relative; }
.in input, .f > input, .f select, .terms select, .tools input, .tools select, textarea, .close-form select { width: 100%; height: 44px; border: 1px solid var(--line); border-radius: 6px; background: var(--card); padding: 0 12px; font-size: 15px; }
.in input { font-family: var(--mono); font-size: 16px; text-align: right; padding-right: 36px; }
.in span { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--mute); font-size: 13.5px; pointer-events: none; }
.in input:disabled { background: var(--sunk); color: var(--faint); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--green-m); box-shadow: 0 0 0 3px rgba(47, 107, 88, .15); }
.hint { font-size: 12.5px; color: var(--mute); margin-top: 4px; min-height: 18px; }
.err { font-size: 12.5px; color: var(--red); font-weight: 600; }
.err:empty { display: none; }
.f.bad input, .f.bad select { border-color: var(--red); background: #FFFBFA; }
.f.bad .hint { display: none; }
.only-rent, .only-pay, .only-rate { display: none; }
[data-prod="rent"] .only-rent { display: block; }
[data-mode="pay"] .only-pay, [data-mode="rate"] .only-rate { display: block; }

.result { padding: 24px; position: sticky; top: 76px; border-top: 4px solid var(--green); }
.res-k { font-size: 13.5px; font-weight: 600; color: var(--mute); }
.res-big { font-size: 22px; color: var(--ink2); margin-top: 2px; }
.res-big b { font-size: 46px; font-weight: 500; color: var(--green); letter-spacing: -.04em; line-height: 1.1; }
.res-sub { font-size: 13.5px; color: var(--mute); margin-top: 4px; }
.insight { margin-top: 16px; background: var(--green-t); border-radius: 8px; padding: 12px 14px; font-size: 14px; color: var(--ink2); line-height: 1.6; }
.insight b { display: block; color: var(--green); }
.insight.warn { background: var(--brass-t); }
.insight.warn b { color: var(--brass); }
.kv { margin-top: 16px; }
.kv > div { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 8px 0; border-bottom: 1px dashed var(--line2); }
.kv dt { color: var(--ink2); font-size: 14px; }
.kv dt small { display: block; font-size: 11.5px; color: var(--faint); }
.kv dd { font-size: 15px; text-align: right; }
.kv .tot { border-bottom: 0; border-top: 1px solid var(--line); }
.kv .tot dt { font-weight: 800; color: var(--ink); }
.kv .tot dd { font-weight: 500; font-size: 16px; }
.kv.sm > div { padding: 6px 0; }
.kv.sm dt, .kv.sm dd { font-size: 13.5px; }
.method { font-size: 12px; color: var(--faint); margin-top: 10px; }
.res-act { display: flex; gap: 8px; margin-top: 18px; }
.res-act .btn { flex: 1; }
.res-empty ul { margin: 10px 0 0 18px; color: var(--red); font-size: 14px; }

.compare { margin-top: 34px; }
.cmp-head { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin-bottom: 12px; }
.cmp-head h2 { font-size: 19px; }
.cmp-head p { color: var(--mute); font-size: 13.5px; }
.cmp { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 10px; background: var(--card); overflow: hidden; }
.cmp-c { padding: 20px 22px; border-left: 1px solid var(--line2); }
.cmp-c:first-child { border-left: 0; }
.cmp-c.on { background: #FBFCF9; box-shadow: inset 0 3px 0 var(--brass-l); }
.cmp-c h3 { font-size: 15px; font-weight: 800; display: flex; align-items: center; gap: 8px; }
.tag { font-size: 11px; font-weight: 600; color: var(--brass); background: var(--brass-t); border-radius: 4px; padding: 2px 6px; }
.cmp-m { margin-top: 6px; font-size: 14px; color: var(--mute); }
.cmp-m b { font-size: 28px; font-weight: 500; color: var(--ink); }
.cmp-m small { margin-left: 2px; }
.cmp-n { font-size: 12.5px; color: var(--mute); margin-top: 10px; }
.bar { display: flex; height: 8px; border-radius: 2px; overflow: hidden; background: var(--sunk); margin-top: 12px; }
.bar i, .legend i { display: block; }
.b-p { background: var(--green); } .b-i { background: var(--brass-l); } .b-e { background: var(--slate); opacity: .65; }
.legend { display: flex; gap: 14px; align-items: center; font-size: 12.5px; color: var(--mute); margin-top: 10px; flex-wrap: wrap; }
.legend i { width: 10px; height: 10px; border-radius: 2px; display: inline-block; margin-right: -8px; }

/* 상환표 */
.sched-head, .adm-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.sched-head p, .adm-head p { color: var(--mute); margin-top: 4px; font-size: 14px; }
.row-act { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.chips { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.chips div { background: var(--card); padding: 14px 18px; }
.chips span { display: block; font-family: var(--sans); font-size: 12.5px; color: var(--mute); }
.chips b { font-size: 21px; font-weight: 500; }
.tbl-wrap { background: var(--card); border: 1px solid var(--line); border-radius: 10px; overflow: auto; margin-top: 16px; }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { position: sticky; top: 0; background: #F3F5F1; text-align: left; font-size: 12.5px; font-weight: 600; color: var(--mute); padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 9px 14px; border-bottom: 1px solid var(--line2); vertical-align: top; }
.tbl .r { text-align: right; }
.sch td { text-align: right; padding: 6px 18px; }
.sch th { text-align: right; padding: 10px 18px; }
.sch th:first-child, .sch td:first-child { text-align: center; width: 70px; }
.sch th:nth-child(2), .sch td:nth-child(2) { text-align: left; }
.sch tr.sub td { background: var(--sunk); font-weight: 600; color: var(--ink2); font-size: 13px; }
.sch tr.sub td:nth-child(-n+2), .sch tfoot td:nth-child(-n+2) { font-family: var(--sans); }
.sch tfoot td { font-weight: 600; background: var(--green-t); border-bottom: 0; }
.sch tfoot .balloon td { background: var(--brass-t); color: var(--brass); }
.print-head { display: none; }

/* 상담 목록 */
.pipe { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--card); }
.pipe button { text-align: left; padding: 12px 14px; border-left: 1px solid var(--line2); position: relative; }
.pipe button:first-child { border-left: 0; }
.pipe button span { display: block; font-size: 12.5px; color: var(--mute); }
.pipe button b { font-size: 22px; font-weight: 500; }
.pipe button.on { background: var(--green); }
.pipe button.on span, .pipe button.on b { color: #fff; }
.pipe button::after { content: ''; position: absolute; left: 14px; right: 14px; bottom: 0; height: 3px; border-radius: 2px 2px 0 0; background: var(--c, transparent); }
.tools { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.tools .search { flex: 1 1 260px; }
.tools select { width: auto; padding-right: 30px; }
.count { font-size: 13px; color: var(--mute); margin-top: 14px; }
.count + .tbl-wrap { margin-top: 6px; }
.cases td small { display: block; font-size: 12px; color: var(--mute); margin-top: 1px; }
.cases td b { font-weight: 600; }
.cases tbody tr { cursor: pointer; }
.cases tbody tr:hover td { background: #F8FAF6; }
.cases .id a { font-weight: 500; color: var(--green); }
.cases .ago { color: var(--mute); font-size: 13px; white-space: nowrap; }
.flag { color: var(--red) !important; font-weight: 600; font-family: var(--sans); }
.chip { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 4px; white-space: nowrap; background: var(--sunk); color: var(--ink2); border: 1px solid var(--line2); }
.chip.big { font-size: 13px; padding: 3px 10px; vertical-align: middle; margin-left: 6px; }
.st-new { --c: var(--brass-l); } .chip.st-new { background: var(--brass-t); color: var(--brass); border-color: #EADBB9; }
.st-contact { --c: #8FB3A3; } .chip.st-contact { background: #EEF5F1; color: var(--green-m); border-color: #D2E4DA; }
.st-sent { --c: #7A97B6; } .chip.st-sent { background: var(--slate-t); color: var(--slate); border-color: #CFDBE8; }
.st-review { --c: #5D6FA8; } .chip.st-review { background: #E7E9F4; color: #3F4C7E; border-color: #D2D6EA; }
.st-contract { --c: var(--green); } .chip.st-contract { background: var(--green); color: #fff; border-color: var(--green); }
.st-hold { --c: #C79A5A; } .chip.st-hold { background: #FFF6E8; color: #8A5A16; border-color: #F0DDBB; }
.st-closed { --c: var(--faint); } .chip.st-closed { background: #EEF0EE; color: var(--mute); }

/* 상담 상세 */
.back { font-size: 14px; color: var(--mute); }
.back:hover { color: var(--green); }
.case-head { margin: 10px 0 16px; }
.case-head p { font-size: 13px; }
.stepper { list-style: none; display: flex; gap: 4px; margin-bottom: 20px; flex-wrap: wrap; }
.stepper li { flex: 1; min-width: 70px; font-size: 13px; font-weight: 600; color: var(--faint); padding: 8px 10px 8px 12px; background: var(--card); border: 1px solid var(--line2); position: relative; }
.stepper li:first-child { border-radius: 6px 0 0 6px; }
.stepper li.done { color: var(--green-m); background: #F3F8F5; }
.stepper li.cur { color: #fff; background: var(--green); border-color: var(--green); }
.stepper li.side { flex: 0 0 auto; border-radius: 6px; margin-left: 10px; }
.stepper li.side.st-hold { background: #8A5A16; border-color: #8A5A16; }
.stepper li.side.st-closed { background: var(--mute); border-color: var(--mute); }
.case-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.col { display: grid; gap: 18px; }
.acts { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.ok-txt { color: var(--green); font-weight: 800; }
.close-form { margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--line); display: grid; gap: 8px; max-width: 320px; }
.close-form label { font-size: 13.5px; font-weight: 600; }
.close-form .btn { justify-self: start; }
.card .kv { margin-top: 0; }
.kv dd select { height: 34px; border: 1px solid var(--line); border-radius: 6px; padding: 0 8px; font-size: 14px; }
textarea { height: auto; padding: 10px 12px; resize: vertical; line-height: 1.5; }
#memo .btn { margin-top: 8px; }
.timeline { list-style: none; }
.timeline li { display: grid; grid-template-columns: 84px 52px 1fr; gap: 8px; padding: 9px 0; border-bottom: 1px solid var(--line2); font-size: 13.5px; align-items: baseline; }
.timeline li:last-child { border-bottom: 0; }
.h-t { font-size: 12px; color: var(--mute); }
.h-w { font-size: 12.5px; font-weight: 600; color: var(--ink2); }
.memo { background: var(--sunk); padding: 6px 10px; border-radius: 6px; display: inline-block; border-left: 3px solid var(--brass-l); }

/* 금리표 */
.rate-t th, .rate-t td { text-align: center; }
.rate-t th.grp { text-align: center; border-left: 1px solid var(--line); color: var(--ink2); }
.rate-t tbody th { text-align: left; background: var(--card); color: var(--ink); font-size: 14px; font-weight: 600; position: static; border-bottom: 1px solid var(--line2); }
.rate-t td:nth-child(3n+2) { border-left: 1px solid var(--line); }
.rate-t thead tr:nth-child(2) th:nth-child(3n+1) { border-left: 1px solid var(--line); }
.rate-t thead tr:first-child th { position: static; }
.rate-t input { width: 72px; height: 34px; text-align: right; border: 1px solid var(--line2); border-radius: 5px; padding: 0 8px; font-size: 14.5px; background: transparent; }
.rate-t input:hover { border-color: var(--line); background: #fff; }
.rate-t input.chg { background: var(--brass-t); border-color: var(--brass-l); }
.rate-t input.bad { background: var(--red-t); border-color: var(--red); }
.rate-t td.low { background: #F1F7F3; }
.rate-t td.low input, .rate-t td.low span { color: var(--green); font-weight: 500; }
.low-dot { display: inline-block; width: 10px; height: 10px; background: #DCEBE2; border: 1px solid #BFD8C9; vertical-align: -1px; }
.card.log { margin-top: 22px; max-width: 720px; }
.card.log .timeline li { grid-template-columns: 84px 52px 1fr; }

/* 검증 */
.pass { font-size: 20px; padding: 8px 16px; border-radius: 8px; background: var(--red-t); color: var(--red); }
.pass.all { background: var(--green); color: #fff; }
.verify td { font-size: 13.5px; }
.verify .ref { color: var(--mute); font-size: 12.5px; }
.verify tr.fail td { background: var(--red-t); }
.how { margin-top: 20px; }
.how p { font-size: 14px; color: var(--ink2); margin-top: 6px; }
.formula { background: var(--sunk); border: 1px solid var(--line2); border-radius: 6px; padding: 10px 14px; font-size: 13.5px; overflow-x: auto; }

/* 시트 */
.sheet-bg { position: fixed; inset: 0; background: rgba(10, 25, 20, .45); z-index: 40; }
.sheet { position: fixed; z-index: 41; left: 50%; top: 50%; width: min(460px, calc(100vw - 32px)); max-height: calc(100vh - 40px); overflow: auto; background: var(--card); border-radius: 12px; padding: 22px 24px 24px; transform: translate(-50%, -46%); opacity: 0; transition: transform .22s ease, opacity .22s ease; box-shadow: 0 30px 60px -20px rgba(10, 30, 22, .45); }
.sheet.in { transform: translate(-50%, -50%); opacity: 1; }
.sh-h { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.sh-h h2 { font-size: 19px; }
.x { font-size: 26px; line-height: 1; color: var(--mute); width: 36px; height: 36px; }
.sh-sum { font-size: 12.5px; color: var(--green); background: var(--green-t); padding: 8px 12px; border-radius: 6px; margin-bottom: 8px; }
.seg.when label { flex: 1; }
.seg.when input { position: absolute; opacity: 0; }
.seg.when span { display: block; text-align: center; height: 36px; line-height: 36px; border-radius: 6px; font-size: 14px; color: var(--mute); cursor: pointer; }
.seg.when input:checked + span { background: var(--card); color: var(--green); font-weight: 600; box-shadow: 0 0 0 1px var(--line); }
.seg.when input:focus-visible + span { outline: 2px solid var(--brass); }
.chk { display: flex !important; gap: 8px; align-items: center; cursor: pointer; }
.chk input { width: 18px; height: 18px; accent-color: var(--green); }
.fine { font-size: 12px; color: var(--mute); margin: 4px 0 0 26px; }
.agree { margin-bottom: 8px; }
.done { text-align: center; }
.done .sh-h { text-align: left; }
.done-id { font-size: 34px; color: var(--green); margin: 10px 0 4px; }
.toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px); background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 8px; font-size: 14px; opacity: 0; pointer-events: none; transition: .2s; z-index: 50; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* 태블릿·모바일 */
@media (max-width: 1080px) {
  .top { gap: 16px; padding: 0 18px; }
  .nav-grp { display: none; }
  .nav-grp.adm { display: block; width: 1px; padding: 0; margin: 0 8px; height: 20px; font-size: 0; }
  .calc-grid { grid-template-columns: 1fr; }
  .result { position: static; }
  .pipe { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .pipe button:nth-child(5) { border-left: 0; }
  .pipe button:nth-child(n+5) { border-top: 1px solid var(--line2); }
}
@media (max-width: 760px) {
  body { font-size: 14.5px; }
  .top { flex-wrap: wrap; height: auto; padding: 10px 16px 0; gap: 6px 10px; }
  .brand { flex: 1; }
  .nav { order: 3; flex: 1 0 100%; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 4px 12px 8px; }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { padding: 6px 10px; font-size: 14px; }
  .who select { font-size: 12.5px; padding: 5px 6px; }
  .wrap { padding: 20px 16px 48px; }
  h1 { font-size: 22px; }
  .calc-head { margin-bottom: 14px; }
  .calc-head p { font-size: 13.5px; }
  .inputs { padding: 16px; }
  .seg button { font-size: 13.5px; height: 36px; }
  .fields { grid-template-columns: 1fr 1fr; gap: 0 10px; }
  .fields .f[data-f="price"], .fields .f[data-f="payment"] { grid-column: 1 / -1; }
  .in input { font-size: 15px; padding-right: 30px; }
  .hint { font-size: 11.5px; }
  .result { padding: 18px; }
  .res-big b { font-size: 40px; }
  .cmp { grid-template-columns: 1fr; }
  .cmp-c { border-left: 0; border-top: 1px solid var(--line2); }
  .cmp-c:first-child { border-top: 0; }
  .chips { grid-template-columns: 1fr 1fr; }
  .chips b { font-size: 17px; }
  .sch td, .sch th { padding: 6px 8px; font-size: 12.5px; }
  .sch th:first-child, .sch td:first-child { width: 40px; }
  .sch th:nth-child(2), .sch td:nth-child(2) { display: none; }
  .pipe button { padding: 10px; }
  .pipe button b { font-size: 18px; }
  .tools .search { flex: 1 0 100%; }
  .tools > label:not(.search) { flex: 1 1 0; min-width: 0; }
  .tools select { width: 100%; min-width: 0; padding: 0 6px; font-size: 13.5px; }
  /* 상담 목록은 카드로 */
  .cases thead { display: none; }
  .cases, .cases tbody { display: block; }
  .cases tr { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 12px 14px; border-bottom: 1px solid var(--line2); }
  .cases td { padding: 0; border: 0; }
  .cases td:nth-child(1) { grid-column: 1; grid-row: 3; display: flex; gap: 8px; align-items: baseline; }
  .cases td:nth-child(1) small { margin: 0; }
  .cases td:nth-child(2) { grid-column: 1; grid-row: 1; }
  .cases td:nth-child(2) small { display: inline; margin-left: 6px; }
  .cases td:nth-child(3) { grid-column: 1; grid-row: 2; font-size: 13px; color: var(--ink2); }
  .cases td:nth-child(3) small { display: inline; margin-left: 6px; }
  .cases td:nth-child(4) { grid-column: 2; grid-row: 2; font-size: 13.5px; }
  .cases td:nth-child(5) { grid-column: 2; grid-row: 3; font-size: 13px; }
  .cases td:nth-child(5) small { display: none; }
  .cases td:nth-child(6) { grid-column: 2; grid-row: 1; text-align: right; }
  .cases td:nth-child(6) small { display: inline; margin-left: 4px; }
  .cases td:nth-child(7) { grid-column: 1; grid-row: 4; font-size: 12.5px; color: var(--mute); }
  .cases td:nth-child(8) { grid-column: 2; grid-row: 4; text-align: right; }
  .case-grid { grid-template-columns: 1fr; }
  .stepper li { min-width: 0; padding: 6px 6px; font-size: 12px; text-align: center; }
  .stepper li.side { flex: 1 0 100%; margin: 4px 0 0; }
  .timeline li { grid-template-columns: 74px 46px 1fr; }
  .rate-t input { width: 60px; font-size: 13.5px; }
  .sheet { left: 0; right: 0; top: auto; bottom: 0; width: 100%; transform: translateY(100%); border-radius: 16px 16px 0 0; max-height: 92vh; padding: 18px 16px calc(20px + env(safe-area-inset-bottom)); }
  .sheet.in { transform: translateY(0); }
  .linked { font-size: 13px; }
}

@media print {
  @page { margin: 14mm; }
  body { background: #fff; font-size: 11px; }
  .no-print, .top, .demo, .toast { display: none !important; }
  .wrap { padding: 0; max-width: none; }
  .print-head { display: block; font-size: 11px; color: #555; border-bottom: 1px solid #999; padding-bottom: 6px; margin-bottom: 10px; }
  .chips, .tbl-wrap { border-color: #bbb; border-radius: 0; overflow: visible; }
  .tbl th { position: static; }
  .sch td { padding: 2px 10px; }
  tr { break-inside: avoid; }
}
