/* =========================================================================
   Controls & Patterns — 체크박스 · 라디오 · 스테퍼 · 상태 칩 · 페이지네이션 · 빈 상태 · 로딩 버튼
   쇼케이스에 없던 8종을 시스템화 (26-08-27, Codex 누락 지적 재판정 후 채택분)
   ========================================================================= */

/* 체크박스 · 라디오 — 시각 20, 히트 44. 선택 = 검정 채움 + 흰 체크/점 */
.ctl { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; cursor: pointer; font-size: 14px; line-height: 20px; color: var(--fg-primary); }
.ctl input { position: absolute; opacity: 0; width: 0; height: 0; }
.ctl-ui { flex: none; width: 20px; height: 20px; border: 1.5px solid var(--border-check); background: var(--bg-default); display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; transition: background .12s, border-color .12s; }
.ctl.is-check .ctl-ui { border-radius: 4px; }   /* 20 = 4 (10-18 크기별 라운드) */
.ctl.is-radio .ctl-ui { border-radius: var(--r-full); }
.ctl-ui .icon { width: 14px; height: 14px; color: var(--fg-inverse); opacity: 0; }
.ctl input:checked + .ctl-ui { background: var(--bg-inverse); border-color: var(--border-selected); }
.ctl input:checked + .ctl-ui .icon { opacity: 1; }
.ctl.is-radio input:checked + .ctl-ui::after { content: ""; width: 8px; height: 8px; border-radius: var(--r-full); background: var(--bg-default); }
.ctl input:focus-visible + .ctl-ui { outline: 2px solid var(--border-focus); outline-offset: 2px; }
.ctl input:disabled + .ctl-ui { background: var(--bg-sunken); border-color: var(--border-subtle); }
.ctl input:disabled ~ .ctl-label { color: var(--fg-tertiary); }

/* 스테퍼 — 3~4단 진행. 점 24, 선 2px, 완료·현재 검정, 미완료 #E5E5EA. 라벨 11/500 */
.stepper { display: flex; padding: 0; margin: 0; list-style: none; }
.step { flex: 1; position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 11px; line-height: 14px; font-weight: 500; color: var(--fg-tertiary); text-align: center; }
.step::before { content: ""; position: absolute; top: 11px; left: 50%; right: -50%; height: 2px; background: var(--bg-sunken); }
.step:last-child::before { display: none; }
.step-dot { position: relative; z-index: 1; width: 24px; height: 24px; border-radius: var(--r-full); border: 0; background: var(--bg-sunken); display: flex; align-items: center; justify-content: center; font: var(--t-tag-12); font-weight: 700; font-variant-numeric: tabular-nums; color: var(--fg-secondary); box-sizing: border-box; }   /* 채움형 — 슈퍼패스 확정안 승격 (26-08-30): 회색 면, 진행·완료는 검정 */
.step-dot .icon { width: 12px; height: 12px; color: currentColor; }
.step.is-done::before, .step.is-current::before { background: var(--bg-inverse); }
.step.is-current::before { background: var(--bg-sunken); }
.step.is-current .step-dot { background: var(--bg-default); box-shadow: inset 0 0 0 2px var(--border-selected); color: var(--fg-primary); }
.step.is-done .step-dot { background: var(--bg-inverse); color: var(--fg-inverse); }   /* 완료 = 차콜 채움 + 흰 체크, 현재 = 흰 원 + 차콜 2px 테두리 (10-18 판단: 완료가 예정 회색과 비슷해 보이던 문제) */
.step.is-done, .step.is-current { color: var(--fg-primary); }
.step.is-current { font-weight: 700; }

/* 상태 칩 — .badge 위에 상태 색만. 라운드 4 (SNS 배지 2 와 구분) */
.badge.st { border-radius: 4px; }   /* 높이 20 에 8 은 알약처럼 보여 4 유지 (10-18 사용자 "너무 라운드") */
/* 10-18 B: 전부 면 — 대기(가장 연함) → 진행(진한 회색 + 굵게) → 완료(검정) · 경고(연한 빨강) */
.badge.st { padding-left: 6px; padding-right: 6px; }   /* 상태 칩 좌우 6 (10-23 사용자 "빽빽") */
.badge.st-wait { background: var(--bg-sunken); border-color: var(--bg-sunken); color: var(--fg-secondary); }
/* 상태 색 = 의미 (10-20 사용자): 회색 대기·예정 · 파랑 진행 중 · 초록 완료 · 주황 확인 필요 · 빨강 실패·반려. 검정 채움 폐기 */
.badge.st-progress { background: var(--bg-info-tint); border-color: var(--bg-info-tint); color: var(--fg-info); }
.badge.st-done { background: var(--bg-success-tint); border-color: var(--bg-success-tint); color: var(--fg-success); }
.badge.st-hold { background: var(--bg-warning-tint); border-color: var(--bg-warning-tint); color: var(--fg-warning); }
.badge.st-alert { background: var(--bg-brand-tint); border-color: var(--bg-brand-tint); color: var(--fg-error-strong); }

