/* 면접 사전 질문 — 에디토리얼 모노크롬 (2026-10-02 Claude 디자인 시안 반영)
   흰 바탕 · 먹색 · 포인트 색 하나(옥스블러드), 프리텐다드 굵기 대비(큰 제목은 가늘게, 작은 영문 라벨은 넓은 자간),
   모서리는 각지게. 휴대폰 기준으로 짜고 960px 이상에서 웹 배치로 바꾼다. */

:root {
  --ink: #141414;
  --paper: #ffffff;
  --stone: #f3f0ec;
  --stone-2: #f6f4f1;
  --line: #e7e3de;
  --line-2: #ddd8d2;
  --muted: #5e5a55;
  --muted-2: #6e6a64;
  --faint: #8e8983;
  --accent: #7a2632;
  --on-dark-dim: #b8b4ae;
  --error: #b42318;
  --font: 'Pretendard Variable', Pretendard, -apple-system, 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
}

* { box-sizing: border-box; }
/* 숨김(hidden)이 화면 배치용 display(grid·flex)보다 항상 이기게 — 안 그러면 숨긴 화면이 겹쳐 보인다(2026-10-02 실제로 겹침) */
[hidden] { display: none !important; }
html, body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--font); font-size: 16px; line-height: 1.65; -webkit-text-size-adjust: 100%; }
/* 한글은 어절 단위로 줄바꿈, 긴 단어·주소는 안전하게 끊기 (base_rules 6-11) */
body, p, div, li, span, label, h1, h2, strong, textarea { word-break: keep-all; overflow-wrap: anywhere; }
h1, h2, p { margin: 0; }
button { font-family: inherit; }
.ico { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; flex-shrink: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* 모바일/웹 한쪽에만 보이는 조각 — 숨기기만 하고 보일 땐 각 조각의 원래 display 를 그대로 쓴다 */
@media (max-width: 959px) { .only-desktop { display: none !important; } }

/* ---------- 공통 조각 ---------- */
/* 세로로 쌓는 칸(웹 대화 왼쪽) 안에서 칸 너비로 늘어나지 않게 align-self 고정 */
.logo { display: block; height: 22px; width: auto; align-self: flex-start; flex-shrink: 0; }
.logo-on-dark { display: none; }
.label { font-size: 11px; font-weight: 600; letter-spacing: .2em; color: var(--accent); }
.eyebrow { font-size: 11px; font-weight: 600; letter-spacing: .18em; color: var(--ink); }
.eyebrow-dim { font-size: 11px; font-weight: 600; letter-spacing: .2em; color: var(--muted-2); }
.pill { font-size: 10px; font-weight: 600; letter-spacing: .18em; border: 1px solid var(--ink); border-radius: 999px; padding: 3px 9px; line-height: 1.4; }
.display { font-weight: 260; letter-spacing: -.035em; }
.lead { font-size: 15px; line-height: 1.7; color: var(--muted); }
.lead-sm { font-size: 15px; line-height: 1.65; color: var(--muted); }
.lead-sm b { color: var(--ink); }
.fine { font-size: 12px; line-height: 1.6; color: var(--muted-2); }
.center { text-align: center; }
.error { color: var(--error); font-size: 13px; min-height: 1.2em; }
.error:empty { min-height: 0; }

.bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 24px; border-bottom: 1px solid var(--line); background: var(--paper); }
.bar-right { display: flex; align-items: center; gap: 16px; }

