/* 웰그린 이커머스 운영대행 — 거래명세 전표 시스템
 * 종이(연녹 전표지) · 복본(연분홍) · 괘선(청록) · 먹 · 인주(붉은 도장)
 * 표제 Hahmlet / 본문 Pretendard / 기입값 Nanum Gothic Coding
 */

:root {
  --desk: #D9E4D6;        /* 전표철 바탕 */
  --paper: #EEF4EC;       /* 전표지 */
  --paper-hi: #F7FAF5;    /* 기입면 */
  --copy: #F2DEE0;        /* 분홍 복본 */
  --rule: #2E6A5C;        /* 괘선 · 칸 머리 글자 */
  --rule-2: #8FB3A8;      /* 가는 괘선 (선 전용, 글자에 쓰지 않음) */
  --hair: rgba(46, 106, 92, .24);
  --tint: rgba(46, 106, 92, .07);
  --ink: #16201B;         /* 먹 */
  --ink-2: #34423C;
  --ink-3: #4F5E57;
  --seal: #B0261C;        /* 인주 */
  --seal-soft: rgba(176, 38, 28, .10);
  --ok: #1E6A4E;

  --font-display: "Hahmlet", "Nanum Myeongjo", "Batang", serif;
  --font-body: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  --font-data: "Nanum Gothic Coding", ui-monospace, "D2Coding", "Malgun Gothic", monospace;

  --grain: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.16  0 0 0 0 0.28  0 0 0 0 0.23  0 0 0 .06 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  --fiber: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='f'><feTurbulence type='fractalNoise' baseFrequency='.012 .9' numOctaves='2' seed='4'/><feColorMatrix values='0 0 0 0 0.2  0 0 0 0 0.32  0 0 0 0 0.27  0 0 0 .05 0'/></filter><rect width='100%25' height='100%25' filter='url(%23f)'/></svg>");

  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --wrap: 1200px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
}

/* ── 기본 ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 84px;
  caret-color: var(--seal);
  scrollbar-color: var(--rule-2) var(--desk);
  scrollbar-width: thin;
}
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--paper) var(--grain);
  color: var(--ink);
  font: 400 1.0625rem/1.75 var(--font-body);
  word-break: keep-all;
  overflow-wrap: break-word;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
::selection { background: rgba(176, 38, 28, .2); color: var(--ink); }
::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: var(--desk); }
::-webkit-scrollbar-thumb { background: var(--rule-2); border: 3px solid var(--desk); border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: var(--rule); }

img, svg { max-width: 100%; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: var(--rule); text-decoration-thickness: 1px; text-underline-offset: .22em; }
a:hover { color: var(--ink); }
:focus-visible { outline: 2.5px solid var(--seal); outline-offset: 3px; border-radius: 2px; }
b, strong { font-weight: 700; }

h1, h2 { font-family: var(--font-display); color: var(--ink); text-wrap: balance; }
h1 { font-weight: 800; font-size: clamp(2.5rem, 3.6vw + 1.1rem, 4.25rem); line-height: 1.12; letter-spacing: -0.03em; }
h2 { font-weight: 700; font-size: clamp(1.75rem, 2vw + 1.1rem, 2.6rem); line-height: 1.28; letter-spacing: -0.02em; }
h3 { font-size: 1.1875rem; line-height: 1.45; font-weight: 700; letter-spacing: -0.01em; text-wrap: balance; }

.num { font-family: var(--font-data); font-variant-numeric: tabular-nums; letter-spacing: 0; }
table { font-variant-numeric: tabular-nums; }
.small { font-size: .9375rem; line-height: 1.7; color: var(--ink-3); }
.lede { font-size: 1.125rem; line-height: 1.75; color: var(--ink-2); max-width: 44em; }
.note { margin-top: 1.25rem; max-width: 52em; }

.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 1rem; top: -4rem; z-index: 100; background: var(--ink); color: var(--paper-hi); padding: .6rem 1rem; border-radius: 3px; }
.skip:focus { top: 1rem; }
.skip:hover, .skip:focus { color: var(--paper-hi); }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }

.ic { width: 1.15em; height: 1.15em; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }

/* ── 버튼 · 링크 ───────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45em;
  min-height: 50px; padding: .8rem 1.4rem;
  font: 600 1.0625rem/1.2 var(--font-body);
  color: var(--paper-hi); background: var(--ink);
  border: 1.5px solid var(--ink); border-radius: 3px;
  text-decoration: none; cursor: pointer;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .25) inset, 0 6px 14px -10px rgba(22, 32, 27, .55);
  transition: background-color .2s var(--ease-out), transform .2s var(--ease-out), box-shadow .2s var(--ease-out);
}
.btn:hover { background: #2A3932; color: var(--paper-hi); box-shadow: 0 1px 0 rgba(255,255,255,.25) inset, 0 10px 20px -12px rgba(22, 32, 27, .6); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: progress; }
.btn-line { background: transparent; color: var(--ink); box-shadow: none; }
.btn-line:hover { background: rgba(22, 32, 27, .06); color: var(--ink); box-shadow: none; }
.btn-sm { min-height: 42px; padding: .5rem 1rem; font-size: .9375rem; }
.btn-block { width: 100%; }
.link-out { display: inline-flex; align-items: center; gap: .3em; font-weight: 600; color: var(--rule); }
.link-out:hover { color: var(--ink); }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; }

/* ── 상단 바 ───────────────────────────────────────── */
.top { position: sticky; top: 0; z-index: 40; background: var(--desk) var(--grain); border-bottom: 1px solid var(--rule-2); }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; min-height: 68px; }
.brand { display: inline-flex; align-items: baseline; gap: .55rem; color: var(--ink); text-decoration: none; }
.brand-name { font: 800 1.5rem/1 var(--font-display); letter-spacing: -0.02em; }
.brand-sub { font-size: .9375rem; font-weight: 600; color: var(--ink-2); }
.menu { display: flex; align-items: center; gap: 1.35rem; }
.menu a:not(.btn) { color: var(--ink-2); font-size: .9688rem; font-weight: 500; text-decoration: none; padding-block: .3rem; border-bottom: 1.5px solid transparent; }
.menu a:not(.btn):hover { color: var(--ink); border-bottom-color: var(--rule); }
.menu-toggle { display: none; width: 46px; height: 46px; align-items: center; justify-content: center; background: transparent; border: 1.5px solid var(--ink); border-radius: 3px; color: var(--ink); cursor: pointer; }
.menu-toggle .ic { width: 22px; height: 22px; }

