/* Buy Cosmetic(바이코스메틱)의 화면 스타일. 홈페이지 뼈대와 시제품이 같이 쓴다. 규칙은 mall/docs/style.md 에 있다.
   17차: 보통의 쇼핑몰 화면을 가볍게 한 모습. 컨테이너 하나(1200px), 간격은 4의 배수(4·8·12·16·24·32·48),
   글자 크기 다섯 단계(13·15·18·22·28), 굵기 둘(400·700), 색 다섯(글자, 보조 글자, 선, 면, 강조) 안에서 쓴다.
   스크립트, 웹폰트, 밖의 자원, 배경 그림을 쓰지 않는다. 화면의 이미지는 상품 이미지뿐이다. */
:root {
  --fg: #1b1b1f;     /* 글자. 흰 바탕과 17.2:1 */
  --muted: #5b5f66;  /* 보조 글자, 입력란의 테두리. 흰 바탕과 6.4:1, 면과 5.9:1 */
  --line: #dfe2e6;   /* 선. 장식이다 */
  --soft: #f4f5f7;   /* 면: 혜택 띠, 표의 머리, 꼬리표, 이미지가 없는 자리 */
  --accent: #d42f1f; /* 강조(할인) 하나. 할인율, 최대 할인, 주된 행동. 흰 바탕과 5.0:1(흰 글자를 올려도 같다) */
  color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100% }
body {
  margin: 0; padding: 0 16px; font: 15px/1.5 system-ui, sans-serif; color: var(--fg); background: #fff;
  word-break: keep-all; overflow-wrap: anywhere; font-variant-numeric: tabular-nums;
}
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0 }
h1, h2, h3 { line-height: 1.3; font-weight: 700 }
a { color: inherit; text-underline-offset: 2px }
main a { display: inline-block; min-height: 24px; line-height: 24px } /* 글 속의 링크도 누르는 높이 24px */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px }

/* 컨테이너. 머리줄(.bar), 혜택 띠(.perks), 본문, 꼬리말의 왼쪽 끝이 같다. 머리말의 선과 띠의 면은 화면 폭을 다 쓴다. */
.bar, .perks, main, footer { max-width: 1168px; margin-left: auto; margin-right: auto }

