:root {
  color-scheme: light;
  --login-bg: #f4f6f1;
  --login-surface: #ffffff;
  --login-text: #233c32;
  --login-muted: #68766d;
  --login-border: #dfe6dc;
  --login-accent: #285c45;
  --login-accent-hover: #1e4936;
  --login-focus: rgb(74 125 87 / 38%);
  --login-danger: #a93f32;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Yu Gothic", Meiryo, sans-serif;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--login-bg); }
body {
  min-height: 100%;
  margin: 0;
  color: var(--login-text);
  background:
    radial-gradient(circle at 10% 12%, rgb(186 211 191 / 32%), transparent 28rem),
    linear-gradient(135deg, #f7f8f4 0%, #edf2eb 100%);
  font-family: var(--font-sans);
  line-height: 1.72;
  line-break: strict;
  word-break: normal;
  letter-spacing: normal;
  -webkit-font-smoothing: antialiased;
}

button,
input { font: inherit; }
svg { display: block; flex: none; }

.login-page {
  width: min(100%, 1180px);
  min-height: 100dvh;
  margin-inline: auto;
  padding: clamp(24px, 5vw, 72px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 460px);
  align-items: center;
  gap: clamp(56px, 9vw, 124px);
}

.login-intro {
  min-width: 0;
  min-height: min(650px, calc(100dvh - 144px));
  display: flex;
  flex-direction: column;
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 18px;
  font-weight: 750;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #fff;
  background: var(--login-accent);
  box-shadow: 0 12px 28px rgb(40 92 69 / 20%);
}

.intro-copy {
  margin-block: auto;
  padding-block: 72px;
}

.eyebrow {
  margin: 0 0 16px;
  color: var(--login-accent);
  font-family: "Segoe UI", sans-serif;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .12em;
}

.intro-copy h1 {
  margin: 0;
  font-size: clamp(36px, 4vw, 48px);
  line-height: 1.28;
  font-weight: 720;
  letter-spacing: -.035em;
  text-wrap: balance;
}

.intro-copy > p:last-child {
  max-width: 39rem;
  margin: 24px 0 0;
  color: var(--login-muted);
  font-size: clamp(15px, 1.5vw, 17px);
  text-wrap: pretty;
}

.privacy-note {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--login-muted);
  font-size: 13px;
}

.login-panel { min-width: 0; }
.login-card {
  padding: clamp(28px, 4vw, 42px);
  border: 1px solid rgb(208 220 207 / 90%);
  border-radius: 28px;
  background: rgb(255 255 255 / 91%);
  box-shadow: 0 28px 80px rgb(35 60 50 / 12%);
  backdrop-filter: blur(14px);
}

.card-heading {
  display: flex;
  align-items: center;
  gap: 14px;
}

.card-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: var(--login-accent);
  background: #e8f0e7;
}

.card-heading h2 {
  margin: 0;
  font-size: 23px;
  line-height: 1.35;
  letter-spacing: normal;
}

.card-heading p {
  margin: 4px 0 0;
  color: var(--login-muted);
  font-size: 13px;
}

.alert {
  margin-top: 24px;
  padding: 13px 14px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border: 1px solid;
  border-radius: 13px;
  font-size: 13px;
  line-height: 1.6;
}
.alert svg { margin-top: 2px; }
.alert-error { color: #8b3026; border-color: #efc8c3; background: #fff3f1; }
.alert-config { color: #775b18; border-color: #ead99b; background: #fff9e7; }
.alert code { overflow-wrap: anywhere; }

.login-form { margin-top: 28px; }
.field label {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 700;
}

.password-control {
  position: relative;
  display: flex;
  align-items: center;
}
.password-control > svg {
  position: absolute;
  inset-inline-start: 15px;
  color: #7c8a80;
  pointer-events: none;
}
.password-control input {
  width: 100%;
  min-height: 52px;
  padding: 0 15px 0 46px;
  border: 1px solid #cdd8cb;
  border-radius: 13px;
  outline: none;
  color: var(--login-text);
  background: #fff;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.password-control input:hover { border-color: #aebfae; }
.password-control input:focus {
  border-color: #5e8a70;
  box-shadow: 0 0 0 4px var(--login-focus);
}
.password-control input:disabled { cursor: not-allowed; color: #89938c; background: #f0f2ef; }

.captcha-wrap {
  min-height: 78px;
  margin-top: 20px;
  overflow: hidden;
}

.login-button {
  width: 100%;
  min-height: 52px;
  margin-top: 22px;
  padding-inline: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 0;
  border-radius: 13px;
  color: #fff;
  background: var(--login-accent);
  font-weight: 750;
  cursor: pointer;
  box-shadow: 0 12px 28px rgb(40 92 69 / 20%);
  transition: background-color .15s ease, transform .06s ease, box-shadow .15s ease;
}
.login-button:hover { background: var(--login-accent-hover); box-shadow: 0 14px 32px rgb(40 92 69 / 25%); }
.login-button:active { transform: translateY(1px); }
.login-button:focus-visible { outline: 3px solid var(--login-focus); outline-offset: 3px; }
.login-button:disabled { cursor: not-allowed; opacity: .5; box-shadow: none; }

.card-footnote {
  margin: 20px 0 0;
  color: var(--login-muted);
  font-size: 11px;
  text-align: center;
}

@media (max-width: 820px) {
  .login-page {
    width: min(100%, 560px);
    grid-template-columns: 1fr;
    align-content: center;
    gap: 36px;
  }
  .login-intro { min-height: 0; }
  .intro-copy { padding-block: 50px 0; }
  .intro-copy h1 { font-size: clamp(32px, 9vw, 46px); }
  .privacy-note { display: none; }
}

@media (max-width: 480px) {
  .login-page { padding: 22px 16px 32px; gap: 28px; }
  .intro-copy { padding-block: 34px 0; }
  .intro-copy h1 { font-size: 31px; letter-spacing: -.02em; }
  .heading-line { display: block; white-space: nowrap; }
  .intro-copy > p:last-child { margin-top: 16px; font-size: 13px; }
  .card-heading p { font-size: 12px; }
  .login-card { padding: 25px 20px; border-radius: 22px; }
  .captcha-wrap { margin-inline: -2px; }
}

@media (max-width: 360px) {
  .captcha-wrap { min-height: 69px; }
  .h-captcha { transform: scale(.88); transform-origin: left top; }
}

@media (max-width: 330px) {
  .captcha-wrap { min-height: 63px; }
  .h-captcha { transform: scale(.8); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
