:root{
  --main-color:#f0dc06;
}
/* #e6d51c */
* {
  box-sizing: border-box;
}

body{
  margin:0;
  font-family:sans-serif;
  background:var(--main-color);
  text-align:center;
}
#app {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}


.page{
  display:none;
}
.page.active{
  display:block;
}

/* ロゴ */

.logo {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 30px;
  gap: 20px;
  transition: all 0.5s ease; /* サイズ変更をアニメーション */
    margin-bottom: 30px;
}

/* 通常サイズ */
.logo-image, .logo-text {
  height: 80px; 
  width: auto;
}

/* トップページ用の大サイズ */

.logo.top-active .logo-image {
  height: 240px; 
}

.logo.top-active .logo-text {
  height: 140px; 
}

/* ===== トップ ===== */

.catch-bubble {
  margin: 40px 0 30px; /* 上・下 */
}
.catch-bubble .highlight-michi {
  font-size: 2em;
  font-weight: bold;
  font-feature-settings: "palt";
  display: inline;
  vertical-align: sub;
  position: relative;
}

.michi-effect {
  position: absolute;
  top: -50px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 30px;
  object-fit: contain;
  opacity: 0;
  animation: sparkle-pop-bounce 0.6s cubic-bezier(0.34, 1.2, 0.8, 1) forwards;
  animation-delay: 0.5s;
}

/* 3段階のポップアニメーション */
@keyframes sparkle-pop-bounce {
  0% {
    opacity: 0;
    transform: translateX(-50%) scale(0);
  }
  50% {
    opacity: 1;
    transform: translateX(-50%) scale(1.3);
  }
  80% {
    transform: translateX(-50%) scale(0.85);
  }
  100% {
    opacity: 1;
    transform: translateX(-50%) scale(1.05);
  }
}
.scroll-wrapper {
  overflow: hidden;
  width: 100%;
  max-width: 820px;
  margin: 40px auto;
}
#startBtn {
  margin-top: 30px;
}

.catch-bubble {
  background: #fff;
  color: #000;
  padding: 8px 30px 16px;
  border-radius: 20px;
  position: relative;
  font-size: 24px;
  font-weight: bold;
  opacity: 0;
  transform: scale(0.8);
  transition: 0.4s;
  display: inline-block;
  vertical-align: middle;
}

/* 縦長▽ */
.catch-bubble::after {
  content: "";
  position: absolute;
  bottom: -30px;       /* 四角の下にくっつける */
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 15px solid transparent;
  border-right: 15px solid transparent;
  border-top: 30px solid #fff; /* 上向き縦長三角形 */
}
.catch-bubble.show {
  opacity: 1;
  transform: scale(1);
}
/* 流れるアイコン */
.scroll-wrapper{
  overflow:hidden;
  width:100%;
}

.scroll-track {
  display: flex;
  width: max-content;
  animation: scroll 100s linear infinite;
}
.scroll-row{
  display:flex;
}

.scroll-row img{
  width: 60px;
  height: 60px;
  flex-shrink: 0;
  margin-right: 20px; /* 余白を追加 */
}

@keyframes scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); } /* 50%だけスクロールで無限ループ */
}
/* ボタン */
button{
  padding:12px 30px;
  font-size:16px;
  border:2px solid #000;
  background:#fff;
  cursor:pointer;
  transition:0.2s;
   font-weight: bold;
}
button:hover{
  transform:scale(1.05);
}
/* はじめるボタン */
#startBtn {
  width: 220px;
  display: block;
  margin: 0 auto;
  padding: 14px 40px;
  font-size: 18px;
  border: 3px solid #000;
  background: transparent;
  cursor: pointer;
}

#startBtn:hover {
  opacity: 0.7;
}

/* ===== 質問 ===== */
.q-card {
  position: relative;
  padding: 60px;
  margin: 40px auto;
  width: 642px;
  box-sizing: border-box;

  overflow: visible; /* ← これが効くようになる */

  /* ↓ これ全部削除 */
  /* background */
  /* outline */
  /* clip-path */
}
.q-card::before {
  content: "";
  position: absolute;
  inset: 0; /* top:0; left:0; right:0; bottom:0 */

  background: #fff;
  border-radius: 24px;

  clip-path: polygon(
    0% 6%, 3% 0%,
    97% 0%, 100% 6%,
    100% 94%, 97% 100%,
    3% 100%, 0% 94%
  );

  z-index: 0;
}
.q-card > * {
  position: relative;
  z-index: 1;
}
/* メーター */
.meter {
  position: relative;
  width: 100%;
  margin: 0 auto 50px;
  overflow: visible;
}

.meter-bar {
  height: 20px;
  background: #fff;
  border-radius: 999px;
  border: 3px solid #000;
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
}

