/* wireframe.css — Playground(제작 도구) 저충실도 스켈레톤 공통 스타일.
   회색 그레이스케일 + 점선 박스 + placeholder. player-ui 와 동일 토큰 계승.
   Player 는 16:9 고정 캔버스, Playground 는 도구 셸(위저드+에디터) 레이아웃. */

:root {
  --wf-bg: #e9e9e9;        /* 페이지 배경 */
  --wf-stage: #d9d9d9;     /* 작업 캔버스/미리보기 */
  --wf-panel: #cfcfcf;     /* 패널/카드 */
  --wf-panel-2: #c2c2c2;   /* 패널 강조 */
  --wf-surface: #f3f3f3;   /* 밝은 카드 표면 */
  --wf-line: #8c8c8c;      /* 테두리(점선) */
  --wf-line-solid: #707070;
  --wf-ink: #444;          /* 본문 텍스트 */
  --wf-muted: #8f8f8f;     /* placeholder 텍스트 */
  --wf-accent: #a8a8a8;    /* 버튼 등 강조(여전히 회색) */
  --wf-radius: 4px;
  --wf-mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --wf-sans: system-ui, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--wf-bg);
  color: var(--wf-ink);
  font-family: var(--wf-sans);
  -webkit-font-smoothing: antialiased;
}