/* 목록 아이템 — 56 최소, 좌우 16, 구분선, 오른쪽 캐럿/액션 */
.list-item { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 8px 16px; border-bottom: 1px solid var(--border-subtle); text-decoration: none; color: inherit; background: var(--bg-default); }
.list-item:first-child { border-top: 1px solid var(--border-subtle); }
.list-item:has(.li-thumb) { padding-top: 12px; padding-bottom: 12px; }   /* 사진 줄 = 위아래 12 (10-23, 8 이면 사진이 구분선에 붙음) */
.list-item .li-thumb { flex: none; width: 44px; height: 44px; border-radius: 8px; background: var(--bg-muted); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .06); object-fit: cover; }   /* 10-18 규칙: 회색 면 = 테두리 없음 · 흰 상자 = 테두리 · 사진 = 안쪽 1px 그림자 */
.list-item .li-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.list-item .li-title { font-size: 14px; line-height: 20px; font-weight: 500; color: var(--fg-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-item .li-sub { font-size: 12px; line-height: 16px; color: var(--fg-secondary); }
.list-item .li-caret { flex: none; width: 20px; height: 20px; color: var(--fg-tertiary); }

/* 페이지네이션 — 32 정사각, 라운드 4, 현재 = 검정 채움 */
.pagination { display: flex; align-items: center; justify-content: center; gap: 4px; }
.page-btn { min-width: 32px; height: 32px; padding: 0 8px; border-radius: 8px; border: 1px solid var(--border-subtle); background: var(--bg-default); color: var(--fg-primary); font-family: inherit; font-size: 14px; line-height: 20px; font-weight: 500; display: inline-flex; align-items: center; justify-content: center; }
.page-btn.is-current { background: var(--bg-inverse); border-color: var(--border-selected); color: var(--fg-inverse); font-weight: 700; }
.page-btn[disabled] { color: var(--fg-tertiary); background: var(--bg-default); }
.page-btn .icon { width: 20px; height: 20px; }
/* 목록 끝 표시 — 페이지 번호 대신 이어 불러오는 목록의 맨 아래 (10-25 메시지·알림) */
.list-end { margin-top: var(--space-section); text-align: center; }
.list-end[hidden] { display: none; }
.page-gap { min-width: 24px; text-align: center; color: var(--fg-tertiary); font-size: 14px; line-height: 20px; }

/* 빈 상태 — 아이콘 40 #D1D1D6, 제목 16/700, 설명 14 #777, 액션 M 44 */
.empty { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 48px 24px; text-align: center; }
.empty[hidden] { display: none; }   /* display:flex 가 hidden 을 덮던 것 (10-25 FAQ 검색 결과 없음) */
.empty .icon { width: 40px; height: 40px; color: var(--fg-tertiary); margin-bottom: 4px; }
.empty-title { font-size: 16px; line-height: 24px; font-weight: 700; color: var(--fg-primary); }
.empty-desc { font-size: 14px; line-height: 20px; color: var(--fg-secondary); max-width: 280px; }
.empty .btn { margin-top: 8px; }

/* 로딩 버튼 — 글자 유지 + 스피너 16, 동작 잠금 */
.btn.is-loading { position: relative; pointer-events: none; }
.btn.is-loading::after { content: ""; width: 16px; height: 16px; margin-left: 8px; border-radius: var(--r-full); border: 2px solid currentColor; border-right-color: transparent; animation: btnSpin .7s linear infinite; }
@keyframes btnSpin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .btn.is-loading::after { animation: none; opacity: .5; } }
/* 로고 썸네일(피치링크 팀 등) — 상단 바와 같은 로고 원본을 흰 면에 맞춰 넣는다 (10-25, 앱 아이콘 png 는 옛 로고·여백 커서 흐려 보였음) */
.list-item .li-thumb.is-logo { object-fit: contain; padding: 6px; box-sizing: border-box; background: var(--bg-default); }

/* 키워드 태그 + 「Copy all」 머리 — 상세·검수 요청이 같이 쓴다 (10-25 detail.css 에서 승격) */
.keyword-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.keyword-tag {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 8px;
  background: var(--bg-muted);
  color: var(--fg-secondary);   /* 태그 = 회색 글자 (10-20 칩 검정 금지) */
  border-radius: 4px;   /* 작은 박스 = 2 (26-08-26) */
  font: var(--t-tag-12);
  /* 태그 글자 = 줄높이 100% + 높이·가운데 정렬 (10-21) */
}
.kw-copy { margin-top: var(--space-content); gap: 4px; }   /* 키워드·해시태그 복사 = 태그 아래 꽉 찬 작은 버튼 S 36 (10-25 사용자 — 제목 옆 글자 버튼은 버튼으로 안 보였다). 캠페인 상세·리뷰·공동구매 상세 공통 */
.form-sec > .kw-copy { margin-top: 0; }   /* 리뷰 쓰기 칸은 묶음 gap 12 가 이미 있어 24 로 벌어지던 것 */

/* 2칸 전환 — 같은 양식의 입력 방법 고르기(아이디 찾기 전화번호/이메일). 필터 칩(빨강 연한 면)은 목록 거르기 전용이라 양식엔 안 맞았다 (10-25) */
.seg { display: grid; grid-auto-columns: minmax(0, 1fr); grid-auto-flow: column; padding: 4px; border-radius: var(--r-12); background: var(--bg-sunken); }
.seg-item { min-height: 36px; padding: 0 var(--space-control); border: 0; border-radius: var(--r-8); background: none; font: var(--t-label); color: var(--fg-secondary); cursor: pointer; overflow-wrap: anywhere; }
.seg-item.active { background: var(--bg-default); color: var(--fg-primary); font-weight: 600; box-shadow: var(--shadow-1); }
