:root {
  --auth-bg: #f5f8fd;
  --auth-card: rgba(255, 255, 255, 0.96);
  --auth-text: #082b60;
  --auth-muted: #51698b;
  --auth-line: #cad7ea;
  --auth-blue: #0867ff;
  --auth-blue-dark: #0757d8;
  --auth-teal: #08bfa1;
  --auth-soft: #edf6ff;
  --auth-danger-bg: #fff1f3;
  --auth-danger: #a82b43;
}

* { box-sizing: border-box; }

html { min-height: 100%; }

body.auth-page {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 36px 20px;
  background:
    radial-gradient(circle at 12% 8%, rgba(35, 134, 255, 0.07), transparent 26rem),
    radial-gradient(circle at 90% 90%, rgba(7, 190, 158, 0.06), transparent 24rem),
    linear-gradient(180deg, #fbfdff 0%, var(--auth-bg) 100%);
  color: var(--auth-text);
  font-family: "Noto Sans JP", "Yu Gothic UI", "Yu Gothic", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.auth-shell {
  width: min(100%, 540px);
}

.auth-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 20px 4px;
  color: inherit;
  text-decoration: none;
}

.auth-brand-mark {
  position: relative;
  display: inline-block;
  width: 37px;
  height: 30px;
  flex: 0 0 37px;
}

.auth-brand-mark::before,
.auth-brand-mark::after {
  content: "";
  position: absolute;
  top: 1px;
  width: 21px;
  height: 12px;
  border-radius: 70% 70% 60% 60%;
  background: linear-gradient(145deg, #37c85c, #1aae74);
  box-shadow: 0 3px 10px rgba(33, 181, 103, 0.2);
}

.auth-brand-mark::before { left: 1px; transform: rotate(-9deg); }
.auth-brand-mark::after { right: 1px; transform: rotate(9deg); }

.auth-brand-stem {
  position: absolute;
  left: 18px;
  top: 11px;
  width: 2px;
  height: 19px;
  border-radius: 2px;
  background: linear-gradient(#3daf69, #779744 62%, #8a6a2a);
}

.auth-brand-name {
  font-size: clamp(2rem, 5vw, 2.55rem);
  font-weight: 900;
  letter-spacing: -0.05em;
  line-height: 1;
  background: linear-gradient(95deg, #0861ff 0%, #0a8bd6 55%, #08ad91 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.auth-brand-tagline {
  margin-left: 4px;
  padding-left: 12px;
  border-left: 1px solid #d6e2f2;
  color: #193b68;
  font-size: 0.84rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.auth-card {
  width: 100%;
  padding: 36px 40px 34px;
  border: 1px solid rgba(208, 220, 237, 0.72);
  border-radius: 28px;
  background: var(--auth-card);
  box-shadow: 0 22px 58px rgba(31, 71, 118, 0.12);
  backdrop-filter: blur(12px);
}

.auth-eyebrow {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  margin-bottom: 18px;
  padding: 7px 18px;
  border-radius: 999px;
  background: linear-gradient(180deg, #edf8ff 0%, #e3f2ff 100%);
  color: #0870e8;
  font-size: 0.9rem;
  font-weight: 900;
  letter-spacing: 0.01em;
}

.auth-title {
  margin: 0;
  color: #062b60;
  font-family: "Yu Mincho", "Hiragino Mincho ProN", "Noto Serif JP", serif;
  font-size: clamp(2rem, 6vw, 2.75rem);
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.25;
}

.auth-title .gradient-text {
  background: linear-gradient(90deg, #0768ff 0%, #08bca1 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.auth-lead {
  margin: 12px 0 28px;
  color: var(--auth-muted);
  font-size: 0.98rem;
  font-weight: 600;
  line-height: 1.8;
}

.auth-error {
  margin: 0 0 18px;
  padding: 12px 14px;
  border: 1px solid #f1c5cf;
  border-radius: 13px;
  background: var(--auth-danger-bg);
  color: var(--auth-danger);
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.55;
}

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

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

.auth-label {
  color: #0b2e5e;
  font-size: 0.94rem;
  font-weight: 900;
}

.auth-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.auth-input-icon {
  position: absolute;
  left: 17px;
  z-index: 1;
  color: #8398b6;
  font-size: 1.05rem;
  line-height: 1;
  pointer-events: none;
}

.auth-input {
  width: 100%;
  min-height: 56px;
  padding: 13px 48px 13px 48px;
  border: 1.5px solid var(--auth-line);
  border-radius: 14px;
  outline: none;
  background: #fff;
  color: #17365e;
  font: inherit;
  font-size: 1rem;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.auth-input::placeholder { color: #9aaac1; }

.auth-input:focus {
  border-color: #5b98ff;
  background: #fbfdff;
  box-shadow: 0 0 0 4px rgba(8, 103, 255, 0.09);
}

.auth-password-toggle {
  position: absolute;
  right: 10px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #7790b2;
  font-size: 1.06rem;
  cursor: pointer;
}

.auth-password-toggle:hover { background: #f0f6ff; color: #3978dc; }
.auth-password-toggle:focus-visible { outline: 2px solid #5b98ff; outline-offset: 1px; }

.auth-legal-consent {
  margin: -2px 2px 0;
  color: #637694;
  font-size: 0.78rem;
  font-weight: 650;
  line-height: 1.7;
  text-align: center;
}

.auth-legal-consent a {
  color: #0768ff;
  font-weight: 900;
  text-underline-offset: 3px;
}

.auth-legal-consent a:hover {
  color: var(--auth-blue-dark);
}

.auth-submit {
  width: 100%;
  min-height: 60px;
  margin-top: 4px;
  padding: 14px 24px;
  border: 0;
  border-radius: 18px;
  background: linear-gradient(100deg, #0867ff 0%, #08a8cf 56%, #08bf9a 100%);
  box-shadow: 0 12px 25px rgba(8, 116, 223, 0.22);
  color: #fff;
  font: inherit;
  font-size: 1.08rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease;
}

.auth-submit:hover { transform: translateY(-1px); box-shadow: 0 15px 28px rgba(8, 116, 223, 0.26); }
.auth-submit:active { transform: translateY(0); }
.auth-submit:focus-visible { outline: 3px solid rgba(8, 103, 255, 0.26); outline-offset: 3px; }

.auth-submit-arrow { margin-left: 10px; font-size: 1.3rem; vertical-align: -1px; }

.auth-assurances {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px 24px;
  flex-wrap: wrap;
  margin: 16px 0 0;
  color: #536987;
  font-size: 0.78rem;
  font-weight: 800;
}

.auth-assurance {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.auth-check {
  width: 19px;
  height: 19px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: #14ba89;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 900;
}

.auth-divider {
  height: 1px;
  margin: 24px 0 20px;
  background: linear-gradient(90deg, transparent, #cfdaea 10%, #cfdaea 90%, transparent);
}

.auth-secondary-block {
  display: grid;
  gap: 12px;
  text-align: center;
  color: #3c5578;
  font-size: 0.88rem;
  font-weight: 700;
}

.auth-link {
  color: #0768ff;
  font-weight: 900;
  text-underline-offset: 4px;
}

.auth-link:hover { color: var(--auth-blue-dark); }

.auth-secondary-cta {
  width: 100%;
  min-height: 56px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  border: 1.6px solid #2c80ff;
  border-radius: 18px;
  background: #fff;
  color: #0768ff;
  text-decoration: none;
  font-size: 1rem;
  font-weight: 900;
  box-shadow: 0 6px 18px rgba(8, 103, 255, 0.05);
  transition: background 0.16s ease, transform 0.16s ease;
}

.auth-secondary-cta:hover { background: #f5f9ff; transform: translateY(-1px); }

.auth-forgot { margin-top: -2px; text-align: center; font-size: 0.9rem; }

@media (max-width: 620px) {
  body.auth-page {
    justify-content: flex-start;
    padding: 18px 14px 30px;
  }

  .auth-shell { width: 100%; }

  .auth-brand {
    margin: 0 0 14px 4px;
    gap: 9px;
  }

  .auth-brand-mark { transform: scale(0.9); transform-origin: left center; }
  .auth-brand-name { font-size: 1.85rem; }
  .auth-brand-tagline { font-size: 0.72rem; padding-left: 9px; }

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

  .auth-eyebrow { margin-bottom: 14px; font-size: 0.82rem; }
  .auth-title { font-size: 2rem; }
  .auth-lead { margin-bottom: 23px; font-size: 0.91rem; }
  .auth-form { gap: 17px; }
  .auth-input { min-height: 54px; }
  .auth-submit { min-height: 58px; border-radius: 16px; }
  .auth-assurances { justify-content: flex-start; gap: 10px 16px; font-size: 0.74rem; }
}

@media (max-width: 390px) {
  .auth-brand-tagline { display: none; }
  .auth-card { padding-inline: 18px; }
  .auth-title { font-size: 1.82rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