/* ── 상단 와이어프레임 주석 바 (nav.js가 주입) ── */
.wf-nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 8px 14px;
  background: #3d3d3d; color: #ddd;
  font-family: var(--wf-mono); font-size: 12px;
}
.wf-nav b { color: #fff; letter-spacing: .5px; }
.wf-nav .wf-nav-links { display: flex; gap: 6px; flex-wrap: wrap; }
.wf-nav a {
  color: #cfcfcf; text-decoration: none;
  padding: 3px 8px; border: 1px solid #5a5a5a; border-radius: 3px;
}
.wf-nav a:hover { background: #555; color: #fff; }
.wf-nav a.is-active { background: #cfcfcf; color: #2a2a2a; border-color: #cfcfcf; }
.wf-tag {
  margin-left: auto; padding: 2px 8px; border: 1px dashed #888; border-radius: 3px;
  color: #bbb;
}

/* ── 위저드 단계 레일 (nav.js가 주입): 퍼널 진행 표시 ── */
.wf-rail {
  position: sticky; top: 35px; z-index: 49;
  display: flex; align-items: center; flex-wrap: wrap; gap: 4px;
  padding: 7px 14px;
  background: #d2d2d2; border-bottom: 1px solid var(--wf-line);
  font-family: var(--wf-mono); font-size: 12px;
}
.wf-rail .step {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px; border: 1px solid var(--wf-line);
  border-radius: 14px; background: var(--wf-surface);
  color: var(--wf-muted); text-decoration: none;
}
.wf-rail .step .n {
  display: inline-flex; align-items: center; justify-content: center;
  width: 16px; height: 16px; border-radius: 50%;
  border: 1px solid var(--wf-line); font-size: 10px;
}
.wf-rail .step:hover { border-color: var(--wf-line-solid); }
.wf-rail .step.is-active {
  background: #3d3d3d; color: #fff; border-color: #3d3d3d;
}
.wf-rail .step.is-active .n { border-color: #bbb; color: #fff; }
.wf-rail .sep { color: var(--wf-muted); padding: 0 2px; }

/* ── 메인 컨테이너 ── */
.wf-main { max-width: 1000px; margin: 0 auto; padding: 24px 16px 60px; }
.wf-main h1 { font-size: 18px; margin: 0 0 4px; }
.wf-lead {
  font-family: var(--wf-mono); font-size: 12px; color: #6f6f6f; line-height: 1.7;
  margin: 0 0 20px;
}
.wf-lead b { color: #4a4a4a; }

/* 화면 제목 + 다음/이전 액션 헤더 */
.wf-pagehead {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 18px; flex-wrap: wrap;
}
.wf-pagehead .wf-spacer { margin-left: auto; }
.wf-pagehead .wf-step-no {
  font-family: var(--wf-mono); font-size: 12px; color: var(--wf-muted);
  border: 1px solid var(--wf-line); border-radius: 12px; padding: 2px 10px;
}

/* ── 버튼 (player-ui 계승 + primary) ── */
.wf-btn {
  font-family: var(--wf-mono); font-size: 12px; color: var(--wf-ink);
  background: var(--wf-panel); border: 1px solid var(--wf-line-solid);
  border-radius: 3px; padding: 6px 12px; cursor: pointer; text-decoration: none;
  display: inline-flex; align-items: center; gap: 6px;
}
.wf-btn:hover { background: var(--wf-panel-2); }
.wf-btn--lg { font-size: 14px; padding: 10px 22px; }
.wf-btn--ghost { background: transparent; }
.wf-btn--primary { background: #4a4a4a; color: #fff; border-color: #3d3d3d; }
.wf-btn--primary:hover { background: #3d3d3d; }
.wf-btn[aria-disabled="true"] { opacity: .5; pointer-events: none; }

/* ── 카드/패널 ── */
.wf-card {
  border: 1px solid var(--wf-line); border-radius: var(--wf-radius);
  background: var(--wf-surface); overflow: hidden; margin-bottom: 16px;
}
.wf-card__head {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-bottom: 1px solid var(--wf-line);
  font-family: var(--wf-mono); font-size: 13px; background: #ececec;
}
.wf-card__head .wf-spacer { margin-left: auto; }
.wf-card__body { padding: 14px; }
.wf-note {
  font-family: var(--wf-mono); font-size: 11.5px; color: #6f6f6f; line-height: 1.7;
}
.wf-note b { color: #4a4a4a; }

/* placeholder 박스 공통 (player-ui 계승) */
.wf-ph {
  display: flex; align-items: center; justify-content: center;
  border: 1px dashed var(--wf-line);
  color: var(--wf-muted); font-family: var(--wf-mono); font-size: 13px;
  text-align: center; padding: 8px; user-select: none;
}
.wf-ph--img {
  background-image: repeating-linear-gradient(
    45deg, transparent, transparent 9px, rgba(0,0,0,.06) 9px, rgba(0,0,0,.06) 10px);
}

/* ── 칩 (타입 / 백엔드 / 상태) — 색 대신 회색 음영 + 기호로 상태 구분 ── */
.wf-chip {
  display: inline-flex; align-items: center; gap: 5px;
  font-family: var(--wf-mono); font-size: 11px; line-height: 1;
  padding: 3px 8px; border-radius: 10px;
  border: 1px solid var(--wf-line); background: var(--wf-panel-2); color: var(--wf-ink);
  white-space: nowrap;
}
.wf-chip--soft { background: var(--wf-surface); }
.wf-chip--lock { border-style: dashed; color: var(--wf-muted); }
/* 상태 기호: ○ 빈칸 / ◐ 생성중 / ● 완료 / ✕ 검증실패 — 음영으로 강조 */
.wf-chip--empty { background: var(--wf-surface); color: var(--wf-muted); border-style: dashed; }
.wf-chip--gen   { background: var(--wf-panel-2); }
.wf-chip--done  { background: #4a4a4a; color: #fff; border-color: #3d3d3d; }
.wf-chip--fail  { background: #efefef; color: #333; border: 1px solid #333; }

/* ── 장르 선택 그리드 ── */
.wf-genre-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px,1fr)); gap: 14px;
}
.wf-genre {
  border: 1px solid var(--wf-line); border-radius: var(--wf-radius);
  background: var(--wf-surface); overflow: hidden; text-decoration: none; color: inherit;
  display: flex; flex-direction: column;
}
.wf-genre:hover { border-color: var(--wf-line-solid); background: #ececec; }
.wf-genre__prev { aspect-ratio: 16/9; }
.wf-genre__meta { padding: 10px 12px; }
.wf-genre__meta h3 { margin: 0 0 4px; font-size: 13px; }
.wf-genre--soon { opacity: .65; }
.wf-genre--soon .wf-genre__prev { border-bottom: 1px dashed var(--wf-line); }

/* ── 앱 셸: 슬롯 사이드바 + 메인 ── */
.wf-shell { display: grid; grid-template-columns: 270px 1fr; gap: 16px; align-items: start; }
.wf-side { position: sticky; top: 92px; }
@media (max-width: 760px) { .wf-shell { grid-template-columns: 1fr; } .wf-side { position: static; } }

/* ── 슬롯 목록 행 ── */
.wf-slot-row {
  display: grid; grid-template-columns: 24px 1fr auto auto auto auto;
  align-items: center; gap: 10px;
  padding: 12px 8px; border-bottom: 1px dashed var(--wf-line);
  text-decoration: none; color: inherit;
}
.wf-slot-row:last-child { border-bottom: none; }
.wf-slot-row:hover { background: #ececec; }
.wf-slot-row .ico {
  width: 24px; height: 24px; border: 1px solid var(--wf-line); border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--wf-mono); font-size: 11px; color: var(--wf-muted);
}
.wf-slot-row .name { font-size: 13px; }
.wf-slot-row .desc { font-size: 11px; color: var(--wf-muted); font-family: var(--wf-mono); margin-top: 2px; }
@media (max-width: 620px) {
  .wf-slot-row { grid-template-columns: 24px 1fr; }
  .wf-slot-row .wf-chip { grid-column: 2; justify-self: start; }
}

/* 사이드바 슬롯 미니 네비 */
.wf-side-nav a {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px; border-bottom: 1px dashed var(--wf-line);
  text-decoration: none; color: var(--wf-ink); font-size: 12px;
}
.wf-side-nav a:last-child { border-bottom: none; }
.wf-side-nav a:hover { background: #ececec; }
.wf-side-nav a.is-active { background: var(--wf-panel-2); font-weight: 700; }

/* ── 프롬프트/결과 박스 (슬롯 편집) ── */
.wf-field { margin-bottom: 14px; }
.wf-field > label {
  display: block; font-family: var(--wf-mono); font-size: 11.5px; color: var(--wf-muted);
  margin-bottom: 5px;
}
.wf-input, .wf-textarea {
  width: 100%; border: 1px solid var(--wf-line); border-radius: var(--wf-radius);
  background: #fff; color: var(--wf-ink); font-family: var(--wf-sans); font-size: 13px;
  padding: 10px 12px; resize: vertical;
}
.wf-textarea { min-height: 90px; line-height: 1.55; }
.wf-input::placeholder, .wf-textarea::placeholder { color: var(--wf-muted); }
.wf-result {
  border: 1px dashed var(--wf-line); border-radius: var(--wf-radius);
  background: var(--wf-stage); padding: 12px; min-height: 120px;
  font-family: var(--wf-mono); font-size: 12px; color: var(--wf-ink); line-height: 1.7;
}

/* 두 칼럼 (입력 ↔ 결과/미리보기) */
.wf-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 760px) { .wf-cols { grid-template-columns: 1fr; } }

/* ── 검증 체크리스트 행 ── */
.wf-check-row {
  display: grid; grid-template-columns: 28px 1fr auto; align-items: center; gap: 12px;
  padding: 12px 8px; border-bottom: 1px dashed var(--wf-line);
}
.wf-check-row:last-child { border-bottom: none; }
.wf-check-row .mark {
  width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--wf-line-solid);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--wf-mono); font-size: 12px;
}
.wf-check-row .mark.ok { background: #4a4a4a; color: #fff; border-color: #3d3d3d; }
.wf-check-row .mark.bad { background: #fff; color: #222; border: 2px solid #222; }
.wf-check-row .what { font-size: 13px; }
.wf-check-row .hint { font-size: 11px; color: var(--wf-muted); font-family: var(--wf-mono); margin-top: 2px; }

/* ── 진행 바 (슬롯 채움률 등) ── */
.wf-progress { height: 8px; background: var(--wf-panel-2); border: 1px solid var(--wf-line); border-radius: 6px; overflow: hidden; }
.wf-progress > i { display: block; height: 100%; background: var(--wf-accent); }

/* 16:9 미리보기 스테이지 (player-ui 캔버스 대역) */
.wf-stageview {
  position: relative; width: 100%; aspect-ratio: 16/9;
  background: var(--wf-stage); border: 2px solid var(--wf-line-solid); border-radius: var(--wf-radius);
  overflow: hidden;
}
.wf-stageview .wf-namebox {
  position: absolute; left: 5%; bottom: calc(5% + 22%);
  padding: 5px 12px; background: var(--wf-panel-2); border: 1px solid var(--wf-line-solid);
  border-radius: var(--wf-radius); font-size: 12px;
}
.wf-stageview .wf-dialogue {
  position: absolute; left: 5%; right: 5%; bottom: 5%; height: 24%;
  background: var(--wf-panel); border: 1px solid var(--wf-line-solid); border-radius: var(--wf-radius);
  padding: 12px 14px; font-size: 12px; line-height: 1.5;
}
.wf-stageview .wf-sprite { position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); width: 34%; height: 78%; }

/* ── 키/값 요약 (배포 등) ── */
.wf-kv { display: grid; grid-template-columns: 150px 1fr; gap: 10px 16px; font-size: 13px; }
.wf-kv dt { color: var(--wf-muted); font-family: var(--wf-mono); font-size: 12px; }
.wf-kv dd { margin: 0; }

/* 4기둥/게이트 안내 박스 */
.wf-callout {
  border: 1px dashed var(--wf-line-solid); border-radius: var(--wf-radius);
  background: rgba(255,255,255,.35); padding: 12px 14px;
  font-family: var(--wf-mono); font-size: 11.5px; color: #5a5a5a; line-height: 1.7;
}
.wf-callout b { color: #3d3d3d; }

/* 화면 설명 캡션 */
.wf-caption {
  max-width: 1000px; margin: 8px auto 0; padding: 0 16px 30px;
  font-family: var(--wf-mono); font-size: 12px; color: #6f6f6f; line-height: 1.7;
}
.wf-caption b { color: #4a4a4a; }

/* index 화면 목록 */
.wf-index-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px,1fr)); gap: 14px; margin-top: 18px; }
.wf-index-card { border: 1px solid var(--wf-line); border-radius: var(--wf-radius); background: var(--wf-surface); text-decoration: none; color: inherit; overflow: hidden; }
.wf-index-card .prev { aspect-ratio: 16/9; }
.wf-index-card .label { padding: 8px 10px; font-family: var(--wf-mono); font-size: 12px; }
.wf-index-card:hover { border-color: var(--wf-line-solid); background: #ececec; }