/* ── 첫 화면 ──────────────────────────────────────── */
.hero { background: var(--desk) var(--grain); padding-block: clamp(2rem, 4vw, 3.25rem) clamp(3.5rem, 7vw, 5.5rem); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: start; }
.hero-copy { display: grid; gap: 1.4rem; align-content: start; padding-top: clamp(.5rem, 4vw, 3.5rem); }
.hero-copy .lede { font-size: 1.1875rem; }
.hint { font-size: 1rem; color: var(--rule); font-weight: 600; padding-left: 1.6rem; position: relative; }
.hint::before { content: ""; position: absolute; left: 0; top: .7em; width: 1.1rem; height: 1.5px; background: var(--rule); }
.hero-copy .actions { margin-top: .4rem; }

/* 전표 */
.docket-wrap { position: relative; isolation: isolate; padding: 0 14px 16px 0; }
.carbon {
  position: absolute; inset: 0 14px 16px 0; z-index: -1;
  background: var(--copy) var(--fiber);
  border: 1px solid rgba(176, 38, 28, .18);
  border-radius: 2px;
  transform: translate(10px, 12px) rotate(-1.1deg);
  transform-origin: 30% 80%;
  box-shadow: 0 1px 2px rgba(22, 32, 27, .12), 0 9px 14px -11px rgba(22, 32, 27, .38);
}
.docket {
  position: relative;
  background: var(--paper-hi) var(--fiber);
  border: 1px solid var(--rule);
  border-radius: 2px;
  padding: clamp(1.1rem, 2.4vw, 1.6rem);
  box-shadow: 0 1px 0 rgba(255,255,255,.7) inset, 0 1px 2px rgba(22, 32, 27, .14), 0 12px 18px -14px rgba(22, 32, 27, .42);
}
.d-head { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: .15rem 1rem; padding-bottom: .65rem; border-bottom: 2px solid var(--rule); }
.d-title { grid-column: 1 / -1; font: 800 clamp(1.4rem, 1.3vw + .9rem, 1.8rem)/1.1 var(--font-display); letter-spacing: .48em; color: var(--rule); text-align: center; padding-left: .48em; }
.d-copy { font-size: .875rem; font-weight: 600; color: var(--rule); }
.d-no { font-size: .875rem; color: var(--ink-3); }

.d-parties { display: grid; grid-template-columns: 1.35fr 1fr; border: 1px solid var(--rule); border-top: 0; margin-bottom: 1rem; }
.kmong-line { font-size: .9688rem; color: var(--ink-2); }
.kmong-line b { color: var(--seal); }
.party { display: grid; grid-template-columns: 2rem 1fr; }
.party + .party { border-left: 1px solid var(--rule); }
.party-side { writing-mode: vertical-rl; text-orientation: upright; display: flex; align-items: center; justify-content: center; letter-spacing: .3em; font-size: .875rem; font-weight: 700; color: var(--rule); background: var(--tint); border-right: 1px solid var(--rule); padding-block: .5rem; }
.cells { display: grid; grid-template-columns: 1fr 1fr; }
.cells > div { display: grid; grid-template-columns: 3.4rem 1fr; border-bottom: 1px solid var(--hair); min-height: 2.15rem; }
.cells > div:nth-child(odd):not(.span2) { border-right: 1px solid var(--hair); }
.cells > div.span2 { grid-column: 1 / -1; }
.cells > div:last-child, .cells > div:nth-last-child(2):not(.span2):nth-child(odd) { border-bottom: 0; }
.cells dt { display: flex; align-items: center; justify-content: center; font-size: .8125rem; font-weight: 600; color: var(--rule); background: var(--tint); border-right: 1px solid var(--hair); padding: .25rem; text-align: center; line-height: 1.3; }
.cells dd { display: block; align-self: center; padding: .45rem .7rem; font-size: .9375rem; font-weight: 600; color: var(--ink); line-height: 1.4; }
.cells dd.blank { color: var(--ink-3); font-weight: 500; background: repeating-linear-gradient(135deg, transparent 0 7px, rgba(46, 106, 92, .07) 7px 8px); }
.cells dd.blank.filled { color: var(--ink); font-weight: 600; background: none; }

