/* ============================================================
   Oruli 와이어프레임 킷 (_wireframe-kit.css)
   ------------------------------------------------------------
   목적: KB→화면설계→[와이어프레임]→디자인 파이프라인의 ③단계.
   원칙: 회색·박스·저해상도. 하이파이 Figma와 혼동되지 않도록
        브랜드 색·이미지·그림자를 쓰지 않는다. 구조(뼈대)만 담는다.
   대상: 375×812 모바일. 실제 디자인의 최종 테마는 '다크'다
        (와이어프레임은 관례상 밝은 회색으로 구조만 본다).
   ============================================================ */

:root {
  /* 회색 램프 — 이 킷은 이 값들 밖의 색을 쓰지 않는다 */
  --wf-bg:        #f4f4f5;   /* 페이지 배경 */
  --wf-surface:   #ffffff;   /* 폰 화면 바탕 */
  --wf-fill:      #e4e4e7;   /* 채움 박스(버튼·일러스트) */
  --wf-fill-2:    #f1f1f3;   /* 옅은 채움(입력칸) */
  --wf-line:      #d4d4d8;   /* 경계선 */
  --wf-line-2:    #a1a1aa;   /* 진한 경계선(강조 박스) */
  --wf-ink:       #3f3f46;   /* 본문 글자 */
  --wf-ink-soft:  #71717a;   /* 보조 글자 */
  --wf-ink-faint: #a1a1aa;   /* 플레이스홀더 */
  --wf-accent:    #52525b;   /* CTA 등 '진한 회색' 강조(색 아님) */

  --wf-radius: 10px;
  --wf-radius-sm: 6px;
  --wf-gap: 8px;
  --wf-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Pretendard,
             "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--wf-font);
  color: var(--wf-ink);
  background: var(--wf-bg);
  -webkit-font-smoothing: antialiased;
}

/* ---------- 페이지 헤더(문서 상단) ---------- */
.wf-doc {
  max-width: 1240px;
  margin: 0 auto;
  padding: 32px 24px 80px;
}
.wf-breadcrumb {
  font-size: 12px;
  color: var(--wf-ink-soft);
  letter-spacing: .02em;
  margin-bottom: 8px;
}
.wf-breadcrumb a { color: var(--wf-ink-soft); text-decoration: none; }
.wf-breadcrumb a:hover { text-decoration: underline; }
.wf-doc-title {
  font-size: 24px;
  font-weight: 700;
  margin: 0 0 6px;
  color: #27272a;
}
.wf-doc-meta {
  font-size: 13px;
  color: var(--wf-ink-soft);
  margin: 0 0 20px;
  line-height: 1.6;
}
.wf-doc-meta code {
  background: var(--wf-fill);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 12px;
}

/* 범례 */
.wf-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  padding: 12px 16px;
  background: var(--wf-surface);
  border: 1px solid var(--wf-line);
  border-radius: var(--wf-radius);
  font-size: 12px;
  color: var(--wf-ink-soft);
  margin-bottom: 28px;
}
.wf-legend b { color: var(--wf-ink); font-weight: 600; }

/* ---------- 섹션 그룹 ---------- */
.wf-section { margin-bottom: 40px; }
.wf-section > h2 {
  font-size: 16px;
  font-weight: 700;
  color: #27272a;
  margin: 0 0 4px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--wf-line);
}
.wf-section > .wf-section-desc {
  font-size: 13px;
  color: var(--wf-ink-soft);
  margin: 8px 0 18px;
}

/* 폰 카드가 가로로 흐르는 갤러리 행 */
.wf-row {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
}

/* ---------- 화면 카드(폰 + 캡션) ---------- */
.wf-screencard { width: 375px; }
.wf-statechip {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  color: var(--wf-ink-soft);
  background: var(--wf-fill);
  border-radius: 999px;
  padding: 3px 10px;
  margin-bottom: 8px;
}
.wf-caption {
  font-size: 12px;
  color: var(--wf-ink-soft);
  margin-top: 10px;
  line-height: 1.5;
}
.wf-caption .n {
  display: inline-block;
  min-width: 16px; height: 16px;
  line-height: 16px; text-align: center;
  font-size: 10px; font-weight: 700;
  color: #fff; background: var(--wf-line-2);
  border-radius: 50%; margin-right: 5px;
}

