/*--------------------------------------------------------
診断オーバーレイ
--------------------------------------------------------*/
.surv-overlay {
  position: fixed;
  inset: 0;
  background: rgba(11, 16, 32, 0.86);
  backdrop-filter: saturate(1.2) blur(2px);
  z-index: 9999;
  display: none;
}
.surv-overlay.show {
  display: block;
}
.surv-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: flex-start; /* 上部から表示開始 */
  justify-content: center;
  padding: 24px;
  overflow-y: auto; /* 縦スクロールを有効化 */
}

.surv-card {
  width: min(750px, 100%); /* 最大幅750px、画面幅が狭い場合は100% */
  margin: auto 0; /* モーダルの中央に配置 */
  background: #f2f2f2;
  border: 1px solid var(--color-black);
  border-radius: 1rem;
  color: var(--color-black);
  box-shadow: 0 0.5rem 2rem rgba(0, 0, 0, 0.35);
}
.surv-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}
.surv-title {
  font-size: 3.4rem;
  font-weight: 700;
}
.surv-close {
  appearance: none;
  border: none;
  background: transparent;
  color: #b3b3b3;
  font-size: 3rem;
  line-height: 1;
  cursor: pointer;
}
.surv-body {
  padding: 18px;
}
.surv-progress {
  position: relative;
  height: 8px;
  background: #cccccc;
  border-radius: 999px;
  overflow: hidden;
  margin: 4px 0 14px;
}
.surv-bar {
  height: 100%;
  background: var(--color-blue);
  width: 0;
  transition: width 0.25s;
}
.surv-progress-num {
  font-size: 3rem;
  color: #b3b3b3;
  margin-bottom: 1rem;
}
.surv-step h2 {
  margin: 1rem 0;
  font-size: 2rem;
  font-weight: 600;
  text-align: left;
  color: var(--color-black);
}
@media (max-width: 768px) {
  .surv-step h2 {
    font-size: 3rem;
  }
}
.surv-step-info {
  font-size: 3rem;
  text-align: center;
  border: 1px solid #cccccc;
  border-radius: 2rem;
  padding: 5rem;
  margin: 3rem 3rem 5rem 3rem;
}
.surv-step-text {
  font-size: 2rem;
  margin-bottom: 2rem;
}
@media (max-width: 768px) {
  .surv-step-text {
    font-size: 3rem;
    margin-bottom: 2rem;
  }
}
.surv-options {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 0.5rem;
  font-size: 2rem;
}
@media (max-width: 768px) {
  .surv-options {
    font-size: 3rem;
  }
}
.surv-option {
  display: flex;
  gap: 1rem;
  align-items: center;
  background: var(--color-white);
  border: 1px solid #cccccc;
  border-radius: 1rem;
  padding: 1rem;
}
@media (max-width: 768px) {
  .surv-option {
    padding: 3rem;
  }
}
.surv-option input {
  width: 2rem;
  height: 2rem;
}
.surv-input-label {
  display: block;
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
}
@media (max-width: 768px) {
  .surv-input-label {
    font-size: 3rem;
  }
}
.surv-input-label input {
  display: block;
  margin-top: 1rem;
}
.surv-input {
  width: 100%;
  padding: 2rem;
  border-radius: 1rem;
  border: 1px solid #cccccc;
  background: var(--color-white);
  color: var(--color-black);
  font-size: 2.4rem;
}
@media (max-width: 768px) {
  .surv-input {
    font-size: 3.2rem;
  }
}
.surv-input-required-label,
.surv-input-no-required-label {
  color: var(--color-white);
  padding: 0 0.5rem;
  margin-right: 1rem;
  font-size: 1.8rem;
  font-weight: normal;
}
@media (max-width: 768px) {
  .surv-input-required-label,
  .surv-input-no-required-label {
    font-size: 3.2rem;
  }
}
.surv-input-required-label {
  background-color: #f16e24;
}
.surv-input-no-required-label {
  background-color: var(--color-blue);
}
.surv-step-privacy-text {
  font-size: 1.6rem;
  text-align: justify;
  margin: 2rem;
  color: #93a2b3;
}
@media (max-width: 768px) {
  .surv-step-privacy-text {
    font-size: 2.6rem;
  }
}
.btn-nav {
  display: grid;
  grid-template-columns: 1fr 1fr; /* 2列グリッド */
  gap: 1rem;
  margin-top: 1rem;
}
/* オープニング画面（戻るボタンがない場合）は1列にする */
.btn-nav:not(:has(.btn-prev[style*="display: block"])) {
  grid-template-columns: 1fr;
}
/* 戻るボタン */
.btn-prev {
  grid-column: 1; /* 左列 */
}
/* 次へ/送信ボタン */
.btn-next,
.btn-submit {
  grid-column: 2; /* 右列 */
}
/* オープニング画面の次へボタン */
.btn-nav:not(:has(.btn-prev[style*="display: block"])) .btn-next,
.btn-nav:not(:has(.btn-prev[style*="display: block"])) .btn-submit {
  grid-column: 1;
}
/* 共通のボタンスタイル */
.btn-prev,
.btn-next,
.btn-submit {
  width: 100%;
  font-size: 2.4rem;
  font-weight: 600;
  padding: 2rem;
  border: none;
  border-radius: 1rem;
  box-shadow: 0 0.2rem 0.5rem rgba(0, 0, 0, 0.2);
  color: var(--color-white);
  cursor: pointer;
}
@media (max-width: 768px) {
  .btn-prev,
  .btn-next,
  .btn-submit {
    font-size: 3.2rem;
    padding: 3rem;
  }
}
.btn-prev {
  background: #b3b3b3;
}
.btn-next,
.btn-submit {
  background: linear-gradient(to bottom, #219bd7, #0062b9);
}
.btn-prev:hover,
.btn-next:hover,
.btn-submit:hover {
  opacity: 0.7;
  transition-duration: 0.3s;
}
.surv-status {
  min-height: 1.4em;
  color: #94a3b8;
  margin: 8px 0 0;
}
.surv-opening {
  text-align: center;
  padding: 24px 8px;
}
.surv-opening h2 {
  font-size: 3rem;
  color: var(--color-blue);
  font-weight: 600;
  margin: 0.2em 0;
}
.surv-thank {
  padding: 8px 0;
}
.hidden {
  display: none !important;
}

@media (max-width: 768px) {
  .surv-modal {
    padding: 12px; /* パディングを小さく */
  }

  .surv-card {
    margin: 0; /* 上下マージンを削除 */
  }

  .surv-options {
    grid-template-columns: 1fr;
  }

  .surv-inputrow {
    grid-template-columns: 1fr;
  }

  .surv-step-info {
    margin: 2rem 1rem; /* 余白を調整 */
    padding: 2rem;
  }
}
