@import url("https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@400;500;600;700;800&display=swap");

#mdOptIn {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  place-items: center;
  overflow-y: auto;
  padding: 24px 18px;
  background: rgb(35 31 28 / 32%);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  font-family: "Noto Sans KR", sans-serif;
  font-synthesis: none;
}
#mdOptIn.is-open {
  display: grid;
}
body.mo-lock {
  /*overflow: hidden;*/
}

#mdOptIn .mo-modal {
  position: relative;
  box-sizing: border-box;
  width: min(480px, 100%);
  margin: auto;
  border: 1px solid rgb(31 41 55 / 7%);
  border-radius: 24px;
  padding: 30px 32px 27px;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: #fff;
  box-shadow:
    0 30px 70px rgb(38 27 17 / 20%),
    0 4px 18px rgb(38 27 17 / 8%);
  text-align: center;
  animation: mo-in 420ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

#mdOptIn button {
  margin: 0;
  border: 0;
  padding: 0;
  font-family: inherit;
  cursor: pointer;
}

#mdOptIn .mo-close {
  position: absolute;
  top: 22px;
  right: 22px;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: transparent;
  color: #9ca3af;
  transition:
    color 160ms ease,
    background 160ms ease,
    transform 160ms ease;
}
#mdOptIn .mo-close svg {
  width: 23px;
  height: 23px;
}
#mdOptIn .mo-close:hover {
  color: #4b5563;
  background: #f7f7f7;
  transform: rotate(3deg);
}

#mdOptIn .mo-illustration {
  width: 180px;
  height: 138px;
  margin: 2px 0 17px;
  display: grid;
  place-items: center;
}
#mdOptIn .mo-svg {
  display: block;
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 9px 10px rgb(151 83 26 / 12%));
}

#mdOptIn .mo-intro h2 {
  display: block;
  margin: 0;
  color: #17191d;
  font-size: 21px;
  font-weight: 700;
  line-height: 1.46;
  letter-spacing: -0.055em;
}
#mdOptIn .mo-intro p {
  display: block;
  margin: 8px 0 0;
  color: #747b86;
  font-size: 13.5px;
  font-weight: 400;
  line-height: 1.7;
  letter-spacing: -0.035em;
}

#mdOptIn .mo-panel {
  box-sizing: border-box;
  width: 100%;
  margin-top: 24px;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 20px;
  background: #f8fafc;
  text-align: left;
}

#mdOptIn .mo-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 18px;
  cursor: pointer;
}
#mdOptIn .mo-row input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}
#mdOptIn .mo-check {
  width: 21px;
  height: 21px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 1.5px solid #cbd1d9;
  border-radius: 6px;
  background: #fff;
  color: transparent;
  transition: all 160ms ease;
}
#mdOptIn .mo-check svg {
  width: 14px;
  height: 14px;
}
#mdOptIn .mo-row:hover .mo-check {
  border-color: #c90e10;
}
#mdOptIn .mo-row input:checked + .mo-check {
  border-color: #c90e10;
  background: #c90e10;
  color: #fff;
  box-shadow: 0 3px 8px rgb(224 79 43 / 22%);
}
#mdOptIn .mo-label {
  color: #313640;
  font-size: 14.5px;
  font-weight: 700;
  letter-spacing: -0.04em;
}
#mdOptIn .mo-label em {
  color: #9ba1aa;
  font-size: 12.5px;
  font-style: normal;
  font-weight: 500;
}

#mdOptIn .mo-details {
  margin: 16px 0 0;
  padding: 0 0 0 2px;
  list-style: none;
  color: #737b87;
  font-size: 12.5px;
  font-weight: 400;
  line-height: 1.65;
  letter-spacing: -0.025em;
}
#mdOptIn .mo-details li {
  position: relative;
  margin: 0 0 8px;
  padding-left: 12px;
}
#mdOptIn .mo-details li:last-child {
  margin-bottom: 0;
}
#mdOptIn .mo-details li::before {
  position: absolute;
  top: 0.65em;
  left: 0;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #9ca3af;
  content: "";
}

#mdOptIn .mo-email {
  box-sizing: border-box;
  width: 100%;
  margin-top: 16px;
}
#mdOptIn .mo-input {
  box-sizing: border-box;
  width: 100%;
  height: 50px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 0 16px;
  background: #fff;
  color: #313640;
  font-family: inherit;
  font-size: 14px;
  letter-spacing: -0.03em;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease;
}
#mdOptIn .mo-input::placeholder {
  color: #b5bbc4;
}
#mdOptIn .mo-input:hover {
  border-color: #d3d9e1;
}
#mdOptIn .mo-input:focus {
  border-color: #c90e10;
  outline: none;
  box-shadow: 0 0 0 3px rgb(224 79 43 / 10%);
}

