/* === Reset / Base ========================================== */

/* htmlとbodyの初期スタイル設定 */
html, body {
  margin: 0; padding: 0;
  background: #f8f9fa; /* 全体の背景色を薄いグレーに設定 */
  font-family: 'ヒラギノ角ゴ','Hiragino Kaku Gothic Pro', Meiryo, 'メイリオ', sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: #111;
  box-sizing: border-box;
}

/* 全要素にボックスサイズの継承 */
*, *::before, *::after {
  box-sizing: inherit;
}

/* === コンテナ共通 ========================================== */

/* ページ共通の中央コンテナ */
#container {
  max-width: 400px;
  margin: 40px auto;
  padding: 24px 16px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  box-sizing: border-box;
}

/* 内側コンテンツは幅100%に */
#inner {
  width: 100%;
}

/* === タイトル・ヘッダー ==================================== */

/* 共通タイトルスタイル */
.ttl-GRNH3 {
  font-size: 1.8rem;
  font-weight: bold;
  color: #000;
  margin: 1.5em 0 1em 0;
  text-align: center;
  max-width: 100%;
}

/* ユーザー情報ボックス */
.login-user-info-box {
  background: #fff;
  border-radius: 8px;
  padding: 24px 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  margin: 40px auto 24px auto;
  max-width: 400px;
  text-align: center;
  font-weight: bold;
  border: 4px solid #000;
  box-sizing: border-box;
}

/* === フォーム・入力欄 ====================================== */

label {
  display: block;
  font-weight: bold;
  margin-bottom: 7px;
  font-size: 1rem;
  color: #333;
  text-align: left;
}

input[type="text"],
input[type="password"],
.form-control {
  width: 100%;
  padding: 10px 12px;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  margin-bottom: 16px;
  box-sizing: border-box;
}

/* === ボタン共通 ============================================ */

button.btn-primary,
.form-submit,
#credit-update-button {
  font-size: 20px;
  padding: 15px 30px;
  width: 100%;
  max-width: 400px;
  box-sizing: border-box;
  cursor: pointer;
  background-color: #007bff;
  color: #fff;
  border: none;
  border-radius: 6px;
  margin: 1em 0;
  display: block;
  text-align: center;
  transition: background-color 0.3s ease;
}

button.btn-primary:hover,
.form-submit:hover,
#credit-update-button:hover {
  background-color: #0056b3;
}

button.btn-secondary {
  background-color: #6c757d;
  color: #fff;
  margin-bottom: 1em;
  border-radius: 6px;
  border: none;
  padding: 12px 20px;
  cursor: pointer;
  width: 100%;
  max-width: 400px;
  transition: background-color 0.3s ease;
}

button.btn-secondary:hover {
  background-color: #5a6268;
}

/* === メッセージ・注意書き ================================== */

.error {
  color: #e55;
  background: #fcc;
  border: 1px solid #d77;
  padding: 2px;
}

/* メッセージボックス */
div.messages {
  border: 1px solid #ddd;
  margin: 1em 0;
  padding: 1em;
  text-align: left;
}

/* 注意書き */
.attention-note {
  color: #d32f2f;
  font-weight: bold;
  font-size: 1.1rem;
  margin-bottom: 12px;
  text-align: left;
}

.description-text {
  margin-top: 5px;
  font-size: 0.95rem;
  line-height: 1.4;
  text-align: left;
}

/* 通知リスト */
.notice-list {
  margin-top: 16px;
  padding-left: 12px;
  text-align: left;
}

.notice-item {
  margin-bottom: 16px;
}

.notice-title {
  font-weight: bold;
  color: #333;
  font-size: 1rem;
  margin-bottom: 4px;
}

.notice-desc {
  font-size: 0.95rem;
  color: #555;
  line-height: 1.5;
  margin-left: 8px;
}

/* === アコーディオン ======================================== */

.must-read-accordion {
  max-width: 100%;
  margin: 0 auto 12px;
  border: 2px solid #d0d0d0;
  border-radius: 5px;
  padding: 0;
  box-sizing: border-box;
}

.must-read-accordion summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1em 1em;
  color: #ff0000;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
}

.must-read-accordion summary::-webkit-details-marker {
  display: none;
}

.must-read-accordion summary::before,
.must-read-accordion summary::after {
  width: 3px;
  height: .9em;
  border-radius: 5px;
  background-color: #ff0000b3;
  content: '';
}

.must-read-accordion summary::before {
  position: relative;
  margin-right: 0.5em;
  transform: rotate(90deg);
}

.must-read-accordion summary::after {
  transition: transform 0.3s;
}

.must-read-accordion[open] summary::after {
  transform: rotate(90deg);
}

.must-read-accordion p {
  margin: 0;
  padding: 0.3em 1em 1em;
  color: #333;
  opacity: 0;
  transform: translateY(-10px);
  transition: transform 0.5s, opacity 0.5s;
  text-align: left;
}

.must-read-accordion[open] p {
  opacity: 1;
  transform: none;
}

/* === レスポンシブ対応 ===================================== */

@media (max-width: 600px) {
  html, body {
    font-size: 14px;
  }

  #container {
    margin: 24px auto;
    padding: 16px 12px;
  }

  .ttl-GRNH3 {
    font-size: 1.3rem;
    margin-top: 1em;
    margin-bottom: 0.75em;
  }

  label {
    font-size: 1rem;
  }

  input[type="text"], input[type="password"], .form-control {
    font-size: 1rem;
    padding: 10px 12px;
  }

  button.btn-primary,
  .form-submit,
  #credit-update-button {
    font-size: 18px;
    padding: 12px 20px;
    max-width: 100%;
  }

  .must-read-accordion summary {
    font-size: 1rem;
    padding: 0.75em 1em;
  }

  .attention-note, .description-text, .notice-desc {
    font-size: 0.9rem;
  }
}