/* ══════════════════════════════════════════════════════════════════════════
   구포몰 공통 프리미티브 — 구매자몰·상인센터·운영센터·정산이 모두 쓴다.
   화면별 조합은 shop.css / seller.css 로 간다.
   ══════════════════════════════════════════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--stick-h) + var(--quicknav-h) + var(--space-3));
}

/* 세로 flex 로 두고 본문만 늘린다. 이렇게 하지 않으면 내용이 짧은 화면
   (빈 장바구니·주문 없음·오류)에서 푸터가 화면 한가운데에 뜨고 그 아래로
   회색 바탕이 수백 px 씩 남아, 화면이 덜 그려진 것처럼 보인다.
   자리 잡은 요소(고정 CTA·하단 네비·토스트)는 흐름 밖이라 영향받지 않는다. */
body {
  display: flex; flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  background: var(--bg-page);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: var(--fs-14);
  line-height: 1.6;
  letter-spacing: -0.012em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5 {
  margin: 0;
  line-height: 1.3;
  letter-spacing: var(--tracking-tight);
  text-wrap: balance;
  font-weight: 700;
}
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; }
table { border-collapse: collapse; width: 100%; }
hr { border: 0; border-top: 1px solid var(--line); margin: var(--space-6) 0; }

/* 금액·수량은 자릿수가 흔들리면 읽기 어렵다. 항상 고정폭 숫자를 쓴다. */
.num, td.num, th.num,
.price__now, .price__rate, .price__before, .price__deal,
.stat b, .money, .count {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}
.mono { font-variant-numeric: tabular-nums; letter-spacing: 0; }

/* ── 접근성 ───────────────────────────────────────────────────────────── */

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.sr-only:focus { position: static; width: auto; height: auto; clip: auto; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--bg-chrome); color: var(--text-on-chrome);
  padding: var(--space-3) var(--space-5);
  border-radius: 0 0 var(--r-md) 0;
  font-weight: 600;
}
.skip-link:focus { left: 0; }

:focus-visible {
  outline: 2px solid var(--line-focus);
  outline-offset: 2px;
  border-radius: var(--r-xs);
}

/* ── 레이아웃 도구 ────────────────────────────────────────────────────── */

.wrap {
  max-width: var(--page-max); margin-inline: auto;
  padding-inline: var(--page-pad); width: 100%;
}
/* 짧은 화면에서 푸터를 바닥으로 밀어 주는 쪽은 본문이다 (body 의 세로 flex).
   basis 를 auto 로 둬야 내용이 길 때는 제 높이를 그대로 쓴다. */
.app-main, .sel-main { flex: 1 0 auto; }
.stack > * + * { margin-top: var(--space-4); }
.row { display: flex; align-items: center; gap: var(--space-3); }
.row--between { justify-content: space-between; }
.row--wrap { flex-wrap: wrap; }
.spacer { flex: 1; }

/* 가로 스크롤 진열대. 스크롤바를 숨기되 키보드 접근은 남긴다. */
.rail {
  display: flex; gap: var(--space-3);
  overflow-x: auto; overscroll-behavior-inline: contain;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
  padding-bottom: var(--space-1);
}
.rail::-webkit-scrollbar { display: none; }
.rail > * { scroll-snap-align: start; flex: none; }

/* ── 제목 ─────────────────────────────────────────────────────────────── */

.h-page { font-size: var(--fs-24); letter-spacing: var(--tracking-tight); }
.h-sect { font-size: var(--fs-20); letter-spacing: var(--tracking-tight); }
.h-sub  { font-size: var(--fs-15); font-weight: 600; }

.eyebrow {
  font-size: var(--fs-12); font-weight: 700;
  letter-spacing: var(--tracking-wide);
  color: var(--text-muted);
}
.lead { color: var(--text-secondary); font-size: var(--fs-15); line-height: 1.75; }
.muted { color: var(--text-muted); }
.small { font-size: var(--fs-12); }

