body {
  font-family: "Noto Sans JP", sans-serif;
  margin-top: 20px;
  background-color: #f1f4f2;
  text-align: center; /* コンテナを中央寄せ */
}

.rich-h1 .htmlDetailElementTable {
  width: 100%;
}

.rich-h1 .htmlDetailElementTable td {
  text-align: inherit;
}

/* Languageエリアのレイアウト */
.language-header {
  display: flex; /* 横並びにする */
  justify-content: flex-end; /* 右端に寄せる */
  align-items: center; /* 上下を中央に揃える */
  gap: 4px; /* アイコンと文字の間隔 */
  cursor: pointer; /* クリックできそうなカーソルにする */
  color: #003ee5;
  text-decoration: underline;
}

.language-header:hover {
  color: #d23232;
  text-decoration: underline;
}
/* テキストのスタイル調整 */
.language_button-text {
  line-height: 1; /* 行の高さを詰めてズレを防ぐ */
}
/* ロゴを囲むコンテナ */
.logo-header {
  text-align: center; /* 親要素も念のためcenterにしておきます */
}

/* ロゴ画像本体 */
.pref-logo {
  width: 120px;
  height: auto;
  display: block;
  margin: 0 auto; /* ★重要：左右を自動調整にして中央に配置 */
}

.none {
  display: none;
}

.none-red {
  display: none;
  color: red;
}

.survey-answered {
  padding: 24px;
  text-align: center;
  font-size: 18px;
}

.private {
  padding: 24px;
  text-align: center;
}

.preview-back-button {
  background: #b8ecff;
  color: #045d7a;
  border: none;
  width: 100%;
  margin-top: 10px;
  padding: 10px;
  font-size: 16px;
  border-radius: 5px;
  cursor: pointer;
}

.preview-back-message {
  font-weight: bold;
  font-size: 20px;
}

/* 完了メッセージの背景色 */
.success-text-container {
  background-color: #d6f5d6;
  padding-top: 5px;
  padding-bottom: 5px;
}

/* フッター共通スタイル */
.site-footer {
  color: #000000;
  text-align: center;
  padding: 10px 10px;
  font-size: 13px;
  line-height: 1.6;
}
.site-footer a {
  color: #003ee5;
  text-decoration: underline;
}
.site-footer a:hover {
  color: #d23232;
  text-decoration: underline;
}
.footer-links {
  margin-top: 4px;
}
.footer-inner {
  max-width: 1000px;
  margin: 0 auto;
}

/* 残り文字数ガイド */
.char-counter {
  text-align: right;
  font-size: 10px;
  color: #666;
  margin-top: 2px;
}

/* エラーメッセージ */
.error-message {
  color: #d23232;
  font-size: 10px; /* 通常文字より約4pt小さい */
  margin-top: 4px;
}

.error-message-honyaku {
  color: #d23232;
  font-size: 10px;
  margin-top: 4px;
  text-align: right;
}

.input-error-box {
  border: 2px solid #B00020;
  border-radius: 6px;
  padding: 16px 20px 14px;
  margin: 10px 0;
  background-color: #fff;
  position: relative;
  text-align: center;
  font-weight: bold;
  display: none;
}

/* メッセージ本文 */
.input-error-text {
  color: #B00020;
  font-size: 14px;
  line-height: 1.6;
}

.input-error-list {
  color: #B00020;
  font-size: 14px;
}

.input-error-list a {
  cursor: pointer;
  color: #B00020;
}

.input-error-list a:hover {
  opacity: 0.8;
}

.form-error {
  background-color: #B000201a;
  border: 2px solid #B00020;
  border-radius: 6px;
  padding: 6px;
}

.form-error-message {
  color: #B00020;
  font-size: 12px;
  font-weight: bold;
}

.note-and-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0 4px;
}
.note {
  color: #223;
  font-size: 14px;
}

.survey-container {
  background: #fff;
  padding: 10px 15px 15px 15px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  width: 320px;
  margin: 0 auto; /* ブロックとして中央に配置 */
  text-align: left; /* ← 中身を左寄せに戻す */
}
.survey-container h1 {
  font-size: 14px;
  margin: 0;
}
/* 設問ブロック全体：縦並びに変更 */
.section-container {
  display: flex;
  flex-direction: column; /* 要素を縦に積む */
  align-items: flex-start; /* 左揃え */
  gap: 6px; /* 1行目と2行目の間隔 */
  margin-top: 15px; /* 設問間の余白を少し広めに */
}

/* 1行目：Q番号とバッジを横並びにするコンテナ */
.question-meta {
  display: flex;
  align-items: center;
  gap: 8px; /* 番号とバッジの間隔 */
}

/* Q番号（例：Q1.）のスタイル */
.q-number {
  font-weight: bold;
  font-size: 16px; /* 少し強調 */
  color: #000;
}