/* ---------- 폰 프레임 ---------- */
.wf-phone {
  position: relative;
  width: 375px;
  height: 812px;
  background: var(--wf-surface);
  border: 1.5px solid var(--wf-line-2);
  border-radius: 18px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.wf-phone.tall { height: 900px; } /* error 등 늘어난 화면 표시용 */

/* 상태 표시줄 */
.wf-statusbar {
  height: 44px;
  flex: 0 0 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  font-size: 12px;
  font-weight: 600;
  color: var(--wf-ink);
  border-bottom: 1px dashed var(--wf-line);
}
.wf-statusbar::before { content: "9:41"; }
.wf-statusbar::after { content: "▮▮▮ ▮"; letter-spacing: -1px; color: var(--wf-ink-faint); }

/* 네비 헤더 */
.wf-header {
  height: 56px;
  flex: 0 0 56px;
  display: flex;
  align-items: center;
  padding: 0 16px;
  gap: 12px;
  border-bottom: 1px solid var(--wf-line);
  font-size: 14px;
  color: var(--wf-ink-soft);
}
.wf-header .back { font-size: 18px; color: var(--wf-ink); }

/* 본문 */
.wf-body {
  flex: 1 1 auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow: hidden;
}
.wf-body.center { justify-content: center; align-items: center; text-align: center; }

/* 하단 고정 영역 */
.wf-footer {
  padding: 16px;
  border-top: 1px dashed var(--wf-line);
}
.wf-homebar {
  height: 5px;
  width: 134px;
  margin: 8px auto 6px;
  background: var(--wf-line-2);
  border-radius: 999px;
}

/* ---------- 프리미티브(부품) ---------- */

/* 브랜드 로고 자리 */
.wf-logo {
  height: 32px;
  width: 140px;
  margin: 0 auto;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--wf-line);
  border-radius: var(--wf-radius-sm);
  font-size: 11px; letter-spacing: .08em;
  color: var(--wf-ink-faint);
  background: var(--wf-fill-2);
}

/* 제목 */
.wf-title { font-size: 20px; font-weight: 700; color: var(--wf-ink); margin: 0; }

/* 본문 텍스트 라인(플레이스홀더) */
.wf-text { font-size: 13px; color: var(--wf-ink-soft); line-height: 1.6; margin: 0; }
.wf-lines { display: flex; flex-direction: column; gap: 6px; width: 100%; }
.wf-lines i { display: block; height: 8px; background: var(--wf-fill); border-radius: 3px; }
.wf-lines i.s { width: 60%; }
.wf-lines i.m { width: 80%; }

/* 입력칸 */
.wf-input {
  height: 50px;
  display: flex; align-items: center;
  padding: 0 14px;
  border: 1px solid var(--wf-line-2);
  border-radius: var(--wf-radius-sm);
  background: var(--wf-fill-2);
  font-size: 13px; color: var(--wf-ink-faint);
}
.wf-input.filled { color: var(--wf-ink); background: var(--wf-surface); }
.wf-input.focus { border-color: var(--wf-ink); border-width: 1.5px; }
.wf-field { display: flex; flex-direction: column; gap: 8px; }

/* PIN 4칸 */
.wf-pin { display: flex; gap: 12px; justify-content: center; }
.wf-pin span {
  width: 48px; height: 50px;
  border: 1px solid var(--wf-line-2);
  border-radius: var(--wf-radius-sm);
  background: var(--wf-fill-2);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; color: var(--wf-ink);
}
.wf-pin.filled span::after { content: "•"; }

/* 라벨(오류·도움) */
.wf-label {
  font-size: 12px;
  color: var(--wf-ink-soft);
}
.wf-label.error { color: var(--wf-ink); }
.wf-label.error::before { content: "⚠ "; }

/* 버튼 */
.wf-btn {
  height: 52px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--wf-radius-sm);
  background: var(--wf-accent);
  color: #fff;
  font-size: 14px; font-weight: 600;
}
.wf-btn.ghost { background: var(--wf-fill); color: var(--wf-ink); border: 1px solid var(--wf-line-2); }

/* 링크 텍스트 */
.wf-link { font-size: 13px; color: var(--wf-ink); text-decoration: underline; text-align: center; }

