body{
  width: 100%;
  background-color:#ffffff;
  max-width: 720px;
  margin:0 auto;
  font-family: "Roboto", sans-serif;
  font-weight: 400;
  font-style: normal;
  font-size: 18px;
  line-height: 1.7em;
  color: #222;
  /* overflow: hidden; */
}

/* ============================== intro ========================== */
.intro_box {
  position: absolute;
  bottom: 0;
  width: 100%;
  height: 70%;
  background-color: #fff;
  border: 1px solid #ddd;
  border-top-left-radius: 30px;
  border-top-right-radius: 30px;
}
.intro_title {
  padding: 40px 0;
  text-align: center;
  font-size: 1.2em;
  font-weight: bold;
  color: #416fdf;
}

/* ============================== login ========================== */
.login {
  margin-top: 20px;
  width: 100%;
}
.login_logo {
  width: 140px;
  margin: auto;
  margin-bottom: 20px;
}
.login_box {
  width: 100%;
  background-color: #fff;
  border-radius: 10px;
  border: 1px solid #ddd;
  padding-bottom: 20px;
}
.login_title {
  padding: 40px 0;
  text-align: center;
}
.login_title b {
  display: block;
  font-size: 1.2em;
}
.login_title span {
  font-size: 0.9em;
  color: #666;
}
.login_form {
  padding: 0 20px;
}
.login_form li {
  margin-bottom: 10px;
}
.login_form li b {
  display: block;
  margin-bottom: 6px;
  margin-left: 10px;
  font-size: 0.9em;
}
.login_etc {
  display: flex;
  justify-content: space-between;
  font-size: 0.9em;
  padding: 0 25px;
  margin: 10px 0 20px 0;
}
.login_etc a {
  font-weight: bold;
  color: #ff8188;
}
.login_btn {
  width: calc(100% - 40px);
  height: 52px;
  margin: auto;
  margin-top: 30px;
  text-align: center;
  line-height: 52px;
  border-radius: 10px;
  background-color: #ff8188;
  color: #fff;
}
.login_btn a {
  display: block;
  width: 100%;
  height: 100%;
}

.login_signup {
  padding: 30px;
  text-align: center;
  color: #666;
  font-size: 0.9em;
}
.login_signup a {
  color: #ff8188;
}

/* ==============================
   Modal (기존 + 정리)
============================== */

/* === 오버레이 공통: 중앙 정렬 + 위·아래 여백 + 오버레이 무스크롤 === */
.modal {
  position: fixed;
  inset: 0;
  display: none;                 /* 기본 숨김 */
  justify-content: center;
  align-items: center;
  padding: 5vh 16px;             /* 상단 잘림 방지용 안전 여백 */
  background: rgba(0,0,0,0.45);
  z-index: 9999;

  overflow: hidden;              /* 오버레이 자체 스크롤 금지 */
  overscroll-behavior: none;     /* 스크롤 체이닝 차단 */
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.modal::-webkit-scrollbar { display: none; }
.modal.is-open { display: flex; }

/* (선택) 모달 열릴 때 배경 페이지 스크롤 잠금 */
body.modal-open { overflow: hidden; }

/* === 콘텐츠 공통: 크기 제한 + 내부 스크롤(바 숨김) === */
#successModal .modal-content,
#policyModal  .modal-content,
#consentModal .modal-content {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;

  width: min(640px, 90vw);
  max-height: calc(100vh - 10vh);
  padding: 32px 24px 28px;
  border-radius: 12px;
  background: #fff;

  overflow: auto;               /* 내부 스크롤만 허용 */
  overscroll-behavior: contain; /* 내부 끝에서 바깥 전파 차단 */
  -ms-overflow-style: none;
  scrollbar-width: none;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}
#successModal .modal-content::-webkit-scrollbar,
#policyModal  .modal-content::-webkit-scrollbar,
#consentModal .modal-content::-webkit-scrollbar { display: none; }

/* 닫기 버튼 공통 */
#successModal .modal-content .close,
#policyModal  .modal-content .close,
#consentModal .modal-content .close {
  position: absolute;
  top: 12px;
  right: 12px;
  cursor: pointer;
  font-size: 36px;
  color: #333;
}
#successModal .modal-content .close:hover,
#policyModal  .modal-content .close:hover,
#consentModal .modal-content .close:hover {
  color: #000;
}

/* 제목/본문/버튼 여백 공통 */
#successModal .modal-content h2,
#policyModal  .modal-content h2,
#consentModal .modal-content h2 { margin: 0 0 12px; font-size: 1.1em; }

#successModal .modal-content p,
#policyModal  .modal-content p,
#consentModal .modal-content p { margin: 8px 0 0; font-size: 0.8em; }

#successModal .modal-content .login_btn,
#policyModal  .modal-content .login_btn,
#consentModal .modal-content .login_btn { margin-top: 12px; }

/* === 정책 모달 전용: 긴 본문은 상단부터 + 좌측 정렬 === */
#policyModal .modal-content {
  justify-content: flex-start;
  align-items: stretch;
  text-align: left;
  line-height: 1.6;
}

/* 모바일 브라우저 정확도 개선(dvh 지원 시) */
@supports (height: 100dvh) {
  #successModal .modal-content,
  #policyModal  .modal-content,
  #consentModal .modal-content {
    max-height: calc(100dvh - 10vh);
  }
}

/* ==============================
   Login Type (Radio) - reset-safe + visible check
============================== */

.login-type b{
  display:block;
  margin-bottom:8px;
}

/* 라디오 그룹 배치 */
.login-type-group{
  display:flex;
  gap:32px;
  align-items:flex-start;
}