/* 設問文（h1）のスタイル調整 */
.section-container h1 {
  font-size: 14px;
  margin: 0;
  line-height: 1.5;
  font-weight: normal; /* 本文は太字にしない（お好みでboldでも可） */
}

/* 必須/任意のバッジ位置調整（既存スタイルの微調整） */
.required,
.optional {
  /* 既存のスタイルを維持しつつ、高さ調整 */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 20px; /* 高さを確保 */
  padding: 0 6px;
  font-size: 11px;
  border-radius: 4px;
  color: #fff;
  font-weight: bold;
  white-space: nowrap;
}
.required {
  background: #d23232;
}
.optional {
  background: #767676;
  color: #fff;
} /* 任意はグレー背景・白文字が見やすい */
.rating-icons {
  display: flex;
  justify-content: center;
  margin-top: 10px;
}
.rating-icons label {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 70px;
  text-align: center;
  font-size: 12px;
  cursor: pointer;
}
.rating-icons input {
  display: none;
}
.rating-icons img {
  width: 40px;
  height: 40px;
  cursor: pointer;
  object-fit: contain;
}

.rating-icons-text {
  width: 100%;
  text-align: center;
  word-break: break-all;
  line-height: 1.2;
}

/* ラジオチェック時の差し替え */
#radio1:checked + img {
  content: url("../images/Checked1_y.png");
}

#radio2:checked + img {
  content: url("../images/Checked2_y.png");
}

#radio3:checked + img {
  content: url("../images/Checked3_y.png");
}

#radio4:checked + img {
  content: url("../images/Checked4_y.png");
}

#radio5:checked + img {
  content: url("../images/Checked5_y.png");
}

.rating-icons input:checked + img + div {
  font-weight: bold;
  color: #000; /* 任意：少し強調したい場合 */
}

.label-area {
  display: grid;
  grid-template-rows: 0fr;
  transition: all 0.3s ease;
}
.label {
  margin: 8px 0 0px;
  color: #333;
}

.detail-area {
  display: grid;
  grid-template-rows: 0fr;
  transition: all 0.3s ease;
}
.detail-area-open {
  grid-template-rows: 1fr;
}
/* チェックボックスグループのコンテナ */
.checkbox-group {
  display: flex;
  flex-direction: column; /* 縦並びに変更 */
  gap: 10px; /* カード間の隙間 */
  margin: 10px 0 0px;
}

/* チェックボックス本体（機能）は非表示 */
.checkbox-group input {
  display: none;
}

/* ラベル（見た目：カード全体） */
.checkbox-group label {
  display: flex; /* 横並び（アイコン＋テキスト） */
  align-items: center; /* 垂直方向中央揃え */
  width: 100%; /* 横幅いっぱい */
  padding: 5px 10px;
  background-color: #e2f0e5; /* 未選択時の薄緑背景 */
  border: 1px solid #bce2c2; /* 未選択時の枠線 */
  border-radius: 6px;
  cursor: pointer;
  box-sizing: border-box;
  font-size: 14px;
  color: #000;
  transition: all 0.2s ease;
  margin: 0; /* 既存のマージンをリセット */
}

/* 左側の白い四角（チェックアイコンの枠） */
.check-icon {
  display: block;
  width: 20px;
  height: 20px;
  background-color: #fff;
  border-radius: 2px;
  margin-right: 12px;
  flex-shrink: 0; /* 縮小防止 */
  position: relative; /* チェックマークの配置基準 */
}

/* --- 選択された時のスタイル --- */

/* チェックされたinputの直後にあるlabel（背景を濃い緑に） */
.checkbox-group input:checked + label {
  background-color: #028632;
  border-color: #028632;
  color: #fff;
}

/* 選択された時のチェックマーク（白い箱の中に緑のレ点をCSSで描画） */
.checkbox-group input:checked + label .check-icon::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 2px;
  width: 5px;
  height: 10px;
  border: solid #028632; /* マークの色（濃い緑） */
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.feedback {
  margin-top: 5px;
}

.feedback textarea {
  font-family: "Noto Sans JP", sans-serif;
  width: 100%;
  height: 90px;
  font-size: 14px;
  border: 1px solid #ccc;
  border-radius: 5px;
  padding: 10px;
  box-sizing: border-box;
  resize: none;
}

.submit-button {
  width: 100%;
  margin-top: 10px;
  padding: 10px;
  font-size: 16px;
  border-radius: 5px;
  border: 2px solid #028632;
  background: #028632;
  color: #fff;
  cursor: pointer;
}
.submit-button:disabled {
  background: #fff;
  color: #028632;
  cursor: not-allowed;
}
.success-container {
  background: #fff;
  padding: 15px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  width: 320px;
  text-align: center;
  margin: 0 auto; /* ブロックとして中央に配置 */
}
.success-container h1 {
  font-size: 14px;
}
.success-picture {
  width: 70%;
  margin: 16px auto;
}
.success-common-text {
  font-size: 10px;
}

