/* ═══════════ 살롱 고객 상담지 (라이트 배경 전용 입력 UI) ═══════════
   style.css의 .field(어두운 배경 전용)는 사용하지 않는다. */

.page-hero h1 em {
  font-style: normal;
  color: var(--brand);
}

/* ── 폼 카드 ── */
.cs-form {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(20px, 3vw, 28px);
  display: grid;
  gap: 30px;
}

.cs-group {
  display: grid;
  gap: 14px;
}
.cs-group + .cs-group {
  padding-top: 26px;
  border-top: 1px dashed var(--line);
}

.cs-legend {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.0625rem;
  font-weight: 900;
  letter-spacing: -0.01em;
  margin-bottom: 2px;
}
.cs-step {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 9px;
  background: var(--brand-100);
  color: var(--brand-600);
  font-size: var(--text-sm);
  font-weight: 900;
}

.cs-help {
  font-size: var(--text-xs);
  color: var(--ink-mute);
  font-weight: 500;
}

/* ── 필드(라이트 배경 인풋) ── */
.cs-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.cs-field { display: grid; gap: 8px; }
.cs-field > label {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--ink-sub);
}

.cs-field input,
.cs-field textarea,
.cs-select {
  width: 100%;
  border: 1.5px solid transparent;
  border-radius: 12px;
  background: var(--bg);
  color: var(--ink);
  font-family: inherit;
  font-size: var(--text-base);
  font-weight: 600;
  padding: 12px 14px;
  transition: border-color var(--duration-fast) ease, background var(--duration-fast) ease,
    box-shadow var(--duration-fast) ease;
}
.cs-field textarea { resize: vertical; min-height: 84px; }
.cs-field input:focus,
.cs-field textarea:focus,
.cs-select:focus {
  outline: none;
  background: var(--surface);
  border-color: var(--brand);
  box-shadow: 0 0 0 4px var(--brand-100);
}
.cs-field input::placeholder,
.cs-field textarea::placeholder { color: var(--ink-mute); font-weight: 500; }

.cs-select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238b95a1' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
  padding-right: 38px;
  cursor: pointer;
}
.cs-select:disabled {
  color: var(--ink-mute);
  cursor: not-allowed;
  opacity: 0.55;
}

/* 단위 붙은 인풋 (분·원) */
.cs-affix {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg);
  border: 1.5px solid transparent;
  border-radius: 12px;
  padding-right: 14px;
  transition: border-color var(--duration-fast) ease, background var(--duration-fast) ease,
    box-shadow var(--duration-fast) ease;
}
.cs-affix:focus-within {
  background: var(--surface);
  border-color: var(--brand);
  box-shadow: 0 0 0 4px var(--brand-100);
}
.cs-affix input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  font-family: inherit;
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--ink);
  text-align: right;
  padding: 12px 0 12px 14px;
  -moz-appearance: textfield;
  appearance: textfield;
}
.cs-affix input::-webkit-outer-spin-button,
.cs-affix input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.cs-affix input:focus { outline: none; }
.cs-affix input::placeholder { color: var(--ink-mute); font-weight: 500; }
.cs-affix-unit {
  flex-shrink: 0;
  font-size: var(--text-sm);
  font-weight: 800;
  color: var(--ink-mute);
}

/* ── 알약 라디오/체크(모발 진단) ── */
.cs-sub { display: grid; gap: 8px; }
.cs-sublabel {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--ink-sub);
  margin-bottom: 2px;
}
.cs-sublabel small { font-size: var(--text-xs); color: var(--ink-mute); font-weight: 500; }

.cs-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.cs-pill { position: relative; }
.cs-pill input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.cs-pill span {
  display: inline-block;
  padding: 9px 16px;
  border-radius: 999px;
  background: var(--bg);
  border: 1.5px solid transparent;
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--ink-sub);
  cursor: pointer;
  transition: background var(--duration-fast) ease, color var(--duration-fast) ease,
    border-color var(--duration-fast) ease, transform var(--duration-fast) ease;
}
.cs-pill span:hover { background: var(--bg-tint); }
.cs-pill span:active { transform: scale(0.95); }
.cs-pill input:checked + span {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}
.cs-pill input:focus-visible + span {
  outline: 3px solid var(--brand-300);
  outline-offset: 2px;
}

/* ── 시술 이력 행 ── */
.cs-history { display: grid; gap: 8px; }
.cs-history-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  background: var(--bg);
  transition: background var(--duration-fast) ease;
}
.cs-history-row:has(input:checked) { background: var(--brand-50); }