/* 라디오: 접근성 유지 + 시각적으로 숨김 */
.login-type-group input[type="radio"]{
  position:absolute;
  width:1px;
  height:1px;
  margin:-1px;
  padding:0;
  border:0;
  overflow:hidden;
  clip:rect(0,0,0,0);
}

/* 라벨: 눈에 보이는 체크 원 */
.login-type-group .login-type-label{
  position:relative;
  display:inline-flex;
  align-items:center;
  padding-left:34px;
  line-height:24px;
  font-size:14px;
  font-weight:600;
  color:#1e1e1e;
  cursor:pointer;
}

/* 바깥 원 */
.login-type-group .login-type-label::before{
  content:'';
  position:absolute;
  left:0;
  top:50%;
  width:20px;
  height:20px;
  border:2px solid #999;
  border-radius:50%;
  transform:translateY(-50%);
  box-sizing:border-box;
  background:#fff;
}

/* 체크된 내부 점 */
.login-type-group input[type="radio"]:checked + .login-type-label::after{
  content:'';
  position:absolute;
  left:6px;
  top:50%;
  width:8px;
  height:8px;
  background:#111;
  border-radius:50%;
  transform:translateY(-50%);
}

/* 선택 강조(선택 사항) */
.login-type-group input[type="radio"]:checked + .login-type-label{
  color:#111;
}

/* ==============================
   Phone / OTP UI (stable layout) - class 기반 통일
   필수 전제: 전화 input에 class="phone-input" 추가
============================== */

/*회원가입 국가번호 안내*/
.field-hint{
  margin: 2px 0 8px 10px;
  font-size: 0.8em;
  color: #888;
  line-height: 1.3;
}

/* phone_row: 전화 입력(위) + OTP(아래) 고정 */
.phone_row{
  display:flex;
  flex-direction:column;
  gap:10px;
  max-width:100%;
}

/* +prefix + input 래퍼 */
.phone-input-wrap{
  display:flex;
  align-items:stretch;
  width:100%;
  height:52px;
  border:1px solid #ccc;
  border-radius:6px;
  overflow:hidden;
  box-sizing:border-box;
  background:#fff;
}

/* + 표시: 외곽 라운드는 래퍼가 담당, prefix는 좌측만 */
.phone-prefix{
  padding:0 12px;
  font-size:15px;
  font-weight:600;
  color:#333;
  background:#f5f5f5;
  border-right:1px solid #ddd;
  display:flex;
  align-items:center;

  border-top-left-radius:6px;
  border-bottom-left-radius:6px;
  border-top-right-radius:0;
  border-bottom-right-radius:0;
}

/* 전화번호 input: id(#tel/#login-tel) 대신 class로 통일 */
.phone-input-wrap .phone-input{
  flex:1 1 auto;
  border:none;
  outline:none;
  padding:0 12px;
  font-size:15px;
  font-family:"Segoe UI","Apple SD Gothic Neo","Noto Sans",sans-serif;
  background:#fff;
  box-sizing:border-box;
}

/* OTP 버튼/메시지 라인: 흔들림 방지 */
.otp-row{
  display:flex;
  align-items:center;
  gap:10px;
  min-height:44px;
  flex-wrap:wrap;
}

/* 메시지 전용 줄(항상 자리 유지) */
.otp-msg-row{
  min-height:18px;
  margin-top:2px;
}

/* OTP 메시지 */
#otpMsg{
  font-size:13px;
  font-family:"Segoe UI","Apple SD Gothic Neo","Noto Sans",sans-serif;
  line-height:1.3;
}

/* OTP 입력 영역: 기본 숨김, 열릴 때 JS에서 display:flex로 */
#otpArea{
  display:none;
  align-items:center;
  gap:8px;
  min-height:44px;
  flex-wrap:wrap;
}

/* OTP 코드 입력 */
#otpArea #otp_code{
  width:160px;
  height:44px;
  padding:0 12px;
  font-size:15px;
  font-family:"Segoe UI","Apple SD Gothic Neo","Noto Sans",sans-serif;
  border:1px solid #ccc;
  border-radius:6px;
  box-sizing:border-box;
}

/* 버튼 공통 */
#btnSendOtp,
#btnVerifyOtp{
  height:44px;
  padding:0 16px;
  font-size:14px;
  font-family:"Segoe UI","Apple SD Gothic Neo","Noto Sans",sans-serif;
  font-weight:600;
  border-radius:6px;
  border:none;
  cursor:pointer;
  transition:background-color 0.2s ease, transform 0.06s ease;
  white-space:nowrap;
}

#btnSendOtp:active,
#btnVerifyOtp:active{
  transform:translateY(1px);
}

/* Send Code */
#btnSendOtp{
  background-color:#222;
  color:#fff;
  margin-top: 5px;
}
#btnSendOtp:hover { background-color:#000; }
#btnSendOtp:disabled{
  opacity:0.6;
  cursor:not-allowed;
}

/* Verify */
#btnVerifyOtp{
  background-color:#0d6efd;
  color:#fff;
}
#btnVerifyOtp:hover { background-color:#0b5ed7; }
#btnVerifyOtp:disabled{
  opacity:0.6;
  cursor:not-allowed;
}

/* 회원정보 수정 페이지에서만 OTP 영역 항상 노출 */
body.page-edit-profile #otpArea{
  display:flex;
}

body.page-edit-profile #otpArea #otp{
  width:160px;
  height:44px;
  padding:0 12px;
  border:1px solid #ccc;
  border-radius:6px;
  box-sizing:border-box;
}


/* 성공/실패 색상은 JS에서 #otpMsg.style.color 로만 제어 */
