:root {
    --primary: #007BFF;
    --black: #1E1E1E;
    --secondary: #8EA0AC;
    --darkGray: #323435;
    --gray-88: #8393A5;
    --gray-e8: #EDF2F7;
    --gray-e1: #E1E1E1;
    --gray-f7: #F8FAFC;
    --gray-f1: #F0F4F9;
}

body {
    font-family: pretendard, sans-serif;
    font-style: normal;
    font-weight: 400;
}

#wrapper {
    margin-top: 2.75rem;
}

#header {
    padding: 0.25rem 1rem;
    background: linear-gradient(to bottom, #ffffff, #F3F7FC);
    border-bottom: 1px solid rgba(0, 62, 129, 0.08);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    border: 0;
}

.flex-gap-1 {
    display: flex;
    gap: 1rem;
    flex: 1;
}
.flex-gap-05 {
    display: flex;
    gap: 0.5rem;
    flex: 1;
}

.divider-e8 {
    width: 100%;
    height: 1px;
    background: var(--gray-e8);
}

.divider-f7 {
    width: 100%;
    height: 1px;
    background: var(--gray-f7);
}

/* [ START :: 히어로 섹션 ] */
#hero-section {
    padding: 2rem 1rem 121px 1rem;
    background: url('../img/hero-bg.png') no-repeat right bottom #F3F7FC;
    background-size: contain;
}
#hero-section .hero-sub {
    font-size: 0.75rem;
    color: var(--gray-88);
    margin-bottom: 0.5rem;
}
#hero-section .hero-title {
    font-size: 1.5rem;
    font-weight: bold;
    line-height: 2.25rem;
}
#hero-section .hero-title span {
    font-weight: 200;
}
/* [ END   :: 히어로 섹션 ] */


/* [ START :: 입력 공통 ] */
.form-row {
    display: flex;
    flex-direction: column;
    margin-bottom: 1rem;
    width: 100%;
}
.form-row label {
    font-size: 0.625rem;
    color: var(--gray-88);
    margin-bottom: 0.25rem;
}
.form-row legend {
    font-size: 0.625rem;
    color: var(--gray-88);
    margin-bottom: 0.25rem;
}
.form-row input {
    border-top: none;
    border-left: none;
    border-right: none;
    border-bottom: 1px solid var(--gray-e8);
    padding: 0.75rem 0;
    color: var(--black);
    flex:1;
    background-color: transparent;
    border-radius: 0;
}
.form-row input::placeholder {
    font-size: 0.8125rem;
    color: var(--gray-88);
}
.form-row input:focus {
    outline: none;
    border-bottom: 1px solid var(--primary);
}
.form-row button {
    font-size: 0.8125rem;
    color: var(--gray-88);
    border: 1px solid var(--gray-e8);
    border-radius: 0.75rem;
    background-color: white;
    padding: 0 2rem;
}
.form-row button.active {
    background-blend-mode: color-burn, normal;
    background-image: linear-gradient(120deg, rgba(54, 41, 241, 0) 0%, #dcdcdc 100%), linear-gradient(to bottom, #007bff, #007bff);
    color: white
}
#phone-prefix1 {
    appearance: none;         /* 최신 표준 */
    -webkit-appearance: none; /* 크롬/사파리 */
    -moz-appearance: none;    /* 파이어폭스 */
    background: none;         /* 기본 배경 제거 */
}
#phone-prefix2 {
    appearance: none;         /* 최신 표준 */
    -webkit-appearance: none; /* 크롬/사파리 */
    -moz-appearance: none;    /* 파이어폭스 */
    background: none;         /* 기본 배경 제거 */
}
#phone-prefix3 {
    appearance: none;         /* 최신 표준 */
    -webkit-appearance: none; /* 크롬/사파리 */
    -moz-appearance: none;    /* 파이어폭스 */
    background: none;         /* 기본 배경 제거 */
}