.d-lines { width: 100%; border-collapse: collapse; font-size: 1rem; }
.d-lines thead th { font-size: .8125rem; font-weight: 600; color: var(--rule); text-align: left; padding: .5rem .55rem; background: var(--tint); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.d-lines td { padding: .48rem .55rem; border-bottom: 1px solid var(--hair); vertical-align: middle; line-height: 1.45; }
.d-lines tfoot td { white-space: nowrap; }
.d-lines td label { cursor: pointer; font-weight: 600; color: var(--ink); }
.d-lines .c-pick { width: 2.6rem; padding-right: 0; }
.d-lines .c-spec { color: var(--ink-3); font-size: .9063rem; width: 9.5rem; }
.d-lines .r { text-align: right; }
.spec-inline { display: none; }
.d-lines tbody tr { transition: background-color .25s var(--ease-out); }
.d-lines tbody tr:hover { background: rgba(46, 106, 92, .045); }
.d-lines tbody tr.on { background: rgba(46, 106, 92, .06); }

.c-amt { width: 7.5rem; background: repeating-linear-gradient(135deg, transparent 0 7px, rgba(46, 106, 92, .08) 7px 8px); transition: background-color .3s; }
tr.on .c-amt, tr:has(.pick:checked) .c-amt { background: none; }
.ink { display: inline-block; font-size: 1.0625rem; font-weight: 700; color: var(--ink); clip-path: inset(0 100% 0 0); }
tr.on .ink, tr:has(.pick:checked) .ink { clip-path: inset(0 0 0 0); }
@media (prefers-reduced-motion: no-preference) {
  .ink { transition: clip-path .28s steps(7, end); }
}

.d-lines tfoot .total th, .d-lines tfoot .total td { border-top: 2px solid var(--ink); border-bottom: 2px solid var(--ink); padding: .8rem .55rem; }
.d-lines tfoot th { text-align: left; font: 800 1.0625rem/1.2 var(--font-display); letter-spacing: .3em; color: var(--ink); }
#d-total { font-size: clamp(1.6rem, 1.2vw + 1.1rem, 2.05rem); font-weight: 700; color: var(--ink); }
.won { margin-left: .2rem; font-weight: 700; color: var(--ink-2); }

.d-foot { display: grid; gap: .9rem; margin-top: 1rem; }
.d-lines tfoot th { position: relative; }
.d-note { font-size: .9375rem; color: var(--ink-3); }
.d-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.2rem; }

.seal {
  position: absolute; left: 10.5rem; top: 50%;
  width: clamp(100px, 8.4vw, 124px); height: auto;
  color: var(--seal); opacity: .9; mix-blend-mode: multiply;
  transform: translateY(-50%) rotate(-9deg);
  pointer-events: none; letter-spacing: 0;
}
.seal text { fill: currentColor; font-family: var(--font-display); font-weight: 800; }
.seal-ring { font-size: 12.5px; font-weight: 700; }
.seal-big { font-size: 31px; }
.seal-mid { font-size: 17px; }
.seal.thump { animation: thump .52s var(--ease-out) both; }
@keyframes thump {
  0% { transform: translateY(-50%) rotate(-9deg) scale(1.6); opacity: 0; }
  55% { transform: translateY(-50%) rotate(-9deg) scale(.95); opacity: .95; }
  100% { transform: translateY(-50%) rotate(-9deg) scale(1); opacity: .9; }
}
@media (prefers-reduced-motion: no-preference) {
  .carbon { animation: separate 1s .15s var(--ease-out) both; }
}
@keyframes separate {
  from { transform: translate(0, 0) rotate(0deg); }
  to { transform: translate(10px, 12px) rotate(-1.1deg); }
}

/* 선택 칸 (전표 · 문의서 공용) */
.pick, .checks input, .agree input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.box {
  display: inline-grid; place-items: center; flex-shrink: 0;
  width: 24px; height: 24px; border: 1.5px solid var(--rule); border-radius: 2px;
  background: var(--paper-hi); color: var(--paper-hi) !important; cursor: pointer;
  transition: background-color .18s var(--ease-out), border-color .18s;
}
.box .ic { width: 17px; height: 17px; stroke-width: 2.6; stroke-dasharray: 24; stroke-dashoffset: 24; transition: stroke-dashoffset .22s var(--ease-out) .05s; }
.pick:checked + .box, .checks input:checked + .box, .agree input:checked + .box { background: var(--ink); border-color: var(--ink); }
.pick:checked + .box .ic, .checks input:checked + .box .ic, .agree input:checked + .box .ic { stroke-dashoffset: 0; }
.pick:focus-visible + .box, .checks input:focus-visible + .box, .agree input:focus-visible + .box { outline: 2.5px solid var(--seal); outline-offset: 2px; }

/* ── 절취선 ───────────────────────────────────────── */
.perf { position: relative; border: 0; height: 24px; margin: 0; background: linear-gradient(90deg, var(--rule-2) 0 8px, transparent 8px 14px) center / 14px 1.5px repeat-x; }
.perf::before, .perf::after { content: ""; position: absolute; top: 50%; width: 24px; height: 24px; border-radius: 50%; background: var(--desk); box-shadow: inset 0 2px 3px rgba(22, 32, 27, .22); transform: translateY(-50%); }
.perf::before { left: -12px; }
.perf::after { right: -12px; }

/* ── 섹션 ─────────────────────────────────────────── */
.sec { padding-block: clamp(3.75rem, 7vw, 6rem); }
.ptabs { margin-top: .25rem; }
.sec-head { display: grid; gap: 1rem; max-width: 46rem; margin-bottom: clamp(2rem, 4vw, 3rem); }

