/* Auth modals — sliced from login/style.css + join/style.css */

#idx-modal-login,
#idx-modal-join {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: max(12px, env(safe-area-inset-top, 0px)) max(12px, env(safe-area-inset-right, 0px))
    max(12px, env(safe-area-inset-bottom, 0px)) max(12px, env(safe-area-inset-left, 0px));
  box-sizing: border-box;
}

#idx-modal-login.is-open,
#idx-modal-join.is-open {
  display: flex;
}

#idx-modal-login .dim,
#idx-modal-join .dim {
  position: absolute !important;
  inset: 0 !important;
  width: auto !important;
  height: auto !important;
  left: 0 !important;
  top: 0 !important;
}

#idx-modal-login .popup,
#idx-modal-join .popup {
  position: relative !important;
  top: auto !important;
  left: auto !important;
  margin: 0 auto;
  z-index: 1;
  max-height: min(92vh, 100%);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  flex-shrink: 0;
  width: min(422px, calc(100vw - 24px));
}

:is(#idx-modal-login, #idx-modal-join) .btn-popup-close {
  margin: 0;
  padding: 0;
  border: none;
  cursor: pointer;
  font: inherit;
  color: inherit;
  background: transparent;
}

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

:is(#idx-modal-login, #idx-modal-join) .idx-auth-field {
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  height: 100%;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 10px;
  background: transparent;
  font-family: "Inter", Helvetica, sans-serif;
  font-weight: 500;
  font-size: 14px;
  letter-spacing: -0.07px;
  line-height: 20.3px;
  color: #ffffff;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
}

:is(#idx-modal-login, #idx-modal-join) .idx-auth-field::placeholder {
  color: #9e9e9e;
  opacity: 1;
}

:is(#idx-modal-login, #idx-modal-join) button.idx-auth-modal-backdrop.dim {
  font: inherit;
  color: inherit;
  border: none;
  padding: 0;
  margin: 0;
  background: transparent;
  cursor: pointer;
  display: block;
  box-sizing: border-box;
}

:is(#idx-modal-login, #idx-modal-join) .subtitle h2,
:is(#idx-modal-login, #idx-modal-join) .subtitle p {
  margin: 0;
}

:is(#idx-modal-login, #idx-modal-join) footer.join-btn {
  margin: 0;
}

#idx-modal-join .idx-auth-field-group > p.idx-auth-field-label {
  margin: 0;
}

#idx-modal-login .dim {
  position: absolute;
  top: calc(50.00% - 650px);
  left: calc(50.00% - 250px);
  width: 500px;
  height: 1298px;
  background-color: #000000b2;
  backdrop-filter: blur(5px) brightness(100%);
  -webkit-backdrop-filter: blur(5px) brightness(100%);
}

#idx-modal-login .popup {
  display: flex;
  flex-direction: column;
  width: 422px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 20px;
  position: absolute;
  top: calc(50.00% - 317px);
  left: calc(50.00% - 211px);
  background-color: #212328;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid;
  border-color: #1e2939;
  box-shadow: 0px 6px 20px #000000cc;
}

:is(#idx-modal-login, #idx-modal-join) .idx-auth-close-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  position: relative;
  align-self: stretch;
  width: 100%;
  flex: 0 0 auto;
}

#idx-modal-login .btn-popup-close {
  width: 40px;
  height: 40px;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background-color: #303338;
  border-radius: 10px;
}

#idx-modal-login .btn-popup-close-icon {
  position: relative;
  width: 15px;
  height: 15px;
  aspect-ratio: 1;
  background-image: url(../img/ico-popup-close-x.svg);
  background-size: 100% 100%;
}

:is(#idx-modal-login, #idx-modal-join) .idx-auth-brand {
  margin: 0;
  flex-direction: column;
  height: 50px;
  justify-content: center;
  gap: 10px;
  display: inline-flex;
  align-items: center;
  position: relative;
}

:is(#idx-modal-login, #idx-modal-join) .idx-auth-brand-img {
  position: relative;
  display: block;
  height: 34px;
  width: auto;
  max-width: 220px;
  object-fit: contain;
}