/* 약관 동의 */
.select-wrapper {
    position: relative;
    display: inline-block;
}
.select-wrapper select {
    width: 4.625rem;
    border: none;
    border-bottom: 1px solid var(--gray-e8);
    color: var(--black);
    font-size: 0.8125rem;
    padding: 0.75rem 0;
}
.select-wrapper select:focus {
    outline: none;
    border-bottom: 1px solid var(--primary);
}
.select-wrapper::after {
    content: "";
    position: absolute;
    top: 50%;
    right: 8px;
    width: 12px;
    height: 12px;
    background: url('../img/arrow-down.svg') no-repeat center;
    background-size: contain;
    pointer-events: none; /* 화살표 클릭해도 select 열리게 */
    transform: translateY(-50%);
}
.terms-list {
    padding-top: 1rem;
}
.terms-list .terms-box {
    padding: 0.875rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.terms-list .terms-check {
    display: flex;
    align-items: center;
    cursor: pointer;
}
.terms-list input {
    display: none;
}
.terms-list .custom-check {
    display: inline-block;
    width: 20px;
    height: 20px;
    margin-right: 8px;
    background: url('../img/unchecked.svg') no-repeat center / contain;
}
.terms-list .terms-check input:checked + .custom-check {
    background: url('../img/checked.svg') no-repeat center / contain;
}
.terms-list .check-text {
    font-size: 0.8125rem;
    color: var(--black);
}
.terms-list .select-all {
    border: 1px solid rgba(0, 62, 129, 0.04);
    background-color: var(--gray-f7);
    border-radius: 0.5rem;
}
.terms-list .select-all .check-text {
    font-weight: 600;
}
.submit-btn {
    margin: 0.5rem 0;
    padding: 0.75rem 0;
    width: 100%;
    font-size: 0.875rem;
    font-weight: bold;
    background-blend-mode: color-burn, normal;
    background-image: linear-gradient(120deg, rgba(54, 41, 241, 0) 0%, #dcdcdc 100%), linear-gradient(to bottom, #007bff, #007bff);
    color: white;
    border: none;
    border-radius: 0.75rem;
    box-shadow: 0 5px 10px rgba(30, 30, 30, 0.1);
}
/* [ END   :: 입력 공통 ] */


/* [ START :: 상단 입력 섹션 ] */
#form-section-top {
    background-color: #F3F7FC;
}
#form-section-top .form-wrapper {
    background: linear-gradient(to bottom, #ffffff, #F8FAFC);
    padding: 1.5rem 1rem 0 1rem;
    border-radius: 1.25rem 1.25rem 0 0;
    border-top: 1px solid var(--gray-e1);
}
/* [ END   :: 상단 입력 섹션 ] */


/* [ START :: 배너 ] */
#banner-section {
    padding: 1rem;
    background: #F8FAFC;
}
#banner-section .banner {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 1.5rem 1rem;
    border: 1px solid rgba(0, 123, 255, 0.02);
    border-radius: 1rem;
    background: url('../img/banner-bg.png') no-repeat right center rgba(0, 123, 255, 0.08);
    background-size: contain;
}
#banner-section .banner .banner-sub {
    font-size: 0.6875rem;
    color: var(--gray-88);
}
#banner-section .banner .banner-title {
    font-size: 1rem;
    color: var(--darkGray);
    line-height: 1.5rem;
    font-weight: bold;
}
/* [ END   :: 배너 ] */


/* [ START :: 보험사 리스트 ] */
#company-section {
    padding: 0 1rem;
    background: #F8FAFC;
}
#company-section .company-wrapper {
    background-color: white;
    border: 1px solid var(--gray-f1);
    padding: 1rem 0.75rem;
    border-radius: 1rem;
}
#company-section .company-wrapper .wrapper-title {
    margin-bottom: 0.5rem;
}
#company-section .company-wrapper .sub-title {
    font-size: 0.75rem;
    color: var(--gray-88);
    margin-bottom: 0.5rem;
}
#company-section .company-wrapper .main-title {
    font-size: 1rem;
    color: var(--black);
    line-height: 1.5rem;
    font-weight: bold;
}

