:root {
  --ink: #2d241d;
  --muted: #75695f;
  --line: #ded3c7;
  --surface: #fffdf9;
  --surface-soft: #f4efe9;
  --primary: #7a4f32;
  --primary-dark: #56351f;
  --primary-soft: #efe2d5;
  --accent: #d3a35b;
  --shadow: 0 24px 70px rgba(73, 50, 33, 0.14);
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: var(--surface-soft);
  font-family: Pretendard, "Noto Sans KR", "Malgun Gothic", sans-serif;
  -webkit-font-smoothing: antialiased;
}

button,
input {
  font: inherit;
}

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

button {
  cursor: pointer;
}

.auth-header {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  z-index: 2;
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 max(40px, calc((100% - 1180px) / 2));
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: white;
  font-size: 18px;
  font-weight: 800;
  text-decoration: none;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 11px 11px 11px 3px;
  color: var(--primary-dark);
  background: #fff8ef;
  font-family: Georgia, serif;
  font-size: 20px;
}

.back-link {
  padding: 9px 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.4);
}

.auth-layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(360px, 0.9fr) minmax(540px, 1.1fr);
}

.auth-intro {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 170px clamp(48px, 5vw, 96px) 54px;
  color: white;
  background:
    linear-gradient(135deg, rgba(44, 25, 14, 0.91), rgba(105, 63, 35, 0.74)),
    url("../assets/wood-texture.png") center / cover;
}

.eyebrow,
.section-kicker {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.13em;
}

.auth-intro h1 {
  max-width: 640px;
  margin: 0;
  font-size: clamp(38px, 4.4vw, 58px);
  line-height: 1.18;
  letter-spacing: -0.05em;
  word-break: keep-all;
}

.intro-description {
  max-width: 560px;
  margin: 24px 0 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 15px;
  line-height: 1.8;
  word-break: keep-all;
}

.intro-note {
  margin: 0;
  color: rgba(255, 255, 255, 0.45);
  font-family: Georgia, serif;
  font-size: 11px;
  letter-spacing: 0.18em;
}

.auth-card {
  width: min(470px, calc(100% - 48px));
  align-self: center;
  justify-self: center;
  margin: 110px 0 54px;
  padding: 42px;
  border: 1px solid rgba(222, 211, 199, 0.9);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.signup-card {
  width: min(560px, calc(100% - 48px));
}

.section-kicker {
  margin-bottom: 7px;
  color: var(--primary);
}

.card-heading h2 {
  margin: 0;
  font-size: 32px;
  letter-spacing: -0.04em;
}

.card-heading>p:last-child {
  margin: 11px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.auth-form {
  display: grid;
  gap: 18px;
  margin-top: 30px;
}

.field-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.field span {
  display: block;
  margin-bottom: 9px;
  color: #5e5147;
  font-size: 13px;
  font-weight: 750;
}

.field input {
  width: 100%;
  height: 50px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 11px;
  outline: none;
  color: var(--ink);
  background: #fcfaf7;
  font-size: 14px;
}

.field input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(122, 79, 50, 0.12);
}

.field input::placeholder {
  color: #aa9c8f;
}

.form-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

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

.check-label input {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
}

.check-label a,
.auth-switch a {
  color: var(--primary-dark);
  font-weight: 750;
  text-underline-offset: 3px;
}

.agreement {
  align-items: flex-start;
  line-height: 1.5;
}

.text-button {
  padding: 0;
  border: 0;
  color: var(--primary);
  background: transparent;
  font-size: 13px;
  font-weight: 700;
}

.button {
  width: 100%;
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 11px;
  font-size: 14px;
  font-weight: 750;
  transition: transform 160ms ease, background-color 160ms ease, border-color 160ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button-primary {
  color: white;
  background: var(--primary);
}

.button-primary:hover {
  background: var(--primary-dark);
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none;
}

.auth-form-message {
  min-height: 20px;
  margin: -4px 0 0;
  color: #a43f31;
  font-size: 13px;
  line-height: 1.5;
}

.auth-form-message:empty {
  min-height: 0;
}

.auth-form-message[data-tone="success"] {
  color: #37734b;
}

[data-google-signin] {
  display: flex;
  justify-content: center;
}

/* 설정 전에도 소셜 로그인 위치와 사용할 수 없는 이유를 명확히 표시합니다. */
[hidden] { display: none !important; }
.google-signin-section { display: grid; gap: 12px; }
.button-google { width: 100%; min-height: 48px; border: 1px solid #b9afa5; background: #fff; color: #3c4043; font-weight: 700; }
.button-google:disabled { opacity: 1; color: #706b65; background: #f5f2ee; cursor: not-allowed; }
.google-signin-section .auth-form-message { margin: 0; }
.google-retry { justify-self: center; }

.divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 26px 0 20px;
  color: #a09387;
  font-size: 12px;
}

.divider::before,
.divider::after {
  content: "";
  height: 1px;
  flex: 1;
  background: #e8dfd7;
}

.auth-switch {
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    transition: none !important;
  }
}
