/* wireframe.css — VN Player 저충실도 스켈레톤 공통 스타일
   회색 그레이스케일 + 점선 박스 + placeholder. 색/폰트는 나중에 실제 디자인에서 교체. */

:root {
  --wf-bg: #e9e9e9;        /* 페이지 배경 */
  --wf-stage: #d9d9d9;     /* 게임 스테이지 */
  --wf-panel: #cfcfcf;     /* 패널/오버레이 */
  --wf-panel-2: #c2c2c2;   /* 패널 강조 */
  --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;
}

/* ── 무대(게임 뷰포트): VN은 고정 캔버스라 16:9 고정 ── */
.wf-wrap { display: flex; justify-content: center; padding: 22px 16px 40px; }
.wf-stage {
  position: relative;
  width: 100%; max-width: 960px; aspect-ratio: 16 / 9;
  background: var(--wf-stage);
  border: 2px solid var(--wf-line-solid);
  border-radius: var(--wf-radius);
  overflow: hidden;
}

/* placeholder 박스 공통 */
.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-abs { position: absolute; }
.wf-fill { position: absolute; inset: 0; }

/* 배경 레이어 */
.wf-bg-layer { position: absolute; inset: 0; }

/* 캐릭터 스프라이트 자리 */
.wf-sprite {
  position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 34%; height: 78%;
}

/* 이름박스 + 대사창 (ADV) */
.wf-namebox {
  position: absolute; left: 5%; bottom: calc(5% + 22%);
  min-width: 120px; padding: 6px 14px;
  background: var(--wf-panel-2); border: 1px solid var(--wf-line-solid);
  border-radius: var(--wf-radius); font-size: 13px; color: var(--wf-ink);
}
.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: 14px 16px; font-size: 14px; color: var(--wf-ink); line-height: 1.55;
}
.wf-advance {
  position: absolute; right: 22px; bottom: calc(5% + 10px);
  font-family: var(--wf-mono); font-size: 16px; color: var(--wf-muted);
}

/* 하단/상단 컨트롤 버튼 줄 */
.wf-controls {
  position: absolute; right: 12px; top: 10px;
  display: flex; gap: 6px;
}
.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: 5px 10px; cursor: pointer; text-decoration: none;
  display: inline-flex; align-items: center; gap: 5px;
}
.wf-btn:hover { background: var(--wf-panel-2); }
.wf-btn--lg { font-size: 14px; padding: 10px 22px; min-width: 180px; justify-content: center; }
.wf-btn--ghost { background: transparent; }

/* 타이틀 메뉴 */
.wf-title-center {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 14px;
}
.wf-logo {
  width: 56%; height: 26%; margin-bottom: 8px;
}

/* 오버레이(선택지/백로그/세이브/설정 공용) */
.wf-overlay {
  position: absolute; inset: 0;
  background: rgba(60,60,60,.45);
  display: flex; align-items: center; justify-content: center;
  padding: 5%;
}
.wf-panelbox {
  width: 100%; height: 100%;
  background: var(--wf-panel); border: 1px solid var(--wf-line-solid);
  border-radius: var(--wf-radius);
  display: flex; flex-direction: column; overflow: hidden;
}
.wf-panelbox__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;
}
.wf-panelbox__head .wf-spacer { margin-left: auto; }
.wf-panelbox__body { flex: 1; overflow: auto; padding: 14px; }

/* 선택지 스택 */
.wf-choices {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 12px;
}

/* 탭 */
.wf-tabs { display: flex; gap: 6px; }
.wf-tab {
  font-family: var(--wf-mono); font-size: 12px; padding: 4px 12px;
  border: 1px solid var(--wf-line); border-bottom: none; border-radius: 3px 3px 0 0;
  background: var(--wf-panel-2); cursor: pointer;
}
.wf-tab.is-active { background: var(--wf-panel); font-weight: 700; }

/* 그리드 (세이브 슬롯 / CG 갤러리) */
.wf-grid { display: grid; gap: 12px; }
.wf-grid--slots { grid-template-columns: repeat(3, 1fr); }
.wf-grid--gallery { grid-template-columns: repeat(4, 1fr); }
.wf-slot {
  border: 1px dashed var(--wf-line); border-radius: var(--wf-radius);
  background: var(--wf-panel-2); overflow: hidden;
  display: flex; flex-direction: column;
}
.wf-slot__thumb { aspect-ratio: 16/9; }
.wf-slot__meta {
  padding: 6px 8px; font-family: var(--wf-mono); font-size: 11px; color: var(--wf-ink);
  display: flex; justify-content: space-between;
}

/* 백로그 줄 */
.wf-log-row {
  display: grid; grid-template-columns: 90px 1fr; gap: 10px;
  padding: 8px 0; border-bottom: 1px dashed var(--wf-line); font-size: 13px;
}
.wf-log-row .who { color: var(--wf-muted); font-family: var(--wf-mono); }

/* 설정 행 */
.wf-set-row {
  display: grid; grid-template-columns: 140px 1fr 60px; align-items: center;
  gap: 12px; padding: 12px 0; border-bottom: 1px dashed var(--wf-line); font-size: 13px;
}
.wf-bar { height: 8px; background: var(--wf-panel-2); border: 1px solid var(--wf-line); border-radius: 6px; position: relative; }
.wf-bar > i { position: absolute; top: -4px; width: 14px; height: 14px; background: var(--wf-accent); border: 1px solid var(--wf-line-solid); border-radius: 50%; }
.wf-toggle { display: inline-flex; border: 1px solid var(--wf-line); border-radius: 4px; overflow: hidden; }
.wf-toggle span { padding: 4px 10px; font-family: var(--wf-mono); font-size: 11px; cursor: pointer; }
.wf-toggle span.is-on { background: var(--wf-accent); color: #2a2a2a; }

/* 출처표기 뱃지 (4기둥: 로고+하이퍼링크만) */
.wf-hostbadge {
  position: absolute; left: 12px; bottom: 12px;
  font-family: var(--wf-mono); font-size: 11px; color: var(--wf-muted);
  border: 1px dashed var(--wf-line); border-radius: 3px; padding: 3px 8px;
  background: rgba(255,255,255,.25);
}

/* 화면 설명 캡션 */
.wf-caption {
  max-width: 960px; margin: 0 auto; 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 { max-width: 960px; margin: 0 auto; padding: 24px 16px 60px; }
.wf-index h1 { font-size: 18px; }
.wf-index-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px,1fr)); gap: 14px; margin-top: 18px; }
.wf-card { border: 1px solid var(--wf-line); border-radius: var(--wf-radius); background: #f3f3f3; text-decoration: none; color: inherit; overflow: hidden; }
.wf-card .wf-card__prev { aspect-ratio: 16/9; }
.wf-card .wf-card__label { padding: 8px 10px; font-family: var(--wf-mono); font-size: 12px; }
.wf-card:hover { border-color: var(--wf-line-solid); background: #ececec; }