/* 리스트 */
.company-list ul li {
    margin-top: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid var(--gray-f1);
}
.company-list ul li:last-child {
    border-bottom: none;
}
.company-list ul li .company-box {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}
.company-list ul li .company-box img {
    width: 3rem;
    height: 3rem;
}
.company-list ul li .company-box div {
    display: flex;
    flex-direction: column;
}
.company-list ul li .company-box div span:first-child {
    font-size: 0.8125rem;
    color: var(--black);
    font-weight: bold;
    line-height: 1.25rem;
    margin-bottom: 0.25rem;
}
.company-list ul li .company-box div span:last-child {
    font-size: 0.6875rem;
    color: var(--gray-88);
    font-weight: 500;
    line-height: 1rem;
}
.company-list ul li button {
    padding: 0.65rem 0.75rem;
    font-size: 0.6875rem;
    color: white;
    font-weight: 600;
    border: none;
    border-radius: 0.5rem;
    background-blend-mode: color-burn, normal;
    background-image: linear-gradient(120deg, rgba(54, 41, 241, 0) 0%, #dcdcdc 100%), linear-gradient(to bottom, #007bff, #007bff);
}
/* [ END   :: 보험사 리스트 ] */


/* [ START :: 하단 입력 섹션 ] */
#form-section-bottom {
    background: linear-gradient(to bottom, #F8FAFC, #ffffff);
    padding: 1.25rem 1rem;
}
#form-section-bottom .wrapper-title {
    margin-bottom: 1rem;
}
#form-section-bottom .wrapper-title .sub-title {
    font-size: 0.75rem;
    color: var(--gray-88);
    margin-bottom: 0.5rem;
}
#form-section-bottom .wrapper-title .main-title {
    font-size: 1.25rem;
    color: var(--black);
    line-height: 2rem;
    font-weight: bold;
}
/* [ END   :: 하단 입력 섹션 ] */


/* [ START :: 푸터 ] */
#footer {
    padding: 1.25rem 1rem;
    text-align: center;
    margin-bottom: 2.125rem;
    background-color: white;
}
#footer p {
    padding: 0.375rem 0;
    font-size: 0.625rem;
    color: var(--gray-88);
    font-weight: 400;
    line-height: 1rem;
}
#footer p.text-large {
    padding: 0.5rem 0;
    font-size: 0.6875rem;
}
#footer p.copyright {
    padding: 0 0 0 0;
	margin-bottom: 2.75rem;
    font-size: 0.6875rem;
    color: #B5BFCD;
}
/* [ END   :: 푸터 ] */

/* [ START :: 팝업 공통 ] */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(30, 30, 30, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 999; /* 항상 위 */
}
.popup-wrapper {
    position: relative;
    padding: 1rem;
    background: white;
    width: calc(100% - 4rem);
    border-radius: 1rem;
}
.popup-wrapper .popup-title {
    font-size: 1rem;
    padding-bottom: 0.75rem;
    font-weight: bold;
    color: var(--black);
    border-bottom: 1px solid rgba(0, 62, 129, 0.08);
    text-align: center;
}
.popup-wrapper .popup-content {
    max-height: 32rem;
    margin: 0.75rem 0;
    overflow: hidden;
    overflow-y: auto;
}
.popup-wrapper button.close-btn {
    width: 100%;
    padding: 0.75rem 0;
    color: white;
    font-size: 0.875rem;
    font-weight: bold;
    border: none;
    border-radius: 0.75rem;
    background-blend-mode: color-burn, normal;
    background-image: linear-gradient(120deg, rgba(54, 41, 241, 0) 0%, #dcdcdc 100%), linear-gradient(to bottom, #007bff, #007bff);
}
/* [ END   :: 팝업 공통 ] */

/* [ START :: 개인정보수집 및 이용동의 팝업 ] */
.popup-wrapper .popup-content .popup-text {
    font-size: 0.8125rem;
    color: #65788E;
    line-height: 1.25rem;
}
/* [ END   :: 개인정보수집 및 이용동의 팝업 ] */


/* [ START :: 상담신청 완료 팝업 ] */
.popup-wrapper .popup-content .popup-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}
.popup-wrapper .popup-content .popup-info img {
    width: 5.5rem;
    height: 5.5rem;
}
.popup-wrapper .popup-content .popup-info p {
    font-size: 0.8125rem;
    color: var(--black);
    line-height: 1.25rem;
    text-align: center;
}
.popup-wrapper .popup-content .popup-info p span {
    color: var(--primary);
    font-weight: 500;
}
.popup-wrapper .popup-content .text-box {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: var(--gray-f7);
    border: 1px solid var(--gray-f1);
    border-radius: 0.75rem;
}
.popup-wrapper .popup-content .text-box span {
    font-size: 0.6875rem;
    color: var(--black);
    font-weight: 500;
}
.popup-wrapper {
    margin-top: 0.5rem;
}
/* [ END   :: 상담신청 완료 팝업 ] */

