/* 팔림 — 택배 운송장 라벨에서 온 시각 체계: 감열지 흰 바탕, 검은 감열 잉크, 칸을 나누는 굵은 괘선.
   빨강은 「언제·얼마가 결제되는지」 한 가지 뜻에만 쓴다. */
:root {
  --paper: #ffffff;
  --ground: #eef0ec;
  --ink: #121412;
  --ink-2: #464a45;
  --ink-3: #5c6059;
  --rule: #121412;
  --hair: #c8cbc4;
  --tint: #f5f6f3;
  --charge: #b81d17;
  --charge-tint: #fbeeed;
  --ok: #1f6b3a;
  --ok-tint: #e9f3ec;
  --focus: #1d4ed8;

  --display: "Black Han Sans", "Gothic A1", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  --text: "Gothic A1", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;

  --r-label: 10px;
  --line: 2px;
  --gutter: 16px;
  --measure: 68ch;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--text);
  font-size: 16px;
  line-height: 1.65;
  word-break: keep-all;
  overflow-wrap: break-word;
  font-variant-numeric: tabular-nums;
}
::selection { background: var(--ink); color: var(--paper); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3 { margin: 0; line-height: 1.25; text-wrap: balance; }
h1, h2 { font-family: var(--display); font-weight: 400; letter-spacing: -0.01em; }
p { margin: 0; }
p + p { margin-top: 0.75em; }
.wrap { width: 100%; max-width: calc(1120px + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: var(--gutter); top: 8px; background: var(--paper); padding: 8px 12px; z-index: 10; }

/* 머리띠 */
.top { background: var(--paper); border-bottom: var(--line) solid var(--rule); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 60px; }
.brand { font-family: var(--display); font-size: 1.6rem; line-height: 1; text-decoration: none; letter-spacing: -0.02em; }
.nav { display: flex; align-items: center; gap: 4px 18px; flex-wrap: wrap; justify-content: flex-end; font-size: 0.95rem; }
.nav a { text-decoration: none; padding: 6px 0; }
.nav a:hover { text-decoration: underline; }
.nav .nav-cta { border: var(--line) solid var(--rule); padding: 5px 12px; border-radius: 6px; font-weight: 700; }
.nav .nav-cta:hover { background: var(--ink); color: var(--paper); text-decoration: none; }

/* 버튼 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px;
  font: 700 1rem/1 var(--text);
  border: var(--line) solid var(--rule); border-radius: 8px;
  background: var(--ink); color: var(--paper);
  text-decoration: none; cursor: pointer;
  transition: background-color 160ms var(--ease-out), color 160ms var(--ease-out), transform 160ms var(--ease-out);
}
.btn:hover { background: #2d312c; }
.btn:active { transform: translateY(1px); }
.btn[disabled], .btn[aria-busy="true"] { opacity: 0.55; cursor: progress; }
.btn-quiet { background: var(--paper); color: var(--ink); }
.btn-quiet:hover { background: var(--tint); }
.btn-danger { background: var(--charge); border-color: var(--charge); }
.btn-danger:hover { background: #961712; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* 라벨 — 운송장 한 장 */
.label {
  background: var(--paper);
  border: var(--line) solid var(--rule);
  border-radius: var(--r-label);
  overflow: hidden;
}
.label-head { padding: 14px 18px; border-bottom: var(--line) solid var(--rule); display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.label-body { padding: 18px; }
.cut { border: 0; border-top: 2px dashed var(--hair); margin: 0; }
.fields { display: grid; grid-template-columns: 1fr 1fr; }
.field { padding: 12px 18px; border-top: 1px solid var(--hair); }
.field:nth-child(odd) { border-right: 1px solid var(--hair); }
.field dt { font-size: 0.8rem; color: var(--ink-3); }
.field dd { margin: 2px 0 0; font-weight: 700; }

/* 바코드: 라벨의 끝을 알리는 장식(읽히지 않음). SVG 자산이라 색은 currentColor */
.barcode { display: block; width: auto; height: 34px; color: var(--ink); }

/* 소개 첫 화면 */
.hero { padding: 56px 0 64px; }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 470px); gap: 48px; align-items: center; }
.hero h1 { font-size: clamp(2.2rem, 4.6vw, 3.6rem); }
.hero .lede { margin-top: 18px; font-size: 1.12rem; color: var(--ink-2); max-width: 34em; }
.hero .btn-row { margin-top: 28px; }
.hero .fineprint { margin-top: 14px; font-size: 0.9rem; color: var(--ink-2); }

.demo .label-head { align-items: center; }
.demo-kw { font-family: var(--display); font-size: 1.7rem; line-height: 1.1; }
.demo-tag { font-size: 0.78rem; border: 1px solid var(--ink); border-radius: 4px; padding: 2px 6px; white-space: nowrap; }
.demo table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.demo th, .demo td { padding: 10px 12px; text-align: right; border-top: 1px solid var(--hair); }
.demo th:first-child, .demo td:first-child { text-align: left; padding-left: 18px; }
.demo th:last-child, .demo td:last-child { padding-right: 18px; }
.demo thead th { font-size: 0.78rem; font-weight: 600; color: var(--ink-3); border-top: 0; }
.demo td:first-child { max-width: 11em; }
.demo .sum { display: flex; justify-content: space-between; gap: 12px; padding: 12px 18px; border-top: var(--line) solid var(--rule); font-weight: 700; }
.demo .barcode { margin: 0 18px 14px; width: calc(100% - 36px); }
.demo .demo-note { padding: 12px 18px 12px; font-size: 0.78rem; color: var(--ink-3); }

@media (prefers-reduced-motion: no-preference) {
  .demo { animation: feed 900ms var(--ease-out) both; }
  @keyframes feed {
    from { clip-path: inset(0 0 55% 0 round var(--r-label)); transform: translateY(-14px); }
    to { clip-path: inset(0 0 0 0 round var(--r-label)); transform: none; }
  }
}

/* 본문 구획 */
.band { padding: 64px 0; border-top: var(--line) solid var(--rule); background: var(--paper); }
.band.alt { background: var(--ground); }
.band h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); }
.band .intro { margin-top: 12px; color: var(--ink-2); max-width: 40em; }
.band .section-body { margin-top: 32px; }