/* 머리줄: 서비스 이름, 검색 폼, 에이전트 안내. 좁은 화면에서는 검색 폼이 둘째 줄로 간다. */
header { margin: 0 -16px; padding: 0 16px; border-bottom: 1px solid var(--line) }
.bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; padding: 8px 0 }
.brand { display: inline-flex; align-items: center; min-height: 44px; font-size: 18px; font-weight: 700; text-decoration: none }
.bar > a:last-child { display: inline-flex; align-items: center; min-height: 44px; margin-left: auto }
.search { display: flex; gap: 8px; flex: 1 1 320px; max-width: 560px; margin: 0 auto }
header .search input[name=q] { flex: 1; min-width: 0; max-width: none; margin: 0 }
.search button { flex: none; color: #fff; background: var(--fg); border-color: var(--fg) }
.search button:hover { background: var(--fg) }
@media (max-width: 39.99rem) { .search { order: 1; flex-basis: 100%; max-width: none } }
/* 혜택 띠: 꼬리표 넷과 혜택 안내 링크. 면은 화면 폭을 다 쓴다. */
.perks {
  display: flex; flex-wrap: wrap; gap: 0 16px; padding: 4px 0; list-style: none; font-size: 13px; line-height: 24px; color: var(--muted);
  background: var(--soft); box-shadow: 0 0 0 100vmax var(--soft); clip-path: inset(0 -100vmax);
}
.perks li:not(:last-child) { color: var(--fg) }
.perks li:last-child { margin-left: auto }
.perks a { display: inline-block; min-height: 24px }

/* 꼬리말 */
footer { margin-top: 48px; padding: 16px 0 32px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px }
footer p + p { margin-top: 8px }
footer a { display: inline-block; min-height: 24px; margin: 4px 0; line-height: 24px } /* 줄이 바뀌어도 위아래 링크가 8px 떨어진다 */

/* 목록 머리: 왼쪽 h1 과 위치, 오른쪽 기준 시각 한 줄 */
.lh { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; margin: 24px 0 16px }
.lh h1 { font-size: 22px }
.lh h1 small { margin-left: 8px; font-size: 15px; font-weight: 400; color: var(--muted) }
.stamp { font-size: 13px; color: var(--muted) }
.lh .stamp { text-align: right }
.perk { display: inline-block; margin: 0 0 16px; padding: 4px 8px; border-radius: 4px; font-size: 13px; font-weight: 700; color: var(--accent); background: var(--soft) }

/* 카드 격자: 좁은 화면 2열, 40rem 이상 3열, 60rem 이상 4열. 카드는 이미지, 브랜드, 상품명(두 줄 높이 고정), 큰 가격,
   기준 가격, 다른 가격, 평점의 차례다. 이미지가 없는 카드는 같은 자리에 같은 크기의 스켈레톤(.skel, 글자 "이미지 없음")을 둔다. */
.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 12px; padding: 0; list-style: none }
@media (min-width: 40rem) { .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px 16px } }
@media (min-width: 60rem) { .cards { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px 24px } }
.cards > li { position: relative; min-width: 0 }
.cards > li > a { display: block; text-decoration: none }
.cards > li > a > img, .cards > li > a > .skel {
  display: block; width: 100%; height: auto; aspect-ratio: 1; margin-bottom: 12px; border: 1px solid var(--line); border-radius: 8px;
}
.cards > li > a > img { object-fit: contain; background: #fff }
.cards > li.so > a > img { opacity: .5 }
.cards > li > a > span:not(:last-child) { display: block; font-size: 13px; line-height: 20px; color: var(--muted) }
.cards > li > a > span:last-child {
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; height: 44px; line-height: 22px;
}
.cards > li > a:hover > span:last-child { text-decoration: underline }
.cards .rk, .cards .sold {
  position: absolute; top: 8px; z-index: 1; min-width: 28px; height: 28px; padding: 0 8px; border-radius: 4px;
  font-size: 13px; font-weight: 700; line-height: 28px; text-align: center; pointer-events: none;
}
.cards .rk { left: 8px; color: #fff; background: var(--fg) }
.cards .sold { right: 8px; color: var(--fg); background: #fff; border: 1px solid var(--line) }
.cards .our { margin-top: 8px }

/* 가격 블록(카드와 구매 상자. 20차·30차·37차): 우리 가격 한 줄(할인의 크기는 강조색, 금액은 굵게. 앞말 "<곳>보다 추가"와 "할인"은 작은
   보통 글자), 작은 간격, 곳마다의 가격 줄(싼 곳부터, 취소선 없이. 기준인 곳은 글자색, 다른 곳은 흐린 글자. 그 곳이 비싸면 "+ N원").
   우리 가격은 앞말 뒤에서 먼저 바뀌고, "10% 할인 <금액>"(.amt)이 그 폭에 들지 않을 때만 금액 앞에서 한 번 더 바뀐다(37차: 360px 의
   두 줄 카드). 금액은 끊기지 않고(nowrap), 한글 낱말은 쪼개지지 않는다(keep-all). 그 밖의 빈칸은 U+00A0 */
.our { font-size: 18px; line-height: 28px; font-weight: 700; color: var(--accent) }
.our, .alt, .was { word-break: keep-all }
.our data, .alt data, .was data { white-space: nowrap }
.our data { color: var(--fg) }
.our .from { font-size: 13px; font-weight: 400 }
.our .amt { display: inline-block }
.was, .alt, .rate { font-size: 13px; line-height: 20px; color: var(--muted) }
.alt { color: var(--accent) }
.was { color: var(--fg) }
.was.other { color: var(--muted) }
.our + .was, .alt + .was { margin-top: 4px }
.was .tag { display: inline; white-space: nowrap } /* 꼬리표는 쪼개지 않고, 자리가 없으면 통째로 다음 줄로 간다(30차) */

/* 쪽 이동 줄. 숫자 링크는 44px 정사각형, 지금 쪽은 글자색을 채운다. */
nav[aria-label="쪽 이동"] { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 32px 0 0 }
nav[aria-label="쪽 이동"] a {
  min-width: 44px; min-height: 44px; padding: 10px 12px; line-height: 24px; text-align: center; text-decoration: none;
  border: 1px solid var(--line); border-radius: 6px;
}
nav[aria-label="쪽 이동"] a[aria-current="page"] { color: #fff; background: var(--fg); border-color: var(--fg); font-weight: 700 }

/* 검색 결과: 해석한 조건의 꼬리표, 결과가 없다는 줄, 접어 둔 알리기 폼 */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; padding: 0; list-style: none }
.chips li { padding: 2px 12px; font-size: 13px; line-height: 24px; border: 1px solid var(--line); border-radius: 16px }
.chips .off, .chips .drop { color: var(--muted); background: var(--soft) }
.none { margin: 0 0 16px; color: var(--muted) }
details { margin-top: 48px; padding-top: 16px; border-top: 1px solid var(--line) }
summary { display: flex; align-items: center; min-height: 44px; font-weight: 700; cursor: pointer }

/* 상품 화면: 경로 줄, 두 단(이미지, 구매 상자), 섹션 이동 줄, 섹션 */
.crumb { margin: 16px 0; font-size: 13px; color: var(--muted) }
.crumb a { display: inline-block; min-height: 24px; line-height: 24px }
.pd { display: grid; gap: 24px }
@media (min-width: 60rem) {
  .pd { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: start }
  .pd > .buy { grid-column: 2 }
}
/* 이미지 띠: 가로로 넘기는 띠에 이미지를 나란히 두고(scroll-snap), 작은 이미지는 그 자리로 가는 앵커다 */
.shots { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; border: 1px solid var(--line); border-radius: 8px; scrollbar-width: none }
.shots::-webkit-scrollbar { display: none } /* 막대는 숨긴다. 작은 이미지가 이동 수단이고 옆으로 넘기는 동작은 그대로 된다 */
.shots img, .shots > .skel { flex: 0 0 100%; width: 100%; height: auto; aspect-ratio: 1; object-fit: contain; scroll-snap-align: start; background: #fff }
.thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px }
.thumbs a { display: block; width: 64px; height: 64px; border: 1px solid var(--line); border-radius: 4px; overflow: hidden; text-decoration: none }
.thumbs img, .thumbs .skel { display: block; width: 100%; height: 100%; object-fit: contain }
.src { margin-top: 8px; font-size: 13px; color: var(--muted) }
/* 구매 상자. 좁은 화면의 차례는 이름, 가격, 구매 단추, 옵션, 조건이다(문서 순서는 넓은 화면의 것). */
.buy { display: flex; flex-direction: column; gap: 8px; min-width: 0 }
.buy .brand { min-height: 0; font-size: 13px; font-weight: 400; color: var(--muted) }
.buy h1 { font-size: 22px }
.opt { color: var(--muted) }
.buy .rate a { display: inline-block; min-height: 24px; line-height: 24px }
.buy .perk { align-self: flex-start; margin: 0 }
.buy .our { margin-top: 8px; font-size: 28px; line-height: 36px }
.buy .our .from { font-size: 15px }
.buy .was, .buy .alt { font-size: 15px; line-height: 22px }
.buy .our + .alt, .buy .was + .was { margin-top: -4px } /* 상자의 간격 8px 안에서 우리 가격 두 줄, 곳마다의 줄을 4px 로 묶는다 */
.buy .stamp { text-align: right }
.buy table { margin-top: 8px }
.note { font-size: 13px; color: var(--muted) }
/* 구매하기 띠(18차): 흰 띠(위에 선)에 단추를 올린다. 뒤의 글자가 비치지 않는다.
   넓은 화면: 구매 상자의 폭, 조건 표와 그 아래 한 줄 다음·옵션 줄 앞이 제자리다. 화면 아래에 붙을 수 있게 둔다(sticky).
   제자리가 첫 화면 안이면 붙지 않고, 상자 끝까지 내리면 제자리로 돌아가 마지막 줄을 가리지 않는다.
   좁은 화면(18차 C2): 화면 아래에 늘 붙인다(fixed. 화면 폭). 붙은 띠 아래로 내용이 흘러 지나가고, 페이지 끝에 띠의 높이만큼
   여백을 두어 끝까지 내렸을 때 마지막 줄(꼬리말)이 가려지지 않는다. */
.cta { margin-top: 8px; padding: 12px 0 16px; background: #fff; border-top: 1px solid var(--line) }
@media (min-width: 60rem) { .cta { position: sticky; bottom: 0; z-index: 2 } }
.cta .primary { display: block; width: 100% }
/* 28차 나: 시제품의 구매 상자는 장바구니 담기(폼 단추)와 바로 구매(주된 행동)가 나란하다 */
.cta:has(> form) { display: flex; gap: 8px; align-items: stretch }
.cta > form { flex: 1; margin: 0 }
.cta > form > button { width: 100%; min-height: 48px; font-weight: 700 }
.cta:has(> form) > .primary { flex: 1 }
.soldout { min-height: 48px; padding: 12px 24px; line-height: 24px; text-align: center; font-weight: 700; color: var(--muted); background: var(--soft); border-radius: 6px }
@media (max-width: 59.99rem) {
  .buy > * { order: 1 }
  .buy > .opts { order: 3 }
  .buy > .conds, .buy > .notes { order: 4 }
  .cta { position: fixed; left: 0; right: 0; bottom: 0; z-index: 3; margin: 0; padding: 8px 16px }
  body:has(.cta) { padding-bottom: 80px } /* 띠의 높이(65px)보다 조금 더 */
  /* 첫 화면에 상품명, 큰 가격, 구매하기가 들게(18차 C2·22차): 큰 이미지의 높이를 폭의 2/5 로(22차. 18차 C2~21차는 1/2.
     이미지가 상품마다 두 장이 되어 작은 이미지 줄이 늘 서고, 360×800 의 초대 화면에서 큰 가격이 띠에 걸렸다),
     작은 이미지를 40px 로, 경로 줄과 두 단 사이의 여백을 줄인다 */
  .crumb { margin: 8px 0 }
  .pd { gap: 16px }
  .shots img, .shots > .skel { aspect-ratio: 5 / 2 }
  .thumbs a { width: 40px; height: 40px }
}

/* 표. 금액 열은 오른쪽 정렬이고, 구매 상자의 표들은 폭을 다 써서 금액 열의 오른쪽 끝이 같다. */
table { width: 100%; border-collapse: collapse }
th, td { padding: 8px 12px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line) }
th { font-weight: 700 }
tr:first-child > th { background: var(--soft) }
.num { text-align: right; white-space: nowrap }
caption { padding-bottom: 8px; text-align: left; font-weight: 700 }
.tag { display: inline-block; padding: 0 8px; font-size: 13px; line-height: 20px; color: var(--accent); background: var(--soft); border-radius: 4px }
.conds th:not(:first-child), .conds td:not(:first-child) { width: 1% }
/* 가격·조건 표(30차 결정 154, 32차 결정 163, 38차 결정 170): 열은 구분 · 가격 · 차이이고 위아래가 맞는다. 위의 두 곳의 행은 흐린 글자
   (구분 칸은 이름과 그 구성의 용량, 그 아래 작은 글로 링크와 배송비), 굵은 선 아래 우리 가격의 행은 가격만 굵게(강조는 우리 가격 한
   곳). 가격 칸은 모든 행이 총액 아래에 작은 흐린 글자로 단위 가격(384px 이상에서는 끊기지 않는다). 두 곳의 행의 차이 칸은 본문 크기의 진한 글자이고
   금액만 굵게(빨간색은 우리 가격에만 쓴다), 그 아래 작은 흐린 글자로 용량 대비의 차이. 우리 가격의 행의 차이 칸(할인율)은 작은 흐린
   글자. 차이 칸은 좁은 화면에서 그 칸 안에서 바뀐다(`바코보다` / `1,570원 비쌈`, `10ml당` / `25원 비쌈`. 금액과 `비쌈`은 붙어 있다).
   좁은 화면(40rem 미만)에서는 차이 칸을 그 글의 폭까지만 두고 남는 폭을 구분 칸에 준다: 우리 가격의 행의 이름은 두 줄까지, 링크는
   한 줄(38차, 기획 세션의 결정). 넓은 화면은 그대로다 */
.conds td.num:not(.diff) { white-space: nowrap }
.conds td.diff { min-width: 6.5em; font-size: 13px; color: var(--muted); white-space: normal; word-break: keep-all; overflow-wrap: normal }
@media (min-width: 60rem) { .conds td.diff { white-space: nowrap } }
@media (max-width: 39.99rem) {
  .conds th, .conds td { padding-left: 6px; padding-right: 6px }
  .conds th:first-child, .conds td:first-child { padding-left: 0 }
  .conds th:last-child, .conds td:last-child { padding-right: 0 }
  .conds td.diff { min-width: 0 }
}
@media (max-width: 23.99rem) { /* 384px 보다 좁으면 단위 가격은 "10ml당" / "392원"으로 바뀔 수 있다(가격 칸을 좁혀 구분 칸에 폭을 준다) */
  .conds td.num .sub { white-space: normal }
}
.conds tr.place td { color: var(--muted) }
.conds tr.place td.diff { font-size: 15px; color: var(--fg) }
.conds td .sub { display: block; font-size: 13px; line-height: 20px; font-weight: 400; color: var(--muted) }
.conds td .sub a { white-space: nowrap }
.conds tr.place + tr.ours td { border-top: 2px solid var(--fg) }
.conds tr.ours td:nth-child(2) { font-weight: 700 }
.notes { display: flex; flex-direction: column; gap: 2px }
.buy .notes .stamp { text-align: left }

/* 정의 목록: 라벨 열과 값 열을 맞춘다 */
dl { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 8px 16px }
dt { color: var(--muted) }
dd a { display: inline-block; min-height: 24px; margin-left: 8px }

/* 옵션 선택: 줄마다 이름, 상태, 가격. 줄 전체가 링크이고 지금 보는 옵션은 테두리를 굵게 한다. */
.opts { display: flex; flex-direction: column; gap: 8px; padding: 0; list-style: none }
.opts a {
  display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 12px; align-items: baseline; min-height: 44px; padding: 10px 11px;
  text-decoration: none; border: 1px solid var(--line); border-radius: 6px;
}
.opts a[aria-current="page"] { border: 2px solid var(--fg); padding: 9px 10px } /* 테두리와 안쪽 여백의 합이 12px: 금액의 오른쪽 끝이 표의 금액 열과 같다 */
.opts a > span:nth-child(2) { font-size: 13px; color: var(--muted) }
.opts .sub { display: block; font-size: 13px; line-height: 20px; color: var(--muted) } /* 단위당 가격의 보조 줄(18차 D, 결정 30) */
.opts data { text-align: right; font-weight: 700 }

/* 섹션: 이동 줄(앵커), 구분선과 같은 모양의 h2, 제목 줄 오른쪽에 출처와 확인 시각 */
.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 48px 0 0; padding: 8px 0; border-bottom: 1px solid var(--line) }
.tabs a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; font-weight: 700; text-decoration: none; border-radius: 6px }
.tabs a:hover { background: var(--soft) }
section { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: baseline; gap: 16px 48px; margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--line) }
.tabs + section { margin-top: 0; border-top: 0 } /* 이동 줄의 선과 첫 섹션의 선이 겹치지 않게 하나만 둔다(18차) */
section > * { grid-column: 1 / -1 }
section > h2 { grid-column: 1; font-size: 18px }
section > h2 + .src { grid-column: 2; margin: 0; text-align: right }
/* 넓은 화면에서는 평점 분포와 만족도를 두 단으로 나란히 둔다(만족도가 없으면 분포가 폭을 다 쓴다) */
@media (min-width: 60rem) {
  section > .dist:has(+ .sat) { grid-column: 1; align-self: start }
  section > .dist + .sat { grid-column: 2; align-self: start }
}
section h3 { font-size: 15px }
.spec th { width: 200px; font-weight: 400; color: var(--muted); background: var(--soft) }
@media (max-width: 39.99rem) { .spec th { width: 112px } }
.spec td { white-space: pre-line }
.score { display: flex; align-items: baseline; gap: 12px }
.score data { font-size: 28px; line-height: 36px; font-weight: 700 }
.score span { color: var(--accent) }
.dist th, .sat th { font-weight: 400; color: var(--muted); background: var(--soft) } /* 라벨 칸은 모든 줄에 같은 면 */
.dist th { width: 56px; white-space: nowrap }
.dist td:last-child { width: 64px }
meter { display: block; width: 100%; height: 8px; margin-top: 7px; appearance: none; -webkit-appearance: none; background: var(--soft); border: 0; border-radius: 4px }
meter::-webkit-meter-bar { height: 8px; background: var(--soft); border: 0; border-radius: 4px }
meter::-webkit-meter-optimum-value, meter::-webkit-meter-suboptimum-value, meter::-webkit-meter-even-less-good-value { background: var(--fg); border-radius: 4px }
meter::-moz-meter-bar { background: var(--fg); border-radius: 4px }
.sat th { width: 96px }
.rv { display: flex; flex-direction: column; padding: 0; list-style: none }
.rv li { padding: 16px 0; border-bottom: 1px solid var(--line) }
.rv li > p:first-child { font-size: 13px; color: var(--muted) }
.rv li > p + p { margin-top: 4px }