.cs-check {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 120px;
  cursor: pointer;
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--ink-sub);
}
.cs-check:has(input:checked) { color: var(--ink); }
.cs-check input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.cs-box {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border: 1.5px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  color: #fff;
  transition: background var(--duration-fast) ease, border-color var(--duration-fast) ease;
}
.cs-box svg {
  width: 13px;
  height: 13px;
  opacity: 0;
  transition: opacity var(--duration-fast) ease;
}
.cs-check input:checked ~ .cs-box { background: var(--brand); border-color: var(--brand); }
.cs-check input:checked ~ .cs-box svg { opacity: 1; }
.cs-check input:focus-visible ~ .cs-box {
  outline: 3px solid var(--brand-300);
  outline-offset: 2px;
}
.cs-history-when { width: 150px; padding-block: 9px; background-color: var(--surface); }

/* ── 개인정보 안내 ── */
.cs-privacy {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: var(--brand-50);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--brand-700);
}
.cs-privacy svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  margin-top: 2px;
}

/* ── 우측: 스티키 미리보기 ── */
.cs-side {
  position: sticky;
  top: 84px;
  display: grid;
  gap: 14px;
}

.cs-preview {
  position: relative;
  overflow: hidden;
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 26px;
}
.cs-preview::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 5px;
  background: linear-gradient(90deg, var(--brand), var(--brand-300));
}

.cs-sheet-head {
  padding-bottom: 16px;
  border-bottom: 2px solid var(--ink);
}
.cs-sheet-tag {
  font-size: 0.6875rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: var(--brand);
}
.cs-sheet-title {
  margin-top: 4px;
  font-size: 1.3rem;
  font-weight: 900;
  letter-spacing: -0.02em;
}
.cs-sheet-name {
  margin-top: 10px;
  font-size: 1.0625rem;
  font-weight: 800;
  color: var(--brand-600);
}
.cs-sheet-meta {
  margin-top: 3px;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--ink-mute);
}

.cs-sheet-empty {
  padding: 34px 0;
  text-align: center;
  font-size: var(--text-sm);
  color: var(--ink-mute);
  line-height: 1.7;
}

/* 상담지 섹션 */
.cs-sec { padding: 16px 0; }
.cs-sec + .cs-sec { border-top: 1px dashed var(--line); }
.cs-sec-title {
  font-size: var(--text-xs);
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--brand-600);
  margin-bottom: 10px;
}
.cs-sec-rows {
  margin: 0;
  display: grid;
  gap: 7px;
}
.cs-sec-row {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 10px;
  font-size: var(--text-sm);
}
.cs-sec-row dt { color: var(--ink-mute); font-weight: 600; }
.cs-sec-row dd { margin: 0; font-weight: 700; color: var(--ink); overflow-wrap: anywhere; }

.cs-sec-warn {
  padding: 11px 13px;
  border-radius: var(--radius-sm);
  background: #fdeef0;
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--up);
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.cs-sheet-foot {
  margin-top: 4px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--ink-mute);
  text-align: center;
}

/* ── 액션 버튼 ── */
.cs-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.cs-actions .btn {
  flex: 1;
  min-width: 136px;
  padding: 13px 10px;
  font-size: var(--text-sm);
}
.cs-btn-icon { width: 16px; height: 16px; flex-shrink: 0; }
.cs-btn-reset {
  background: var(--bg);
  color: var(--ink-mute);
}
.cs-btn-reset:hover { background: var(--line); color: var(--ink-sub); }
.cs-actions-hint {
  font-size: var(--text-xs);
  color: var(--ink-mute);
  text-align: center;
}

/* ── 인쇄: 상담지 카드만 출력 ── */
@media print {
  @page { margin: 14mm; }
  .nav,
  .page-hero,
  .cs-form,
  .cs-actions,
  .cs-actions-hint,
  .cs-cta,
  .footer,
  .toast { display: none !important; }

  body { background: #fff; }
  .reveal { opacity: 1 !important; transform: none !important; }
  .section { padding: 0; }
  .calc { display: block; margin: 0; }
  .cs-side { position: static; display: block; }
  .cs-preview {
    box-shadow: none;
    border-radius: 0;
    padding: 0;
  }
  .cs-preview::before { display: none; }
  .cs-sheet-empty { display: none; }
}

/* ── 반응형 ── */
@media (max-width: 1023px) {
  .cs-side { position: static; }
}

@media (max-width: 767px) {
  .cs-grid-2 { grid-template-columns: 1fr; }
  .cs-history-when { width: 100%; }
}

@media (max-width: 480px) {
  .cs-form { padding: 18px 16px; }
  .cs-preview { padding: 20px 18px; }
  .cs-pill { flex: 1 1 calc(25% - 8px); }
  .cs-pill span { display: block; text-align: center; padding-inline: 0; }
  .cs-sec-row { grid-template-columns: 78px 1fr; gap: 8px; }
  .cs-actions .btn { min-width: 100%; }
}