#meterFill {
  height: 100%;
  width: 0%;
  background: var(--main-color);
  transition: width 0.3s ease;
}

#meterNum {
  position: absolute;
  background: #000;
  color: #fff;
font-family: "Noto Serif JP", serif;
  font-size: 32px;
  font-weight: bold;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translateX(-50%);
  transition: left 0.3s ease;
  top: -70px;
  left: 0;
  z-index: 100;
  padding-bottom: 2px;
}

#meterNum::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-top: 12px solid #000;
}

#questionText {
  font-size: 26px;
  font-weight: bold;
  line-height: 1.6;
  text-align: center;
  margin: 0 0 50px;
  white-space: pre-line;
}

.btn-row {
  display: flex;
  justify-content: center;
  gap: 20px;
}

#yesBtn, #noBtn {
  width: 220px;
  padding: 18px 0;
  font-size: 22px;
  font-weight: bold;
  border: 3px solid #000;
  border-radius: 10px;
  cursor: pointer;
  transition: 0.2s;
}

#yesBtn {
  background: #fff;
  color: #000;
}

#noBtn {
  background: #000;
  color: #fff;
}

#yesBtn:hover { opacity: 0.7; }
#noBtn:hover { opacity: 0.7; }

#backBtn {
  display: block;
  margin: 0 auto;
  padding: 14px 40px;
  font-size: 18px;
  border: 3px solid #000;
  background: transparent;
  cursor: pointer;
}

/* ===== 結果 ===== */
.result-title {
  font-size: 22px;
  font-weight: bold;
  margin: 40px 0 20px;
  opacity: 0;
  transition: opacity 2s ease;
}
.result-title.show {
  opacity: 1;
}

.result-card {
  background: #fff;
  border-radius: 24px;
  padding:20px;
  margin: 20px auto 40px;
  width: 642px;
  height: 386px;
  box-sizing: border-box;
  clip-path: polygon(
    0% 6%, 3% 0%,
    97% 0%, 100% 6%,
    100% 94%, 97% 100%,
    3% 100%, 0% 94%
  );
  opacity: 0;
  transition: opacity 0.8s ease;
}
.result-card.show {
  opacity: 1;
}

.result-inner {
  display: flex;
  flex-direction: row;
  align-items: center;     /* ← 縦方向中央 */
  justify-content: center; /* ← 横方向中央（これが重要！） */
  height: 100%;   /* ← これが必須 */
  gap: 20px;
}

.result-image {
  height: 100%;
  width: 46%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.result-image img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

.result-info {
  width: 54%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: left;
  padding: 0px 8px;
  box-sizing: border-box;
  text-align: left;
}

.result-name-row {
  display: flex;
  align-items: center;   /* 縦中央揃え */
  gap: 12px;
  margin-bottom: 4px;
}

.result-icon {
  width:76px;
  height:76px;
  object-fit: contain;
}
#resultName {
  font-size: 40px;
  margin: 0;
  text-align: center;  /* ← 追加 */
}

.result-subtitle {
  font-size: 20px;
  font-weight: bold;
  margin: 0;
  text-align: center;  /* ← 追加 */
}

#resultText {
  font-size: 20px;
  font-weight: 600;
  line-height: 1.75;
  text-align: left;
  word-break: break-all;
  overflow-wrap: break-word;
  white-space: normal;
  width: 100%;
  display: block;
  contain: layout;
}
#resultText:lang(en) {
    opacity: 0;
  transition: opacity 0.8s ease;
    hyphens: auto;
      word-break: normal;
  overflow-wrap: break-word;
}

#resultText.show {
  opacity: 1;
}
#restartBtn {
  opacity: 0;
  transform: translateY(50px);
  transition: 0.6s;
  pointer-events: none;
}

#restartBtn.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
/* ===== もっとみる ===== */
#moreText {
  margin-top: 40px;
  opacity: 0;
  transform: translateY(50px);
  transition: 0.6s;
  font-size: 18px;
  font-weight: bold;
  font-feature-settings: "palt";
}
#moreText.show {
  opacity: 1;
  transform: translateY(0);
}
.more-deco {
  font-style: italic;
  margin: 0 4px;
  display: inline-block;
  transform: rotate(-20deg);
}

.more-deco:last-child {
  transform: rotate(20deg);
}

/* moreTextの左右の装飾 */
.more-deco-img {
  width: 30px;
  height: 18px;
  object-fit: contain;
}
.more-deco-img.left{
  transform: scaleX(-1);
}
.more-icons {
  margin-top: 12px;
  display: flex;
  justify-content: center;
  gap: 16px;
}


.more-icons a {
  display: inline-block;
  transition: transform 0.2s;
}

.more-icons a:hover {
  transform: scale(1.1);
}