/* 버튼 바로 위 약관 에러 문구 여백/간격 */
.terms-error{
  display:block;
  margin: 8px 0 12px;         /* 위/아래 간격 */
  padding-left: 0.75rem;      /* ← 왼쪽 여백만 살짝 */
  text-align: left;
}

/*입력에러*/
.error { color:#e11d48; font-size:13px; margin-top:6px; }
input.js-birth:focus { outline:2px solid var(--primary, #2563eb); outline-offset:2px; }

/* ===== 모바일 앱(WebView)에서 화면 흔들림/이동 방지 ===== */

/* 루트 스크롤 제어: 오버스크롤 체인 차단(당겨서 새로고침, 바운스 방지) */
html, body {
  height: 100%;
  overscroll-behavior: none;        /* 안드로이드/크롬: 바운스 & P2R 방지 */
  -webkit-overflow-scrolling: auto; /* iOS 바운스 영향 최소화 */
}

/* 세로 스크롤만 허용(가로 흔들림 방지), 가로 스크롤 숨김 */
body {
  overflow-x: hidden;
  touch-action: pan-y;               /* 세로만 팬 가능 */
  -webkit-user-select: none;         /* 길게 눌러 선택 방지(미세 이동 방지) */
  user-select: none;
  -webkit-touch-callout: none;       /* iOS 터치 콜아웃 방지 */
  -webkit-tap-highlight-color: rgba(0,0,0,0); /* 탭 하이라이트 제거 */
}

/* 컨테이너에서 추가 바운스 방지 */
#wrapper {
  min-height: 100%;
  overscroll-behavior: contain;      /* 내부 스크롤이 바깥으로 전이되는 것 차단 */
}

/* 이미지/버튼 드래그로 인한 화면 끌림 방지 */
img, a, button {
  -webkit-user-drag: none;
  user-drag: none;
}

/* ===== 성별 버튼 : 줄바꿈 없이, 좌우만 축소 + 색상 복원 ===== */
.gender-btn {
  display: flex;
  flex: 1 1 auto;
  justify-content: space-between;
  align-items: stretch;
  gap: 0.5rem;
  min-width: 5.5rem;
  box-sizing: border-box;
  flex-wrap: nowrap; /* ✅ 절대 줄바꿈 안됨 */
}

.gender-btn button {
  flex: 1 1 0;
  white-space: nowrap;
  font-size: 0.8125rem;     /* ✅ 글자 크기 고정 */
  text-align: center;
  padding: 0.6rem 0;        /* ✅ 세로 여백 고정 */
  border: 1px solid var(--gray-e8);
  border-radius: 0.75rem;
  background-color: #fff;   /* 흰색 기본 배경 */
  color: var(--gray-88);
  min-width: 0;             /* ✅ 좌우만 줄어들도록 flex shrink 허용 */
  height: 2.4rem;           /* ✅ 높이 고정 */
  box-sizing: border-box;
  flex-shrink: 1;           /* ✅ 좌우 폭만 줄어듦 */
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

/* ✅ 활성(선택)된 버튼 색상 복원 */
.gender-btn button.active {
  background-color: var(--primary);  /* 파란색 배경 */
  color: #fff;                       /* 흰색 텍스트 */
  border: 1px solid var(--primary);  /* 동일 색상 테두리 */
}

/* ✅ 터치 시(누르는 순간) 약간 어둡게 */
.gender-btn button:active {
  background-color: #0056cc;
  border-color: #0056cc;
  color: #fff;
}

/* 이름 + 성별 버튼 행 정렬 */
.form-row .flex-gap-1 {
  display: flex;
  align-items: flex-end;
  gap: 1rem;
  flex-wrap: nowrap; /* ✅ 한 줄 유지 */
  overflow: hidden;  /* ✅ 가로 스크롤 방지 */
}