/* 오퍼하우스 사전 설문지 - 공통 스타일 */

:root {
  --bg: #FAF7F2;
  --card-bg: #FFFFFF;
  --border: #E8E0D3;
  --accent: #8B5E3C;
  --accent-dark: #6B4A2F;
  --accent-soft: #F1E7DA;
  --text: #2E2A25;
  --text-muted: #7A7264;
  --shadow: 0 2px 6px rgba(46, 42, 37, 0.06);
  --shadow-hover: 0 10px 24px rgba(139, 94, 60, 0.16);
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: "Pretendard", "Apple SD Gothic Neo", "Malgun Gothic", -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: inherit;
  text-decoration: none;
}

.page {
  flex: 1;
  display: flex;
  flex-direction: column;
  max-width: 880px;
  width: 100%;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
.site-header {
  text-align: center;
  padding: 48px 0 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.brand-logo {
  height: 68px;
  width: auto;
  display: block;
}

.site-header h1 {
  margin: 150px 0 24px;
  font-size: clamp(17px, 2.6vw, 22px);
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* Card grid */
.card-grid {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  padding: 110px 0 56px;
  align-content: start;
}

@media (max-width: 720px) {
  .site-header h1 {
    margin: 80px 0 24px;
  }

  .card-grid {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 40px 0 40px;
  }
}

.option-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px 22px;
  box-shadow: var(--shadow);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  cursor: pointer;
}

.option-card:hover,
.option-card:focus-visible {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: var(--accent);
  outline: none;
}

.option-card:active {
  transform: translateY(-1px);
}

.option-card .icon-wrap {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--accent-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-dark);
}

.option-card .icon-wrap svg {
  width: 26px;
  height: 26px;
}

.option-card h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
}

.option-card p {
  margin: 0;
  font-size: 13.5px;
  color: var(--text-muted);
}

.option-card .cta {
  margin-top: auto;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.option-card .cta svg {
  width: 14px;
  height: 14px;
  transition: transform 0.18s ease;
}

.option-card:hover .cta svg {
  transform: translateX(3px);
}

/* Placeholder / survey pages */
.placeholder-page {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 0;
}

.placeholder-card {
  width: 100%;
  max-width: 480px;
  text-align: center;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 48px 32px;
  box-shadow: var(--shadow);
}

.placeholder-card .icon-wrap {
  width: 60px;
  height: 60px;
  border-radius: 16px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}

.placeholder-card .icon-wrap svg {
  width: 30px;
  height: 30px;
}

.placeholder-card .category-tag {
  display: inline-block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 12px;
}

.placeholder-card h1 {
  font-size: 21px;
  margin: 0 0 12px;
}

.placeholder-card p {
  color: var(--text-muted);
  font-size: 14.5px;
  margin: 0 0 28px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--accent-dark);
  border: 1px solid var(--border);
  padding: 10px 20px;
  border-radius: 999px;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.back-link:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
}

.back-link svg {
  width: 14px;
  height: 14px;
}

/* Survey form */
.survey-page {
  flex: 1;
  padding: 8px 0 60px;
}

.survey-card {
  max-width: 640px;
  margin: 0 auto;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 40px 32px 44px;
  box-shadow: var(--shadow);
}

@media (max-width: 560px) {
  .survey-card {
    padding: 32px 20px 36px;
    border-radius: 16px;
  }
}

.survey-header-block .category-tag {
  margin-bottom: 14px;
}

.survey-header-block h1 {
  margin: 0 0 10px;
  font-size: 21px;
}

.survey-description {
  margin: 0;
  color: var(--text-muted);
  font-size: 14px;
}

.survey-form {
  margin-top: 28px;
}

.survey-section {
  margin-top: 32px;
}

.survey-section:first-of-type {
  margin-top: 0;
}

.survey-section-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--accent-dark);
  margin: 0 0 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.field {
  margin-bottom: 20px;
}

.field:last-child {
  margin-bottom: 0;
}

.field-row {
  display: flex;
  gap: 14px;
  margin-bottom: 20px;
}

.field-row .field {
  flex: 1;
  margin-bottom: 0;
  min-width: 0;
}

@media (max-width: 480px) {
  .field-row {
    flex-direction: column;
    gap: 20px;
  }
}

.field-label {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text);
}

.req {
  color: #c0392b;
}

