.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 54px;
  border: 0;
  border-radius: 12px;
  color: #3c2a12;
  background: linear-gradient(180deg, #ffd993, var(--amber));
  box-shadow: 0 10px 24px rgba(218, 136, 34, .24);
  font-weight: 800;
  text-decoration: none;
  transition: transform .15s, box-shadow .15s;
}
.primary-button:hover { transform: translateY(-1px); box-shadow: 0 13px 28px rgba(218, 136, 34, .3); }
.modal-backdrop {
  position: fixed;
  z-index: 20;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
  visibility: hidden;
  opacity: 0;
  background: rgba(10, 32, 50, .68);
  backdrop-filter: blur(8px);
  transition: opacity .2s, visibility .2s;
}
.modal-backdrop.is-open { visibility: visible; opacity: 1; }
.login-modal {
  position: relative;
  width: min(100%, 470px);
  max-height: calc(100vh - 36px);
  padding: clamp(28px, 5vw, 44px);
  overflow-y: auto;
  border-radius: 26px;
  background: #fff;
  box-shadow: 0 28px 80px rgba(5, 29, 47, .28);
  transform: translateY(14px) scale(.98);
  transition: transform .2s;
}
.is-open .login-modal { transform: translateY(0) scale(1); }
.modal-close {
  position: absolute;
  top: 15px;
  right: 15px;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  color: var(--muted);
  background: #eff4f6;
  font-size: 21px;
}
.login-modal h2 { margin: 0 0 5px; font-size: 27px; }
.modal-lead { margin: 0 0 22px; color: var(--muted); font-size: 14px; }
.alert-error {
  margin: 0 0 18px;
  padding: 11px 13px;
  border: 1px solid #efb8b8;
  border-radius: 10px;
  color: #c83d3d;
  background: #fff2f2;
  font-size: 13px;
}
.form-field { margin-bottom: 17px; text-align: left; }
.form-field label { display: block; margin-bottom: 7px; font-size: 13px; font-weight: 750; }
.form-field input {
  width: 100%;
  height: 51px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 11px;
  outline: none;
  color: var(--ink);
  background: #fbfdfe;
}
.form-field input:focus { border-color: var(--blue-600); box-shadow: 0 0 0 4px rgba(25, 143, 197, .12); }
.forgot-link { display: block; margin: -3px 0 21px; color: var(--blue-600); text-align: right; font-size: 13px; font-weight: 700; }
.divider { display: flex; align-items: center; gap: 12px; margin: 24px 0 18px; color: #93a0aa; font-size: 12px; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.google-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 49px;
  border: 1px solid var(--line);
  border-radius: 11px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
}
.google-mark { color: #4285f4; font-size: 20px; font-weight: 900; }

/* パスワード再発行モーダル */
.forgot-link[type="button"] { align-self: start; padding: 0; border: 0; cursor: pointer; background: transparent; font: inherit; }
.forgot-password-modal { width: min(100%, 460px); }
.modal-kicker { margin: 0 0 3px; color: var(--blue-600); font-size: 9px; font-weight: 900; letter-spacing: .15em; }
.password-sent-modal { width: min(100%, 430px); text-align: center; }
.password-sent-icon { display: grid; place-items: center; width: 58px; height: 58px; margin: 0 auto 15px; border-radius: 50%; color: #fff; background: #55a66a; font-size: 27px; font-weight: 900; }
.password-sent-modal .primary-button { width: 100%; margin-top: 10px; }


.modal-backdrop { z-index: 1000; --blue-600: #198fc5; --amber: #ffc465; --line: #d6e2ea; --ink: #18384b; --muted: #617788; line-height: 1.6; }
.modal-backdrop button { cursor: pointer; font-family: inherit; }
.modal-backdrop .login-modal { text-align: left; }
.modal-backdrop .password-sent-modal { text-align: center; }
.page-loading-modal { position: fixed; z-index: 1000; inset: 0; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 13px; visibility: hidden; opacity: 0; color: #fff; background: rgba(8,30,46,.68); font-size: 13px; font-weight: 800; letter-spacing: .05em; pointer-events: none; transition: opacity .12s, visibility .12s; }
.page-loading-modal.is-open { visibility: visible; opacity: 1; pointer-events: auto; }
.page-loading-spinner { width: 42px; height: 42px; border: 4px solid rgba(255,255,255,.3); border-top-color: #fff; border-radius: 50%; animation: page-loading-spin .72s linear infinite; }
@keyframes page-loading-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .page-loading-spinner { animation-duration: 1.5s; } }