:is(#idx-modal-login, #idx-modal-join) .subtitle {
  flex: 0 0 auto;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  position: relative;
}

:is(#idx-modal-login, #idx-modal-join) .idx-auth-heading {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  margin-top: -1px;
  font-family: "Inter", Helvetica;
  font-weight: 600;
  color: #ffffff;
  font-size: 25px;
  text-align: center;
  letter-spacing: -0.12px;
  line-height: 36.3px;
  white-space: nowrap;
}

:is(#idx-modal-login, #idx-modal-join) .idx-auth-lede {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  font-family: "Inter", Helvetica;
  font-weight: 500;
  color: #99a1af;
  font-size: 15px;
  text-align: center;
  letter-spacing: -0.07px;
  line-height: 21.8px;
  white-space: nowrap;
}

#idx-modal-login .inputbox {
  gap: 20px;
  padding: 10px 20px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  position: relative;
  align-self: stretch;
  width: 100%;
  flex: 0 0 auto;
  margin: 0;
  border: none;
  box-sizing: border-box;
}

:is(#idx-modal-login, #idx-modal-join) .idx-auth-field-group {
  gap: 5px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  position: relative;
  align-self: stretch;
  width: 100%;
  flex: 0 0 auto;
}

:is(#idx-modal-login, #idx-modal-join) .idx-auth-field-label {
  position: relative;
  display: flex;
  align-items: center;
  width: fit-content;
  margin-top: -1px;
  font-family: "Inter", Helvetica;
  font-weight: 700;
  color: #99a1af;
  font-size: 16px;
  letter-spacing: -0.08px;
  line-height: 23.2px;
  white-space: nowrap;
}

#idx-modal-login .idx-auth-input-wrap {
  display: flex;
  height: 45px;
  align-items: center;
  justify-content: flex-start;
  padding: 0 12px;
  position: relative;
  align-self: stretch;
  width: 100%;
  background-color: #2f2f30;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid;
  border-color: #3f3f40;
}

#idx-modal-login .idx-auth-actions-row {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: stretch;
  justify-content: stretch;
  gap: 10px;
  position: relative;
  align-self: stretch;
  width: 100%;
  flex: 0 0 auto;
}

#idx-modal-login button.login {
  display: flex;
  height: 45px;
  align-items: center;
  justify-content: center;
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  width: auto;
  align-self: stretch;
  margin: 0;
  padding: 10px 12px;
  border: none;
  cursor: pointer;
  font: inherit;
  color: inherit;
  background-color: #00bc7d;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0px 0px 15px #10b9814c;
}

#idx-modal-login .idx-auth-action-label {
  position: relative;
  display: flex;
  align-items: center;
  width: fit-content;
  font-family: "Inter", Helvetica;
  font-weight: 900;
  color: #ffffff;
  font-size: 14px;
  letter-spacing: -0.07px;
  line-height: 20.3px;
  white-space: nowrap;
}

#idx-modal-login button.telegram {
  background: linear-gradient(
    90deg,
    rgba(17, 163, 198, 1) 0%,
    rgba(17, 158, 192, 1) 100%
  );
  display: flex;
  height: 45px;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 10px 12px;
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  width: auto;
  align-self: stretch;
  margin: 0;
  border: none;
  cursor: pointer;
  font: inherit;
  color: inherit;
  border-radius: 10px;
  overflow: hidden;
}

#idx-modal-login .ico-telegram {
  position: relative;
  width: 18px;
  height: 15.22px;
}

#idx-modal-login .join-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px 20px;
  position: relative;
  align-self: stretch;
  width: 100%;
  flex: 0 0 auto;
}

#idx-modal-login .idx-auth-switch-caption {
  margin: 0;
  height: 30px;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  position: relative;
}

#idx-modal-login .idx-auth-btn-register {
  background-color: #303338;
  display: flex;
  height: 45px;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 10px;
  position: relative;
  align-self: stretch;
  width: 100%;
  border-radius: 10px;
  overflow: hidden;
}
#idx-modal-join .dim {
  position: absolute;
  top: calc(50.00% - 801px);
  left: calc(50.00% - 250px);
  width: 500px;
  height: 1602px;
  background-color: #000000b2;
  backdrop-filter: blur(5px) brightness(100%);
  -webkit-backdrop-filter: blur(5px) brightness(100%);
}

