@import url('https://fonts.googleapis.com/css2?family=Zen+Kaku+Gothic+New:wght@400;600;700&display=swap');

:root {
  --bg: #f7f2e9;
  --ink: #2b2a28;
  --muted: #6a5f57;
  --card: #ffffff;
  --accent: #e05c33;
  --accent-dark: #b94524;
  --border: #ded7ce;
  --error-bg: #fff3ef;
  --error-border: #efb29f;
  --error-text: #913719;
  --shadow: rgba(43, 42, 40, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body.auth-page {
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  padding: 24px;
  display: grid;
  place-items: center;
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 10% 10%, rgba(244, 195, 161, 0.55), transparent 60%),
    radial-gradient(800px 500px at 90% 0%, rgba(224, 92, 51, 0.12), transparent 55%),
    var(--bg);
  font-family: "Zen Kaku Gothic New", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
}

.auth-card {
  width: min(100%, 430px);
  padding: 36px;
  background: var(--card);
  border-radius: 20px;
  box-shadow: 0 18px 40px var(--shadow);
}

.auth-card--message {
  text-align: center;
}

.auth-logo {
  display: block;
  width: min(240px, 76%);
  height: auto;
  margin: 0 auto 28px;
}

.auth-title {
  margin: 0;
  font-size: clamp(25px, 7vw, 30px);
  line-height: 1.35;
  text-align: center;
}

.auth-kicker {
  margin: 0 0 6px;
  color: var(--accent-dark);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-align: center;
}

.auth-description {
  margin: 10px 0 28px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.75;
  text-align: center;
}

.auth-form {
  display: grid;
  gap: 20px;
}

.form-field {
  display: grid;
  gap: 8px;
}

.form-label {
  font-size: 14px;
  font-weight: 600;
}

.form-input {
  width: 100%;
  min-height: 50px;
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #ffffff;
  color: var(--ink);
  font: inherit;
  font-size: 16px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-input:focus {
  border-color: var(--accent);
  outline: none;
  box-shadow: 0 0 0 4px rgba(224, 92, 51, 0.15);
}

.auth-button,
.auth-link-button {
  min-height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 10px 20px rgba(224, 92, 51, 0.25);
  color: #ffffff;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.auth-button {
  width: 100%;
  margin-top: 4px;
}

.auth-button:hover,
.auth-link-button:hover {
  transform: translateY(-2px);
  background: var(--accent-dark);
  box-shadow: 0 14px 24px rgba(185, 69, 36, 0.28);
}

.auth-button:focus-visible,
.auth-link-button:focus-visible,
.back-link:focus-visible {
  outline: 3px solid rgba(224, 92, 51, 0.35);
  outline-offset: 3px;
}

.auth-alert {
  margin: 0 0 22px;
  padding: 14px 16px;
  border: 1px solid var(--error-border);
  border-radius: 12px;
  background: var(--error-bg);
  color: var(--error-text);
  font-size: 14px;
  line-height: 1.65;
}

.auth-alert p {
  margin: 0;
}

.auth-alert ul {
  margin: 0;
  padding-left: 1.3em;
}

.auth-alert li + li {
  margin-top: 4px;
}

.back-link {
  display: block;
  width: fit-content;
  margin: 24px auto 0;
  color: var(--accent-dark);
  font-size: 14px;
  font-weight: 600;
  text-underline-offset: 4px;
}

.logout-mark {
  width: 56px;
  height: 56px;
  margin: 0 auto 18px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #fff1e8;
  color: var(--accent);
  font-size: 28px;
  font-weight: 700;
}

.auth-card--message .auth-link-button {
  width: 100%;
  margin-top: 4px;
}

@media (max-width: 520px) {
  body.auth-page {
    padding: 16px;
  }

  .auth-card {
    padding: 28px 22px;
    border-radius: 16px;
  }

  .auth-logo {
    margin-bottom: 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .form-input,
  .auth-button,
  .auth-link-button {
    transition: none;
  }
}
