:root {
  --paper: #fbfaf7;
  --ink: #111110;
  --muted: #746f67;
  --line: #8d8880;
  --soft-line: #d9d3ca;
  --accent: #bd5537;
  --success: #4e6b55;
  --error: #a13d2d;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--paper);
}

body {
  min-height: 100vh;
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Helvetica Neue", Arial, "Pretendard", "Noto Sans KR", sans-serif;
  letter-spacing: 0;
}

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

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.site-header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 74px;
  padding: 0 32px;
}

.wordmark {
  font-family: "Bodoni 72", Didot, "Bodoni MT", "Times New Roman", serif;
  font-size: 37px;
  line-height: 1;
  letter-spacing: -0.02em;
}

.home-link {
  padding-bottom: 4px;
  border-bottom: 1px solid var(--ink);
  font-size: 12px;
}

.recovery-page {
  position: relative;
  min-height: calc(100vh - 74px);
  padding: clamp(58px, 8vh, 88px) 24px 72px;
}

.recovery-panel {
  width: min(520px, 100%);
  margin: 0 auto;
}

.recovery-heading,
.success-panel {
  text-align: center;
}

.recovery-heading > p,
.success-panel > p {
  margin: 0;
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.recovery-heading h1 {
  margin: 16px 0 0;
  font-family: Georgia, "Noto Serif KR", "Times New Roman", serif;
  font-size: 39px;
  line-height: 1.15;
  font-weight: 400;
}

.recovery-heading > span,
.success-panel > span {
  display: block;
  margin-top: 20px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.page-marker {
  position: absolute;
  top: 41px;
  right: clamp(26px, 4vw, 64px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 10px;
  writing-mode: vertical-rl;
}

.page-marker i {
  width: 1px;
  height: 65px;
  background: #bdb7ae;
}

form {
  margin-top: 55px;
}

.field {
  margin-bottom: 28px;
}

.field > label {
  display: block;
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 500;
}

.line-control {
  position: relative;
  min-height: 45px;
  border-bottom: 1px solid var(--line);
}

.line-control input {
  width: 100%;
  height: 44px;
  padding: 0 2px;
  border: 0;
  border-radius: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 14px;
}

.line-control input::placeholder {
  color: #a6a097;
}

.line-control:focus-within {
  border-bottom-color: var(--ink);
}

.line-control.invalid {
  border-bottom-color: var(--error);
}

.action-control {
  padding-right: 128px;
}

.outline-button {
  position: absolute;
  right: 0;
  bottom: 0;
  display: grid;
  place-items: center;
  min-width: 114px;
  height: 38px;
  padding: 0 13px;
  border: 1px solid var(--ink);
  border-radius: 0;
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
  font-size: 12px;
  white-space: nowrap;
}

.outline-button:hover:not(:disabled) {
  background: var(--ink);
  color: #fff;
}

button:disabled {
  cursor: default;
  opacity: 0.38;
}

.email-section[hidden],
.verification-field {
  display: none;
}

.email-section:not([hidden]),
.verification-field.visible {
  display: block;
}

.email-line {
  margin-top: 37px;
}

.registered-email {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 128px;
  gap: 18px;
  align-items: end;
  min-height: 57px;
  padding-bottom: 7px;
  border-bottom: 1px solid var(--line);
}

.registered-email span {
  display: block;
  color: var(--muted);
  font-size: 10px;
}

.registered-email strong {
  display: block;
  margin-top: 9px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 17px;
  font-weight: 400;
}

.email-send-button {
  position: static;
  width: 128px;
}

.code-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 52px 114px 50px;
  gap: 12px;
  align-items: end;
}

.verify-button {
  position: static;
}

.timer {
  align-self: center;
  color: var(--accent);
  font-size: 12px;
  text-align: center;
}

.resend-button {
  align-self: center;
  padding: 7px 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 11px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.message {
  min-height: 15px;
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.message.success {
  color: var(--success);
}

.message.error {
  color: var(--error);
}

.password-section[hidden],
.success-panel[hidden] {
  display: none;
}

.section-line {
  height: 1px;
  margin: 37px 0 30px;
  background: var(--soft-line);
}

.password-control {
  padding-right: 42px;
}

.password-toggle {
  position: absolute;
  right: 0;
  bottom: 7px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.password-toggle:hover,
.password-toggle:focus-visible {
  color: var(--ink);
}

.eye-icon {
  width: 20px;
  height: 20px;
}

.eye-slash.is-hidden {
  display: none;
}

.submit-button,
.login-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: 56px;
  padding: 0 21px 0 25px;
  border: 1px solid var(--accent);
  border-radius: 0;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  font-size: 14px;
}

.submit-button {
  margin-top: 38px;
}

.submit-button span,
.login-button b {
  font-size: 27px;
  line-height: 1;
  font-weight: 400;
}

.submit-button:hover,
.login-button:hover {
  border-color: #a7462d;
  background: #a7462d;
}

.success-panel {
  margin-top: 77px;
}

.success-panel h2 {
  margin: 16px 0 0;
  font-family: Georgia, "Noto Serif KR", "Times New Roman", serif;
  font-size: 30px;
  line-height: 1.3;
  font-weight: 400;
}

.login-button {
  margin-top: 39px;
  text-align: left;
}

@media (max-width: 720px) {
  .page-marker {
    display: none;
  }
}

@media (max-width: 560px) {
  .site-header {
    height: 64px;
    padding: 0 18px;
  }

  .wordmark {
    font-size: 30px;
  }

  .recovery-page {
    min-height: calc(100vh - 64px);
    padding: 48px 20px 58px;
  }

  .recovery-heading h1 {
    font-size: 34px;
  }

  .action-control {
    padding-right: 116px;
  }

  .outline-button {
    min-width: 104px;
    padding-inline: 9px;
  }

  .code-control {
    grid-template-columns: minmax(0, 1fr) 48px 104px;
  }

  .registered-email {
    grid-template-columns: minmax(0, 1fr) 116px;
  }

  .email-send-button {
    width: 116px;
  }

  .resend-button {
    grid-column: 1 / -1;
    justify-self: end;
  }
}
