/* 사전 정보작성 양식 — 앱 디자인 시스템(theme.ts)과 같은 크림/골드 톤.
   색을 바꿀 땐 apps/mobile/src/theme.ts와 함께 본다. */

:root {
  --bg: #f7f4ee;
  --card: #ffffff;
  --accent: #c6a374;
  --accent-soft: #f1e5d3;
  --on-accent: #ffffff;
  --text: #221d17;
  --text-2: #8a8377;
  --muted: #b0a99c;
  --border: #eee8de;
  --danger: #bd5b4c;
  --radius: 16px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Segoe UI', Roboto,
    'Noto Sans KR', sans-serif;
  font-size: 15px;
  line-height: 1.55;
  -webkit-text-size-adjust: 100%;
}

.wrap { max-width: 640px; margin: 0 auto; padding: 24px 16px 80px; }

.wordmark {
  font-family: Georgia, 'Times New Roman', serif;
  letter-spacing: 0.18em;
  text-align: center;
  font-size: 20px;
  color: var(--text);
  margin: 8px 0 2px;
}
.form-title { text-align: center; font-size: 15px; color: var(--text-2); margin: 0 0 20px; }

.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 20px 18px;
  margin-bottom: 14px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}
.card h2 {
  font-size: 16px;
  margin: 0 0 4px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}
.card h2 .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none; }
.card .desc { font-size: 13px; color: var(--text-2); margin: 0 0 8px; white-space: pre-line; }

.q { margin-top: 18px; }
.q:first-of-type { margin-top: 10px; }
.q-label { font-weight: 600; font-size: 14.5px; margin-bottom: 4px; }
.q-label .req { color: var(--danger); margin-left: 2px; }
.q-hint { font-size: 12.5px; color: var(--muted); margin-bottom: 8px; white-space: pre-line; }
.q-hint a { color: var(--accent); }

input[type='text'], input[type='tel'], input[type='email'], input[type='date'], textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  padding: 11px 12px;
  font-size: 15px;
  color: var(--text);
  font-family: inherit;
  appearance: none;
  -webkit-appearance: none;
  min-height: 44px;
}
textarea { min-height: 84px; resize: vertical; }
input:focus, textarea:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }

.opt {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 8px;
  cursor: pointer;
  background: var(--card);
}
.opt input { margin-top: 3px; accent-color: var(--accent); width: 17px; height: 17px; flex: none; }
.opt span { font-size: 14.5px; }
.opt.checked { border-color: var(--accent); background: var(--accent-soft); }

/* 예시 사진이 붙은 선택지 — 체크+이름이 위, 사진이 아래 (사용자 요청) */
.opt.with-img { flex-direction: column; align-items: stretch; gap: 8px; padding: 10px; }

/* 접이식 선택 탭 — 항상 펼쳐두지 않고, 누르면 아래로 쭉 펼쳐진다.
   입력칸과 같은 흰색 공란 모양 (사용자 요청). 업로드 박스는 점선+📷라 구분된다. */
.picker { border-radius: 10px; overflow: hidden; }
.picker-head {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  min-height: 44px;
  font-size: 15px;
  color: var(--muted);
  font-family: inherit;
  cursor: pointer;
  text-align: left;
}
.picker.has-value .picker-head-text { color: var(--text); font-weight: 600; }
.picker.has-value .picker-head-text::before { content: '✓ '; color: var(--accent); }
.picker-chev { color: var(--muted); transition: transform 0.15s; flex: none; }
.picker.has-value .picker-chev { color: var(--accent); }
.picker.open .picker-chev { transform: rotate(180deg); }
.picker-body { display: none; padding: 10px 10px 4px; background: var(--card); border: 1px solid var(--border); border-top: 0; border-radius: 0 0 10px 10px; }
.picker.open .picker-head { border-radius: 10px 10px 0 0; }
.picker.open .picker-body { display: block; }