/* 폼(주문 정보, 결제, 알리기). 입력란과 고르는 칸은 높이 44px 이상. 폭은 다 쓰되 28rem(448px)에서 멈춘다. */
form { margin: 8px 0 }
form > p { margin-top: 8px; font-size: 13px; color: var(--muted) }
fieldset { min-width: 0; margin: 12px 0; padding: 8px 16px 12px; border: 1px solid var(--line); border-radius: 6px }
legend { padding: 0 4px; font-weight: 700 }
label { display: block; margin: 12px 0 }
input:not([type=checkbox]):not([type=hidden]), select, textarea {
  display: block; width: 100%; max-width: 448px; min-height: 44px; margin-top: 4px; padding: 8px 12px;
  font: inherit; font-size: 16px; color: inherit; background: #fff; border: 1px solid var(--muted); border-radius: 6px;
}
textarea { min-height: 96px; resize: vertical }
input[name=qty]:not([type=hidden]), input[name=q_birth_year]:not([type=hidden]), input[name=postal_code]:not([type=hidden]),
input[name=card_exp]:not([type=hidden]), input[name=birth6]:not([type=hidden]), input[name=card_pw2]:not([type=hidden]) { max-width: 160px }
label:has(> input[type=checkbox]) { display: flex; gap: 8px; align-items: flex-start; cursor: pointer }
input[type=checkbox] { flex: none; width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--accent) }