/* 기능 목록: 운송장 칸처럼 괘선으로 나눈 행 */
.rows { border: var(--line) solid var(--rule); border-radius: var(--r-label); background: var(--paper); overflow: hidden; }
.row { display: grid; grid-template-columns: minmax(0, 15rem) minmax(0, 1fr); }
.row + .row { border-top: 1px solid var(--hair); }
.row > * { padding: 18px 20px; }
.row h3 { font-size: 1.05rem; border-right: 1px solid var(--hair); }
.row .where { display: block; font-weight: 400; font-size: 0.85rem; color: var(--ink-3); margin-top: 4px; }
.row ul { margin: 0; padding-left: 1.1em; }
.row li + li { margin-top: 4px; }

/* 요금표 */
.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.plan .label-head h3 { font-size: 1.15rem; }
.plan .price { padding: 18px; }
.plan .price strong { display: block; font-family: var(--display); font-weight: 400; font-size: 2rem; line-height: 1.1; }
.plan .price span { display: block; margin-top: 4px; font-size: 0.9rem; color: var(--ink-2); }
.plan .charge { padding: 10px 18px; border-top: 1px solid var(--hair); background: var(--charge-tint); color: var(--charge); font-weight: 700; font-size: 0.92rem; }
.plan dl { margin: 0; }
.plan .field { grid-column: span 2; border-right: 0; display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.plan .field dt { font-size: 0.88rem; color: var(--ink-2); }
.plan .field dd { margin: 0; }
.plan.featured { box-shadow: 0 10px 24px -14px rgba(18, 20, 18, 0.45); }
.plan.featured .label-head { background: var(--ink); color: var(--paper); }
.plans-note { margin-top: 20px; color: var(--ink-2); font-size: 0.95rem; }

.trial-copy { margin-top: 28px; padding: 18px 20px; border: var(--line) solid var(--rule); border-radius: var(--r-label); background: var(--paper); font-weight: 600; max-width: 46em; }
.trial-copy p + p { font-weight: 400; color: var(--ink-2); }

.data-list { margin: 0; padding: 0; list-style: none; border: var(--line) solid var(--rule); border-radius: var(--r-label); background: var(--paper); overflow: hidden; }
.data-list li { padding: 16px 20px; }
.data-list li + li { border-top: 1px solid var(--hair); }

.close-cta .btn-row { margin-top: 24px; }

/* 바닥: 사업자 정보는 한 줄에 하나 */
.foot { border-top: var(--line) solid var(--rule); background: var(--paper); padding: 36px 0 48px; font-size: 0.88rem; color: var(--ink-2); }
.foot .wrap { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; }
.foot .biz { margin: 0; padding: 0; list-style: none; }
.foot .biz li + li { margin-top: 2px; }
.foot .links { display: flex; flex-direction: column; gap: 6px; text-align: right; }
.foot .links a { color: var(--ink); }
.foot .links .strong { font-weight: 800; }

/* 작업 화면(가입·카드·계정) */
.task { padding: 48px 0 72px; }
.task .wrap { max-width: calc(560px + 2 * var(--gutter)); }
.task h1 { font-size: clamp(1.8rem, 5vw, 2.4rem); }
.task .sub { margin-top: 10px; color: var(--ink-2); }
.task .label { margin-top: 28px; }

.tabs { display: grid; grid-template-columns: 1fr 1fr; border-bottom: var(--line) solid var(--rule); }
.tabs button {
  font: 700 1rem/1 var(--text); color: var(--ink-3);
  background: var(--tint); border: 0; min-height: 52px; cursor: pointer;
}
.tabs button + button { border-left: var(--line) solid var(--rule); }
.tabs button[aria-pressed="true"] { background: var(--paper); color: var(--ink); }

.form { display: grid; gap: 18px; }
.form label { display: grid; gap: 6px; font-weight: 700; font-size: 0.95rem; }
.form .hint { font-weight: 400; font-size: 0.85rem; color: var(--ink-3); }
.form input[type="email"], .form input[type="password"] {
  font: 400 1rem/1.4 var(--text); color: var(--ink);
  min-height: 48px; padding: 10px 12px;
  border: var(--line) solid var(--rule); border-radius: 6px; background: var(--paper);
  width: 100%;
}
.form input::placeholder { color: var(--ink-3); }
.form input[aria-invalid="true"] { border-color: var(--charge); }
.form .btn { width: 100%; }
.form-foot { font-size: 0.88rem; color: var(--ink-2); }

.msg { padding: 12px 14px; border-radius: 6px; font-size: 0.95rem; }
.msg[hidden] { display: none; }
.msg-error { background: var(--charge-tint); color: var(--charge); border: 1px solid #e6b3b0; }
.msg-ok { background: var(--ok-tint); color: var(--ok); border: 1px solid #b7d6c1; }
.msg-info { background: var(--tint); color: var(--ink); border: 1px solid var(--hair); }
.msg .btn { margin-top: 12px; }
.msg a { font-weight: 700; }

/* 요금제 선택 */
.choices { display: grid; gap: 0; border: var(--line) solid var(--rule); border-radius: var(--r-label); overflow: hidden; background: var(--paper); }
.choice { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 4px 14px; align-items: center; padding: 16px 18px; cursor: pointer; }
.choice + .choice { border-top: 1px solid var(--hair); }
.choice input { width: 20px; height: 20px; margin: 0; accent-color: var(--ink); grid-row: span 2; }
.choice .name { font-weight: 800; }
.choice .lim { grid-column: 2; font-size: 0.85rem; color: var(--ink-3); }
.choice .amt { grid-row: 1 / span 2; grid-column: 3; text-align: right; font-weight: 700; }
.choice .amt small { display: block; font-weight: 400; font-size: 0.8rem; color: var(--ink-3); }
.choice:has(input:checked) { background: var(--tint); }

.charge-line { margin-top: 18px; padding: 14px 16px; border: var(--line) solid var(--charge); border-radius: 8px; color: var(--charge); font-weight: 700; }
.charge-line span { display: block; font-weight: 400; color: var(--ink-2); font-size: 0.9rem; margin-top: 2px; }
.steps { margin: 18px 0 0; padding-left: 1.2em; color: var(--ink-2); font-size: 0.95rem; }
.steps li + li { margin-top: 4px; }

/* 계정 */
.acct .fields { grid-template-columns: 1fr; }
.acct .field { border-right: 0 !important; display: grid; grid-template-columns: 8.5rem minmax(0, 1fr); gap: 12px; align-items: baseline; }
.acct .field dt { font-size: 0.88rem; }
.acct .field dd { margin: 0; }
.acct .field dd .charge-text { color: var(--charge); }
.acct .label-head h2 { font-size: 1.35rem; }
.status-pill { font-size: 0.85rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; border: 1px solid currentColor; white-space: nowrap; }
.status-pill.is-ok { color: var(--ok); }
.status-pill.is-warn { color: var(--charge); }
.status-pill.is-off { color: var(--ink-3); }
.usage { margin: 0; padding: 0; list-style: none; }
.usage li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 18px; border-top: 1px solid var(--hair); font-size: 0.95rem; }
.usage li span:last-child { font-weight: 700; }
.confirm { margin-top: 16px; padding: 16px; border: var(--line) solid var(--rule); border-radius: 8px; background: var(--tint); }
.confirm p { margin-bottom: 14px; }
.section-gap { margin-top: 28px; }
.loading { padding: 18px; color: var(--ink-3); }
.ext-box p + .btn-row { margin-top: 12px; }

/* 법적 문서(읽기) */
.doc { padding: 48px 0 80px; }
.doc .wrap { max-width: calc(780px + 2 * var(--gutter)); }
.doc h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); }
.doc .meta { margin-top: 10px; color: var(--ink-2); }
.doc .paper { margin-top: 28px; background: var(--paper); border: var(--line) solid var(--rule); border-radius: var(--r-label); padding: 28px clamp(18px, 4vw, 40px) 36px; }
.doc .toc { margin: 0 0 8px; padding: 0 0 20px 1.3em; border-bottom: 2px dashed var(--hair); }
.doc .toc li + li { margin-top: 2px; }
.doc h2 { font-family: var(--text); font-weight: 800; font-size: 1.3rem; margin-top: 36px; scroll-margin-top: 16px; }
.doc h3 { font-size: 1rem; font-weight: 800; margin-top: 20px; }
.doc p, .doc li { max-width: var(--measure); }
.doc h2 + p, .doc h2 + ul, .doc h2 + ol, .doc h3 + p, .doc h3 + ul { margin-top: 10px; }
.doc ul, .doc ol { padding-left: 1.3em; margin: 10px 0 0; }
.doc li + li { margin-top: 6px; }
.doc p + ul, .doc ul + p, .doc table + p, .doc p + table { margin-top: 12px; }
.doc .quote { margin: 12px 0 0; font-weight: 700; }
.doc .quote::before { content: "「"; }
.doc .quote::after { content: "」"; }
.doc .table-wrap { overflow-x: auto; margin-top: 12px; }
.doc table { width: 100%; border-collapse: collapse; font-size: 0.93rem; min-width: 32rem; }
.doc th, .doc td { border: 1px solid var(--hair); padding: 10px 12px; text-align: left; vertical-align: top; }
.doc thead th { background: var(--tint); font-weight: 800; }

