/* ================================
   ベース設定
   ================================ */
html,
body {
  height: 100%;
  margin: 0;
  padding: 0;
  background: #fff;
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  /* 大きくしすぎていたので標準に戻す */
}

/* ================================
   ログインコンテナ（中央より少し下）
   ================================ */
.login-container {
  width: 95%;
  max-width: 380px;
  /* 420px → ひと回り小さく */
  height: 100vh;
  /* 画面全体を基準に配置 */
  display: flex;
  flex-direction: column;
  justify-content: center;
  /* 垂直中央寄せ */
  align-items: center;
  margin: 0 auto;
  padding: 0 20px;
  transform: translateY(2vh);
  /* 中央より少し下 */
  box-sizing: border-box;
}

/* タイトル（少しだけ小さく） */
.login-title {
  font-size: 24px;
  /* 28px → 24px */
  font-weight: 800;
  margin-bottom: 8px;
  letter-spacing: 1px;
}

/* サブタイトル */
.login-subtitle {
  font-size: 14px;
  /* 16px → 14px */
  color: #444;
  margin-bottom: 18px;
  /* 20px → 18px */
  line-height: 1.6;
}

/* フォーム（行間を少しだけ狭める） */
.login-form {
  width: 95%;
  display: flex;
  flex-direction: column;
  gap: 12px;
  /* 14px → 12px */
}

/* 入力フィールド */
.login-input {
  padding: 9px 10px;
  /* 10px → 9px */
  border: 1.5px solid #bbb;
  border-radius: 10px;
  font-size: 14px;
  /* 16px → 14px */
  width: 100%;
  box-sizing: border-box;
  background-color: #fafafa;
  text-align: left;
}

.login-input::placeholder {
  color: #aaa;
  opacity: 1;
}

.login-input:focus {
  border-color: #000;
  background: #fff;
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.08);
}

/* ボタン（ひと回り小さく） */
.login-button {
  background-color: #000;
  color: #fff;
  padding: 9px 12px;
  /* 10px → 9px */
  border: none;
  border-radius: 6px;
  font-size: 16px;
  /* 18px → 16px */
  font-weight: bold;
  cursor: pointer;
  transition:
    background 0.25s,
    transform 0.15s;
}

.login-button:hover {
  background-color: #333;
  transform: scale(1.03);
}

/* メッセージ */
.login-message {
  margin-top: 10px;
  /* 12px → 10px */
  color: red;
  font-size: 13px;
  /* 14px → 13px */
  font-weight: bold;
}

/* ================================
   目アイコン（パスワード表示切替）
   ================================ */
.input-row {
  position: relative;
}

.password-input {
  padding-right: 34px;
  /* 36px → 少しだけ詰める */
}

.toggle-visibility {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: 0;
  padding: 4px;
  cursor: pointer;
  color: #666;
  font-size: 13px;
  /* 14px → 13px */
}

.toggle-visibility:focus {
  outline: 2px solid #c9c9cf;
  outline-offset: 2px;
}

/* ================================
   スプラッシュ（ホワイトアウト → 画像 → フェードアウト）
   ================================ */
.is-splashing body {
  overflow: hidden;
}

.is-splashing #primary,
.is-splashing .login-container {
  visibility: hidden;
}

#login-splash {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
}

#login-splash.show {
  opacity: 1;
  pointer-events: auto;
}

#login-splash .splash-bg {
  position: absolute;
  inset: 0;
  background: #fff;
  opacity: 0;
  transition: opacity 0.5s ease;
}

#login-splash .splash-content {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(0.9);
  transition:
    opacity 0.8s ease,
    transform 1s ease;
}

/* ★ スプラッシュ画像も一回り小さく */
#login-splash .splash-image {
  width: min(38vw, 160px);
  /* 45vw,200px → 38vw,160px */
  height: auto;
  display: block;
  filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.15));
}

#login-splash.phase-white .splash-bg {
  opacity: 1;
}

#login-splash.phase-image .splash-content {
  opacity: 1;
  transform: scale(1);
}

#login-splash.fadeout {
  opacity: 0;
  transition: opacity 0.8s ease;
}

/* ================================
   スマホ対応（〜480px）
   ================================ */
@media (max-width: 480px) {
  .login-container {
    transform: translateY(2vh);
    padding: 0 16px;
    max-width: 360px;
    /* スマホではさらに少し絞る */
  }

  .login-title {
    font-size: 22px;
    /* 24px → 22px */
    margin-bottom: 6px;
  }

  .login-subtitle {
    font-size: 13px;
    margin-bottom: 16px;
  }

  .login-form {
    gap: 10px;
  }

  .login-input {
    font-size: 13px;
    padding: 8px 10px;
  }

  .password-input {
    padding-right: 32px;
  }

  .toggle-visibility {
    right: 6px;
    font-size: 12px;
    padding: 3px;
  }

  .login-button {
    font-size: 15px;
    padding: 9px;
  }

  .login-message {
    margin-top: 8px;
    font-size: 12px;
  }

  /* スマホ時のスプラッシュ画像も小さめに */
  #login-splash .splash-image {
    width: min(50vw, 140px);
    /* 45vw,140pxより少し控えめ */
  }
}

/* ================================
   PCワイド時
   ================================ */
@media (min-width: 1024px) {
  .login-container {
    max-width: 420px;
    /* 460px → 少し小さく */
    transform: translateY(8vh);
  }

  #login-splash .splash-image {
    width: min(26vw, 200px);
    /* PCのスプラッシュも少し小さめ */
  }
}

#login-splash .splash-image {
  display: block;
  box-shadow: none !important;
  filter: none !important;
  background: transparent !important;
}

#login-splash .splash-content {
  box-shadow: none !important;
  filter: none !important;
}

.login-input {
  font-size: 16px !important;
}

@media (max-width: 480px) {
  .login-input {
    font-size: 16px !important;
  }
}