#mdOptIn .mo-error {
  display: block;
  align-self: flex-start;
  margin: 8px 3px -3px;
  color: #c90e10;
  font-size: 12px;
  font-weight: 500;
}
#mdOptIn .mo-error[hidden] {
  display: none;
}

#mdOptIn .mo-primary {
  box-sizing: border-box;
  width: 100%;
  height: 52px;
  margin-top: 20px;
  border-radius: 12px;
  color: #fff;
  background: #c90e10;
  box-shadow: 0 7px 16px rgb(224 79 43 / 18%);
  font-size: 15.5px;
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 52px;
  transition:
    background 170ms ease,
    box-shadow 170ms ease,
    transform 170ms ease;
}
#mdOptIn .mo-primary:hover {
  background: #c90e10;
  box-shadow: 0 9px 20px rgb(196 61 29 / 24%);
  transform: translateY(0px);
}
#mdOptIn .mo-primary:disabled,
#mdOptIn .mo-primary:disabled:hover {
  cursor: not-allowed;
  background: #d9dde3;
  box-shadow: none;
  transform: none;
}
#mdOptIn .mo-primary:active {
  transform: translateY(1px);
}

#mdOptIn .mo-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  margin-top: 17px;
  color: #9ca3af;
  font-size: 12px;
  letter-spacing: -0.025em;
}
#mdOptIn .mo-links span {
  width: 1px;
  height: 11px;
  background: #e5e7eb;
}
#mdOptIn .mo-links button {
  color: #9ca3af;
  background: transparent;
  font-size: 12px;
  transition: color 150ms ease;
}
#mdOptIn .mo-links button:hover {
  color: #555d69;
  text-decoration: underline;
  text-underline-offset: 3px;
}

#mdOptIn button:focus-visible,
#mdOptIn input:focus-visible + .mo-check {
  outline: 3px solid rgb(224 79 43 / 22%);
  outline-offset: 3px;
}

#mdOptIn .mo-done {
  box-sizing: border-box;
  width: min(420px, 100%);
  margin: auto;
  border: 1px solid rgb(31 41 55 / 7%);
  border-radius: 22px;
  padding: 35px;
  background: #fff;
  box-shadow: 0 20px 55px rgb(38 27 17 / 13%);
  text-align: center;
  animation: mo-in 420ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
#mdOptIn .mo-done[hidden],
#mdOptIn .mo-modal[hidden] {
  display: none;
}
#mdOptIn .mo-done h2 {
  display: block;
  margin: 0;
  color: #24272d;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.04em;
}
#mdOptIn .mo-done p {
  display: block;
  margin: 14px 0 20px;
  color: #69717d;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.6;
  letter-spacing: -0.025em;
  word-break: keep-all;
  overflow-wrap: break-word;
}
#mdOptIn .mo-again {
  border-radius: 10px;
  padding: 10px 20px;
  color: #fff;
  background: #c90e10;
  font-size: 13px;
  font-weight: 700;
}

@keyframes mo-in {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-height: 760px) and (min-width: 520px) {
  #mdOptIn .mo-modal {
    padding-top: 23px;
    padding-bottom: 22px;
  }
  #mdOptIn .mo-illustration {
    width: 150px;
    height: 115px;
    margin-bottom: 11px;
  }
  #mdOptIn .mo-panel {
    margin-top: 16px;
  }
}

@media (max-width: 520px) {
  #mdOptIn {
    align-items: end;
    padding: 12px;
  }
  #mdOptIn .mo-modal {
    max-height: calc(100vh - 24px);
    overflow-y: auto;
    border-radius: 22px;
    padding: 27px 21px 24px;
  }
  #mdOptIn .mo-close {
    top: 16px;
    right: 16px;
  }
  #mdOptIn .mo-illustration {
    width: 148px;
    height: 113px;
    margin-bottom: 16px;
  }
  #mdOptIn .mo-intro h2 {
    font-size: 19px;
  }
  #mdOptIn .mo-intro p {
    font-size: 12.5px;
  }
  #mdOptIn .mo-panel {
    margin-top: 18px;
    padding: 16px;
  }
  #mdOptIn .mo-label {
    font-size: 13.5px;
  }
  #mdOptIn .mo-details {
    font-size: 11.5px;
  }
}

@media (prefers-reduced-motion: reduce) {
  #mdOptIn .mo-modal {
    animation: none;
  }
}