#idx-modal-join .popup {
  display: flex;
  flex-direction: column;
  width: 422px;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  padding: 15px 20px;
  position: absolute;
  top: calc(50.00% - 708px);
  left: calc(50.00% - 211px);
  background-color: #212328;
  border-radius: 16px;
  overflow-x: hidden;
  overflow-y: auto;
  max-height: min(92vh, 100dvh);
  -webkit-overflow-scrolling: touch;
  border: 1px solid;
  border-color: #1e2939;
  box-shadow: 0px 6px 20px #000000cc;
}

#idx-modal-join .btn-popup-close {
  width: 40px;
  height: 40px;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background-color: #303338;
  border-radius: 10px;
}

#idx-modal-join .btn-popup-close-icon {
  position: relative;
  width: 15px;
  height: 15px;
  aspect-ratio: 1;
  background-image: url(../img/ico-popup-close-x.svg);
  background-size: 100% 100%;
}

#idx-modal-join #idx-join-form {
  margin: 0;
  padding: 0;
  border: none;
  box-sizing: border-box;
  align-self: stretch;
  width: 100%;
  display: flex;
  flex-direction: column;
  flex: 0 0 auto;
}

#idx-modal-join fieldset.idx-auth-fieldset {
  border: none;
  margin: 0;
  padding: 0;
  min-width: 0;
  align-self: stretch;
  width: 100%;
  box-sizing: border-box;
  position: relative;
}

/* sr-only legend이 fieldset 상단에 빈 공간을 만들지 않도록 */
#idx-modal-join fieldset.idx-auth-fieldset > legend.idx-auth-sr-only {
  position: absolute;
  left: 0;
  top: 0;
  margin: 0;
}

#idx-modal-join .idx-auth-form-stack {
  flex-direction: column;
  align-items: flex-start;
  display: flex;
  position: relative;
  align-self: stretch;
  width: 100%;
  flex: 0 0 auto;
}

#idx-modal-join .inputbox {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
  padding: 10px 20px;
  position: relative;
  align-self: stretch;
  width: 100%;
  flex: 0 0 auto;
}

#idx-modal-join .idx-auth-field-row {
  display: flex;
  align-items: center;
  gap: 5px;
  position: relative;
  align-self: stretch;
  width: 100%;
  flex: 0 0 auto;
}

#idx-modal-join .idx-auth-input-wrap {
  display: flex;
  height: 45px;
  align-items: center;
  justify-content: flex-start;
  padding: 0 12px;
  position: relative;
  flex: 1;
  flex-grow: 1;
  background-color: #2f2f30;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid;
  border-color: #3f3f40;
}

#idx-modal-join select.idx-auth-select {
  cursor: pointer;
}

#idx-modal-join select.idx-auth-select option {
  color: #1a1a1a;
  background-color: #ffffff;
}

#idx-modal-join .idx-auth-btn-secondary {
  display: inline-flex;
  height: 45px;
  align-items: center;
  justify-content: center;
  padding: 10px;
  position: relative;
  flex: 0 0 auto;
  background-color: #e701e2;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid;
  border-color: #ff37fa;
}

#idx-modal-join button.idx-auth-btn-secondary {
  margin: 0;
  cursor: pointer;
  font: inherit;
  color: inherit;
}

#idx-modal-join .idx-auth-action-label {
  position: relative;
  display: flex;
  align-items: center;
  width: fit-content;
  font-family: "Inter", Helvetica;
  font-weight: 900;
  color: #ffffff;
  font-size: 14px;
  letter-spacing: -0.07px;
  line-height: 20.3px;
  white-space: nowrap;
}

#idx-modal-join .idx-auth-btn-secondary .idx-auth-action-label {
  font-weight: 700;
}

