:root {
  --text: #111111;
  --muted: #788391;
  --line: #d9d9d9;
  --soft-line: #eeeeee;
  --accent: #ff3b64;
  --blue: #2563eb;
  --black: #000000;
  --white: #ffffff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--white);
  color: var(--text);
  font-family: Arial, "Noto Sans KR", "Malgun Gothic", sans-serif;
  font-size: 14px;
  letter-spacing: 0;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

.page {
  width: 100%;
  max-width: 1160px;
  min-height: 100vh;
  margin: 0 auto;
  padding: 32px 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.page > form {
  width: 100%;
}

.auth-logo {
  display: flex;
  justify-content: center;
  width: 100%;
  margin-top: -24px;
  margin-bottom: 22px;
}

.auth-logo img {
  display: block;
  width: min(210px, 36vw);
  height: auto;
}

.field-stack {
  width: 100%;
  border: 1px solid var(--line);
}

.input,
.select {
  display: block;
  width: 100%;
  height: 36px;
  border: 1px solid var(--line);
  padding: 0 13px;
  color: var(--text);
  outline: 0;
  background: var(--white);
}

.field-stack .input {
  border: 0;
}

.field-stack .input + .input {
  border-top: 1px solid var(--soft-line);
}

.input::placeholder {
  color: #677281;
  opacity: 1;
}

.guide {
  margin: 7px 0 24px 4px;
  color: #66717e;
  font-size: 11px;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 38px;
  color: var(--muted);
}

.check-row.compact {
  margin-top: 6px;
}

.checkbox {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
}

.checkbox input {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.checkbox span {
  width: 20px;
  height: 20px;
  border: 1px solid #cfd4da;
  border-radius: 3px;
  background: var(--white);
}

.checkbox input:checked + span {
  border-color: var(--black);
  background: var(--black);
}

.checkbox input:checked + span::after {
  content: "";
  position: absolute;
  left: 7px;
  top: 3px;
  width: 5px;
  height: 10px;
  border: solid var(--white);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.radio-row {
  display: grid;
  gap: 10px;
  margin-top: 13px;
}

.radio-label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
}

.radio-label input {
  width: 17px;
  height: 17px;
  margin: 0;
}

.login-button,
.submit-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 36px;
  border: 1px solid #222222;
  border-radius: 20px;
  background: var(--white);
  color: var(--text);
  font-weight: 400;
}

.login-button {
  margin-top: 10px;
}

.submit-button {
  margin-top: 20px;
  background: var(--black);
  color: var(--white);
  font-weight: 700;
}

.login-links {
  display: flex;
  justify-content: flex-start;
  margin-top: 12px;
  color: var(--muted);
}

.link-button {
  border: 0;
  padding: 0;
  background: none;
  color: inherit;
}

.join-row {
  margin-bottom: 18px;
}

.required {
  color: var(--accent);
}

.terms-box {
  width: 100%;
  height: 200px;
  margin-top: 8px;
  padding: 13px 12px;
  border: 1px solid var(--line);
  overflow-y: auto;
  line-height: 1.58;
  color: #000000;
  white-space: pre-line;
}

.terms-box.small {
  height: 199px;
}

.terms-box::-webkit-scrollbar {
  width: 12px;
}

.terms-box::-webkit-scrollbar-track {
  background: #f7f7f7;
  border-left: 1px solid #eeeeee;
}

.terms-box::-webkit-scrollbar-thumb {
  background: #999999;
  border: 3px solid #f7f7f7;
  border-radius: 8px;
}

.actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 24px;
}

.btn {
  min-width: 74px;
  height: 39px;
  padding: 0 22px;
  border-radius: 20px;

  /* 중앙 정렬을 위해 아래 3줄 추가 */
  display: flex;
  align-items: center;     /* 세로 중앙 정렬 */
  justify-content: center;  /* 가로 중앙 정렬 */
}

.btn-cancel {
  border: 1px solid #e1e4e8;
  background: var(--white);
  color: #56616f;
}

.btn-submit {
  border: 1px solid var(--black);
  background: var(--black);
  color: var(--white);
  font-weight: 700;

}

.form-group {
  margin-top: 22px;
}

.label {
  display: block;
  margin-bottom: 8px;
  color: var(--text);
  font-size: 12px;
}

.label-dot::after {
  content: "";
  display: inline-block;
  width: 4px;
  height: 4px;
  margin-left: 4px;
  vertical-align: middle;
  border-radius: 50%;
  background: var(--blue);
}

.birth-row {
  display: flex;
  gap: 4px;
}

.birth-row .select {
  width: 86px;
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, #8b95a1 50%), linear-gradient(135deg, #8b95a1 50%, transparent 50%);
  background-position: calc(100% - 15px) 15px, calc(100% - 10px) 15px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

@media (max-width: 720px) {
  .page {
    padding: 14px 12px 28px;
  }

  .login-links {
    font-size: 13px;
  }

  .terms-box,
  .terms-box.small {
    height: 180px;
  }
}

@media (max-height: 760px) {
  .page {
    align-items: flex-start;
  }
}

/* 아이디 입력창과 버튼을 가로로 정렬 */
.id-row {
  display: flex;
  gap: 8px;          /* 입력창과 버튼 사이의 간격 */
  margin-bottom: 8px; /* 아래 비밀번호 창과의 간격 */
}

/* 아이디 입력창이 남은 너비를 모두 차지하도록 설정 */
.id-row .input {
  flex: 1;
}

/* 버튼이 찌그러지지 않고 고유 너비를 유지하도록 설정 */
.id-row .btn {
  white-space: nowrap;
}