.more-icons img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

/* ===== フッター ===== */
/* ===== フッター ===== */
/* ===== フッター ===== */
footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  margin: 0;
  padding: 20px 0;
  font-size: 13px;
  background: transparent;
  text-align: center;
}
footer.show {
  opacity: 1;
  pointer-events: auto;
}

/* 結果ページでのみ表示を制御 */
#resultPage footer {
  display: block;
}

/* ===== 959px以下のレスポンシブ ===== */
@media (max-width: 682px) {
  #app {
    padding: 0 1rem;
  }

  .logo {
    margin: 1rem;
    gap: 0.5rem;
  }

  .logo-image, .logo-text {
    height: 60px;
  }

  .logo.top-active .logo-image {
    height: initial;
    width: 50%;
  }

  .logo.top-active .logo-text {
    height: initial;
    width: 50%;
  }

  .catch-bubble {
    padding: 0.5rem 1.5rem 1.2rem;
    border-radius: 1.2rem;
    font-size: clamp(1rem, 4.5vw, 1.5rem);
  }

  .catch-bubble::after {
    bottom: -1.6rem;
    border-left: 0.9rem solid transparent;
    border-right: 0.9rem solid transparent;
    border-top: 1.8rem solid #fff;
  }

  .highlight-michi {
    font-size: 1.3em;
  }

  .michi-effect {
    top: -2.5rem;
    width: 45px;
    height: 22px;
  }

  .scroll-wrapper {
    max-width: 100%;
    margin: 1.5rem auto;
  }

  .scroll-row img {
    width: 45px;
    height: 45px;
    margin-right: 1rem;
  }

  #startBtn {
    width: 90%;
    max-width: 220px;
    margin: 1.5rem auto 0;
    padding: 0.85rem 2.5rem;
    font-size: 1.1rem;
  }

  .q-card {
    padding: 1.2rem;
    margin: 2.5rem auto;
    width: 100%;
    max-width: 100%;
  }

  .meter {
    margin: 0 auto 2rem;
  }

  .meter-bar {
    height: 1.2rem;
    border: 2px solid #000;
  }

  #meterNum {
    font-size: 1.2rem;
    width: 45px;
    height: 45px;
    top: -3.5rem;
  }

  #meterNum::after {
    bottom: -0.6rem;
    border-left: 0.5rem solid transparent;
    border-right: 0.5rem solid transparent;
    border-top: 0.75rem solid #000;
  }

  #questionText {
    font-size: clamp(1rem, 4vw, 1.6rem);
    margin: 0 0 2rem;
  }

  .btn-row {
    gap: 1rem;
    flex-wrap: wrap;
  }

  #yesBtn, #noBtn {
    width: 45%;
    padding: 1rem;
    font-size: 1rem;
    flex: 1;
  }

  #backBtn {
    margin: 1rem auto 0;
    padding: 0.85rem 2.5rem;
    font-size: 1rem;
    max-width: 220px;
  }

  .result-title {
    font-size: clamp(1.2rem, 5vw, 1.4rem);
    margin: 1.5rem 0 1rem;
  }

  .result-card {
    padding: 1rem;
    margin: 1rem auto;
    width: 95%;
    max-width: 100%;
    height: auto;
    min-height: 300px;
    clip-path: none;
    border-radius: 12px;
  }

  .result-inner {
    flex-direction: column;
  }

  .result-image {
    width: 100%;
    max-width: 280px;
  }

  .result-image img {
    max-height: 280px;
  }

  .result-info {
    width: 100%;
    padding: 0 0.5rem;
    text-align: center;
  }

  .result-name-row {
    justify-content: center;
    flex-wrap: wrap;
  }

  .result-icon {
    width: 50px;
    height: 50px;
  }

  #resultName {
    font-size: clamp(1.5rem, 6vw, 2.5rem);
  }

  .result-subtitle {
    font-size: clamp(0.9rem, 3vw, 1.2rem);
  }

  #resultText {
    font-size: clamp(0.9rem, 3vw, 1.25rem);
    text-align: left;
    margin-top: 0.5rem;
    min-height: 0!important;
  }

  #restartBtn {
    margin-top: 1rem;
  }

  #moreText {
    margin-top: 1.5rem;
    font-size: clamp(0.9rem, 3vw, 1.1rem);
  }

  .more-deco-img {
    width: 25px;
    height: 16px;
    margin: 0 0.3rem;
  }

  .more-icons {
    margin-top: 0.8rem;
    gap: 1rem;
    flex-wrap: wrap;
  }

  .more-icons img {
    width: 22px;
    height: 22px;
  }

  footer {
    margin-top: 3rem;
    padding: 1.2rem 0;
    font-size: 0.8rem;
    position: relative;
  }
}