/* 단추. 높이 44px 이상. 주된 행동(.primary)은 화면마다 하나이고 강조색을 채운다. 구매 상자에서는 상자의 폭이다. */
button { min-height: 44px; padding: 8px 16px; font: inherit; color: var(--fg); background: #fff; border: 1px solid var(--muted); border-radius: 6px; cursor: pointer }
button:hover { background: var(--soft) }
.primary {
  display: inline-block; min-height: 48px; padding: 12px 24px; line-height: 24px; text-align: center;
  font-weight: 700; color: #fff; text-decoration: none; background: var(--accent); border: 1px solid var(--accent); border-radius: 6px;
}
a.primary:hover, button.primary:hover { color: #fff; background: var(--accent) }
@media (max-width: 39.99rem) { .primary { display: block; width: 100% } }

/* 글 화면(에이전트 안내, 서비스 소개, 정책)과 S4~S6 의 기본 */
main > h1 { margin: 24px 0 16px; font-size: 22px }
main > h2 { margin: 32px 0 8px; font-size: 18px }
main > h3 { margin: 24px 0 8px; font-size: 15px } /* 정책 글의 조문 제목(38차) */
main > p, main > ul, main > ol, main > table, main > dl, main > pre { margin-top: 8px }
main > ul, main > ol { padding-left: 24px }
main > table th, main > table td { border: 1px solid var(--line) }
main > table { width: auto; max-width: 100% }
/* 글 화면의 표(정책 글의 표. 38차): 한글 낱말을 쪼개지 않는다. 좁은 화면에서 표가 폭보다 넓으면 표 안에서 옆으로 민다(화면은 넘치지 않는다) */
main > table th, main > table td { word-break: keep-all; overflow-wrap: normal }
@media (max-width: 39.99rem) { main > table { display: block; overflow-x: auto } }
pre { padding: 12px; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 13px; line-height: 1.5; background: var(--soft); border: 1px solid var(--line); border-radius: 6px }

/* 18차 B: 주문 정보(S4), 결제(S5), 주문 조회(S6), 글 화면과 오류 화면 */
/* S4: 넓은 화면에서는 왼쪽에 주문 요약 상자(작은 이미지, 이름, 조건 표, 정의 목록), 오른쪽에 폼. 좁으면 요약이 위 */
.buyform { display: grid; gap: 24px }
@media (min-width: 60rem) {
  .buyform { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 48px; align-items: start }
  .buyform > .summary { position: sticky; top: 16px }
}
.summary { display: flex; flex-direction: column; gap: 12px; padding: 16px; border: 1px solid var(--line); border-radius: 8px }
.item { display: flex; gap: 12px; align-items: flex-start }
.item img, .orderitem img, .item > .skel, .orderitem > .skel { flex: none; width: 64px; height: 64px; object-fit: contain; border: 1px solid var(--line); border-radius: 4px; background: #fff }
.item .brand { font-size: 13px; color: var(--muted) }
.item .name { font-weight: 700 }
.summary caption { font-size: 13px; color: var(--muted); font-weight: 400 }
/* 28차 나: 장바구니의 담은 상품(주문 정보의 줄, 상품 화면과 빼기 링크) */
.cart { display: flex; flex-direction: column; gap: 12px; margin: 16px 0; padding: 0; list-style: none; max-width: 720px }
.cart > li { padding: 12px 16px; border: 1px solid var(--line); border-radius: 8px }
.cart > li > .note { margin: 8px 0 0 }
.buyform form { margin: 0 }
.buyform fieldset:first-of-type { margin-top: 0 }
legend .tag { margin-left: 4px; font-weight: 400 }
label .tag { margin-left: 4px }
fieldset > .note { margin: 4px 0 0 }
fieldset details { margin: 0 0 8px; padding: 0; border: 0 }
fieldset summary { min-height: 44px; font-weight: 400; font-size: 13px; color: var(--muted) }
fieldset details p { font-size: 13px; color: var(--muted) }
/* 받는 분 칸은 넓은 화면에서 두 단 */
@media (min-width: 40rem) {
  fieldset.two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 16px }
  fieldset.two > label { margin: 8px 0 }
}
/* S5: 금액 표는 그 단의 폭을 다 쓴다(금액 열은 오른쪽). 표 아래에 꼬리표와 각주 한 줄, 정의 목록, 돌아가기.
   60rem 이상은 두 단(왼쪽 7, 오른쪽 카드 폼 5, 사이 48px. 18차 D): 1280×900 에서 결제 단추가 첫 화면에 든다. 좁으면 차례대로 한 단 */
.payform { display: grid; gap: 16px }
@media (min-width: 60rem) { .payform { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 48px; align-items: start } }
.payform > form { margin: 0 }
.payform > form > label:first-of-type { margin-top: 0 }
table.amount { width: 100%; max-width: 720px }
table.amount caption { font-weight: 700 }
.paysum > table.amount ~ .chips { margin-top: 12px }
.paysum > p { margin-top: 8px }
.paysum > p.note { margin-top: 4px }
.paysum > dl.terms, .orderitem dl { max-width: 720px; margin-top: 16px }
/* S6: 단계 표시(접수 › 결제 › 상품 주문 › 발송 › 도착). 지난 단계는 글자색, 지금 단계는 채우고, 앞의 단계는 보조색 */
.steps { display: flex; flex-wrap: wrap; gap: 4px; margin: 8px 0 16px; padding: 0; list-style: none; counter-reset: step }
.steps li { flex: 1 1 0; min-width: 64px; padding: 8px 4px; text-align: center; font-size: 13px; color: var(--muted); background: var(--soft); border-radius: 4px; counter-increment: step }
.steps li.done { color: var(--fg) }
.steps li[aria-current="step"] { color: #fff; background: var(--fg); font-weight: 700 }
.orderitem { display: flex; gap: 16px; align-items: flex-start; max-width: 720px }
.orderitem dl { flex: 1; margin-top: 0 }
@media (max-width: 39.99rem) { .orderitem { flex-direction: column; gap: 8px } .orderitem dl { width: 100% } }
table.hist { width: 100%; max-width: 720px; margin-top: 24px }
table.hist caption { font-weight: 700 }
table.hist td:first-child { width: 1%; white-space: nowrap }
/* 글 화면: 목차, 번호 단계 */
.toc { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 8px; padding: 8px 0; border-bottom: 1px solid var(--line) }
.toc a { display: inline-flex; align-items: center; min-height: 32px; padding: 0 12px; font-size: 13px; border: 1px solid var(--line); border-radius: 16px; text-decoration: none }
.numsteps { display: grid; gap: 8px; margin-top: 8px; padding: 0; list-style: none; counter-reset: num }
.numsteps li { position: relative; padding: 8px 12px 8px 44px; background: var(--soft); border-radius: 6px; counter-increment: num }
.numsteps li::before { content: counter(num); position: absolute; left: 12px; top: 8px; width: 24px; height: 24px; line-height: 24px; text-align: center; font-size: 13px; font-weight: 700; color: #fff; background: var(--fg); border-radius: 50% }
main > p.note { margin-top: 4px }

/* 스켈레톤(22차, 결정 101): 이미지가 없거나 읽지 못하는 자리. 그 자리의 이미지와 같은 크기의 회색 면 위에 "이미지 없음"(HTML 의
   글자다). 상품 화면의 이미지 띠와 작은 이미지 줄, 카드, 주문 요약과 조회 화면의 작은 이미지에 쓴다. 맨 뒤에 두어 자리마다의
   규칙(크기, 테두리)은 살리고 모양만 덮는다. */
.shots > .skel, .thumbs .skel, .cards > li > a > span.skel, .item > .skel, .orderitem > .skel {
  display: flex; align-items: center; justify-content: center; padding: 4px; text-align: center; word-break: keep-all;
  font-size: 13px; line-height: 16px; color: var(--muted); background: var(--soft)
}
@media (max-width: 59.99rem) { .thumbs .skel { padding: 0; letter-spacing: -1px } } /* 40px 안에 "이미지/없음" 두 줄이 들게 */