/* 소제목 구분선 — 컨셉 / 헤어스타일 / 메이크업 경계 */
.q.q-divider { margin-top: 26px; }
.subhead { display: flex; align-items: center; gap: 8px; padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.subhead-bar { width: 4px; height: 16px; border-radius: 2px; background: var(--accent); flex: none; }
.subhead-text { font-size: 15.5px; font-weight: 700; color: var(--text); }
.opt-row { display: flex; align-items: flex-start; gap: 10px; }
.opt-img { position: relative; border-radius: 8px; overflow: hidden; background: #eee; }
.opt-img img { width: 100%; height: auto; display: block; } /* 예시 사진은 자르지 않고 통째로 보여준다 (구글폼과 동일) */
.zoom-btn {
  position: absolute;
  right: 8px;
  bottom: 8px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 0;
  background: rgba(0, 0, 0, 0.5);
  font-size: 15px;
  line-height: 34px;
  text-align: center;
  cursor: pointer;
  padding: 0;
}

/* 사진 확대 보기 */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
  cursor: zoom-out;
}
.lightbox.show { display: flex; }
.lightbox img { max-width: 100%; max-height: 86vh; border-radius: 8px; }
.lightbox-cap { color: #fff; font-size: 13.5px; margin-top: 12px; text-align: center; }
.other-input { margin-top: 4px; display: none; }
.other-input.show { display: block; }

/* 사진 업로드 박스 — 선택 탭(골드 버튼)과 헷갈리지 않게 흰 배경 + 점선 테두리로 구분 */
.filebox {
  border: 1.5px dashed var(--muted);
  border-radius: 12px;
  background: var(--card);
  padding: 14px;
  text-align: center;
  cursor: pointer;
  color: var(--text-2);
  font-size: 14px;
}
.filebox strong { color: var(--text-2); }
.filebox::before { content: '📷 '; }
.thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.thumb { position: relative; width: 74px; height: 74px; border-radius: 10px; overflow: hidden; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb .x {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  border: 0;
  font-size: 13px;
  line-height: 22px;
  text-align: center;
  cursor: pointer;
  padding: 0;
}

.guide { font-size: 13.5px; color: var(--text); white-space: pre-line; }
.guide h3 { font-size: 14px; margin: 14px 0 4px; color: var(--accent); }

.submit-btn {
  display: block;
  width: 100%;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 16px;
  font-weight: 700;
  border: 0;
  border-radius: 14px;
  padding: 16px;
  margin-top: 8px;
  cursor: pointer;
  font-family: inherit;
}
.submit-btn:disabled { opacity: 0.55; }
.submit-note { text-align: center; font-size: 12.5px; color: var(--muted); margin-top: 10px; }

.q.invalid .q-label { color: var(--danger); }
.q.invalid input[type='text'], .q.invalid input[type='email'], .q.invalid input[type='tel'],
.q.invalid input[type='date'], .q.invalid textarea { border-color: var(--danger); }
.err-msg { color: var(--danger); font-size: 13px; margin-top: 6px; display: none; }
.q.invalid .err-msg { display: block; }

/* 업로드/제출 진행 오버레이 */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(34, 29, 23, 0.55);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 50;
  padding: 24px;
}
.overlay.show { display: flex; }
.overlay .box {
  background: var(--card);
  border-radius: var(--radius);
  padding: 28px 24px;
  width: 100%;
  max-width: 320px;
  text-align: center;
}
.spinner {
  width: 34px;
  height: 34px;
  margin: 0 auto 14px;
  border: 3px solid var(--accent-soft);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.overlay .msg { font-size: 14.5px; }
.overlay .sub { font-size: 12.5px; color: var(--muted); margin-top: 6px; }

/* 제출 완료 화면 */
.done { text-align: center; padding: 60px 20px; display: none; }
.done.show { display: block; }
.done .check {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 32px;
  line-height: 64px;
  margin: 0 auto 18px;
}
.done h2 { font-size: 20px; margin: 0 0 8px; }
.done p { color: var(--text-2); font-size: 14.5px; white-space: pre-line; }

/* 고객 소통 채팅 (2026-09-07) — 완료 화면의 물음·「채팅하기」 카드 */
.done-extra { display: none; margin-top: 14px; }
.done-extra.show { display: block; }
.done-page.show { display: inline-block; margin-top: 22px; padding: 13px 22px; border-radius: 14px; background: var(--accent); color: var(--on-accent); text-decoration: none; font-weight: 600; }
.ask-btns { display: flex; flex-direction: column; gap: 10px; max-width: 420px; margin: 22px auto 0; }
.ask-btns .nav-btn { width: 100%; white-space: normal; line-height: 1.45; padding: 15px 16px; height: auto; text-align: center; }
.ask-notice {
  max-width: 460px;
  margin: 0 auto 20px;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--card);
  border: 1px solid var(--border);
  text-align: left;
}
.ask-field { display: block; max-width: 420px; margin: 0 auto 12px; text-align: left; font-size: 13px; color: var(--text-2); }
.ask-field input {
  display: block;
  width: 100%;
  margin-top: 5px;
  padding: 11px 12px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: #fff;
  font-size: 15px;
  box-sizing: border-box;
}
.ask-check { display: flex; align-items: center; gap: 8px; max-width: 420px; margin: 4px auto 18px; font-size: 14px; text-align: left; }
.ask-check input { width: 18px; height: 18px; }
#chat-go { max-width: 420px; margin: 0 auto; display: block; width: 100%; }
/* 체크를 해야 눌린다 — 눌리는 상태인지 눈으로 구분되게 (안 그러면 「눌러도 안 된다」로 읽힌다) */
#chat-go:disabled { opacity: 0.45; cursor: not-allowed; }

/* 단계(페이지) 표시줄 */
.steps { display: flex; justify-content: center; gap: 6px; margin: 0 0 16px; flex-wrap: wrap; }
.step {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--border);
  font-size: 12px;
  color: var(--muted);
}
.step-num {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--border);
  color: var(--text-2);
  font-size: 11px;
  line-height: 18px;
  text-align: center;
  flex: none;
}
.step.on { border-color: var(--accent); color: var(--text); }
.step.on .step-num { background: var(--accent); color: #fff; }
.step.done .step-num { background: var(--accent-soft); color: var(--accent); }

/* 이전/다음 버튼 */
.nav-row { display: flex; gap: 10px; margin-top: 8px; }
.nav-btn {
  flex: 1;
  border-radius: 14px;
  padding: 15px;
  font-size: 15.5px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  border: 0;
}
/* 「다음」은 진한 골드 대신 밝은 크림골드 톤 (사용자 요청). 최종 「제출하기」만 진한 골드. */
.nav-btn.primary { background: var(--accent-soft); color: #9a6b2e; border: 1px solid var(--accent); }
.nav-btn.ghost { background: var(--card); color: var(--text-2); border: 1px solid var(--border); flex: 0 0 30%; }
.nav-row .submit-btn { flex: 1; margin-top: 0; }

.lang-switch { text-align: center; margin-bottom: 16px; font-size: 13px; }
.lang-switch a { color: var(--text-2); text-decoration: none; padding: 4px 10px; }
.lang-switch a.on { color: var(--accent); font-weight: 700; }

/* ---------- 만족도 조사 (review.html 등, 엔진 feedback.js) ---------- */

/* 참여 혜택 띠 — 안내 카드 안에서 「추가보정 1컷」을 한눈에 */
.benefit-band {
  background: var(--accent-soft);
  border: 1px solid var(--accent);
  border-radius: 12px;
  padding: 12px 14px;
  margin: 12px 0 10px;
  font-size: 14px;
  color: #7a5a2e;
  text-align: center;
  line-height: 1.5;
}
.benefit-band strong { color: #6b4a1e; }

/* 상/하반기 추첨 상품 */
.prize-box { border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; background: var(--bg); }
.prize-title { font-size: 13px; font-weight: 700; color: var(--text-2); margin-bottom: 6px; letter-spacing: 0.02em; }
.prize-row { display: flex; align-items: center; gap: 10px; font-size: 14.5px; padding: 4px 0; }
.prize-rank {
  flex: none;
  min-width: 38px;
  text-align: center;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 12px;
  font-weight: 700;
  border-radius: 999px;
  padding: 3px 8px;
}
.prize-note { font-size: 12.5px; color: var(--muted); margin-top: 6px; line-height: 1.5; }
.fine-print { font-size: 12px; color: var(--muted); margin: 12px 0 0; text-align: center; }

/* 별점 — 다섯 개 중 k번째를 누르면 k개가 골드로 칠해지고, 별마다 눈금 문구(매우 불편함 … 매우 좋았음)가 붙는다 */
.rating { display: grid; grid-template-columns: repeat(5, 1fr); max-width: 360px; margin-top: 6px; }
.rate-cell { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.star {
  width: 44px;
  height: 44px;
  border: 0;
  background: none;
  padding: 6px;
  cursor: pointer;
  color: #e3dccd;
  transition: transform 0.1s, color 0.1s;
  -webkit-tap-highlight-color: transparent;
}
.star svg { width: 100%; height: 100%; fill: currentColor; display: block; }
.star.on { color: var(--accent); }
.star:active { transform: scale(1.15); }
.rate-lbl {
  font-size: 10.5px;
  line-height: 1.25;
  color: var(--muted);
  text-align: center;
  word-break: keep-all;
  hyphens: auto; /* 영어 긴 낱말(Inconvenient·Dissatisfied)은 음절 단위로 끊는다 — 마디 없이 잘리지 않게 */
  -webkit-hyphens: auto;
  overflow-wrap: anywhere;
  min-height: 26px;
  padding: 0 2px;
}
html[lang='en'] .rate-lbl { font-size: 10px; }
.rate-cell.sel .rate-lbl { color: #9a6b2e; font-weight: 700; }
.star-cap { font-size: 13px; color: var(--muted); margin-top: 4px; min-height: 19px; padding-left: 6px; }
.star-cap.has { color: var(--text); font-weight: 600; }
.q.invalid .star:not(.on) { color: #efd3cd; }

/* 단계 표시줄 압축형 — 좁은 화면에서는 지금 단계만 이름을 보이고 나머지는 번호만 (한 줄 유지) */
@media (max-width: 480px) {
  .steps-compact .step:not(.on) .step-name { display: none; }
  .steps-compact .step:not(.on) { padding: 6px 7px; }
}

/* 대여 의상 고르기 (type 'outfits', 2026-10-17) — 설문 칸의 버튼·고른 목록 + 화면 전체를 덮는 고르기 창 */
.outfit-open {
  width: 100%; padding: 14px; border-radius: 12px; font: inherit; font-size: 15px; font-weight: 700;
  background: var(--accent-soft); color: #9a6b2e; border: 1px solid var(--accent); cursor: pointer;
}
.outfit-picked { margin-top: 10px; display: flex; flex-direction: column; gap: 10px; }
.outfit-picked:empty { display: none; }
.outfit-group { border: 1px solid var(--border); border-radius: 12px; padding: 10px; background: var(--card); }
.outfit-group.orphan { border-color: var(--danger); }
.outfit-group-head { font-size: 13px; font-weight: 700; color: var(--text-2); margin-bottom: 6px; }
.outfit-warn { font-size: 12.5px; color: var(--danger); margin-bottom: 6px; }
.outfit-chip { display: flex; align-items: center; gap: 10px; padding: 4px 0; }
.outfit-chip img { width: 42px; height: 56px; object-fit: cover; border-radius: 6px; flex: none; background: #eee; }
.outfit-chip span { flex: 1; font-size: 14px; min-width: 0; }
.outfit-chip .x { border: 0; background: none; color: var(--muted); font-size: 16px; padding: 6px 8px; cursor: pointer; }
input.outfit-note { margin-top: 10px; }
.q.invalid input[type='text'].outfit-note { border-color: var(--border); } /* 문제는 담은 의상 쪽 — 메모 칸은 빨갛게 안 한다 */

.ofp { position: fixed; inset: 0; z-index: 60; background: var(--bg); display: none; flex-direction: column; }
.ofp.show { display: flex; }
.ofp-top {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 12px 16px; border-bottom: 1px solid var(--border); background: var(--card);
}
.ofp-title { font-weight: 700; font-size: 16px; }
.ofp-back, .ofp-done { border: 0; background: none; font: inherit; font-size: 15px; cursor: pointer; padding: 6px 2px; }
.ofp-back { color: var(--text-2); }
.ofp-done { color: #9a6b2e; font-weight: 700; }
.ofp-body { flex: 1; overflow-y: auto; padding: 12px 16px 40px; max-width: 640px; width: 100%; margin: 0 auto; }
.ofp-rule { font-size: 12.5px; color: var(--text-2); margin-bottom: 10px; }
.ofp .seg { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.ofp .seg button {
  border: 1px solid var(--border); background: var(--card); color: var(--text-2); border-radius: 999px;
  padding: 7px 13px; font: inherit; font-size: 13.5px; cursor: pointer;
}
.ofp .seg button.on { border-color: var(--accent); background: var(--accent-soft); color: #9a6b2e; font-weight: 700; }
.ofp-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ofp-cell {
  position: relative; border: 2px solid transparent; border-radius: 10px; padding: 0; overflow: hidden;
  background: var(--card); cursor: pointer; font: inherit; text-align: left;
}
.ofp-cell.picked { border-color: var(--accent); }
.ofp-cell img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; display: block; background: #eee; }
.ofp-name { display: block; font-size: 11.5px; color: var(--text); padding: 5px 6px 6px; line-height: 1.3; }
.ofp-badge {
  position: absolute; top: 6px; right: 6px; width: 24px; height: 24px; border-radius: 12px;
  background: var(--accent); color: #fff; font-size: 13px; font-weight: 700; display: flex; align-items: center; justify-content: center;
}
.ofp-empty { color: var(--text-2); font-size: 14px; padding: 20px 0; }
.ofp-big { width: 100%; max-height: 62vh; object-fit: contain; border-radius: 10px; background: #eee; display: block; }
.ofp-dname { font-size: 17px; font-weight: 700; margin-top: 12px; }
.ofp-sizes { font-size: 14px; color: var(--text-2); margin-top: 4px; }
.ofp-sizes.none { color: var(--muted); }
.ofp-act { margin-top: 16px; display: flex; flex-direction: column; gap: 8px; }
.ofp-wide { flex: none; width: 100%; }
.ofp-act .nav-btn:disabled { opacity: 0.45; cursor: default; }
.ofp-ask { font-size: 13.5px; color: var(--text-2); }
.ofp-full { font-size: 13.5px; color: var(--danger); }
.ofp-added { font-size: 15px; font-weight: 700; color: #9a6b2e; }
/* 힌트 안 강조 줄 — 「본인 의상도 꼭 챙겨 오세요」 (대표 지시 2026-10-17) */
.q-hint .hint-warn {
  display: block; margin-top: 8px; padding: 9px 11px; border-radius: 10px;
  background: #fbeae6; border: 1px solid var(--danger); color: var(--danger);
  font-size: 13.5px; font-weight: 700; white-space: normal;
}

/* 이어 보기 — 같은 폰에서 다시 열면 적은 답을 불러왔다는 안내 (2026-10-19) */
.resume-bar {
  background: var(--accent-soft);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 14px;
  font-size: 14px;
  line-height: 1.55;
}
.resume-msg { white-space: pre-line; color: var(--text); }
.resume-reset {
  margin-top: 10px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 13px;
  color: var(--text-2);
  cursor: pointer;
}
.thumb.sent .sent-tag {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  font-size: 10px;
  text-align: center;
  padding: 2px 0;
}
