/* db */
.db {
  position: relative;
  z-index: 999;
  background: #e4e6d5;
}

.db .txt {
  padding: 0px 24px 0px;
  text-align: center;
  background: #e4e6d5;
}

.db .txt h2 {
  padding-top: 20px;
  font-size: 28px;
  font-weight: 800;
  color: #2d3319;
  line-height: 1.5;
  margin: 0 0 12px;
  word-break: keep-all;
}

.db .txt h2 .highlight {
  position: relative;
  display: inline-block;
}
.db .txt h2 .highlight::after {
  content: "";
  position: absolute;
  left: -2px;
  right: -2px;
  bottom: 4px;
  height: 12px;
  background: #c2b280;
  z-index: -1;
  border-radius: 2px;
}

.db .txt p {
  font-size: 16px;
  color: #2d3319;
  line-height: 1.7;
  margin: 0;
}

#contact {
  width: 100%;
  max-width: 640px;
}

.db .background-pat {
  font-family: "Noto Sans KR", sans-serif;
  background: #e4e6d5;
  padding: 28px 20px 24px;
  max-width: 640px;
  margin: 0 auto;
}

.db .container {
  width: 100%;
  padding: 24px 20px 20px;
  background: #ffffff;
  border: 2px solid #2d3319;
  border-radius: 12px;
  box-sizing: border-box;
  box-shadow: 0 4px 0 rgba(45, 51, 25, 0.08);
}

.db .form-inputs {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.db .clearfix {
  display: flex;
  align-items: center;
  gap: 12px;
}
.db .clearfix::after {
  content: "";
  display: block;
  clear: both;
}

/* 폼 필드 + 에러 */
.db .form-field {
  margin: 0;
}

.db .field-label {
  display: block;
  margin-bottom: 10px;
  font-size: 14px;
  font-weight: 700;
  color: #3f3a1f;
  line-height: 1.3;
}

.db .form-field .field-error {
  display: none;
  margin: 8px 0 0;
  font-size: 12px;
  font-weight: 600;
  color: #e53935;
  line-height: 1.4;
}

.db .form-field.is-error .field-error {
  display: block;
}

.db .form-field.is-error .input2,
.db .form-field.is-error .phone-part {
  border-color: #e53935;
  background: #fff8f8;
}

.db .form-field.is-error .phone-prefix {
  background: #fff0f0;
}

.db .form-field.is-error .phone-part:focus {
  border-color: #2d3319;
}

.db .form-field[data-field="checkbox"] .field-error {
  margin: 10px 0 0;
  text-align: center;
}

.db .form-field--concern {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid #ded9bd;
}

.db .form-field--agree {
  margin-top: 20px;
}

.db .form-field.is-error .ss {
  outline: 2px solid #e53935;
  outline-offset: 2px;
  background: #fff5f5;
}

/* 라벨 */
.db .sum {
  min-width: 64px;
  width: 64px;
  font-size: 14px;
  font-weight: 700;
  color: black;
  text-align: center;
  background: #fff;
  border-radius: 10px;
  padding: 14px 4px;
  line-height: 1.3;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 텍스트 인풋 */
.db .input2 {
  display: block;
  width: 100%;
  height: 52px;
  border: 1.5px solid #2d3319;
  border-radius: 10px;
  padding: 0 16px;
  font-size: 15px;
  color: #2d2a1a;
  background: #ffffff;
  outline: none;
  font-family: inherit;
  box-sizing: border-box;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}
.db .input2:focus {
  border-color: #6b7a3d;
  box-shadow: 0 0 0 3px rgba(107, 122, 61, 0.18);
}
.db .input2::placeholder {
  color: #8a8578;
  font-size: 14px;
}

/* 연락처 분할 입력 */
.db .phone-input-group {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.db .phone-part {
  height: 52px;
  border: 1.5px solid #2d2a1a;
  border-radius: 10px;
  padding: 0 12px;
  font-size: 15px;
  color: #2d2a1a;
  background: #ffffff;
  outline: none;
  font-family: inherit;
  box-sizing: border-box;
  text-align: center;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}

.db .phone-part:focus {
  border-color: #6b7a3d;
  box-shadow: 0 0 0 3px rgba(107, 122, 61, 0.18);
}

.db .phone-prefix {
  flex: 1;
  min-width: 0;
  background: #ddd8ab;
  color: #2d3319;
  font-weight: 700;
  cursor: default;
}

.db .phone-input-group .phone-part {
  flex: 1;
  min-width: 0;
}

.db .phone-sep {
  color: #2d3319;
  font-weight: 700;
  flex-shrink: 0;
  user-select: none;
  padding: 0 2px;
}

/* 고민사항 체크박스 */
.db .concern-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  width: 100%;
}

.db .concern-list label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 15px;
  font-weight: 600;
  color: #2d3319;
  background: #ffffff;
  border: 1.5px solid #2d3319;
  border-radius: 10px;
  padding: 16px 10px;
  cursor: pointer;
  user-select: none;
  transition: all 0.15s;
}
.db .concern-list label::before {
  content: "✓ ";
  color: #6b7a3d;
}
.db .concern-list label:has(input:checked) {
  background: #2d3319;
  border-color: #2d3319;
  color: #fff;
}
.db .concern-list label:has(input:checked)::before {
  color: #c2b280;
}
.db .concern-list input[type="checkbox"] {
  display: none;
}

/* 개인정보 동의 */
.db .ss {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 13px;
  color: #4a4a2a;
  background: #ddd8ab;
  border-radius: 10px;
  padding: 14px 16px;
}
.db .ss input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #2d3319;
  flex-shrink: 0;
}
.db .agreedetail {
  cursor: pointer;
  font-size: 13px;
  color: #4a4a2a;
}
.db .agreedetail2 {
  font-size: 11px;
  padding: 3px 10px;
  background: #a8a35a;
  border-radius: 4px;
  margin-left: 8px;
  color: #2d2a1a;
  font-weight: 700;
}
.db .agreedetail2 a {
  color: #2d2a1a;
  text-decoration: none;
}

