body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: #fff;
  min-height: 100vh;
  position: relative;
  display: flex;
  justify-content: center;
}


.container {
  position: relative;
  z-index: 2;
  max-width: 600px;
  width: 100%;
  margin: 0 auto;
  padding: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}


.screen {
  display: none;
  background: white;
  border-radius: 20px;
  padding: 0;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: fadeIn 0.4s ease;
  width: 100%;
}

.screen.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 進捗バッジ */
.progress {
  text-align: center;
  margin-bottom: 0;
}

.progress-badge {
  height: auto;
  display: inline-block;
  margin-top: 5px;
}

.question-title {
  text-align: center;
  font-size: 24px;
  font-weight: bold;
  margin-top: 10px;
  margin-bottom: 5px;
  color: #333;
  line-height: 1.4;
}

.options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
  margin-bottom: 30px;
}

.option {
  border: none;
  border-radius: 0;
  padding: 0;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: transparent;
  text-align: center;
  overflow: hidden;
}

.option:hover {
  transform: translateY(-5px);
}

.option.selected {
  color: white;
}

/* 選択されていないカードをグレーアウト */
.options.has-selection .option:not(.selected) {
  position: relative;
}

.options.has-selection .option:not(.selected)::after {
  content: '';
  position: absolute;
  top: 4px;
  left: 0;
  width: 100%;
  height: calc(100% - 8px);
  background: rgba(41, 41, 41, 0.4);
  border-radius: 10px;
  pointer-events: none;
}

/* イラスト部分（カード回転アニメーション対応） */
.option-image-wrapper {
  width: 100%;
  aspect-ratio: 185 / 247;
  perspective: 1000px;
  position: relative;
}

.option-image-front,
.option-image-back {
  width: 100%;
  height: 100%;
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: absolute;
  top: 0;
  left: 0;
  backface-visibility: hidden;
  transition: transform 0.6s ease;
}

.option-image-front {
  transform: rotateY(0deg);
}

.option-image-back {
  transform: rotateY(180deg);
}

/* 選択時に画像を回転 */
.option.selected .option-image-front {
  transform: rotateY(180deg);
}

.option.selected .option-image-back {
  transform: rotateY(0deg);
}

.option-image-front img,
.option-image-back img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}


.buttons {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.back-link {
  text-align: center;
  margin-top: 20px;
}

.back-link a {
  color: #666;
  text-decoration: none;
  font-size: 14px;
}

.back-link a:hover {
  text-decoration: underline;
}

.btn {
  padding: 15px 30px;
  border: none;
  border-radius: 50px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  flex: 1;
}

.btn-primary {
  background: linear-gradient(#f81d49);
  color: white;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 20px rgba(189, 168, 64, 0.4);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn-secondary {
  background: #f0f0f0;
  color: #666;
}

.btn-secondary:hover {
  background: #e0e0e0;
}

.btn-next {
  background-color: #f81d49;
  border: none;
  border-radius: 50px;
  padding: 10px 60px;
  cursor: pointer;
  width: 50vw;
  max-width: 300px;
  font-size: 20px;
  font-weight: bold;
  color: #fff;
  transition: all 0.15s ease;
  box-shadow: 0 5px 0 #c4324f;
  position: relative;
  top: 0;
  overflow: hidden;
}

.btn-next::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  transform: skewX(-25deg);
  animation: shine 2.5s infinite;
}

.btn-next:hover {
  background-color: #da1c42;
}

.btn-next:active {
  top: 5px;
  box-shadow: 0 0 0 #c4324f;
  background-color: #c4324f;
}

.btn-next:disabled {
  opacity: 1;
  cursor: not-allowed;
}

.btn-next:disabled:hover {
  background-color: #f81d49;
}

.btn-next:disabled:active {
  top: 0;
  box-shadow: 0 5px 0 #c4324f;
}

/* イントロ画面 */
.intro-screen {
  text-align: center;
}

.fv-modal-image {
  width: 100%;
  margin-bottom: 10px;
}

.fv-modal-image img {
  width: 100%;
  height: auto;
  display: block;
}

.intro-title {
  font-size: 22px;
  font-weight: bold;
  margin-bottom: 20px;
  color: #333;
  line-height: 1.4;
}

.intro-subtitle {
  font-size: 18px;
  color: #666;
  margin-bottom: 30px;
}

/* 目的選択ボタン */
.mokuteki-buttons {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
  margin-top: 15px;
  padding: 0 30px;
}

.mokuteki-btn {
  padding: 15px 10px;
  background-color: #fc71aa;
  border: none;
  border-radius: 10px;
  font-size: 20px;
  font-weight: bold;
  color: #fff;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 5px 0 #e65791;
  position: relative;
  top: 0;
  overflow: hidden;
}

.mokuteki-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  transform: skewX(-25deg);
  animation: shine 2.5s infinite;
}

@keyframes shine {
  0% {
    left: -100%;
  }

  50%,
  100% {
    left: 150%;
  }
}

.mokuteki-btn:hover {
  background-color: #f05a9a;
}

.mokuteki-btn:active {
  top: 5px;
  box-shadow: 0 0 0 #e65791;
  background-color: #e65791;
}

/* モーダルフッター */
.modal-footer {
  margin-top: 30px;
  padding: 25px;
  background-color: #473f99;
  display: flex;
  justify-content: center;
  gap: 30px;
}

.modal-footer a {
  color: #fff;
  text-decoration: none;
  font-size: 14px;
}

.modal-footer a:hover {
  text-decoration: underline;
}

/* 質問ページフッター */
.page-footer {
  margin-top: 40px;
  padding: 30px;
  background-color: #473f99;
  display: flex;
  justify-content: center;
  gap: 30px;
}

.page-footer a {
  color: #fff;
  text-decoration: none;
  font-size: 14px;
}

.page-footer a:hover {
  text-decoration: underline;
}

/* 情報ページ */
.screen:has(.info-page) {
  border-radius: 0;
}

.info-page {
  padding: 20px;
}

.info-title {
  font-size: 24px;
  font-weight: bold;
  text-align: center;
  margin-bottom: 30px;
  color: #333;
}

.info-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 30px;
}