/* ロゴのアニメーション */
.success-logo-container {
  text-align: center;
  margin-bottom: 5px;
}

.success-logo-container svg {
  animation: bounceLogo 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
  transform-origin: center;
}

@keyframes bounceLogo {
  0% {
    transform: scale(0);
    opacity: 0;
  }
  60% {
    transform: scale(1.1);
    opacity: 1;
  }
  100% {
    transform: scale(1);
  }
}

.multiline-text {
  white-space: pre-line;
}
#msta_langArea.msta-default {
  position: static !important;
  /* ← fixed を無効化 */
  top: auto !important;
  right: auto !important;
  left: auto !important;
  bottom: auto !important;
  background-color: #fff !important;
}

:focus-visible {
  outline: 3px solid #005cad;
  outline-offset: 2px;
}

.custom-select:focus-visible,
label:focus-visible {
  border-radius: 4px;
}

.select-group {
  margin: 10px 0 20px;
}
.select-group select {
  width: 100%;
  padding: 8px;
  font-size: 14px;
  border: 1px solid #ccc;
  border-radius: 5px;
  font-family: "Noto Sans JP", sans-serif;
}

.custom-select {
  position: relative;
  width: 100%; /* モバイルでは幅いっぱい */
  max-width: 400px; /* PCなどでは最大幅を設定 */
  font-family: "Noto Sans JP", sans-serif;
  margin: 10px 0 20px;
  font-size: 14px;
}

.select-button {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 15px;
  border: 1px solid #ccc;
  border-radius: 5px;
  background-color: #fff;
  cursor: pointer;
}

.arrow {
  transition: transform 0.3s;
}

/* プルダウンが開いている状態のスタイル（JavaScriptでクラスをトグル） */
.custom-select.open .arrow {
  transform: rotate(180deg);
}

.select-dropdown {
  list-style: none;
  padding: 0;
  margin: 4px 0 0 0;
  border: 1px solid #ccc;
  border-radius: 5px;
  position: absolute;
  width: 100%;
  z-index: 10;
  background-color: #fff;
  overflow-y: auto;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);

  /* 最初は非表示 */
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.2s,
    visibility 0.2s;
}

/* プルダウンが開いている状態 */
.custom-select.open .select-dropdown {
  opacity: 1;
  visibility: visible;
}

.select-dropdown li {
  padding: 10px 15px;
  cursor: pointer;
}

.select-dropdown li:hover,
.select-dropdown li.selected {
  /* 選択中のスタイル */
  background-color: #f0f0f0;
}

.textbox-group {
  margin: 6px 0;
}

.textbox-group input[type="text"] {
  width: 100%;
  padding: 6px 8px;
  font-size: 14px;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-sizing: border-box;
}

/* ラジオボタン群 */
.radio-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 8px 0 0px;
}

.radio-group input[type="radio"] {
  accent-color: #028632; /* 緑色の選択円 */
  width: 16px;
  height: 16px;
  margin-right: 8px;
  cursor: pointer;
}

.radio-group label {
  font-size: 14px;
  color: #333;
  cursor: pointer;
  display: flex;
  align-items: center;
}

.number-input {
  margin-top: 10px;
  margin-bottom: 20px;
}

.number-input input[type="number"] {
  width: 100px;
  padding: 6px 8px;
  font-size: 14px;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-sizing: border-box;
}

.list-checks {
  margin: 8px 0 16px;
  display: grid;
  row-gap: 10px;
}

/* 1行 = 2列（[□][ラベル]）で固定。flexは使わない */
.list-checks > div {
  display: grid;
  grid-template-columns: 18px 1fr; /* ← □の列幅を固定 */
  column-gap: 10px;
  align-items: start; /* 改行しても□は伸びない */
}

/* チェックボックスは完全固定サイズ＆伸縮禁止 */
.list-checks input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;

  width: 18px;
  height: 18px;
  box-sizing: content-box;
  border: 1px solid #666;
  border-radius: 3px;
  margin: 2px 0 0 0; /* 行頭に寄せる */
  justify-self: start; /* 左寄せ固定 */
  align-self: start; /* ラベルが複数行でも□は上揃え */
  cursor: pointer;
}

/* ラベル */
.list-checks label {
  font-size: 14px;
  line-height: 1.6;
  cursor: pointer;
}

/* チェック時の見た目（共通） */
.list-checks input[type="checkbox"]:checked {
  background-color: #028632;
  border-color: #028632;
  background-image: url("data:image/svg+xml;utf8,\
<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'>\
<path fill='white' d='M5.5 10.5l-3-3 1.4-1.4 1.6 1.6 4.6-4.6L11.5 4z'/>\
</svg>");
  background-repeat: no-repeat;
  background-position: center;
}

.copyright {
  margin: 0px;
}