/* 탭 — 전표철 색인 */
.tabs { display: flex; gap: .3rem; overflow-x: auto; scrollbar-width: none; padding-top: 4px; margin-bottom: -1px; position: relative; z-index: 1; }
.tabs::-webkit-scrollbar { display: none; }
.tabs [role="tab"] {
  flex-shrink: 0; min-height: 48px; padding: .65rem 1.2rem;
  font: 600 1rem/1.2 var(--font-body); color: var(--ink-2);
  background: var(--desk); border: 1px solid var(--rule-2); border-bottom-color: var(--rule);
  border-radius: 6px 6px 0 0; cursor: pointer;
  transition: background-color .2s var(--ease-out), color .2s, transform .2s var(--ease-out);
}
.tabs [role="tab"]:hover { color: var(--ink); background: #E3ECE0; }
.tabs [role="tab"][aria-selected="true"] { color: var(--ink); background: var(--paper-hi); border-color: var(--rule); border-bottom-color: var(--paper-hi); transform: translateY(-3px); padding-bottom: calc(.65rem + 3px); margin-bottom: -3px; }
.tabsheet { background: var(--paper-hi) var(--fiber); border: 1px solid var(--rule); border-radius: 0 3px 3px 3px; padding: clamp(1.25rem, 3vw, 2.25rem); box-shadow: 0 1px 2px rgba(22, 32, 27, .1), 0 10px 16px -14px rgba(22, 32, 27, .35); }
.tabpanel[hidden] { display: none; }
@media (prefers-reduced-motion: no-preference) {
  .tabpanel:not([hidden]) { animation: slip .38s var(--ease-out); }
}
@keyframes slip { from { opacity: .4; transform: translateY(6px); } to { opacity: 1; transform: none; } }

#who .tabpanel { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: start; }
#who .tabpanel[hidden] { display: none; }
.who-text { display: grid; gap: 1rem; justify-items: start; }
.who-text h3 { font: 700 clamp(1.35rem, 1vw + 1rem, 1.65rem)/1.35 var(--font-display); letter-spacing: -0.015em; }
.who-text p { color: var(--ink-2); }

/* 장부 줄 (점선 리더) */
.ledger { display: grid; }
.ledger > div { display: flex; flex-wrap: wrap; align-items: baseline; gap: .2rem .5rem; padding-block: .85rem; border-bottom: 1px solid var(--hair); }
.ledger > div:first-child { border-top: 1.5px solid var(--rule); }
.ledger dt { order: 0; font-weight: 600; color: var(--ink); }
.ledger > div::after { content: ""; order: 1; flex: 1 1 1.5rem; min-width: 1.5rem; border-bottom: 1.5px dotted var(--rule-2); transform: translateY(-.3em); }
.ledger dd { order: 2; text-align: right; color: var(--ink-2); }
.ledger dd b { font-size: 1.1875rem; color: var(--ink); }
.ledger dd span { display: block; font-size: .875rem; color: var(--ink-3); }
.ledger > div:first-child dd b { font-size: 1.4rem; }

/* 괘선 표 */
.tablewrap { overflow-x: auto; background: var(--paper-hi) var(--fiber); border: 1px solid var(--rule); border-radius: 2px; }
.ruled { width: 100%; border-collapse: collapse; font-size: 1rem; }
.ruled caption { caption-side: top; text-align: left; padding: .9rem 1rem .6rem; font-weight: 600; color: var(--ink-2); }
.ruled th, .ruled td { padding: .85rem 1rem; text-align: left; border-bottom: 1px solid var(--hair); vertical-align: top; }
.ruled thead th { font-size: .875rem; font-weight: 600; color: var(--rule); background: var(--tint); border-bottom: 1px solid var(--rule); white-space: nowrap; }
.ruled tbody th { font-weight: 600; color: var(--ink); }
.ruled .r { text-align: right; }
.ruled tfoot .total th, .ruled tfoot .total td { border-top: 2px solid var(--ink); border-bottom: 0; font-weight: 700; color: var(--ink); }
.ruled .ours { font-weight: 700; color: var(--ink); }
.ruled .dim, .ruled .no { color: var(--ink-3); }
.ruled .lead-row td { font-weight: 600; }
.seal-ink { color: var(--seal) !important; font-weight: 700; }
.launch .ours { font-size: 1.125rem; }
.ruled tbody tr { transition: background-color .2s; }
.ruled tbody tr:hover { background: rgba(46, 106, 92, .04); }

/* 새는 시간 */
.pain-foot { display: grid; gap: 1.25rem; margin-top: 1.5rem; max-width: 52rem; }
.sum-line { font-size: 1.0625rem; line-height: 1.75; color: var(--ink-2); padding: 1rem 1.25rem; background: var(--paper-hi); border: 1px solid var(--rule-2); border-radius: 2px; }
.sum-line b { color: var(--ink); }
.contrast { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--rule); border-radius: 2px; background: var(--paper-hi); }
.contrast .side { display: grid; gap: .15rem; padding: 1rem 1.25rem; }
.contrast .side + .side { border-left: 1px solid var(--rule); }
.contrast .lab { font-size: .875rem; font-weight: 600; color: var(--rule); }
.contrast .val { font-size: clamp(1.6rem, 1.4vw + 1rem, 2.1rem); font-weight: 700; line-height: 1.3; }
.contrast .before .val { color: var(--ink-3); text-decoration: line-through; text-decoration-color: rgba(176, 38, 28, .65); text-decoration-thickness: 2px; }
.contrast .who { font-size: .9375rem; color: var(--ink-3); }

/* 작업 일지 */
.worklog { display: grid; border-top: 1.5px solid var(--rule); }
.worklog li { display: grid; grid-template-columns: 9.5rem minmax(0, 15rem) minmax(0, 1fr); gap: .4rem 1.5rem; align-items: baseline; padding: 1.15rem 0; border-bottom: 1px solid var(--hair); }
.worklog .when { font-size: .9375rem; font-weight: 700; color: var(--rule); }
.worklog h3 { font-size: 1.125rem; }
.worklog p { color: var(--ink-2); }