.info-table th,
.info-table td {
  padding: 15px;
  border-bottom: 1px solid #ddd;
  text-align: left;
}

.info-table th {
  width: 40%;
  background-color: #f5f5f5;
  font-weight: bold;
  color: #333;
}

.info-table td {
  color: #666;
}

.info-table td a {
  color: #473f99;
  text-decoration: none;
}

.info-table td a:hover {
  text-decoration: underline;
}

.info-content {
  padding: 0 10px;
  margin-bottom: 30px;
}

.info-content h2 {
  font-size: 18px;
  font-weight: bold;
  color: #333;
  margin-top: 25px;
  margin-bottom: 10px;
  padding-bottom: 5px;
  border-bottom: 2px solid #473f99;
}

.info-content p {
  font-size: 14px;
  color: #666;
  line-height: 1.8;
  margin-bottom: 10px;
}

.info-content ul {
  margin: 10px 0 10px 20px;
}

.info-content ul li {
  font-size: 14px;
  color: #666;
  line-height: 1.8;
  list-style: disc;
  margin-bottom: 5px;
}

.info-content a {
  color: #473f99;
  text-decoration: none;
}

.info-content a:hover {
  text-decoration: underline;
}

.info-content .contact-info {
  background-color: #f5f5f5;
  padding: 15px;
  border-radius: 5px;
  text-align: center;
}

.age-buttons {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
  margin-top: 40px;
}

.age-btn {
  padding: 25px 20px;
  background: #fc71aa;
  border: none;
  border-radius: 15px;
  font-size: 20px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  color: #333;
}

.age-btn:hover {
  border-color: #fff;
  background: linear-gradient(#db5089 100%);
  color: white;
  transform: translateY(-3px);
}

/* 最終画面 */
#result.screen {
  background: transparent;
  padding: 0;
  box-shadow: none;
  border-radius: 0;
}

