.page { max-width: var(--container-max); margin: 0 auto; padding: var(--space-3xl) var(--page-pad-mobile); }
@media (min-width: 768px) { .page { padding: var(--space-3xl) var(--page-pad-desktop); } }

/* Hero */
.survey-hero { text-align: left; margin-bottom: var(--space-2xl); }
.survey-hero .eyebrow { margin-bottom: var(--space-md); }
.survey-hero h1 { margin-bottom: var(--space-md); }
.survey-hero p.lead { font-size: 17px; color: var(--sub); max-width: 560px; }
.survey-hero .meta {
  margin-top: var(--space-lg); font-size: 13px; color: var(--sub);
  display: inline-flex; align-items: center; gap: var(--space-sm);
}
.survey-hero .meta::before {
  content: ""; display: inline-block; width: 16px; height: 1px; background: var(--line-strong);
}

/* Section */
.survey-section { margin-bottom: var(--space-3xl); }
.section-head { margin-bottom: var(--space-xl); }
.section-head .step-eyebrow {
  display: inline-flex; align-items: center; gap: var(--space-sm);
  font-size: 12px; color: var(--brand-nude-deep);
  text-transform: uppercase; letter-spacing: 0.18em; margin-bottom: var(--space-md);
}
.section-head .step-eyebrow .num {
  width: 24px; height: 24px; border-radius: 50%;
  border: 1px solid var(--line-strong); display: inline-flex;
  align-items: center; justify-content: center; font-size: 12px; letter-spacing: 0;
}
.section-head h2 { margin-bottom: var(--space-sm); }
.section-head p.section-desc { color: var(--sub); font-size: 15px; }

/* Submit row */
.submit-row { margin-top: var(--space-2xl); display: flex; justify-content: center; }

/* Chip grid (중복 선택용 체크박스) */
.chip-grid {
  display: grid; gap: var(--space-sm);
  grid-template-columns: 1fr;
}
@media (min-width: 560px) {
  .chip-grid { grid-template-columns: 1fr 1fr; align-items: start; }
}
.chip-grid .choice { padding: 14px 18px; }

/* Mood cards (3종 라디오) */
.mood-grid {
  display: grid; gap: var(--space-md);
  grid-template-columns: 1fr;
}
@media (min-width: 560px) {
  .mood-grid { grid-template-columns: 1fr 1fr; }
}
.mood-card {
  position: relative; cursor: pointer; user-select: none;
  border: 1.5px solid var(--line); border-radius: var(--radius-md);
  background: var(--paper-pure); overflow: hidden;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.mood-card:hover { border-color: var(--line-strong); }
.mood-card input { position: absolute; opacity: 0; pointer-events: none; }
.mood-card .thumb { aspect-ratio: 4 / 3; background: var(--brand-nude-soft); }
.mood-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.mood-card .body { padding: var(--space-md) var(--space-lg) var(--space-lg); }
.mood-card .label { font-size: 12px; color: var(--brand-nude-deep); letter-spacing: 0.18em; text-transform: uppercase; margin-bottom: var(--space-xs); }
.mood-card .title { font-size: 17px; font-weight: 500; color: var(--ink-deep); margin-bottom: var(--space-xs); }
.mood-card .desc  { font-size: 14px; color: var(--sub); line-height: 1.6; }
.mood-card:has(input:checked) {
  border-color: var(--brand-nude-deep); border-width: 2px;
}
.mood-card:has(input:checked)::after {
  content: "✓"; position: absolute; top: 12px; right: 12px;
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--brand-nude-deep); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 500;
}

/* "잘 모르겠음" 텍스트 옵션 */
.mood-unsure {
  margin-top: var(--space-md);
}

/* Tip box (섹션 ⑥) */
.tip-box {
  margin-top: var(--space-md);
  background: var(--brand-nude-soft);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  border-left: 3px solid var(--brand-nude-deep);
}
.tip-box .tip-eyebrow {
  font-size: 12px; font-weight: 500; color: var(--brand-nude-deep);
  letter-spacing: 0.12em; text-transform: uppercase;
  margin-bottom: var(--space-sm);
}
.tip-box p { font-size: 14px; color: var(--ink); line-height: 1.7; }

/* Slot picker (섹션 ⑦) */
.slot-picker { }
.slot-picker .type-toggle {
  display: inline-flex; padding: 4px;
  background: var(--paper-pure); border: 1.5px solid var(--line);
  border-radius: var(--radius-pill); margin-bottom: var(--space-xl);
}
.slot-picker .type-toggle button {
  appearance: none; border: 0; background: transparent;
  height: 40px; padding: 0 24px;
  font-size: 14px; font-weight: 500; color: var(--sub);
  border-radius: var(--radius-pill); letter-spacing: 0.02em;
  transition: background 0.15s ease, color 0.15s ease;
}
.slot-picker .type-toggle button.is-active {
  background: var(--brand-nude-deep); color: #fff;
}

.slot-picker .day-block {
  border-bottom: 1px solid var(--line-soft);
  padding: var(--space-lg) 0;
}
.slot-picker .day-block:last-child { border-bottom: 0; }
.slot-picker .day-head {
  display: flex; align-items: baseline; gap: var(--space-md); margin-bottom: var(--space-md);
}
.slot-picker .day-label { font-size: 16px; font-weight: 500; color: var(--ink-deep); }
.slot-picker .day-meta  { font-size: 13px; color: var(--sub); }

.slot-picker .day-block.is-closed .slots { opacity: 0.5; }