/* 서비스 상품 (JS 렌더) */
.legend { display: flex; flex-wrap: wrap; gap: .5rem 1.4rem; font-size: .9375rem; color: var(--ink-2); }
.legend li { display: inline-flex; align-items: center; gap: .5rem; }
.fit { display: inline-block; width: 14px; height: 14px; border-radius: 2px; flex-shrink: 0; }
.f-auto { background: var(--rule); }
.f-labor { background: var(--paper-hi); border: 2px solid var(--ink); }
.f-any { background: repeating-linear-gradient(135deg, var(--rule) 0 2px, transparent 2px 4px); border: 1px solid var(--rule); }
.pgroups { display: grid; gap: 2.75rem; }
.pgroup h3 { font: 700 clamp(1.3rem, .8vw + 1rem, 1.55rem)/1.35 var(--font-display); letter-spacing: -0.01em; display: flex; align-items: baseline; gap: .7rem; }
.pgroup h3 .cnt { font: 400 .9375rem var(--font-data); color: var(--ink-3); }
.glead { color: var(--ink-2); margin: .4rem 0 1rem; max-width: 46em; }
.plist { border: 1px solid var(--rule); border-radius: 2px; background: var(--paper-hi) var(--fiber); }
.prow { display: grid; grid-template-columns: 14px minmax(0, 1fr) 9.5rem auto; gap: .35rem 1.1rem; align-items: center; padding: 1rem 1.15rem; border-bottom: 1px solid var(--hair); }
.prow:last-child { border-bottom: 0; }
.prow .fit { align-self: start; margin-top: .45rem; }
.prow .pt { font-weight: 700; color: var(--ink); line-height: 1.45; }
.prow .pd { grid-column: 2 / 3; font-size: .9375rem; color: var(--ink-3); line-height: 1.65; }
.prow .pp { grid-column: 3; grid-row: 1 / span 2; text-align: right; font-weight: 700; font-size: 1.0625rem; color: var(--ink); }
.prow .pp small { display: block; font: 400 .8125rem var(--font-body); color: var(--ink-3); margin-top: .1rem; }
.prow .pa { grid-column: 4; grid-row: 1 / span 2; display: flex; flex-direction: column; align-items: stretch; gap: .45rem; }
.prow .pa .btn { min-height: 42px; padding: .5rem .95rem; font-size: .9375rem; }
.prow .km { display: inline-flex; align-items: center; justify-content: center; gap: .3em; min-height: 40px; padding: .45rem .9rem; font-size: .9375rem; font-weight: 600; color: var(--seal); border: 1.5px solid var(--seal); border-radius: 3px; text-decoration: none; transition: background-color .2s; }
.prow .km:hover { background: var(--seal-soft); color: var(--seal); }

/* 공동구매 */
.gb { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1fr); gap: 1px; background: var(--rule); border: 1px solid var(--rule); border-radius: 2px; }
.gb-item { background: var(--paper-hi) var(--fiber); padding: clamp(1.15rem, 2vw, 1.6rem); display: flex; flex-direction: column; gap: .7rem; }
.gb-item:first-child { grid-row: span 2; background-color: #F3F7F1; }
.gb-item h3 { font: 700 1.25rem/1.4 var(--font-display); letter-spacing: -0.01em; }
.gb-item:first-child h3 { font-size: clamp(1.4rem, 1vw + 1rem, 1.7rem); }
.gb-for { order: 2; font-size: .875rem; font-weight: 600; color: var(--rule); }
.gb-for::before { content: "대상 · "; color: var(--ink-3); font-weight: 500; }
.gb-item h3 { order: 1; }
.gb-item .ticks { order: 3; }
.ticks { display: grid; gap: .5rem; }
.ticks li { position: relative; padding-left: 1.5rem; color: var(--ink-2); line-height: 1.6; }
.ticks li::before { content: ""; position: absolute; left: .1rem; top: .45em; width: .8rem; height: .45rem; border-left: 2px solid var(--rule); border-bottom: 2px solid var(--rule); transform: rotate(-45deg); }
.gb-table tbody th { width: 15rem; font: 700 1.125rem/1.4 var(--font-display); }
.gb-table tbody th span { display: block; margin-top: .2rem; font: 500 .875rem/1.4 var(--font-body); color: var(--ink-3); }
.gb-table tbody td:nth-child(2) { width: 9rem; font-weight: 600; color: var(--rule); white-space: nowrap; }
.work { display: grid; gap: .35rem; }
.work li { position: relative; padding-left: 1.1rem; color: var(--ink-2); line-height: 1.6; }
.work li::before { content: ""; position: absolute; left: 0; top: .72em; width: .45rem; height: 1.5px; background: var(--rule); }
.hint-mob { display: none; }
.entry-line { font: 700 clamp(1.35rem, 1vw + 1rem, 1.7rem)/1.4 var(--font-display); color: var(--ink); }
.entry-line b { font-size: 1.55em; color: var(--seal); letter-spacing: -0.01em; }
.gb-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 2rem; margin-top: 1.5rem; }
.gb-foot p { color: var(--ink-2); max-width: 40em; }

/* 요금 패널 */
.panel-head { display: grid; gap: .6rem; margin-bottom: 1.4rem; max-width: 48rem; }
.panel-head h3 { font: 700 clamp(1.3rem, .8vw + 1rem, 1.55rem)/1.35 var(--font-display); }
.panel-head p { color: var(--ink-2); }
.tabpanel .tablewrap + .note, .tabpanel .tablewrap + .sum-line, .tabpanel .ledger, .tabpanel .sum-line + .actions, .tabpanel .note + .actions { margin-top: 1.25rem; }
.tabpanel .tablewrap { background-color: var(--paper); }
.plans th.plan-col { vertical-align: bottom; padding-top: 1.1rem; }
.plan-name { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem; font: 600 1rem var(--font-body); color: var(--ink); }
.plan-price { display: block; margin-top: .35rem; font-size: 2.1rem; font-weight: 700; line-height: 1.1; color: var(--ink); }
.plan-price small { font: 500 .875rem var(--font-body); color: var(--ink-3); margin-left: .25rem; }
.plans th.picked, .plans td:nth-child(3) { background: rgba(46, 106, 92, .06); }
.plans thead th.picked { border-top: 3px solid var(--ink); }
.plans tbody th { font-size: .9375rem; width: 22%; }
.plans tbody td { font-size: .9375rem; color: var(--ink-2); }
.plans .yes { color: var(--ok); }
.plans .yes .ic { width: 1.35em; height: 1.35em; stroke-width: 2.4; }
.plans tfoot td { padding-top: 1rem; padding-bottom: 1.1rem; border-bottom: 0; }
.plans tfoot .link-out { margin-top: .6rem; font-size: .9375rem; }
.tagstamp { font-style: normal; font-size: .8125rem; font-weight: 700; color: var(--seal); border: 1.5px solid var(--seal); border-radius: 3px; padding: .05rem .45rem; transform: rotate(-4deg); display: inline-block; background: var(--seal-soft); }
.addons { margin-top: 1.25rem; max-width: 40rem; }