.final-screen {
  text-align: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.final-screen>img {
  width: 100%;
  height: auto;
  display: block;
}

.final-screen .page-footer {
  margin-top: 0;
}

.final-screen .result-with-cta {
  margin-top: 5px;
}

/* .final-screen .result-with-cta .cta-overlay {
  bottom: 5%;
} */

.final-title {
  font-size: 28px;
  font-weight: bold;
  margin-bottom: 20px;
  color: #333;
}

.final-message {
  font-size: 16px;
  color: #666;
  margin-bottom: 30px;
  line-height: 1.6;
}

.cta-button {
  background: linear-gradient(135deg, #06C755 0%, #00B900 100%);
  color: white;
  padding: 20px 40px;
  border: none;
  border-radius: 50px;
  font-size: 20px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-block;
  text-decoration: none;
  animation: pulse 2s infinite;
}

@keyframes pulse {

  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.05);
  }
}

.cta-button:hover {
  transform: scale(1.1);
  box-shadow: 0 10px 30px rgba(6, 199, 85, 0.4);
}

/* 結果ページCTAオーバーレイ */
.result-with-cta {
  position: relative;
  width: 100%;
}

.result-with-cta>img {
  width: 100%;
  height: auto;
  display: block;
}

.cta-overlay {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  cursor: pointer;
  transition: all 0.15s ease;
  animation: ctaPulse 1.5s ease-in-out infinite;
}

@keyframes ctaPulse {
  0%, 100% {
    transform: translateX(-50%) scale(1);
  }
  50% {
    transform: translateX(-50%) scale(1.05);
  }
}

.cta-overlay img {
  width: 100%;
  height: auto;
  display: block;
}

.cta-overlay:active {
  transform: translateX(-50%) translateY(5px);
}

.note {
  font-size: 12px;
  color: #999;
  margin-top: 20px;
}

/* モーダルオーバーレイ */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1000;
  overflow-y: auto;
}

/* 質問セクション */
.question-section {
  width: 100%;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

/* 質問ページ用ラッパー */
.page-wrapper {
  width: 100%;
  max-width: 650px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
}

/* FVセクション（質問ページ用） */
.fv-section {
  width: 100%;
  max-width: 650px;
  margin: 0 auto;
}

.fv-section img {
  width: 100%;
  height: auto;
  display: block;
}

/* 質問ページ用コンテナ */
.page-container {
  position: relative;
  z-index: 2;
  max-width: 650px;
  width: 100%;
  margin: 0 auto;
  padding: 0;
}

/* 質問パネル（ページ遷移版） */
.question-panel {
  background: white;
  border-radius: 0;
  padding: 0px 30px;
  animation: fadeIn 0.4s ease;
  width: 100%;
  margin-top: 0;
  position: relative;
  z-index: 3;
}

/* 結果パネル */
.result-panel {
  width: 100%;
}

.result-panel img {
  width: 100%;
  height: auto;
  display: block;
}

/* レスポンシブデザイン */
@media (max-width: 750px) {
  .container {
    padding: 10px;
    max-width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
  }

  .screen {
    padding: 0;
  }

  .fv-modal-image {
    margin-bottom: 10px;
  }

  .intro-title {
    font-size: 16px;
    margin-bottom: 20px;
  }

  .mokuteki-buttons {
    gap: 10px;
    margin-top: 10px;
    padding: 0 10px;
  }

  .mokuteki-btn {
    padding: 15px 10px;
    font-size: 14px;
    box-shadow: 0 4px 0 #e65791;
  }

  .mokuteki-btn:active {
    top: 4px;
  }

  .progress {
    margin-bottom: 0px;
  }

  .question-title {
    font-size: 20px;
    margin-bottom: 15px;
  }

  .options {
    margin-bottom: 15px;
  }

  .age-buttons {
    grid-template-columns: 1fr;
  }

  .buttons {
    flex-direction: column-reverse;
  }

  .btn {
    width: 100%;
  }

  .page-container {
    padding: 0;
  }

  .question-panel {
    padding: 5px 10px;
    margin-top: 0;
  }

  .cta-overlay {
    bottom: 0;
  }

  .btn-next {
    width: 50vw;
    padding: 10px 60px;
    font-size: 14px;
    margin: 0 auto;
  }

  .buttons {
    justify-content: center;
    width: 100%;
    display: flex;
  }

  .options.has-selection .option:not(.selected)::after {
    border-radius: 5px;
  }

  .modal-footer {
    padding: 20px;
  }

  .modal-footer a {
    font-size: 10px;
  }

  .page-footer {
    padding: 20px;
    margin-top: 20px;
  }

  .page-footer a {
    font-size: 10px;
  }
}