.input { width: 100%; font: inherit; color: var(--ink); background: var(--paper); border: 1px solid var(--ink); border-radius: 0; padding: 14px 16px; outline: none; }
.input:focus { box-shadow: 0 0 0 3px rgba(122, 38, 50, .18); }
.input-code { height: 56px; font-size: 17px; letter-spacing: .12em; text-transform: uppercase; }
.input-code::placeholder { letter-spacing: 0; text-transform: none; }
.field-label { font-size: 13px; font-weight: 600; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 56px; padding: 0 24px; border-radius: 0; border: 1px solid transparent; font-size: 16px; font-weight: 600; cursor: pointer; }
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: #2a2a2a; }
.btn-primary:disabled { background: #bdb8b1; cursor: not-allowed; }
.btn-ghost { background: transparent; border-color: var(--ink); color: var(--ink); }
.link-btn { padding: 0; border: 0; background: none; font-size: 13px; font-weight: 600; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.notice { background: var(--stone); padding: 16px 18px; font-size: 14px; line-height: 1.65; }
.notice-icon { display: flex; gap: 12px; align-items: flex-start; }
.notice-icon .ico { margin-top: 2px; }

/* ---------- 1. 입장 ---------- */
.screen-enter { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.enter-hero { padding: 18px 24px 0; display: flex; flex-direction: column; }
.enter-hero-top { display: flex; align-items: center; justify-content: space-between; padding-bottom: 18px; border-bottom: 1px solid var(--line); margin: 0 -24px; padding-left: 24px; padding-right: 24px; }
.enter-hero-body { padding-top: 40px; display: flex; flex-direction: column; gap: 20px; }
.enter-title { font-size: 36px; line-height: 1.24; }
.meta3 { margin-top: 32px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--ink); border-bottom: 1px solid var(--line); }
.meta3 > div { padding: 14px 0; display: flex; flex-direction: column; gap: 4px; }
.meta3 > div + div { padding-left: 14px; border-left: 1px solid var(--line); }
.meta-num { font-size: 22px; font-weight: 300; letter-spacing: -.02em; }
.meta-key { font-size: 10px; font-weight: 600; letter-spacing: .16em; color: var(--muted); }
.enter-side { flex-grow: 1; display: flex; flex-direction: column; justify-content: flex-end; padding: 32px 24px calc(28px + env(safe-area-inset-bottom)); }
.enter-form { display: flex; flex-direction: column; gap: 10px; width: 100%; }
.enter-form .btn { margin-top: 4px; width: 100%; }

/* ---------- 2. 시작 안내 ---------- */
.intro-grid { padding: 32px 24px calc(28px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 32px; }
.intro-left, .intro-right { display: flex; flex-direction: column; gap: 16px; }
.intro-title { font-size: 26px; line-height: 1.4; font-weight: 300; }
.rules { list-style: none; margin: 12px 0 0; padding: 0; border-top: 1px solid var(--ink); }
.rules li { display: flex; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--line); }
/* 번호는 옆 글이 길어도 줄어들거나 '0/2'로 쪼개지지 않게 (2026-10-02 모바일에서 쪼개짐) */
.rules .rule-no { flex-shrink: 0; min-width: 20px; white-space: nowrap; font-size: 12px; font-weight: 600; letter-spacing: .1em; color: var(--accent); padding-top: 2px; }
.rules li > div { display: flex; flex-direction: column; gap: 4px; }
.rules strong { font-size: 16px; font-weight: 600; }
.rules li > div > span { font-size: 14px; line-height: 1.6; color: var(--muted); }
.rules .link-btn { align-self: flex-start; margin-top: 4px; }
.personas { display: grid; gap: 12px; }
.persona { display: flex; flex-direction: column; gap: 8px; padding: 18px; border: 1px solid var(--line-2); cursor: pointer; background: var(--paper); transition: border-color .15s; }
.persona.is-selected { border: 1.5px solid var(--ink); padding: 17.5px; }
.persona-top { display: flex; align-items: center; justify-content: space-between; }
.persona-case { font-size: 11px; font-weight: 600; letter-spacing: .16em; color: var(--muted-2); }
.persona.is-selected .persona-case { color: var(--accent); }
.persona input { width: 20px; height: 20px; margin: 0; accent-color: var(--ink); }
.persona strong { font-size: 17px; line-height: 1.4; font-weight: 600; }
.persona .p-summary { font-size: 14px; line-height: 1.6; color: var(--muted); }
.persona ul { margin: 4px 0 0; padding: 12px 0 0; list-style: none; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
.intro-cta .btn { width: 100%; }

/* ---------- 3. 대화 ---------- */
.screen-chat { min-height: 100vh; min-height: 100dvh; }
.chat-side { display: none; }
.chat-main { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.chat-bar { position: sticky; top: 0; z-index: 5; border-bottom: 0; padding-bottom: 10px; }
.counter { font-size: 11px; font-weight: 600; letter-spacing: .16em; }
.counter b { color: var(--accent); font-weight: 600; }
.segments { position: sticky; top: 52px; z-index: 5; background: var(--paper); display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; padding: 0 24px 14px; border-bottom: 1px solid var(--line); }
.segments span { height: 2px; background: var(--line); }
.segments span.done { background: var(--ink); }
.segments span.now { background: var(--accent); }
.chat-column { flex-grow: 1; width: 100%; padding: 16px 24px 8px; display: flex; flex-direction: column; }
.persona-chip { align-self: flex-start; font-size: 12px; color: var(--muted-2); border: 1px solid var(--line); border-radius: 999px; padding: 3px 12px; margin-bottom: 18px; }
.messages { display: flex; flex-direction: column; gap: 18px; }
.msg-ai { white-space: pre-wrap; }
.msg-ai .msg-tag { display: block; font-size: 11px; font-weight: 600; letter-spacing: .16em; color: var(--accent); margin-bottom: 6px; white-space: normal; }
.msg-ai.followup .msg-tag, .msg-ai.closing .msg-tag { color: var(--muted-2); }
.msg-ai.question .msg-text, .msg-ai.followup .msg-text, .msg-ai.closing .msg-text { font-size: 18px; line-height: 1.55; font-weight: 500; letter-spacing: -.01em; }
.msg-ai.reflect { font-size: 15px; line-height: 1.65; color: var(--muted); }
.msg-me { white-space: pre-wrap; background: var(--stone); padding: 14px 16px; margin-left: 40px; font-size: 15px; line-height: 1.65; }
.typing { display: flex; gap: 5px; padding: 14px 0 4px; }
.typing span { width: 6px; height: 6px; border-radius: 50%; background: var(--faint); animation: blink 1.2s infinite ease-in-out; }
.typing span:nth-child(2) { animation-delay: .2s; }
.typing span:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .typing span { animation: none; opacity: .6; } }
.chat-done { margin-top: 24px; }
.chat-done .btn { width: 100%; }

.composer { position: sticky; bottom: 0; z-index: 5; background: var(--paper); border-top: 1px solid var(--line); padding: 12px 24px calc(14px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 8px; }
.composer-note { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--muted-2); }
.composer-note .link-btn { font-size: 12px; }
.composer-row { display: flex; gap: 8px; align-items: flex-end; }
.composer textarea { flex-grow: 1; min-height: 52px; max-height: 40vh; resize: none; font-size: 15px; line-height: 1.5; }
.btn-send { width: 52px; min-height: 52px; height: 52px; padding: 0; flex-shrink: 0; }
.btn-send .send-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.btn-send .ico-right { display: none; }
.btn-send .ico { width: 20px; height: 20px; }
.composer-meta { font-size: 11px; color: var(--muted-2); letter-spacing: .03em; }

/* ---------- 4. 다시 읽기 ---------- */
.review-grid { display: flex; flex-direction: column; }
.review-main { padding: 32px 24px 0; display: flex; flex-direction: column; gap: 14px; }
.review-title { font-size: 28px; line-height: 1.3; font-weight: 300; }
.review-list { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.review-item { padding: 18px; border: 1px solid var(--line-2); display: flex; flex-direction: column; gap: 10px; }
.review-item .q { font-size: 12px; line-height: 1.5; color: var(--muted-2); }
.review-item .q b { color: var(--accent); letter-spacing: .1em; margin-right: 8px; }
.review-item .a { font-size: 15px; line-height: 1.65; white-space: pre-wrap; }
.review-item .row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.review-item .excl-tag { visibility: hidden; font-size: 11px; font-weight: 600; letter-spacing: .14em; color: var(--muted-2); }
.review-item .toggle { min-height: 36px; padding: 0 16px; border: 1px solid var(--ink); border-radius: 999px; background: var(--paper); font-size: 13px; font-weight: 600; color: var(--ink); cursor: pointer; }
.review-item.excluded { background: var(--stone-2); border-color: var(--stone-2); }
.review-item.excluded .q b { color: var(--muted-2); }
.review-item.excluded .a { color: var(--faint); text-decoration: line-through; }
.review-item.excluded .excl-tag { visibility: visible; }
.review-item.excluded .toggle { background: var(--ink); color: #fff; }
.review-end { height: 1px; }
.review-side { margin-top: 28px; padding: 24px 24px calc(28px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 14px; }
.confirm { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; line-height: 1.6; cursor: pointer; }
.confirm input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--ink); flex-shrink: 0; }
.review-side .btn { width: 100%; }
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--ink); border-bottom: 1px solid var(--line-2); }
.stats > div { padding: 16px 0; display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); }
.stats > div + div { padding-left: 20px; border-left: 1px solid var(--line-2); }
.stat-num { font-size: 34px; font-weight: 200; color: var(--ink); line-height: 1.2; }
.stat-accent { color: var(--accent); }
.side-text { font-size: 14px; line-height: 1.7; }

/* ---------- 5. 완료 ---------- */
/* 'done' 은 진행 막대·목차의 '완료' 표시에 쓰므로 화면 이름은 done-box (겹쳐서 막대가 검은 상자로 커진 적 있음, 2026-10-02) */
.done-box { padding: 48px 24px; display: flex; flex-direction: column; gap: 14px; max-width: 560px; }
.done-title { font-size: 36px; line-height: 1.25; }
.done-box .btn { align-self: flex-start; margin-top: 12px; }

/* ---------- 안내 창 ---------- */
.sheet { position: fixed; inset: 0; z-index: 20; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(20, 20, 20, .45); }
.sheet-panel { position: absolute; left: 0; right: 0; bottom: 0; max-width: 560px; margin: 0 auto; background: var(--paper); padding: 10px 24px calc(22px + env(safe-area-inset-bottom)); max-height: 82vh; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; }
.sheet-grip { width: 40px; height: 3px; background: var(--line-2); margin: 4px auto 12px; }
.sheet-title { font-size: 22px; font-weight: 300; letter-spacing: -.03em; }
.avoid-list { list-style: none; margin: 8px 0 12px; padding: 0; border-top: 1px solid var(--ink); }
.avoid-list li { border-bottom: 1px solid var(--line); }
.avoid-list button { width: 100%; display: flex; justify-content: space-between; align-items: center; text-align: left; font-size: 15px; color: var(--ink); cursor: pointer; background: transparent; border: 0; padding: 14px 2px; }
.avoid-list button::after { content: '+'; font-weight: 300; font-size: 18px; color: var(--muted-2); }
.avoid-list li.open button::after { content: '−'; }
.avoid-list .ex { display: none; background: var(--stone); padding: 12px 14px; margin: 0 0 14px; font-size: 14px; }
.avoid-list li.open .ex { display: block; }
.avoid-list li.open button { font-weight: 600; }
.sheet-panel .btn { width: 100%; }

/* ---------- 웹 배치 (960px 이상) ---------- */
@media (min-width: 960px) {
  .only-mobile { display: none !important; }
  .logo { height: 26px; }
  .bar { padding: 22px 64px; }
  .label { font-size: 12px; letter-spacing: .22em; }

  /* 입장: 왼쪽 먹색 판 / 오른쪽 입력 */
  .screen-enter { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); min-height: 100vh; }
  .enter-hero { background: var(--ink); color: #fff; padding: 48px 64px; justify-content: space-between; }
  .enter-hero-top { border: 0; margin: 0; padding: 0; }
  .logo-on-light { display: none; }
  .logo-on-dark { display: block; }
  .enter-hero .eyebrow-dim { color: var(--on-dark-dim); letter-spacing: .2em; }
  .enter-hero .label { color: var(--on-dark-dim); }
  .enter-hero-body { padding-top: 0; gap: 28px; }
  .enter-title { font-size: clamp(56px, 5vw, 76px); line-height: 1.12; font-weight: 200; letter-spacing: -.045em; }
  .enter-hero .lead { max-width: 460px; font-size: 17px; line-height: 1.75; color: #cfcbc5; }
  .meta3 { margin-top: 0; border-top-color: #3a3835; border-bottom: 0; }
  .meta3 > div { padding: 20px 0 0; }
  .meta3 > div + div { padding-left: 20px; border-left-color: #3a3835; }
  .meta-num { font-size: 30px; font-weight: 200; }
  .meta-key { font-size: 11px; color: var(--on-dark-dim); }
  .enter-side { padding: 48px 64px; justify-content: space-between; }
  .enter-side-top { display: flex; justify-content: flex-end; }
  .enter-form { max-width: 420px; align-self: center; gap: 12px; }
  .enter-form-title { font-size: 32px; line-height: 1.3; font-weight: 300; margin-bottom: 12px; }
  .input-code { height: 60px; font-size: 18px; }
  .enter-form .btn { min-height: 60px; }
  .enter-foot { font-size: 12px; color: var(--muted-2); letter-spacing: .04em; }

  /* 시작 안내: 왼쪽 안내 / 오른쪽 가상 지원자 */
  .intro-grid { max-width: 1280px; margin: 0 auto; padding: 56px 64px 64px; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 80px; }
  .intro-left { gap: 20px; }
  .intro-title { font-size: 40px; line-height: 1.32; font-weight: 260; }
  .rules strong { font-size: 17px; }
  .rules li > div > span { font-size: 15px; }
  .intro-right { gap: 20px; }
  .personas { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .persona { padding: 24px; gap: 12px; }
  .persona.is-selected { padding: 23.5px; }
  .persona strong { font-size: 20px; }
  .persona .p-summary, .persona ul { font-size: 14px; }
  .intro-cta { display: flex; justify-content: flex-end; margin-top: 8px; }
  .intro-cta .btn { width: 280px; min-height: 60px; }

  /* 대화: 왼쪽 진행 목차 / 가운데 대화 */
  .screen-chat { display: grid; grid-template-columns: 340px minmax(0, 1fr); }
  .chat-side { display: flex; flex-direction: column; gap: 32px; position: sticky; top: 0; height: 100vh; padding: 32px; background: var(--stone-2); border-right: 1px solid var(--line); overflow-y: auto; }
  .side-progress { display: flex; flex-direction: column; gap: 12px; }
  .progress-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); }
  .progress-list li { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-bottom: 1px solid #e2ded8; font-size: 15px; color: var(--muted-2); }
  .progress-list .pno { font-size: 12px; font-weight: 600; width: 20px; flex-shrink: 0; white-space: nowrap; }
  .progress-list .ptitle { flex-grow: 1; }
  .progress-list li.done { color: var(--ink); }
  .progress-list li.now { color: var(--ink); font-weight: 600; }
  .progress-list li.now .pno { color: var(--accent); }
  .progress-list .pdot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
  .progress-list .ico { width: 16px; height: 16px; stroke-width: 1.8; }
  .side-persona { padding: 18px; background: var(--paper); border: 1px solid #e2ded8; display: flex; flex-direction: column; gap: 6px; }
  .side-persona .sp-case { font-size: 11px; font-weight: 600; letter-spacing: .18em; color: var(--accent); }
  .side-persona strong { font-size: 15px; font-weight: 600; }
  .side-persona .sp-summary { font-size: 13px; line-height: 1.6; color: var(--muted); }
  .side-notes { margin-top: auto; display: flex; flex-direction: column; gap: 8px; font-size: 13px; line-height: 1.6; color: var(--muted); }
  .side-notes .link-btn { align-self: flex-start; }
  .chat-bar { padding: 22px 48px; border-bottom: 1px solid var(--line); }
  .counter { font-size: 12px; letter-spacing: .2em; }
  .chat-column { max-width: 760px; margin: 0 auto; padding: 40px 48px 16px; }
  .messages { gap: 22px; }
  .msg-ai.question .msg-text, .msg-ai.followup .msg-text, .msg-ai.closing .msg-text { font-size: 22px; line-height: 1.5; }
  .msg-ai.reflect { font-size: 16px; line-height: 1.7; }
  .msg-me { margin-left: 96px; padding: 16px 20px; font-size: 16px; line-height: 1.7; }
  .composer { border-top: 0; max-width: 760px; width: 100%; margin: 0 auto; padding: 16px 48px 32px; }
  .composer-row { flex-direction: column; align-items: stretch; gap: 10px; }
  .composer textarea { min-height: 96px; font-size: 16px; line-height: 1.6; padding: 16px 18px; }
  .btn-send { align-self: flex-end; width: auto; padding: 0 28px; order: 2; }
  .btn-send .send-text { position: static; width: auto; height: auto; overflow: visible; clip: auto; }
  .btn-send .ico-up { display: none; }
  .btn-send .ico-right { display: block; width: 18px; height: 18px; }
  .composer-meta { font-size: 12px; margin-top: -48px; height: 48px; display: flex; align-items: center; pointer-events: none; }
  .chat-done { max-width: 320px; }

  /* 다시 읽기: 왼쪽 답 목록 / 오른쪽 제출판 */
  .review-grid { max-width: 1280px; margin: 0 auto; padding: 48px 64px; display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 64px; align-items: start; }
  .review-main { padding: 0; gap: 16px; }
  .review-title { font-size: 40px; font-weight: 260; }
  .lead-sm { font-size: 16px; }
  .review-item { padding: 22px 24px; }
  .review-item .q { font-size: 13px; }
  .review-item .a { font-size: 16px; line-height: 1.7; }
  .review-side { position: sticky; top: 32px; margin-top: 0; padding: 32px; border: 0; background: var(--stone-2); gap: 20px; }
  .review-side .btn { min-height: 60px; }

  .done-box { margin: 0 auto; padding: 96px 64px; max-width: 1280px; }
  .done-title { font-size: 56px; font-weight: 200; }
  .sheet-panel { bottom: auto; top: 50%; transform: translateY(-50%); max-width: 520px; padding: 24px 32px 28px; }
  .sheet-grip { display: none; }
}
