main.main-content {
  width: 90% !important;
  max-width: 600px;
  /* ただし 600px を上限にする */
  margin: 0 auto;
  background: white;
  padding: 0px 10px 40px 20px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  margin-top: 20px;
  margin-bottom: 30px;
}

h1 {
  text-align: center;
  margin-bottom: 20px;
  font-size: 1.6em;
}

h2 {
  text-align: center;
  margin-bottom: 20px;
  font-size: 1.2em;
}

.question {
  margin-top: 40px;
  margin-bottom: 20px;
}

.question label {
  display: block;
  margin-bottom: 15px;
  font-weight: bold;
}

.question select {
  width: 100%;
  padding: 8px;
  font-size: 16px;
}

#staffButtons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  margin: 50px 0 30px 0;
  gap: 10px;
}

#staffButtons button {
  background-color: #eee;
  border: 2px solid #ccc;
  padding: 10px;
  border-radius: 8px;
  cursor: pointer;
  text-align: center;
  width: 100px;
  transition: all 0.2s ease-in-out;
}

#staffButtons button.selected {
  border-color: #666;
  background-color: #afd6ea;
  font-weight: bold;
}

#staffButtons img {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 5px;
}

button[type="submit"] {
  display: block;
  width: 100%;
  padding: 12px;
  font-size: 18px;
  background-color: #666;
  color: #fff;
  border: none;
  border-radius: 8px;
  margin-top: 50px;
  margin-bottom: 30px;
  cursor: pointer;
  transition: background-color 0.3s;
}

button[type="submit"]:hover {
  background-color: #999;
}

#surveyForm {
  visibility: hidden;
}

#thanksMessage {
  text-align: center;
  font-size: 18px;
  font-weight: bold;
  color: rgb(8, 192, 8);
  margin-top: 30px;
}

.star-wrapper {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 8px;
  width: 90%;
  margin-top: -10px;
}

.star-rating {
  display: flex;

  /* 折り返し許可の場合 flex-wrap: wrap; */

  gap: 4px;
  max-width: 100%;
  flex: 1;
}

.star-rating span {
  font-size: clamp(16px, 4vw, 28px);
  color: #ffd9664d;
  /* 濃い金色 */
  opacity: 1;
  /* はっきり見える */
  transition: all 0.2s;
  text-align: center;
  width: 9%;
  min-width: 24px;
  flex: 0 0 auto;
}

.star-rating span.selected {
  color: #ffb800;
  /* 薄めの金色で目立ちにくく */
  opacity: 1;
}

.star-score {
  font-size: clamp(14px, 4vw, 18px);
  white-space: nowrap;
  flex-shrink: 0;
}

/* アンケート設問ラッパー */
.dynamic-question {
  margin-top: 40px;
  margin-bottom: 20px;
}

/* 設問文 */
.dynamic-question p {
  margin-bottom: 10px;
  font-weight: bold;
}

/* 星評価エリア */
.dynamic-question .star-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* 備考欄（textarea） */
#remarkInput {
  width: 100%;
  max-width: 100%;
  padding: 12px;
  font-size: 16px;
  border-radius: 6px;
  border: 1px solid #ccc;
  margin-top: 10px;
  resize: vertical;
  /* ユーザーが高さ変更できる */
}

.survey-label {
  display: inline-flex;
  align-items: center;
  font-weight: bold;
  font-size: 18px;
  margin-bottom: 8px;
  gap: 8px;
  color: #333;
}

.survey-label .badge {
  background-color: #4CAF50;
  color: white;
  border-radius: 50%;
  padding: 6px 12px;
  font-size: 14px;
  min-width: 32px;
  text-align: center;
  line-height: 1.2;
}

/* お待ちください点滅メッセージ */
#loadingOverlay {
  position: fixed;
  z-index: 99999;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(35, 34, 33, 0.51);
  display: flex;
  align-items: center;
  justify-content: center;
}

.loading-message {
  color: #fff;
  font-size: 1.2em;
  font-weight: bold;
  letter-spacing: .1em;
  animation: loading-blink 1s steps(1, start) infinite;
  padding: 30px 40px;
  background: rgba(0, 0, 0, 0.45);
  border-radius: 18px;
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.17);
  text-align: center;
}

@keyframes loading-blink {
  50% {
    opacity: 0;
  }
}

/* モーダル */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-content {
  position: relative;
  max-width: 90%;
  max-height: 90%;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  padding: 10px;
}

.modal-content img {
  width: 100%;
  height: auto;
  display: block;
}

.modal-name {
  text-align: center;
  font-size: 18px;
  font-weight: bold;
  margin-top: 12px;
  color: #333;
}

.modal-close {
  position: absolute;
  top: 15px;
  right: 20px;
  z-index: 2000;
  width: 36px;
  height: 36px;
  padding: 0;
  /* ← 余計な余白を完全カット */
  background: #3bb537;
  color: white;
  border: none;
  border-radius: 50%;
  /* ← 厳密な正円 */
  font-size: 1.5rem;
  /* ← 直径の1/2〜2/3程度でOK */
  font-weight: bold;
  line-height: 36px;
  /* ← 高さに合わせる、中央揃え */
  text-align: center;
  box-sizing: border-box;
  /* ← 念のため明示 */
  cursor: pointer;
  transition: background 0.2s;
  appearance: none;
  /* ← Safari用 */
  -webkit-appearance: none;
  /* ← iOS用 */
  user-select: none;
}