@media (max-width: 900px) {
  .hero { padding: 36px 0 48px; }
  .hero .wrap { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .plans { grid-template-columns: minmax(0, 1fr); }
  .row { grid-template-columns: minmax(0, 1fr); }
  .row h3 { border-right: 0; padding-bottom: 0; }
  .foot .wrap { grid-template-columns: minmax(0, 1fr); }
  .foot .links { text-align: left; }
}
@media (max-width: 520px) {
  .band { padding: 48px 0; }
  .nav { gap: 2px 12px; font-size: 0.9rem; }
  .nav .hide-sm { display: none; }
  .demo th:nth-child(3), .demo td:nth-child(3) { display: none; }
  .acct .field { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .btn-row .btn { flex: 1 1 100%; }
}

/* 조각 */
.plan-pick { padding: 0; margin-inline: 0; min-width: 0; }
.h-plain { font-family: var(--text); font-weight: 800; font-size: 1.05rem; }
.h-sub { font-size: 1.35rem; }
.choices-flat { border: 0; border-radius: 0; }
.flush-top { padding-top: 0; }
[data-ruled] { border-top: 1px solid var(--hair); }
#card-done-lines p + p { margin-top: 6px; }
.charge-text { color: var(--charge); font-weight: 700; }
figure.label { margin: 0; }
dl.fields { margin: 0; }
.fields > .field:first-child { border-top: 0; }
.plan .fields > .field:first-child { border-top: 1px solid var(--hair); }
.field dd .line { display: block; }