/* 결재란 (도입 과정) */
.approval { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border: 1px solid var(--rule); border-radius: 2px; background: var(--paper-hi) var(--fiber); counter-reset: ap; margin-bottom: 2rem; }
.approval li { display: grid; grid-template-rows: auto auto 1fr; counter-increment: ap; }
.approval li + li { border-left: 1px solid var(--rule); }
.ap-step { padding: .7rem .8rem; font-weight: 700; color: var(--ink); background: var(--tint); border-bottom: 1px solid var(--rule); text-align: center; line-height: 1.35; }
.ap-step::before { content: counter(ap) " "; font: 700 .875rem var(--font-data); color: var(--rule); margin-right: .2rem; }
.ap-time { position: relative; display: grid; place-items: center; min-height: 5.25rem; font: 700 1.3rem/1.2 var(--font-display); color: var(--ink); border-bottom: 1px solid var(--hair); }
.ap-body { padding: .9rem .9rem 1.1rem; font-size: .9375rem; color: var(--ink-2); line-height: 1.65; }
.ap-stamped .ap-time { color: var(--seal); }
.ap-stamped .ap-time::after {
  content: "확인"; position: absolute; right: .7rem; top: .55rem;
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  border: 2px solid var(--seal); color: var(--seal); font: 800 .8125rem var(--font-display);
  transform: rotate(-14deg); opacity: .85; mix-blend-mode: multiply;
}
.growth caption span, .growth thead th span { font: 400 .8125rem var(--font-data); color: var(--ink-3); margin-left: .35rem; }
.growth thead th { white-space: normal; color: var(--ink); font-size: .9688rem; }
.growth td { color: var(--ink-2); font-size: .9375rem; }

/* 회사 */
.about-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: start; }
.history { background: var(--paper-hi) var(--fiber); border: 1px solid var(--rule); }
.history th { width: 5.5rem; font: 700 .9375rem var(--font-data); color: var(--rule); background: var(--tint); border-right: 1px solid var(--hair); white-space: nowrap; }
.history td { color: var(--ink); }
.brands { display: grid; gap: 1.1rem; }
.brands h3 { font: 700 1.3rem/1.35 var(--font-display); }
.brands dl { display: grid; border-top: 1.5px solid var(--rule); }
.brands dl > div { display: grid; grid-template-columns: 8.5rem 1fr; gap: 1rem; padding: .85rem 0; border-bottom: 1px solid var(--hair); }
.brands dt { font-weight: 700; color: var(--rule); font-size: .9688rem; }
.brands dd { color: var(--ink); }

/* 특약사항 */
.clauses { display: grid; grid-template-columns: 1fr 1fr; column-gap: clamp(1.5rem, 4vw, 3.5rem); border-top: 1.5px solid var(--rule); }
.clauses > div { padding: 1.1rem 0 1.1rem 1.6rem; border-bottom: 1px solid var(--hair); position: relative; }
.clauses > div::before { content: ""; position: absolute; left: 0; top: 1.5rem; width: .7rem; height: .7rem; border: 1.5px solid var(--rule); border-radius: 1px; }
.clauses dt { font-weight: 700; color: var(--ink); margin-bottom: .3rem; }
.clauses dd { color: var(--ink-2); font-size: 1rem; }

/* FAQ */
.faqs { max-width: 52rem; border-top: 1.5px solid var(--rule); }
.faqs details { border-bottom: 1px solid var(--hair); }
.faqs summary { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.1rem 0; font-weight: 700; font-size: 1.0625rem; color: var(--ink); cursor: pointer; list-style: none; }
.faqs summary::-webkit-details-marker { display: none; }
.faqs summary .ic { color: var(--rule); transition: transform .25s var(--ease-out); }
.faqs details[open] summary .ic { transform: rotate(180deg); }
.faqs summary:hover { color: var(--rule); }
.faqs details p { padding: 0 0 1.25rem; color: var(--ink-2); max-width: 46em; }

/* 소식 */
.feed-list { display: grid; border-top: 1.5px solid var(--rule); max-width: 56rem; }
.post { display: grid; grid-template-columns: 9rem minmax(0, 1fr); gap: .5rem 1.5rem; padding: 1.25rem 0; border-bottom: 1px solid var(--hair); }
.post .meta { display: grid; gap: .2rem; align-content: start; }
.post .kind { font-size: .875rem; font-weight: 700; color: var(--rule); }
.post .date { font: 400 .875rem var(--font-data); color: var(--ink-3); }
.post h3 { font-size: 1.125rem; margin-bottom: .35rem; }
.post p { color: var(--ink-2); }
.post .stat { display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; margin-top: .6rem; font-size: .9375rem; color: var(--ink-3); }
.post .stat b { font-family: var(--font-data); color: var(--ink); }

