:root {
  color: #1f302b;
  background: #f1f4ef;
  font-family: system-ui, -apple-system, "Hiragino Kaku Gothic ProN", "Noto Sans JP", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(ellipse at 16% 20%, rgba(213, 227, 205, 0.72), transparent 34rem),
    radial-gradient(ellipse at 84% 86%, rgba(226, 216, 192, 0.5), transparent 30rem),
    #f1f4ef;
}

.auth-shell {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 32px 18px;
}

.auth-card {
  width: min(100%, 440px);
  padding: clamp(28px, 6vw, 48px);
  border: 1px solid rgba(55, 80, 65, 0.11);
  border-radius: 24px;
  background: rgba(255, 255, 252, 0.94);
  box-shadow: 0 24px 70px rgba(36, 59, 44, 0.12);
}

.brand { display: inline-flex; align-items: center; gap: 11px; color: inherit; font-weight: 700; text-decoration: none; }
.brand-mark { display: grid; width: 36px; height: 36px; place-items: center; border-radius: 12px; background: #486d58; color: #fff; }
.eyebrow { margin: 34px 0 8px; color: #63816c; font-size: 0.77rem; font-weight: 700; letter-spacing: 0.11em; }
h1 { margin: 0; font-size: clamp(1.7rem, 5vw, 2.1rem); letter-spacing: -0.04em; }
.intro { margin: 10px 0 24px; color: #68736b; line-height: 1.75; }

form { display: grid; gap: 18px; }
label { display: grid; gap: 8px; color: #34473d; font-size: 0.9rem; font-weight: 600; }
input {
  width: 100%;
  min-height: 48px;
  padding: 11px 13px;
  border: 1px solid #d1d9d0;
  border-radius: 10px;
  background: #fff;
  color: #1f302b;
  font: inherit;
}
input:focus { border-color: #4d785e; outline: 3px solid rgba(77, 120, 94, 0.17); }
.field-hint { margin-top: -3px; color: #7b857d; font-size: 0.77rem; font-weight: 400; }
.primary-button { min-height: 50px; margin-top: 4px; border: 0; border-radius: 10px; background: #315f48; color: white; font: inherit; font-weight: 700; cursor: pointer; }
.primary-button:hover { background: #274e3b; }
.primary-button:disabled, .dev-mail-button:disabled { cursor: wait; opacity: 0.65; }
.switch-mode { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; margin: 22px 0 0; color: #69746c; font-size: 0.88rem; }
.text-button { padding: 0; border: 0; background: none; color: #315f48; font: inherit; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.notice, .error, .invite-banner { margin: 0 0 18px; padding: 12px 14px; border-radius: 10px; font-size: 0.88rem; line-height: 1.65; }
.notice { background: #eaf3e9; color: #31543d; }
.error { background: #fff0ec; color: #9b3e2e; }
.invite-banner { margin-top: -8px; background: #f3f0e5; color: #695b33; }
.privacy-note { margin: 28px 0 0; color: #879087; font-size: 0.75rem; line-height: 1.7; text-align: center; }
.dev-mail-button { display: block; margin: 18px auto 0; padding: 7px; border: 1px solid #d4dcd3; border-radius: 8px; background: #f8faf6; color: #516559; font: inherit; font-size: 0.8rem; cursor: pointer; }
.dev-mail-output { max-height: 240px; margin: 12px 0 0; padding: 12px; overflow: auto; border-radius: 8px; background: #eff2ed; color: #48574d; font: 0.75rem/1.6 ui-monospace, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
[hidden] { display: none !important; }

@media (max-width: 480px) {
  .auth-shell { align-items: start; padding: 16px 12px; }
  .auth-card { margin-top: min(8vh, 44px); padding: 26px 22px; border-radius: 20px; }
  .eyebrow { margin-top: 28px; }
}
