*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --green-dark:   #2d6a4f;
  --green-mid:    #52b788;
  --green-light:  #d8f3dc;
  --green-pale:   #f0faf3;
  --text:         #1b1b1b;
  --text-sub:     #555;
  --border:       #cde8d4;
  --error:        #c0392b;
  --error-bg:     #fdf0ef;
  --radius:       8px;
}

body {
  font-family: 'Hiragino Kaku Gothic ProN', 'Noto Sans JP', sans-serif;
  background: var(--green-pale);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}

.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px 36px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
}

.logo {
  text-align: center;
  margin-bottom: 28px;
}
.logo h1 {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--green-dark);
}
.logo p {
  font-size: .82rem;
  color: var(--text-sub);
  margin-top: 4px;
}

label {
  display: block;
  font-size: .85rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}

input[type="email"],
input[type="password"],
input[type="text"] {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: .95rem;
  outline: none;
  transition: border-color .15s;
}
input:focus { border-color: var(--green-mid); }

.field { margin-bottom: 18px; }

.btn {
  display: block;
  width: 100%;
  padding: 11px;
  background: var(--green-dark);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s;
  margin-top: 8px;
}
.btn:hover  { background: #245a42; }
.btn:active { background: #1b4533; }
.btn:disabled { background: #aaa; cursor: not-allowed; }

.alert {
  padding: 10px 14px;
  border-radius: var(--radius);
  font-size: .88rem;
  margin-bottom: 16px;
  display: none;
}
.alert.error   { background: var(--error-bg); color: var(--error); border: 1px solid #f5c6c2; }
.alert.success { background: var(--green-light); color: var(--green-dark); border: 1px solid var(--green-mid); }
.alert.show    { display: block; }

.link-row {
  text-align: center;
  margin-top: 18px;
  font-size: .85rem;
  color: var(--text-sub);
}
.link-row a {
  color: var(--green-dark);
  text-decoration: none;
  cursor: pointer;
}
.link-row a:hover { text-decoration: underline; }

/* モーダル */
.modal-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,.4);
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 24px;
}
.modal-overlay.show { display: flex; }
.modal-box {
  background: #fff;
  border-radius: var(--radius);
  padding: 32px 28px;
  max-width: 380px;
  width: 100%;
  text-align: center;
}
.modal-box h2 { font-size: 1.1rem; margin-bottom: 12px; color: var(--green-dark); }
.modal-box p  { font-size: .9rem; line-height: 1.7; color: var(--text); margin-bottom: 8px; }
.modal-box a  { color: var(--green-dark); }
.modal-box .btn { margin-top: 20px; max-width: 160px; margin-inline: auto; }

.hint { font-size: .8rem; color: var(--text-sub); margin-top: 5px; }
