* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Noto Serif JP", sans-serif;
    font-optical-sizing: auto;
    font-weight: 400;
    font-style: normal;
}
body {
    min-height: 100vh;
    background-image:
        linear-gradient(
            rgba(255, 255, 255, 0.55),
            rgba(255, 255, 255, 0.55)
        ),
        url("../images/sindan.jpg");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

h1 {
  margin: 0;
  box-sizing: border-box;
  padding: 0 150px;
  background-color: rgb(70, 88, 105);
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 110px;
  overflow: visible;
}
h1 a img {
  width: 120px;
  height: auto;
  display: block;
}
.sound-button {
  pointer-events: auto;
  flex-shrink: 0;
  background: none;
  border: none;
  padding: 0;
  line-height: 0;
  cursor: pointer;
}
.sound-button img {
  width: 80px;
  height: 80px;
  display: block;
}

.content-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px 20px;
}

.survey-outer {
  background-color: rgba(70, 88, 105);
  border-radius: 5px;
  padding: 50px 40px;
}

/* 内側：白いカード本体 */
.survey-card {
  position: relative;
  max-width: 1020px;
  margin: 0 auto;
  background-color: white;
  padding: 70px 50px 60px;
  min-height: 550px;
  display: flex;
  flex-direction: column;
}

.binder-clip {
  position: absolute;
  top: -172px;
  left: 50%;
  transform: translateX(-50%);
  width: 370px;
  height: auto;
}

.survey-instruction {
  text-align: center;
  font-size: 18px;
  letter-spacing: 0.1em;
  margin-bottom: 20px;
  color: black;
}

.survey-question {
  text-align: center;
  font-size: 30px;
  font-weight: 500;
  letter-spacing: 0.15em;
  margin-bottom: 60px;
  color: black;
}

.checkbox-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  row-gap: 36px;
  column-gap: 100px;
  margin: 0 auto 60px;
  width: fit-content;
}

.checkbox-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: 260px;
  cursor: pointer;
}

.checkbox-text {
  font-size: 24px;
  letter-spacing: 0.05em;
  color: black;
}

.checkbox-item input[type="radio"] {
  appearance: none;
  -webkit-appearance: none;
  width: 24px;
  height: 24px;
  border: 2px solid black;
  background-color: white;
  cursor: pointer;
  margin: 0;
  flex-shrink: 0;
}

.checkbox-item input[type="radio"]:checked {
  background-color: rgb(70, 88, 105);
  border-color: rgb(70, 88, 105);
}

.next-link {
  display: block;
  text-align: right;
  font-size: 17px;
  color: black;
  text-decoration: none;
  letter-spacing: 0.05em;
  margin-top: auto;
}
.next-link:hover {
  text-decoration: underline;
}
button.next-link {
  background: none;
  border: none;
  font-family: inherit;
  width: 100%;
}

.result-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(255, 255, 255, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 1.2s ease;
  z-index: 1000;
}

.result-overlay.show {
  opacity: 1;
  pointer-events: auto;
}

.result-overlay p {
  font-size: 32px;
  letter-spacing: 0.15em;
  color: rgb(70, 88, 105);
}

/* =========================
   画面幅の狭い端末用の補正
   index.html側と同じ900px/760px/450pxを基準に段階調整する
========================= */

/* 900px以下：横幅に合わせて余白・binder・チェック項目の間隔を少し詰める */
@media (max-width: 900px) {
  h1 {
    padding: 0 5vw;
  }

  .content-wrap {
    padding: 32px 20px 20px;
  }

  .survey-outer {
    padding: 36px 24px;
  }

  .survey-card {
    padding: 60px 30px 40px;
    min-height: 480px;
  }

  .binder-clip {
    width: 300px;
    top: -140px;
  }

  .survey-question {
    font-size: 26px;
    margin-bottom: 40px;
  }

  .checkbox-grid {
    column-gap: 60px;
    row-gap: 28px;
  }

  .checkbox-item {
    width: 220px;
  }

  .checkbox-text {
    font-size: 20px;
  }
}

/* 760px以下：main-headとチェック項目を1列にしてスマホ向けレイアウトへ */
@media (max-width: 760px) {
  /* iOSでbackground-attachment: fixedが不安定になるのを避ける */
  body {
    background-attachment: scroll;
  }

  h1 {
    height: 80px;
    padding: 0 5vw;
  }

  h1 a img {
    width: 85px;
  }

  .sound-button img {
    width: 55px;
    height: 55px;
  }

  .content-wrap {
    padding: 24px 14px 14px;
  }

  .survey-outer {
    padding: 24px 14px;
  }

  .survey-card {
    padding: 60px 20px 30px;
    min-height: 0;
  }

  .binder-clip {
    width: 220px;
    top: -100px;
  }

  .survey-instruction {
    font-size: 15px;
    margin-bottom: 14px;
  }

  .survey-question {
    font-size: 20px;
    letter-spacing: 0.08em;
    line-height: 1.5;
    margin-bottom: 30px;
  }

  /* チェック項目を1列に。中央寄せで幅を画面に合わせる */
  .checkbox-grid {
    grid-template-columns: 1fr;
    row-gap: 20px;
    column-gap: 0;
    width: 100%;
    max-width: 280px;
    margin-bottom: 40px;
  }

  .checkbox-item {
    width: 100%;
  }

  .checkbox-text {
    font-size: 17px;
  }

  .checkbox-item input[type="radio"] {
    width: 20px;
    height: 20px;
  }

  .next-link {
    font-size: 15px;
  }

  .result-overlay p {
    font-size: 22px;
    padding: 0 24px;
    text-align: center;
  }
}

/* 450px以下：さらに小さい端末向けに微調整 */
@media (max-width: 450px) {
  .survey-card {
    padding: 48px 14px 24px;
  }

  .binder-clip {
    width: 170px;
    top: -78px;
  }

  .survey-question {
    font-size: 17px;
  }

  .checkbox-text {
    font-size: 15px;
  }

  .result-overlay p {
    font-size: 18px;
  }
}