.modal-close:hover {
  background: #abf2a8;
}

/* ==== ダークモード対応追記 ==== */
html.dark-mode main.main-content {
  background: #1a1a1a;
  color: #f0f0f0;
  border: 1.5px solid #555555;
  /* 薄いグレー枠線 */
}

html.dark-mode h1,
html.dark-mode h2,
html.dark-mode .survey-label,
html.dark-mode .modal-name {
  color: #f0f0f0;
}

html.dark-mode #remarkInput,
html.dark-mode textarea,
html.dark-mode select {
  background-color: #2b2b2b;
  color: #f0f0f0;
  border: 1px solid #666666;
}

html.dark-mode .modal-content {
  background: #2a2a2a;
}

html.dark-mode .modal-name {
  color: #f0f0f0;
}

/* ダークモード時のスタッフ選択ボタン */
html.dark-mode #staffButtons button {
  background-color: #2a2a2a;
  color: #f0f0f0;
  border: 2px solid #555;
}

html.dark-mode #staffButtons button.selected {
  background-color: #afd6ea !important;
  border-color: #666 !important;
}

/* Google口コミ＆自アンケート親コンテナを同じ幅・中央寄せ */
#google-reviews,
#published-surveys {
  max-width: 600px !important;
  width: 100% !important;
  margin: 10px auto;
  padding: 0;
  font-family: 'Segoe UI', 'ヒラギノ角ゴ ProN', 'Meiryo', sans-serif;
}

#google-reviews,
#publishedSurveyList {
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  display: block !important;
  box-sizing: border-box;
  padding: 0;
}

#google-reviews {
  margin-top: 30px;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {

  #google-reviews,
  #published-surveys {
    max-width: 100%;
    padding: 0 2vw;
  }

  .review {
    padding: 16px 10px 14px 14px;
  }
}

/* 口コミ表示の共通ボックス */
.review {
  width: 100%;
  box-sizing: border-box;
  margin: 0 0 22px 0;
  border-radius: 14px;
  background: #f2f2f2;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.09);
  padding: 22px 26px 20px 26px;
  border: 1.5px solid #cccccc;
  transition: box-shadow 0.2s, background 0.3s, border-color 0.3s;
  display: block;
  max-width: 100%;
}

/* Google口コミは青ライン */
.review.google-review {
  border-left: 6px solid #0b82fa;
}

/* 自アンケートは小豆色ライン＆ベージュ背景・影 */
.review.my-survey {
  background: #faf6f5;
  border-left: 6px solid #963553;
  border-color: #eddde2;
  box-shadow: 0 4px 20px rgba(150, 53, 83, 0.08);
}

/* hover時の影強調（共通） */
.review:hover {
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.13);
}

/* レビューヘッダー */
.review-header {
  display: flex;
  align-items: center;
}

/* 投稿者名 */
.review-author {
  font-weight: bold;
  color: var(--text-color, #222);
  font-size: 1.08em;
  margin-right: 14px;
}

/* 星 */
.review-stars {
  margin: 3px 0 10px 0;
  color: #eeb73c;
  font-size: 1.13em;
  letter-spacing: 1px;
}

/* 投稿者行 */
.review-meta {
  color: #222;
  font-size: 1em;
  margin-top: 5px;
}

/* 日付と投稿者行の書式を統一 */
.review-date,
.review-meta {
  color: #888;
  font-size: 0.97em;
  font-weight: normal;
}

/* 口コミ本文 */
.review-text {
  color: var(--survey-text-color, #343434);
  font-size: 1.11em;
  line-height: 1.7;
  margin-top: 2px;
  white-space: pre-line;
}

/* Googleバッジ */
.google-badge {
  display: flex;
  align-items: center;
  font-size: 0.97em;
  color: #888;
  margin: 25px auto 0 auto;
  width: fit-content;
  gap: 6px;
}

.google-badge img {
  height: 19px;
}

/* Google口コミモーダル右上✕ボタン（略）…ここは元のままでOK */

/* ダークモード */
.dark-mode #google-reviews,
.dark-mode #published-surveys {
  color: var(--section-text-color, #f0f0f0);
}

.dark-mode .review {
  background: var(--survey-bg-color, #2a2a2a);
  border: 1.5px solid var(--survey-border-color, #666);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.24);
}

.dark-mode .review.google-review {
  border-left: 6px solid #30a3ff;
}

.dark-mode .review.my-survey {
  border-left: 6px solid #ac6976;
  border-color: #eddde2;
  background: #2a2a2a;
}

.dark-mode .review-author {
  color: #ffe588;
}

.dark-mode .review-text {
  color: var(--survey-text-color, #f0f0f0);
}

.dark-mode .review-date {
  color: #bbb;
}

.dark-mode .review-stars {
  color: #ffd857;
}

.dark-mode .google-badge {
  color: #bbb;
}