/* 문의서 */
.formwrap { display: grid; grid-template-columns: minmax(0, 1fr) 20rem; gap: clamp(1.5rem, 3vw, 2.5rem); align-items: start; }
.form { display: grid; gap: 1.1rem; }
.sheet-form { background: var(--paper-hi) var(--fiber); border: 1px solid var(--rule); border-radius: 2px; padding: clamp(1.25rem, 3vw, 2.25rem); box-shadow: 0 1px 2px rgba(22, 32, 27, .1), 0 10px 16px -14px rgba(22, 32, 27, .35); }
.form-title { font: 800 1.35rem/1.2 var(--font-display); letter-spacing: .4em; padding-left: .4em; color: var(--rule); text-align: center; padding-bottom: .9rem; border-bottom: 2px solid var(--rule); margin-bottom: .3rem; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem 1.1rem; }
.form label { display: grid; gap: .4rem; font-size: .9375rem; font-weight: 600; color: var(--ink-2); }
.form .req { font-size: .75rem; font-weight: 700; color: var(--seal); margin-left: .25rem; }
.form input:not([type="checkbox"]), .form select, .form textarea {
  width: 100%; min-height: 50px; padding: .7rem .85rem;
  font: 400 1.0625rem/1.4 var(--font-body); color: var(--ink);
  background: #FCFDFB; border: 1px solid var(--rule-2); border-radius: 2px;
  transition: border-color .18s, box-shadow .18s;
}
.form input.num { font-family: var(--font-data); }
.form textarea { min-height: 8.5rem; resize: vertical; line-height: 1.65; }
.form select { appearance: none; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232E6A5C' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='m6.5 9.5 5.5 5.5 5.5-5.5'/></svg>"); background-repeat: no-repeat; background-position: right .7rem center; background-size: 1.2rem; padding-right: 2.4rem; }
.form input::placeholder, .form textarea::placeholder { color: #5A6962; opacity: 1; }
.form input:hover, .form select:hover, .form textarea:hover { border-color: var(--rule); }
.form input:focus, .form select:focus, .form textarea:focus { outline: none; border-color: var(--rule); box-shadow: 0 0 0 3px rgba(46, 106, 92, .18); }
.checks { border: 1px solid var(--hair); border-radius: 2px; padding: .9rem 1rem 1rem; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: .65rem 1rem; }
.checks legend { padding: 0 .35rem; font-size: .9375rem; font-weight: 600; color: var(--ink-2); }
.checks label, .agree { display: flex !important; align-items: flex-start; gap: .65rem; font-weight: 500; color: var(--ink); cursor: pointer; line-height: 1.5; position: relative; }
.checks label .box, .agree .box { margin-top: .05rem; }
.agree { font-size: .9375rem; color: var(--ink-2); }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.2rem; }
.form-msg { font-size: 1rem; line-height: 1.7; }
.form-msg:empty { display: none; }
.form-msg.ok { padding: 1rem 1.15rem; background: rgba(30, 106, 78, .08); border: 1px solid rgba(30, 106, 78, .4); border-radius: 2px; color: var(--ink); }
.form-msg.err { padding: 1rem 1.15rem; background: var(--seal-soft); border: 1px solid rgba(176, 38, 28, .45); border-radius: 2px; color: #7E1A13; }
.form-msg .no { display: block; margin: .5rem 0; font: 700 1.5rem var(--font-data); color: var(--ink); letter-spacing: .02em; }

.direct { display: grid; gap: 1rem; position: sticky; top: 92px; }
.direct-title { font: 700 1.2rem var(--font-display); color: var(--ink); padding-bottom: .6rem; border-bottom: 1.5px solid var(--rule); }
.contact { display: grid; }
.contact > div { display: grid; grid-template-columns: 4.5rem 1fr; gap: .5rem; padding: .55rem 0; border-bottom: 1px solid var(--hair); font-size: .9688rem; }
.contact dt { color: var(--rule); font-weight: 600; }
.contact dd { color: var(--ink); overflow-wrap: anywhere; }
.kmong-card { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: .1rem .8rem; padding: 1rem 1.1rem; border: 1.5px solid var(--seal); border-radius: 3px; color: var(--seal); text-decoration: none; background: var(--paper-hi); transition: background-color .2s var(--ease-out), transform .2s var(--ease-out); }
.kmong-card:hover { background: var(--seal-soft); color: var(--seal); transform: translateY(-1px); }
.kc-top { font-weight: 700; font-size: 1.0625rem; }
.kc-body { grid-row: 2; font-size: .9375rem; color: var(--ink-2); }
.kmong-card .ic { grid-row: 1 / span 2; grid-column: 2; width: 1.4em; height: 1.4em; }

/* 문의 조회 */
.lookup { max-width: 42rem; }
.lookup-result:empty { display: none; }
.lookup-result { display: grid; gap: .9rem; padding: 1.1rem 1.25rem; background: var(--paper-hi); border: 1px solid var(--rule-2); border-radius: 2px; }
.lookup-result .status { display: inline-flex; align-items: center; gap: .45rem; font-weight: 700; color: var(--ink); }
.lookup-result .status i { width: .6rem; height: .6rem; border-radius: 50%; background: var(--ok); }
.thread { display: grid; gap: .7rem; }
.thread .mine { padding: .8rem 1rem; background: var(--paper); border: 1px solid var(--hair); border-radius: 2px; color: var(--ink-2); }
.thread .reply { padding: .8rem 1rem; background: rgba(30, 106, 78, .07); border: 1px solid rgba(30, 106, 78, .3); border-radius: 2px; color: var(--ink); }
.thread .reply .date { display: block; font: 400 .8125rem var(--font-data); color: var(--ink-3); margin-bottom: .25rem; }

/* 바닥 */
.foot { background: var(--ink); color: #D3DED7; padding-block: 3rem 3.5rem; }
.foot .wrap { display: grid; gap: .7rem; }
.foot a { color: #E6EFE9; }
.foot a:hover { color: #FFFFFF; }
.foot b { color: #FFFFFF; }
.foot .small { color: #B6C4BC; max-width: 60em; }

/* ── 반응형 ───────────────────────────────────────── */
@media (max-width: 1120px) {
  .menu { gap: 1rem; }
  .menu a:not(.btn) { font-size: .9375rem; }
}
@media (max-width: 1040px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-copy { max-width: 40rem; }
  .gb { grid-template-columns: 1fr 1fr; }
  .gb-item:first-child { grid-row: auto; grid-column: 1 / -1; }
  .approval { grid-template-columns: 1fr; }
  .approval li { grid-template-columns: 11rem 7.5rem 1fr; grid-template-rows: auto; }
  .approval li + li { border-left: 0; border-top: 1px solid var(--rule); }
  .ap-step { display: flex; align-items: center; justify-content: flex-start; text-align: left; border-bottom: 0; border-right: 1px solid var(--rule); }
  .ap-time { min-height: 0; padding: .8rem; border-bottom: 0; border-right: 1px solid var(--hair); font-size: 1.15rem; }
  .ap-stamped .ap-time::after { width: 38px; height: 38px; right: .2rem; top: .2rem; font-size: .75rem; }
  .formwrap { grid-template-columns: 1fr; }
  .direct { position: static; }
  .about-grid { grid-template-columns: 1fr; }
}
@media (max-width: 920px) {
  .menu-toggle { display: inline-flex; }
  .menu {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--desk) var(--grain); border-bottom: 1px solid var(--rule); padding: .5rem var(--gutter) 1.1rem;
    box-shadow: 0 10px 14px -12px rgba(22, 32, 27, .4);
  }
  .menu.open { display: flex; }
  .menu a:not(.btn) { padding: .85rem 0; border-bottom: 1px solid var(--hair); font-size: 1.0625rem; }
  .menu .btn { margin-top: .9rem; }
  #who .tabpanel { grid-template-columns: 1fr; }
  .worklog li { grid-template-columns: 8rem minmax(0, 1fr); }
  .worklog li p { grid-column: 2; }
  .prow { grid-template-columns: 14px minmax(0, 1fr) auto; }
  .prow .pp { grid-column: 3; grid-row: 1; }
  .prow .pd { grid-column: 2 / -1; }
  .prow .pa { grid-column: 2 / -1; grid-row: auto; flex-direction: row; flex-wrap: wrap; }
  .clauses { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  body { font-size: 1.0313rem; }
  .d-parties { grid-template-columns: 1fr; }
  .party + .party { border-left: 0; border-top: 1px solid var(--rule); }
  .d-lines .c-spec { display: none; }
  .spec-inline { display: block; font-size: .875rem; color: var(--ink-3); font-weight: 500; }
  .c-amt { width: 6.3rem; }
  .d-foot { padding-right: 0; }
  .seal { left: auto; right: .15rem; width: 70px; opacity: .82; }
  .d-lines tfoot th { letter-spacing: .12em; }
  .hint-desk { display: none; }
  .hint-mob { display: inline; }
  /* 비교표는 모바일에서 전표 줄처럼 세로로 쌓는다 */
  .ruled.stack thead { display: none; }
  .ruled.stack, .ruled.stack tbody, .ruled.stack tfoot { display: block; width: 100%; }
  .ruled.stack tr { display: grid; grid-template-columns: 1fr 1fr; gap: .45rem 1rem; padding: .95rem 1rem; border-bottom: 1px solid var(--hair); }
  .ruled.stack th, .ruled.stack td { display: block; padding: 0; border: 0 !important; text-align: left !important; }
  .ruled.stack tr > :first-child { grid-column: 1 / -1; font-weight: 700; color: var(--ink); }
  .ruled.stack td::before { content: attr(data-label); display: block; font: 600 .8125rem/1.4 var(--font-body); color: var(--rule); margin-bottom: .1rem; }
  .ruled.stack tr > :first-child::before { content: none; }
  .ruled.stack td[colspan] { grid-column: 1 / -1; }
  .ruled.stack tfoot tr { border-top: 2px solid var(--ink); border-bottom: 0; }
  .ruled.stack .c-wide { grid-column: 1 / -1; }
  .gb-table tbody th, .gb-table tbody td:nth-child(2) { width: auto; }
  .d-head { padding-right: 0; }
  .gb { grid-template-columns: 1fr; }
  .contrast { grid-template-columns: 1fr; }
  .contrast .side + .side { border-left: 0; border-top: 1px solid var(--rule); }
  .approval li { grid-template-columns: 1fr; }
  .ap-step { border-right: 0; border-bottom: 1px solid var(--hair); }
  .ap-time { justify-items: start; padding: .7rem .9rem 0; border-right: 0; }
  .ap-stamped .ap-time::after { top: .4rem; right: .8rem; }
  .grid2, .checks { grid-template-columns: 1fr; }
  .brands dl > div { grid-template-columns: 1fr; gap: .2rem; }
  .post { grid-template-columns: 1fr; }
  .post .meta { grid-auto-flow: column; justify-content: start; gap: .8rem; }
  .worklog li { grid-template-columns: 1fr; gap: .25rem; }
  .worklog li p { grid-column: auto; }
  .prow { padding: .95rem 1rem; }
  .brand-sub { display: none; }
}
@media (max-width: 420px) {
  .d-title { letter-spacing: .3em; padding-left: .3em; }
  .party { grid-template-columns: 1.7rem 1fr; }
  .cells > div { grid-template-columns: 3rem 1fr; }
  .d-lines td { padding-inline: .4rem; }
  .c-amt { width: 5.6rem; }
  .ink { font-size: 1rem; }
  .actions .btn { flex: 1 1 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

@media print {
  .top, .menu-toggle, .perf, .hero .actions, .form-actions, .kmong-card { display: none !important; }
  body, .hero { background: #fff; }
}