/* 체크 + 텍스트 */
.wf-check { display: flex; align-items: flex-start; gap: 8px; font-size: 12px; color: var(--wf-ink-soft); }
.wf-check::before {
  content: "";
  flex: 0 0 18px; width: 18px; height: 18px;
  border: 1.5px solid var(--wf-line-2);
  border-radius: 4px;
  margin-top: 1px;
}
.wf-check.on::before { content: "✓"; color: #fff; background: var(--wf-accent); border-color: var(--wf-accent); display:flex; align-items:center; justify-content:center; font-size:12px; }

/* 아이콘 자리 */
.wf-icon {
  width: 24px; height: 24px;
  border: 1px solid var(--wf-line-2);
  border-radius: 5px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px; color: var(--wf-ink-faint);
}

/* 일러스트/이미지 자리 — 대각선 X 로 '이미지 placeholder' 표시 */
.wf-illu {
  width: 84px; height: 100px;
  margin: 0 auto;
  border: 1px solid var(--wf-line-2);
  border-radius: var(--wf-radius-sm);
  background:
    linear-gradient(to top right, transparent 49%, var(--wf-line) 49.5%, var(--wf-line) 50.5%, transparent 51%),
    linear-gradient(to top left,  transparent 49%, var(--wf-line) 49.5%, var(--wf-line) 50.5%, transparent 51%),
    var(--wf-fill-2);
}

/* 구획 박스(약관 스크롤, 동의 박스 등) */
.wf-box {
  border: 1px solid var(--wf-line);
  border-radius: var(--wf-radius-sm);
  padding: 14px;
  background: var(--wf-fill-2);
  display: flex; flex-direction: column; gap: 10px;
}
.wf-box.scroll { flex: 1 1 auto; overflow: hidden; position: relative; }
.wf-box.scroll::after {
  content: ""; position: absolute; right: 6px; top: 14px; bottom: 14px;
  width: 4px; border-radius: 999px; background: var(--wf-line);
}

/* ---------- 팝업/오버레이 ---------- */
.wf-phone .wf-dim {
  position: absolute; inset: 0;
  background: rgba(39,39,42,.38);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.wf-popup {
  width: 100%;
  background: var(--wf-surface);
  border: 1px solid var(--wf-line-2);
  border-radius: var(--wf-radius);
  padding: 28px 20px 20px;
  display: flex; flex-direction: column; gap: 14px;
  text-align: center;
}
.wf-badge19 {
  width: 56px; height: 56px; margin: 0 auto;
  border: 1.5px solid var(--wf-line-2); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; font-weight: 800; color: var(--wf-ink);
}

/* ---------- 주석(annotation) ---------- */
/* 번호 마커: 폰 안의 요소에 찍고, 아래 주석 목록의 같은 번호와 잇는다 */
.wf-annomark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px; flex: 0 0 18px;
  border-radius: 50%;
  background: var(--wf-ink); color: #fff;
  font-size: 10px; font-weight: 700;
  font-variant-numeric: tabular-nums;
}
/* 입력칸 오른쪽에 마커 */
.wf-input.mk { justify-content: space-between; }
/* 버튼 안 오른쪽에 마커(잘리지 않게 내부 배치) */
.wf-btn { position: relative; }
.wf-btn .wf-annomark { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); background: #fff; color: var(--wf-accent); }
.wf-link .wf-annomark, .wf-check .wf-annomark { vertical-align: middle; margin-left: 5px; }

/* 폰 아래 주석 목록 */
.wf-annolist {
  list-style: none; margin: 10px 0 0; padding: 12px;
  background: var(--wf-surface);
  border: 1px solid var(--wf-line);
  border-radius: var(--wf-radius-sm);
  display: flex; flex-direction: column; gap: 8px;
}
.wf-annolist .head {
  font-size: 10px; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: var(--wf-ink-faint);
  margin-bottom: 2px;
}
.wf-annolist > li {
  display: flex; gap: 8px;
  font-size: 12px; color: var(--wf-ink); line-height: 1.5;
}
.wf-annolist > li > .wf-annomark { margin-top: 1px; }
/* 유형 태그: 색이 아니라 글자로 구분(저해상도 원칙 유지) */
.wf-annotag {
  display: inline-block;
  font-size: 10px; font-weight: 700; letter-spacing: .02em;
  padding: 1px 6px; border-radius: 4px;
  background: var(--wf-fill); color: var(--wf-ink-soft);
  margin-right: 4px; white-space: nowrap;
}
.wf-annolist code { background: var(--wf-fill); padding: 0 4px; border-radius: 3px; font-size: 11px; }

/* ---------- 갤러리 인덱스(index.html) ---------- */
.wf-index-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 18px;
}
.wf-index-card {
  display: block;
  border: 1px solid var(--wf-line);
  border-radius: var(--wf-radius);
  background: var(--wf-surface);
  padding: 18px;
  text-decoration: none;
  color: var(--wf-ink);
  transition: border-color .15s, transform .15s;
}
.wf-index-card:hover { border-color: var(--wf-line-2); transform: translateY(-2px); }
.wf-index-card .pg { font-size: 12px; color: var(--wf-ink-faint); font-weight: 600; }
.wf-index-card .nm { font-size: 15px; font-weight: 700; margin: 4px 0 8px; }
.wf-index-card .st { font-size: 12px; color: var(--wf-ink-soft); }
.wf-index-card.todo { opacity: .5; pointer-events: none; }
.wf-index-card.todo .st::before { content: "⏳ "; }