#idx-modal-join .idx-auth-control {
  justify-content: flex-start;
  padding: 0 12px;
  align-self: stretch;
  width: 100%;
  overflow: hidden;
  display: flex;
  height: 45px;
  align-items: center;
  position: relative;
  background-color: #2f2f30;
  border-radius: 10px;
  border: 1px solid;
  border-color: #3f3f40;
}

#idx-modal-join .idx-auth-phone-prefix {
  flex: 0 0 auto;
  width: 58px;
  min-width: 58px;
  justify-content: center;
  padding: 0 6px;
  overflow: hidden;
  display: flex;
  height: 45px;
  align-items: center;
  position: relative;
  background-color: #2f2f30;
  border-radius: 10px;
  border: 1px solid;
  border-color: #3f3f40;
}

#idx-modal-join .idx-auth-field--phone-prefix {
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  text-align: center;
  padding: 0 2px;
}

#idx-modal-join .idx-auth-phone-part {
  display: flex;
  height: 45px;
  align-items: center;
  justify-content: flex-start;
  padding: 0 10px;
  position: relative;
  flex: 1;
  flex-grow: 1;
  background-color: #2f2f30;
  border-radius: 10px;
  border: 1px solid;
  border-color: #3f3f40;
}

#idx-modal-join .idx-auth-select-shell {
  justify-content: flex-start;
  gap: 0;
  padding: 0 34px 0 12px;
  flex: 1;
  flex-grow: 1;
  overflow: hidden;
  display: flex;
  height: 45px;
  align-items: center;
  position: relative;
  background-color: #2f2f30;
  border-radius: 10px;
  border: 1px solid;
  border-color: #3f3f40;
}

#idx-modal-join .idx-auth-select-shell .idx-auth-select {
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
}

#idx-modal-join .idx-auth-select-chevron {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

#idx-modal-join .idx-auth-select-chevron .idx-auth-chevron-img {
  position: static;
  transform: rotate(-90deg);
  display: block;
  width: 16px;
  height: 16px;
}

#idx-modal-join .idx-auth-field-heading {
  align-items: center;
  justify-content: space-between;
  display: flex;
  position: relative;
  align-self: stretch;
  width: 100%;
  flex: 0 0 auto;
}

#idx-modal-join .idx-auth-field-hint {
  position: relative;
  display: flex;
  align-items: center;
  width: fit-content;
  font-family: "Inter", Helvetica;
  font-weight: 500;
  color: #ff4e00;
  font-size: 12px;
  letter-spacing: -0.06px;
  line-height: 17.4px;
  white-space: nowrap;
}

#idx-modal-join .join-btn {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  gap: 10px;
  padding: 20px 20px 10px;
  position: relative;
  align-self: stretch;
  width: 100%;
  flex: 0 0 auto;
  box-sizing: border-box;
}

#idx-modal-join button.telegram {
  display: flex;
  height: 45px;
  align-items: center;
  justify-content: center;
  position: relative;
  align-self: stretch;
  width: 100%;
  max-width: none;
  margin: 0;
  border: none;
  cursor: pointer;
  font: inherit;
  color: inherit;
  box-sizing: border-box;
  background-color: #00bc7d;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0px 0px 15px #10b9814c;
}

/* 슬라이스 원본의 고정 500px 레이아웃 무시 — 전체 뷰포트 기준 */
#idx-modal-login .dim,
#idx-modal-join .dim {
  position: absolute !important;
  inset: 0 !important;
  width: auto !important;
  height: auto !important;
  top: 0 !important;
  left: 0 !important;
}

#idx-modal-login .popup,
#idx-modal-join .popup {
  position: relative !important;
  top: auto !important;
  left: auto !important;
  width: min(422px, calc(100vw - 24px)) !important;
}

/* 회원가입: 긴 폼 세로 스크롤 유지 (슬라이스 overflow 숨김 덮어씀) */
#idx-modal-join .popup {
  justify-content: flex-start !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  max-height: min(92vh, 100dvh, 100%) !important;
  -webkit-overflow-scrolling: touch;
}

#idx-modal-login button.idx-auth-btn-register.idx-auth-switch-join {
  border: none;
  cursor: pointer;
  font: inherit;
  margin: 0;
}