.slot-picker .slots {
  display: grid; gap: var(--space-sm);
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
}
.slot-picker .slot {
  appearance: none; border: 1.5px solid var(--line);
  background: var(--paper-pure); color: var(--ink-deep);
  height: 44px; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 500;
  cursor: pointer; transition: all 0.15s ease;
}
.slot-picker .slot:hover:not(:disabled) { border-color: var(--brand-nude-deep); }
.slot-picker .slot.is-selected {
  background: var(--brand-nude-deep); color: #fff; border-color: var(--brand-nude-deep);
}
.slot-picker .slot:disabled {
  color: var(--sub); background: var(--paper); cursor: not-allowed;
}
.slot-picker .slot.is-closed-day {
  background-image: repeating-linear-gradient(
    -45deg, var(--paper) 0 6px, var(--line-soft) 6px 7px
  );
}

.slot-picker .selected-summary {
  margin-top: var(--space-xl);
  background: var(--brand-nude-soft);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  display: none;
}
.slot-picker .selected-summary.is-visible { display: block; }
.slot-picker .selected-summary .label {
  font-size: 12px; color: var(--brand-nude-deep);
  text-transform: uppercase; letter-spacing: 0.12em; margin-bottom: 4px;
}
.slot-picker .selected-summary .value {
  font-size: 17px; font-weight: 500; color: var(--ink-deep);
}

/* Submit + done */
#survey-form .submit-row { margin-top: var(--space-2xl); display: flex; justify-content: center; }
#survey-form .submit-row .btn-primary { min-width: 280px; }

.done-screen { display: none; text-align: center; padding: var(--space-3xl) 0; }
.done-screen.is-visible { display: block; }
.done-screen .check {
  width: 72px; height: 72px; border-radius: 50%;
  background: var(--brand-nude-deep); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 28px; margin-bottom: var(--space-xl);
}
.done-screen h2 { margin-bottom: var(--space-md); font-size: 28px; font-weight: 400; }
.done-screen p  { color: var(--sub); font-size: 16px; }
.done-screen .reservation-box {
  display: inline-block; margin-top: var(--space-xl);
  padding: 20px 32px; background: var(--brand-nude-soft);
  border-radius: var(--radius-md); text-align: left;
}
.done-screen .reservation-box .label { font-size: 12px; color: var(--brand-nude-deep); letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 4px; }
.done-screen .reservation-box .value { font-size: 17px; color: var(--ink-deep); font-weight: 500; }

/* Slot picker error state */
.slot-picker.has-error .type-toggle {
  border-color: var(--error);
  box-shadow: 0 0 0 1px var(--error);
}

/* legend.sr-only 명시 — display:contents 리셋과 sr-only position:absolute 충돌 방지 */
legend.sr-only { display: block; }

/* Focus visible */
:focus-visible {
  outline: 2px solid var(--brand-nude-deep);
  outline-offset: 2px;
  border-radius: var(--radius-xs);
}
.input:focus-visible, .textarea:focus-visible { outline: none; }

/* Mobile fine-tune */
@media (max-width: 480px) {
  h1 { font-size: 32px; }
  .section-head h2 { font-size: 22px; }
  .survey-section { margin-bottom: var(--space-2xl); }
  .slot-picker .type-toggle { width: 100%; }
  .slot-picker .type-toggle button { flex: 1; padding: 0; }
  #survey-form .submit-row .btn-primary { min-width: unset; width: 100%; }
}

/* 가로 너비 1100px 이상에서 슬롯 한 줄에 더 많이 */
@media (min-width: 1100px) {
  .slot-picker .slots { grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); }
}

/* Print: 인쇄 시 폼은 의미 없으므로 숨김 */
@media print { #survey-form, .slot-picker { display: none; } }

/* ──────────────────────────────────────────
   Upload (섹션 ⑥ 참고 이미지)
────────────────────────────────────────── */
.upload-area {
  border: 1.5px dashed var(--line-strong);
  border-radius: var(--radius-md);
  background: var(--paper-pure);
  padding: 20px 24px;
}
.upload-desc {
  font-size: 14px;
  color: var(--sub);
  margin-bottom: var(--space-md);
}
.upload-controls {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  flex-wrap: wrap;
}
.upload-btn {
  cursor: pointer;
}
.upload-meta {
  font-size: 13px;
  color: var(--sub);
}
.upload-error {
  font-size: 13px;
  color: var(--error);
  margin-top: var(--space-sm);
  min-height: 1.4em;
}
.upload-error:empty { display: none; }
.upload-preview {
  display: grid;
  gap: var(--space-sm);
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  margin-top: var(--space-md);
}
.upload-preview:empty { display: none; }
.preview-item {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--paper);
  overflow: hidden;
}
.preview-thumb {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
  background: var(--brand-nude-soft);
}
.preview-meta {
  padding: 8px 10px;
  font-size: 12px;
  color: var(--ink);
  line-height: 1.4;
}
.preview-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 500;
}
.preview-size {
  color: var(--sub);
  font-size: 11px;
  margin-top: 2px;
}
.preview-remove {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(44, 36, 32, 0.7);
  color: #fff;
  border: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  line-height: 1;
}
.preview-remove:hover { background: var(--ink-deep); }

/* 단계 3 — 시간표 로딩/에러 상태 */
.slot-loading {
  padding: var(--space-md);
  color: var(--brand-nude-deep);
  font-size: 14px;
}
.slot-error {
  padding: var(--space-md);
  text-align: center;
}
.slot-error p {
  color: var(--error);
  margin-bottom: var(--space-sm);
}
.slot-retry {
  border: 1px solid var(--brand-nude-deep);
  background: #fff;
  color: var(--brand-nude-deep);
  border-radius: 8px;
  padding: 8px 16px;
  cursor: pointer;
  font-size: 14px;
}
.slot-retry:hover {
  background: var(--brand-nude-soft);
}

.submit-error {
  color: var(--error);
  font-size: 14px;
  margin-top: var(--space-sm);
  text-align: center;
  min-height: 1.2em;
}