/* ── 버튼 ─────────────────────────────────────────────────────────────── */
/* 노랑 배경에는 먹 글씨. 난색에 흰 글씨는 4.5:1 을 못 넘긴다 (tokens.css 참조). */

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: var(--space-2);
  min-height: 44px; padding: var(--space-2) var(--space-6);
  border: 1px solid transparent; border-radius: var(--r-md);
  font-size: var(--fs-14); font-weight: 600;
  line-height: 1.4;
  letter-spacing: -0.014em;
  cursor: pointer; white-space: nowrap;
  transition: background-color var(--dur-fast) var(--ease-out),
              border-color var(--dur-fast) var(--ease-out),
              color var(--dur-fast) var(--ease-out),
              box-shadow var(--dur-fast) var(--ease-out),
              transform .08s var(--ease-out);
}
.btn:active:not([disabled]) { transform: translateY(1px); }
/* 글자와 같이 놓인 아이콘은 글자보다 커지면 안 된다. 크기를 안 정해 두면
   viewBox 그대로 나와 버튼 높이를 밀어 올린다. */
.btn:not(.btn--icon) svg { width: 1.15em; height: 1.15em; flex: none; }
.btn[disabled], .btn[aria-disabled="true"] {
  opacity: .45; cursor: not-allowed; pointer-events: none;
}

.btn--primary {
  background: var(--action-bg); color: var(--text-on-action);
  border-color: var(--action-line); box-shadow: var(--shadow-xs);
}
.btn--primary:hover:not([disabled]) { background: var(--action-bg-hover); }

.btn--dark { background: var(--bg-chrome); color: var(--text-on-chrome); }
.btn--dark:hover:not([disabled]) { background: var(--ink-700); }

.btn--deal { background: var(--bg-deal); color: #fff; }
.btn--deal:hover:not([disabled]) { background: var(--red-600); }

.btn--outline,
.btn--secondary {
  background: var(--bg-surface); color: var(--text-primary);
  border-color: var(--line-strong);
}
.btn--outline:hover:not([disabled]),
.btn--secondary:hover:not([disabled]) {
  background: var(--bg-muted); border-color: var(--n-400);
}

.btn--ghost { background: var(--bg-muted); color: var(--text-secondary); }
.btn--ghost:hover:not([disabled]) { background: var(--bg-sunken); color: var(--text-primary); }

.btn--quiet { background: transparent; color: var(--text-secondary); padding-inline: var(--space-2); }
.btn--quiet:hover:not([disabled]) { background: var(--bg-muted); color: var(--text-primary); }

.btn--danger { background: var(--bg-surface); color: var(--status-danger); border-color: var(--red-100); }
.btn--danger:hover:not([disabled]) { background: var(--red-50); }

.btn--block { width: 100%; }
.btn--sm { min-height: 36px; font-size: var(--fs-13); padding: var(--space-1) var(--space-4); border-radius: var(--r-sm); }
.btn--lg { min-height: 52px; font-size: var(--fs-15); padding: var(--space-3) var(--space-8); border-radius: var(--r-lg); }
.btn--icon { padding: 0; width: 44px; }

.btn-group { display: flex; gap: var(--space-2); flex-wrap: wrap; }

.cta-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  background: var(--bg-surface);
  border-top: 1px solid var(--line);
  box-shadow: 0 -4px 16px -6px rgba(14, 36, 48, .12);
  padding: var(--space-2) var(--page-pad);
  padding-bottom: calc(var(--space-2) + env(safe-area-inset-bottom, 0px));
}
.cta-bar__inner {
  max-width: var(--page-max); margin-inline: auto;
  display: flex; gap: var(--space-2); align-items: center;
}
.cta-bar .btn { flex: 1; height: calc(var(--cta-h) - var(--space-5)); font-size: var(--fs-15); }
.cta-bar .btn--icon { flex: none; width: 52px; }

/* ── 뱃지 ─────────────────────────────────────────────────────────────── */