/* 신청 버튼 */
.db .submit-wrap {
  width: 100%;
  margin: 20px 0 0;
}
.db .submit-btn {
  display: block;
  width: 100%;
  border: none;
  border-radius: 12px;
  padding: 18px 20px;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  font-family: "Noto Sans KR", sans-serif;
  letter-spacing: -0.3px;
  background: rgba(75, 83, 32, 0.93);
  color: white;
  text-align: center;
  text-decoration: none;
  box-sizing: border-box;
  box-shadow:
    inset 0 -5px 0 rgba(0, 0, 0, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
  transition:
    transform 0.1s,
    box-shadow 0.1s;
  position: relative;
  overflow: hidden;
}

.db .submit-btn::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -75%;
  width: 50%;
  height: 200%;
  background: rgba(255, 255, 255, 0.22);
  transform: skewX(-20deg);
  animation: rq-shimmer 2.2s infinite;
}
.db .submit-btn::after {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: 14px;
  border: 2.5px solid #2d3319;
  animation: rq-pulse 1.6s ease-out infinite;
  pointer-events: none;
}
.db .submit-btn:active {
  transform: translateY(3px);
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.15);
}

@keyframes rq-shimmer {
  0% {
    left: -75%;
  }
  60%,
  100% {
    left: 130%;
  }
}
@keyframes rq-pulse {
  0% {
    opacity: 0.9;
    inset: -3px;
  }
  100% {
    opacity: 0;
    inset: -10px;
  }
}

/* 안내 팝업 */
body.popup-open {
  overflow: hidden;
}

.app-popup[hidden] {
  display: none;
}

.app-popup {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.app-popup__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 22, 12, 0.55);
}

.app-popup__panel {
  position: relative;
  width: 100%;
  max-width: 320px;
  background: #f3f1e2;
  border: 2px solid #a8a35a;
  border-radius: 16px;
  padding: 28px 22px 22px;
  text-align: center;
  box-shadow: 0 12px 40px rgba(45, 51, 25, 0.18);
  animation: popup-in 0.22s ease-out;
}

.app-popup__title {
  margin: 0 0 10px;
  font-size: 20px;
  font-weight: 800;
  color: #3f3a1f;
}

.app-popup__message {
  margin: 0 0 22px;
  font-size: 15px;
  color: #4a4a2a;
  line-height: 1.65;
  white-space: pre-line;
  word-break: keep-all;
}

.app-popup__btn {
  width: 100%;
  border: none;
  border-radius: 12px;
  padding: 14px 20px;
  font-size: 16px;
  font-weight: 700;
  color: #2d3319;
  background: #a8a35a;
  cursor: pointer;
  font-family: "Noto Sans KR", "Apple SD Gothic Neo", sans-serif;
  box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.15);
}

.app-popup__btn:active {
  transform: translateY(2px);
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.15);
}

/* 약관 팝업 */
.terms-open-link {
  cursor: pointer;
}

.terms-popup__panel {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 360px;
  max-height: 85vh;
  padding: 22px 20px 18px;
}

.terms-popup__body {
  flex: 1;
  min-height: 200px;
  max-height: min(55vh, 420px);
  margin-bottom: 16px;
  border: 1.5px solid #d8d0ae;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
}

.terms-popup__body iframe {
  display: block;
  width: 100%;
  height: min(55vh, 420px);
  border: none;
  background: #fff;
}

@keyframes popup-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
