:root {
  --font-ui-ja: "BIZ UDGothic", "MS Gothic", monospace;
  --font-ui-en: Arial, "Helvetica Neue", sans-serif;
  --font-body: var(--font-ui-ja);
}

html:lang(en) {
  --font-body: var(--font-ui-en);
}

body,
button,
input,
select,
textarea {
  font-family: var(--font-body);
}

body {
  font-weight: 400;
  background: linear-gradient(to bottom, #e9e9e9, #d9d9d9);
  height: 100vh;
  line-height: 1;
}
h1 {
  font-size: 1.4em;
  height: 22.4px;
  line-height: 1.6;
  text-align: center;
  margin-bottom: 33px;
}
.login-wrapper {
  max-width: 320px;
  margin: 4rem auto 1.5rem auto;
  padding: 2.5rem 2rem;
  background: #fff;
  border: 1px solid #e4e4e4;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgb(0 0 0 / 0.08);
}

input:focus {
  outline: none;
  border-color: #007508;
  box-shadow: 0 0 0 2px rgb(0 117 8 / 0.15);
}
form p {
  text-align: center;
}
form p label {
  width: 126px;
  display: inline-block;
  text-align: left;
}
/* エラーメッセージ */
.errorlist {
  margin: 0 0 1rem 0;
  padding: 0.8rem 1rem;
  list-style: none;
  background: #ffecec;
  border: 1px solid #f5c2c2;
  color: #cc0000;
  border-radius: 4px;
  font-size: 0.85rem;
}

#loginButton,
.auth-button {
  margin: 1.5rem auto 0 auto;
  padding: 0.4rem 1.4rem;
  font-size: 0.8rem;
  font-weight: bold;
  border: none;
  border-bottom: solid 2px rgb(0, 68, 5);
  border-radius: 4px;
  cursor: pointer;
  background: linear-gradient(to bottom, #00aa0b, #00980a);
  color: #fff;
  transition: background 0.2s ease, transform 0.1s ease;
  display: block;
}
#loginButton:hover,
.auth-button:hover {
  background-image: linear-gradient(to bottom, #00980a, #006e07);
  background-color: #00aa0b;
}
#loginButton:active,
.auth-button:active {
  transform: translateY(2px);
  -webkit-transform: translateY(2px);
  border-bottom: none;
}
.signup {
  color: #007508;
  text-decoration: none;
  font-size: 0.8rem;
}
.signup:hover {
  text-decoration: underline;
}

/* ---- パスワード再設定の画面とロック中の画面（registration/_auth_page.html）---- */
/* 見出しが長く、狭い画面では2行になるので高さを固定しない。1行のときの下の余白はログイン画面と同じ
   （固定の高さ 22.4px＋余白 33px ＝ 1行ぶんの高さ 1.6em＋この余白） */
.auth-page h1 {
  height: auto;
  margin-bottom: calc(22.4px + 33px - 1.6em);
}
.auth-links {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.9rem;
}
.auth-page .auth-links {
  margin-top: 1.6rem;
}
.auth-page .auth-links a {
  color: #007508;
  text-decoration: none;
  font-size: 0.8rem;
}
.auth-page .auth-links a:hover {
  text-decoration: underline;
}
.auth-page form p {
  text-align: left;
}
.auth-page .errorlist {
  line-height: 1.6;
}
.nowrap {
  white-space: nowrap;
}
.auth-text {
  margin: 0 0 1rem;
  font-size: 0.85rem;
  line-height: 1.7;
  color: #333;
}
.auth-text b {
  overflow-wrap: anywhere;
}
.auth-note {
  font-size: 0.8rem;
  color: #555;
}
.auth-email {
  display: block;
  overflow-wrap: anywhere;
  color: #222;
}
.auth-field {
  margin: 0 0 1rem;
  font-size: 0.85rem;
}
.auth-field label {
  display: block;
  margin-bottom: 0.4rem;
}
.auth-field input {
  box-sizing: border-box;
  width: 100%;
  padding: 0.55rem 0.6rem;
  font-size: 1rem;
  border: 1px solid #b9b9b9;
  border-radius: 4px;
}
.auth-hint {
  margin: 0.45rem 0 0;
  font-size: 0.75rem;
  line-height: 1.6;
  color: #666;
}
.auth-hint ul {
  margin: 0;
  padding-left: 1.2em;
}
.auth-help {
  padding: 0.8rem 0.9rem;
  background: #f5f7f5;
  border-radius: 4px;
  font-size: 0.8rem;
  line-height: 1.7;
  color: #444;
}
.auth-help p {
  margin: 0 0 0.2rem;
  font-weight: bold;
  color: #222;
}
.auth-help ul {
  margin: 0;
  padding-left: 1.2em;
}
a.auth-button {
  width: max-content;
  text-decoration: none;
}
#back-button-container {
  text-align: center;
}
#backButton {
  padding: 0.4rem 1.4rem;
  font-size: 0.8rem;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  text-align: center;
  background-color: transparent;
  color: rgb(167, 0, 0);
  display: inline-block;
}
#backButton:hover {
  text-decoration: underline;
}