.badge {
  display: inline-flex; align-items: center; gap: 3px;
  padding: 2px 7px; border-radius: var(--r-xs);
  font-size: var(--fs-11); font-weight: 700; line-height: 1.6;
  white-space: nowrap; letter-spacing: -0.01em;
}
.badge--action  { background: var(--action-bg);  color: var(--text-on-action); }
.badge--deal    { background: var(--bg-deal);    color: #fff; }
.badge--price   { background: var(--red-50);     color: var(--text-price); }
.badge--dark    { background: var(--bg-chrome);  color: var(--text-on-chrome); }
.badge--success { background: var(--green-50);   color: var(--status-ok); }
.badge--warning { background: var(--yellow-100);  color: var(--status-warn); }
.badge--danger  { background: var(--red-50);     color: var(--status-danger); }
.badge--info    { background: var(--blue-50);    color: var(--status-info); }
.badge--muted   { background: var(--bg-muted);   color: var(--text-secondary); }
.badge--taxable { background: var(--bg-muted);   color: var(--text-secondary); }
.badge--exempt  { background: var(--green-50);   color: var(--green-700); }
.badge--ship    { background: var(--shell-50);    color: var(--shell-700); }
.badge--pickup  { background: var(--yellow-100);  color: var(--status-warn); }
.badge--outline { background: transparent; color: var(--text-secondary); box-shadow: inset 0 0 0 1px var(--line-strong); }
.badge--lg { font-size: var(--fs-12); padding: 4px 10px; border-radius: var(--r-sm); }

/* ── 가격 ─────────────────────────────────────────────────────────────── */

.price { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.price__before {
  color: var(--text-muted); font-size: var(--fs-12);
  text-decoration: line-through; text-decoration-thickness: 1px;
}
.price__now {
  font-weight: 800; font-size: var(--fs-17);
  letter-spacing: var(--tracking-tighter);
}
.price__unit { font-weight: 600; font-size: var(--fs-13); letter-spacing: -0.02em; }
.price__rate {
  color: var(--text-price); font-weight: 800; font-size: var(--fs-13);
  letter-spacing: var(--tracking-tight);
}
.price--lg .price__now { font-size: var(--fs-28); }
.price--lg .price__rate { font-size: var(--fs-20); }
.price--lg .price__before { font-size: var(--fs-14); }

.store-label {
  color: var(--text-secondary); font-size: var(--fs-12);
  font-weight: 500; letter-spacing: -0.014em;
}
.link { color: var(--text-link); font-weight: 500; }
.link:hover { text-decoration: underline; text-underline-offset: 2px; }

/* ── 카드 · 패널 ──────────────────────────────────────────────────────── */

.panel {
  background: var(--bg-surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: var(--space-5);
}
.panel--flush { padding: 0; overflow: hidden; }
.panel__head {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--space-3); margin-bottom: var(--space-4);
}
.panel__head h2, .panel__head h3 { font-size: var(--fs-15); font-weight: 700; }

/* 카드가 연달아 놓이면 테두리끼리 맞붙어 한 덩어리로 읽힌다. 안쪽 여백이
   넉넉한 만큼 바깥도 떨어져야 각 카드가 하나의 묶음으로 보인다.

   .. note:: 부모에 gap 을 주지 않고 인접 형제에 건다

      패널을 감싸는 컨테이너는 화면마다 다르고(그냥 block 인 곳, form 인 곳,
      이미 gap 을 가진 grid 인 곳) 부모에 걸면 grid 안에서 간격이 두 번 벌어진다.
      인접 형제 선택자는 실제로 맞닿은 자리에만 붙는다. */
.panel + .panel,
.panel + .notice,
.notice + .panel,
.notice + .notice { margin-top: var(--space-5); }

/* 카드 안 마지막 입력칸의 아래 여백은 패널 안쪽 여백과 겹쳐 바닥만 두꺼워
   보인다. 위아래가 같아야 칸이 가운데 놓인 것으로 읽힌다. */
.panel > .field:last-child,
.panel > form > .field:last-child { margin-bottom: 0; }

.tile {
  background: var(--bg-surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: var(--space-4);
}

/* 통계 타일 — 대시보드 공통 */
.stats { display: grid; gap: var(--space-3); grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.stat {
  background: var(--bg-surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: var(--space-4);
}
.stat dt { font-size: var(--fs-12); color: var(--text-muted); font-weight: 500; }
.stat dd { margin: 4px 0 0; }
.stat b { font-size: var(--fs-24); font-weight: 800; letter-spacing: var(--tracking-tighter); }
.stat small { font-size: var(--fs-12); color: var(--text-muted); font-weight: 500; margin-left: 3px; }

/* ── 표 ───────────────────────────────────────────────────────────────── */

.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { font-size: var(--fs-13); }
.table th, .table td {
  padding: var(--space-3);
  border-bottom: 1px solid var(--line-soft);
  text-align: left; vertical-align: middle;
}
.table thead th {
  font-size: var(--fs-12); font-weight: 700; color: var(--text-secondary);
  background: var(--bg-muted); white-space: nowrap;
  border-bottom: 1px solid var(--line);
}
.table tbody tr:hover { background: var(--bg-raised); }
.table td.num, .table th.num { text-align: right; }
.table tfoot td { font-weight: 700; border-top: 2px solid var(--line-strong); border-bottom: 0; }
.table--compact th, .table--compact td { padding: var(--space-2) var(--space-3); }

/* ── 폼 ───────────────────────────────────────────────────────────────── */

.field { display: block; margin-bottom: var(--space-4); }
.field > label, .field__label {
  display: block; font-size: var(--fs-13); font-weight: 600;
  margin-bottom: 6px; color: var(--text-primary);
}
.field__hint { font-size: var(--fs-12); color: var(--text-muted); margin-top: 5px; line-height: 1.6; }
.field__error { font-size: var(--fs-12); color: var(--status-danger); margin-top: 5px; font-weight: 600; }
.field--req > label::after { content: " *"; color: var(--status-danger); }

input[type="text"], input[type="email"], input[type="password"], input[type="tel"],
input[type="number"], input[type="search"], input[type="date"], input[type="datetime-local"],
input[type="url"], select, textarea {
  width: 100%; min-height: 44px;
  padding: 10px var(--space-3);
  border: 1px solid var(--line-field); border-radius: var(--r-sm);
  background: var(--bg-surface); color: var(--text-primary);
  font: inherit; font-size: var(--fs-14);
  transition: border-color var(--dur-fast) var(--ease-out),
              box-shadow var(--dur-fast) var(--ease-out);
}
textarea { min-height: 110px; resize: vertical; line-height: 1.7; }
select {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5l5-5' stroke='%23656B73' stroke-width='1.8' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
  padding-right: 34px;
}
input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: none; border-color: var(--line-focus);
  box-shadow: 0 0 0 3px rgba(35, 121, 220, .18);
}
input::placeholder, textarea::placeholder { color: var(--n-400); }
input[disabled], select[disabled], textarea[disabled] {
  background: var(--bg-muted); color: var(--text-muted); cursor: not-allowed;
}

.check { display: flex; align-items: flex-start; gap: var(--space-2); font-size: var(--fs-14); cursor: pointer; }
.check input { width: 18px; height: 18px; min-height: 0; margin: 2px 0 0; flex: none; accent-color: var(--ink-800); }

.form-grid { display: grid; gap: 0 var(--space-4); grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

/* 수량 조절기 */
.stepper {
  display: inline-flex; align-items: center;
  border: 1px solid var(--line-strong); border-radius: var(--r-sm);
  overflow: hidden; background: var(--bg-surface);
}
.stepper button {
  width: 38px; height: 38px; border: 0; background: transparent;
  cursor: pointer; color: var(--text-secondary); font-size: 16px;
  display: grid; place-items: center;
}
.stepper button:hover { background: var(--bg-muted); color: var(--text-primary); }
.stepper input {
  width: 46px; min-height: 38px; height: 38px; border: 0; border-inline: 1px solid var(--line);
  border-radius: 0; text-align: center; padding: 0;
  font-variant-numeric: tabular-nums; font-weight: 600;
}
.stepper input:focus-visible { box-shadow: none; }

/* ── 칩 · 탭 ──────────────────────────────────────────────────────────── */

/* 칩 줄 밑에는 늘 목록이나 표가 붙는다. 아래 여백이 없으면 필터와 결과가
   한 덩어리로 붙어, 어느 칩을 눌러 나온 목록인지 눈으로 끊기지 않는다.
   바로 아래 오는 .filter-bar 와 같은 값을 쓴다. */
.chips { display: flex; gap: var(--space-2); flex-wrap: wrap; margin-bottom: var(--space-4); }
.chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 7px var(--space-4); border-radius: var(--r-full);
  background: var(--bg-surface); border: 1px solid var(--line-strong);
  font-size: var(--fs-13); font-weight: 600; color: var(--text-secondary);
  cursor: pointer; transition: background-color var(--dur-fast) var(--ease-out),
                               border-color var(--dur-fast) var(--ease-out),
                               color var(--dur-fast) var(--ease-out);
}
.chip:hover { border-color: var(--n-400); color: var(--text-primary); }
.chip[aria-current="true"], .chip--on {
  background: var(--ink-900); border-color: var(--ink-900); color: #fff;
}

.tabs {
  display: flex; gap: var(--space-5);
  border-bottom: 1px solid var(--line); margin-bottom: var(--space-5);
  overflow-x: auto; scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tabs a, .tabs button {
  flex: none; padding: var(--space-3) 2px;
  border: 0; background: none; cursor: pointer;
  font-size: var(--fs-14); font-weight: 600; color: var(--text-muted);
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.tabs a:hover, .tabs button:hover { color: var(--text-primary); }
.tabs [aria-current="page"], .tabs [aria-current="true"] {
  color: var(--text-primary); border-bottom-color: var(--ink-900);
}

/* ── 진행 게이지 (타임딜 소진율) ──────────────────────────────────────── */

.gauge {
  height: 6px; border-radius: var(--r-full);
  background: var(--bg-sunken); overflow: hidden;
}
.gauge__fill {
  height: 100%; border-radius: var(--r-full);
  background: linear-gradient(90deg, var(--red-500), var(--red-700));
  transition: width var(--dur-slow) var(--ease-out);
}

/* ── 알림 · 빈 상태 ───────────────────────────────────────────────────── */

.flash { margin: 0 0 var(--space-4); display: grid; gap: var(--space-2); }
.flash__item {
  padding: var(--space-3) var(--space-4);
  border-radius: var(--r-md); font-size: var(--fs-13); font-weight: 600;
  border: 1px solid transparent;
}
.flash__item--success { background: var(--green-50); color: var(--status-ok); border-color: #C9E4D4; }
.flash__item--error   { background: var(--red-50);   color: var(--status-danger); border-color: var(--red-100); }
.flash__item--warning { background: var(--yellow-100);color: var(--status-warn); border-color: var(--yellow-200); }
.flash__item--info,
.flash__item--debug   { background: var(--blue-50);  color: var(--status-info); border-color: #CFE1F8; }

/* ── 토스트 ───────────────────────────────────────────────────────────────
 * 안내 메시지는 본문을 밀지 않고 위에 떠서 알린다. 헤더 바로 아래 가운데에
 * 두는 이유는, 방금 누른 버튼 근처가 아니라 **눈이 이미 가 있는 곳**이기
 * 때문이다. 모바일에서는 화면 폭에 맞춰 좌우 여백만 남긴다.
 */
.toasts {
  position: fixed; z-index: 90;
  /* 헤더를 덮지 않는다. 안내를 띄우느라 검색창과 장바구니를 가리면 안 된다. */
  top: calc(var(--stick-h) + var(--space-3) + env(safe-area-inset-top, 0px));
  left: 50%; transform: translateX(-50%);
  width: min(440px, calc(100vw - var(--space-5) * 2));
  display: grid; gap: var(--space-2);
  pointer-events: none;                 /* 빈 자리로 뒤 화면을 계속 누를 수 있게 */
}
.toast {
  pointer-events: auto;
  display: flex; align-items: center; gap: var(--space-3);
  padding: var(--space-3) var(--space-3) var(--space-3) var(--space-4);
  border-radius: var(--r-md); border: 1px solid transparent;
  font-size: var(--fs-13); font-weight: 600;
  background: var(--bg-surface); color: var(--text-primary);
  box-shadow: 0 6px 20px rgba(14, 36, 48, .16), 0 1px 3px rgba(14, 36, 48, .10);
  animation: toast-in .22s cubic-bezier(.16, 1, .3, 1) both;
}
.toast--success { background: var(--green-50); color: var(--status-ok);     border-color: #C9E4D4; }
.toast--error   { background: var(--red-50);   color: var(--status-danger); border-color: var(--red-100); }
.toast--warning { background: var(--yellow-100);color: var(--status-warn);   border-color: var(--yellow-200); }
.toast--info,
.toast--debug   { background: var(--blue-50);  color: var(--status-info);   border-color: #CFE1F8; }

.toast__text { flex: 1; min-width: 0; }
.toast__close {
  flex: none; display: grid; place-items: center;
  width: 26px; height: 26px; padding: 0;
  border: 0; border-radius: var(--r-sm); background: transparent;
  color: inherit; opacity: .6; cursor: pointer;
}
.toast__close:hover { opacity: 1; background: rgba(14, 36, 48, .08); }
.toast__close:focus-visible { outline: 2px solid currentColor; outline-offset: 1px; opacity: 1; }

.toast.is-leaving { animation: toast-out .18s ease-in both; }

@keyframes toast-in  { from { opacity: 0; transform: translateY(-10px); } }
@keyframes toast-out { to   { opacity: 0; transform: translateY(-6px); } }

/* 애니메이션을 끈 사용자에게는 나타나고 사라지기만 한다. 자동 사라짐 자체는
   내용을 못 읽게 만들지 않으므로 유지한다 (오류·경고는 애초에 안 사라진다). */
@media (prefers-reduced-motion: reduce) {
  .toast, .toast.is-leaving { animation-duration: .01ms; }
}

.notice {
  display: flex; gap: var(--space-3); align-items: flex-start;
  padding: var(--space-4); border-radius: var(--r-md);
  background: var(--bg-muted); color: var(--text-secondary);
  font-size: var(--fs-13); line-height: 1.75;
}
.notice--info { background: var(--blue-50); color: var(--status-info); }
.notice--warn { background: var(--yellow-100); color: var(--status-warn); }

/* 빈 상태. 넓은 흰 판에 글자 두 줄만 띄우면 화면이 덜 만들어진 것처럼
   보인다. 세로 여백을 줄이고 글줄 폭을 재서 덩어리로 읽히게 한다. */
.empty {
  display: flex; flex-direction: column; align-items: center;
  padding: var(--space-12) var(--space-6);
  text-align: center; color: var(--text-muted);
  background: var(--bg-surface); border: 1px solid var(--line);
  border-radius: var(--r-lg);
  /* 빈 상태 뒤에 다른 판이 오는 화면이 있다 (TAX-006 지급, TAX-008 정책).
     여백이 없으면 두 판의 테두리가 맞붙어 한 덩어리로 보인다. */
  margin-bottom: var(--space-4);
}
.empty p { max-width: 44ch; line-height: 1.8; }
.empty__title {
  font-size: var(--fs-17); font-weight: 700;
  color: var(--text-primary); margin-bottom: var(--space-2);
  letter-spacing: var(--tracking-tight);
}
/* 안내 그림. 글자만 있으면 어디를 봐야 할지 정하지 못한다. */
.empty__icon {
  width: 56px; height: 56px; margin-bottom: var(--space-4);
  border-radius: var(--r-xl);
  background: var(--bg-muted); color: var(--text-muted);
  display: grid; place-items: center; flex: none;
}
.empty__icon svg { width: 26px; height: 26px; }

/* ── 정의 목록 (금액 요약) ────────────────────────────────────────────── */

.dl { display: grid; gap: var(--space-2); }
.dl > div { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-4); }
.dl dt { color: var(--text-secondary); font-size: var(--fs-13); }
.dl dd { margin: 0; font-variant-numeric: tabular-nums; font-weight: 600; }
.dl__total {
  border-top: 1px solid var(--line); margin-top: var(--space-2); padding-top: var(--space-3);
}
.dl__total dt { color: var(--text-primary); font-weight: 700; font-size: var(--fs-14); }
.dl__total dd { font-size: var(--fs-20); font-weight: 800; color: var(--text-price); letter-spacing: var(--tracking-tighter); }
.dl__minus dd { color: var(--status-danger); }

/* ── 페이지네이션 ─────────────────────────────────────────────────────── */

.pager { display: flex; justify-content: center; align-items: center; gap: 6px; margin-top: var(--space-8); }
.pager a, .pager span {
  min-width: 38px; height: 38px; padding: 0 10px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--r-sm); font-size: var(--fs-13); font-weight: 600;
  color: var(--text-secondary); border: 1px solid transparent;
}
.pager a:hover { background: var(--bg-muted); color: var(--text-primary); }
.pager [aria-current="page"] { background: var(--ink-900); color: #fff; }
.pager .is-disabled { opacity: .35; pointer-events: none; }

/* ── 모의 결제 화면 (SPEC §8.2) ───────────────────────────────────────── */

/* width 100% — .sel-main 과 같은 이유다. body 세로 flex 에서 가로 auto 여백은
   늘이기를 끄므로, 없으면 결제 화면이 내용 폭으로 쪼그라든다. */
.mock-pay { max-width: 440px; margin: 0 auto; width: 100%; padding: var(--space-10) var(--page-pad) var(--space-16); }
.mock-pay__head { text-align: center; margin-bottom: var(--space-6); }
.mock-pay__badge {
  display: inline-block; background: var(--yellow-700); color: #fff;
  font-size: var(--fs-11); font-weight: 700; letter-spacing: var(--tracking-wide);
  padding: 4px 10px; border-radius: var(--r-sm); margin-bottom: var(--space-3);
}
.mock-pay__head h1 { font-size: var(--fs-24); }
.mock-pay__note { color: var(--text-secondary); font-size: var(--fs-13); margin-top: var(--space-2); }
.mock-pay__summary, .mock-pay__tax {
  background: var(--bg-surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: var(--space-4); margin: 0 0 var(--space-3);
}
.mock-pay__summary > div, .mock-pay__tax > div {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: var(--space-4); padding: 5px 0;
}
.mock-pay__summary dt, .mock-pay__tax dt { color: var(--text-secondary); font-size: var(--fs-13); }
.mock-pay__summary dd, .mock-pay__tax dd { margin: 0; font-variant-numeric: tabular-nums; font-weight: 600; }
.mock-pay__total { border-top: 1px solid var(--line); margin-top: var(--space-2); padding-top: var(--space-3) !important; }
.mock-pay__total dt { font-weight: 700; color: var(--text-primary) !important; }
.mock-pay__total dd { font-size: var(--fs-20); font-weight: 800; color: var(--text-price); }
.mock-pay__tax { font-size: var(--fs-13); }
.mock-pay__actions { display: grid; gap: var(--space-2); }
.mock-pay__row { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-2); }
.mock-pay__foot { margin-top: var(--space-5); color: var(--text-muted); font-size: var(--fs-12); text-align: center; line-height: 1.8; }

/* ── 첨부 서류 목록 · 줄바꿈 보존 ─────────────────────────────────────── */

/* 입점 신청서와 심사 화면이 함께 쓴다. 파일 이름이 길어도 줄이 넘치지 않게
   끊어 준다 — 스캔 파일 이름은 대개 길다. */
.doclist { list-style: none; display: grid; gap: var(--space-2); }
.doclist li {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--space-3); padding: var(--space-3) 0;
  border-bottom: 1px solid var(--line);
}
.doclist li:last-child { border-bottom: 0; padding-bottom: 0; }
.doclist a { font-weight: 600; word-break: break-all; }
.doclist__meta { color: var(--text-muted); font-size: var(--fs-12); white-space: nowrap; }

/* 사람이 줄을 나눠 적은 글(반려 사유·공지 본문)을 적은 대로 보여 준다.
   linebreaks 필터로 <br> 을 만들면 들여쓴 목록이 무너진다. */
.preline { white-space: pre-line; }

/* ── 인쇄 ─────────────────────────────────────────────────────────────── */

@media print {
  .app-header, .catnav, .quicknav, .bottom-nav, .cta-bar,
  .promo, .site-footer, .no-print { display: none !important; }
  body { background: #fff; }
  .panel, .tile { border-color: #999; box-shadow: none; }
}

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