* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  background: #ffffff !important;
  background-image: none !important;
  color: #111;
  font-family: "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
}

body {
  line-height: 1.5;
}

.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 36px 30px 80px;
}

.page-title {
  max-width: 360px;
  margin: 0 auto 44px;
  padding: 18px 20px;
  background: #000;
  color: #fff;
  text-align: center;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.4;
  border-radius: 12px;
}

/* 섹션 공통 */
.section {
  margin-bottom: 48px;
}

.section-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 20px;
}

/* 템플릿 선택 */
.template-section {
  text-align: left;
}

.template-section .section-title {
  margin-bottom: 14px;
}

.inline-group {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.radio-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  cursor: pointer;
}

/* 라벨 / 필수표시 */
.main-label {
  display: block;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 8px;
}

.required {
  color: #d60000;
  margin-left: 2px;
}

/* 입력 공통 */
input[type="text"],
input[type="email"],
input[type="tel"],
select,
textarea {
  width: 100%;
  border: none;
  outline: none;
  background: #d9d9d9;
  color: #111;
  padding: 14px 16px;
  font-size: 14px;
  font-family: inherit;
  line-height: 1.4;
  appearance: none;
  -webkit-appearance: none;
  border-radius: 0;
}

textarea {
  min-height: 220px;
  resize: vertical;
}

/* 세로 적층형 블록 */
.stack-block,
.person-block {
  width: 100%;
  max-width: 520px;
}

.stack-block .field,
.person-block .field {
  margin-bottom: 16px;
}

.stack-block .field:last-child,
.person-block .field:last-child {
  margin-bottom: 0;
}

/* 절반 폭 공통 */
.half-field {
  width: 100%;
  max-width: 520px;
}

/* 예약자 정보 */
.stack-block {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* 부모님/본인 파트 */
.person-block {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: 28px;
}

.person-block:last-child {
  margin-bottom: 0;
}

/* 故 + 이름 입력 */
.deceased-input {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 12px;
  margin-top: 2px;
}

.deceased-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  cursor: pointer;
  white-space: nowrap;
}

.deceased-wrap input[type="checkbox"] {
  display: none;
}

.circle-check {
  width: 16px;
  height: 16px;
  min-width: 16px;
  border: 1.5px solid #888;
  border-radius: 50%;
  background: #fff;
  position: relative;
}

.deceased-wrap input[type="checkbox"]:checked + .circle-check::after {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #111;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

/* 예식 정보 */
.date-field,
.time-field,
.address-field {
  width: 100%;
  max-width: 520px;
  margin-bottom: 18px;
}

.compact-select-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.compact-select-row select {
  width: 160px;
  min-width: 160px;
  background-image: linear-gradient(45deg, transparent 50%, #111 50%), linear-gradient(135deg, #111 50%, transparent 50%);
  background-position: calc(100% - 18px) calc(50% - 2px), calc(100% - 12px) calc(50% - 2px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 34px;
}

.address-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  width: 100%;
  max-width: 340px;
}

#postcode {
  width: 180px;
  min-width: 180px;
}

.address-btn {
  width: 148px;
  min-width: 148px;
  height: 46px;
  border: none;
  background: #000;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}

#address {
  display: block;
  width: 100%;
  max-width: 520px;
  margin-bottom: 12px;
}

#detailAddress {
  display: block;
  width: 100%;
  max-width: 520px;
}

/* 모시는 글 */
.invite-section .field {
  width: 100%;
  max-width: 520px;
  margin-bottom: 18px;
}

.invite-section .field:last-child {
  margin-bottom: 0;
}

/* 버튼 */
.submit-wrap {
  display: flex;
  justify-content: center;
  margin-top: 56px;
}

.submit-btn {
  border: none;
  background: #000;
  color: #fff;
  width: 100%;
  max-width: 280px;
  height: 58px;
  border-radius: 29px;
  font-size: 20px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}

.field {
  margin-bottom: 18px;
}

/* 모바일 */
@media (max-width: 768px) {
  .wrap {
    padding: 28px 16px 56px;
  }

  .page-title {
    max-width: 300px;
    margin-bottom: 28px;
    padding: 14px 16px;
    font-size: 18px;
  }

  .section {
    margin-bottom: 38px;
  }

  .section-title {
    font-size: 18px;
    margin-bottom: 16px;
  }

  .main-label {
    font-size: 14px;
  }

  .stack-block,
  .person-block,
  .half-field,
  .date-field,
  .time-field,
  .address-field,
  #address,
  #detailAddress,
  .invite-section .field {
    max-width: 100%;
  }

  .compact-select-row {
    flex-direction: column;
    gap: 10px;
  }

  .compact-select-row select {
    width: 100%;
    min-width: 100%;
  }

  .address-wrap {
    max-width: 100%;
  }

  #postcode {
    width: 100%;
    min-width: 0;
    flex: 1;
  }

  .address-btn {
    width: 140px;
    min-width: 140px;
    height: 44px;
    font-size: 13px;
  }

  input[type="text"],
  input[type="email"],
  input[type="tel"],
  select,
  textarea {
    padding: 12px 14px;
    font-size: 14px;
  }

  .submit-wrap {
    margin-top: 44px;
  }

  .submit-btn {
    max-width: 220px;
    height: 52px;
    font-size: 16px;
  }
}