.field input[type="text"],
.field input[type="tel"],
.field input[type="email"],
.field input[type="number"],
.field input[type="date"],
.field select,
.field textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 14px;
  font-family: inherit;
  color: var(--text);
  background: #fff;
  transition: border-color 0.15s ease;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.field textarea {
  resize: vertical;
  min-height: 96px;
}

.field-hint {
  margin: 6px 0 0;
  font-size: 12px;
  color: var(--text-muted);
}

.field input[type="file"] {
  width: 100%;
  padding: 10px 14px;
  border: 1px dashed var(--border);
  border-radius: 10px;
  font-size: 13px;
  font-family: inherit;
  color: var(--text-muted);
  background: var(--accent-soft);
  cursor: pointer;
  transition: border-color 0.15s ease;
}

.field input[type="file"]:hover,
.field input[type="file"]:focus {
  outline: none;
  border-color: var(--accent);
}

.field input[type="file"]::file-selector-button {
  margin-right: 12px;
  padding: 8px 14px;
  border: none;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease;
}

.field input[type="file"]::file-selector-button:hover {
  background: var(--accent-dark);
}

/* 입력창 오른쪽에 단위(예: "원")를 붙여 보여주는 그룹 */
.input-suffix-group {
  display: flex;
  align-items: stretch;
}

.input-suffix-group input {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.input-suffix-group input:focus {
  position: relative;
  z-index: 1;
}

.input-suffix {
  flex: none;
  display: flex;
  align-items: center;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-left: none;
  border-radius: 0 10px 10px 0;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}

/* option-group: 기본(pill) 스타일 */
.option-group--pill {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.option-group--pill .option-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  font-weight: 500;
  padding: 9px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  cursor: pointer;
  color: var(--text);
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.option-group--pill input {
  accent-color: var(--accent);
}

.option-group--pill .option-item:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-dark);
}

/* option-group: badge 스타일 (번호 배지 카드, 2열 그리드) */
.option-group--badge {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

@media (max-width: 480px) {
  .option-group--badge {
    grid-template-columns: 1fr;
  }
}

.option-group--badge .option-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.option-badge {
  flex: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, color 0.15s ease;
}

.option-group--badge .option-item-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.option-group--badge .option-item:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.option-group--badge .option-item:has(input:checked) .option-badge {
  background: var(--accent);
  color: #fff;
}

/* option-group: card 스타일 (제목 + 설명, 세로 스택) */
.option-group--card {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.option-group--card .option-item {
  display: flex;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: 14px;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.option-item-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.option-group--card .option-item-label {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text);
}

.option-item-desc {
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.5;
}

.option-group--card .option-item:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.option-group--card .option-item:has(input:checked) .option-item-label {
  color: var(--accent-dark);
}

/* badge/card 는 실제 라디오·체크박스를 시각적으로만 숨기고 카드 전체를 클릭 영역으로 사용 */
.option-group--badge input,
.option-group--card input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.option-group--badge .option-item:focus-within,
.option-group--card .option-item:focus-within {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.field-error input,
.field-error select,
.field-error textarea,
.field-error .option-item {
  border-color: #c0392b;
}

.field-error-msg {
  margin: 6px 0 0;
  font-size: 12px;
  color: #c0392b;
}

.submit-btn {
  margin-top: 36px;
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 12px;
  background: var(--accent);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease;
}

.submit-btn:hover {
  background: var(--accent-dark);
}

.submit-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.submit-error-msg {
  margin: 12px 0 0;
  font-size: 13px;
  color: #c0392b;
  text-align: center;
}

/* 업로드 진행률 바 — 첨부파일 전송 중 제출 버튼 자리에 표시 */
.upload-progress {
  margin-top: 36px;
}

.upload-progress-label {
  margin: 0 0 10px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--accent-dark);
  text-align: center;
}

.upload-progress-track {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  overflow: hidden;
}

.upload-progress-fill {
  height: 100%;
  width: 0%;
  background: var(--accent);
  border-radius: 999px;
  transition: width 0.25s ease;
}

.file-count-notice {
  color: var(--accent-dark);
  font-weight: 600;
}

.survey-success {
  text-align: center;
  padding: 20px 0 4px;
}

.survey-success h2 {
  margin: 0 0 12px;
  font-size: 20px;
}

.survey-success p {
  color: var(--text-muted);
  margin: 0 0 28px;
}