/* 반응형: 좁은 화면에서 폰이 넘치지 않게 가로 스크롤 허용 */
@media (max-width: 460px) {
  .wf-screencard, .wf-phone { width: 100%; max-width: 375px; }
}

/* ============================================================
   프로토타입(클리커블) — _wireframe-kit.js 가 동작을 붙인다
   ============================================================ */

/* 상단 툴바(모드 전환·핫스팟 토글) */
.wf-toolbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 10px 24px; margin: -32px -24px 24px;
  background: var(--wf-surface);
  border-bottom: 1px solid var(--wf-line);
}
.wf-toolbar button {
  font: inherit; font-size: 12px; font-weight: 600;
  padding: 5px 11px; border: 1px solid var(--wf-line-2);
  border-radius: 6px; background: var(--wf-fill-2);
  color: var(--wf-ink); cursor: pointer;
}
.wf-toolbar button:hover { border-color: var(--wf-ink); }
.wf-tb-modes { display: flex; gap: 6px; }
.wf-tb-modes button.on { background: var(--wf-accent); color: #fff; border-color: var(--wf-accent); }
.wf-tb-flow { display: flex; align-items: center; gap: 8px; }
.wf-tb-label { font-size: 13px; font-weight: 700; color: var(--wf-ink); }
.wf-tb-hint { font-size: 12px; color: var(--wf-ink-faint); }
.wf-tb-hot { margin-left: auto; font-size: 12px; color: var(--wf-ink-soft); display: flex; align-items: center; gap: 5px; cursor: pointer; user-select: none; }

/* 프레임 진입 버튼(전체 모드에서 이 화면부터 흐름 시작) */
.wf-playbtn {
  display: inline-block; margin: 0 0 8px 8px;
  font-size: 11px; font-weight: 600; padding: 3px 9px;
  border: 1px solid var(--wf-line-2); border-radius: 999px;
  background: var(--wf-surface); color: var(--wf-ink-soft); cursor: pointer;
}
.wf-playbtn:hover { border-color: var(--wf-accent); color: var(--wf-accent); }

/* 핫스팟(클릭 가능한 요소) 어포던스 */
.is-hotspot { cursor: pointer; }
.is-hotspot:hover { outline: 2px solid var(--wf-accent); outline-offset: 2px; border-radius: 5px; }
body.show-hotspots .is-hotspot { outline: 2px dashed var(--wf-line-2); outline-offset: 2px; border-radius: 5px; }
body.show-hotspots .is-hotspot::after {
  content: "▶"; font-size: 8px; color: #fff; background: var(--wf-accent);
  border-radius: 3px; padding: 0 3px; margin-left: 4px; vertical-align: middle;
}

/* 전체 모드에서 이동 시 대상 프레임 반짝임 */
.wf-flash .wf-phone { box-shadow: 0 0 0 3px var(--wf-accent); }

/* 흐름(prototype) 모드 — 한 화면만 가운데 */
body.mode-flow .wf-breadcrumb,
body.mode-flow .wf-doc-title,
body.mode-flow .wf-doc-meta,
body.mode-flow .wf-legend,
body.mode-flow .wf-section > h2,
body.mode-flow .wf-section > .wf-section-desc { display: none; }
body.mode-flow .wf-section { margin-bottom: 0; }
body.mode-flow .wf-row { justify-content: center; }
body.mode-flow .wf-screencard { display: none; }
body.mode-flow .wf-screencard.is-current { display: block; }
body.mode-flow .wf-playbtn { display: none; }
