*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: #1B1F4B;
  color: #1B1F4B;
  font-family: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic", sans-serif;
  line-height: 1.8;
}
main { max-width: 560px; margin: 0 auto; background: #FAFAF7; box-shadow: 0 0 40px rgba(0,0,0,.25); }
.part { margin: 0; }
.frame { position: relative; line-height: 0; }
.frame img { display: block; width: 100%; height: auto; }

/* 画像内のボタンに重ねる実際のリンク */
.hit {
  position: absolute; display: block;
  font-size: 0; color: transparent; overflow: hidden;
  border-radius: 8px;
  outline-offset: 3px;
  transition: transform .12s ease, box-shadow .12s ease;
}
.hit:hover { box-shadow: 0 0 0 3px rgba(255,255,255,.7); }
.hit:active { transform: translateY(2px); }
.hit:focus-visible { outline: 3px solid #FFD23F; }

/* FV：会話ウィンドウの ▼ を点滅させる（画像の ▼ の上に地の色を重ねて出し入れ） */
.cursor-blink {
  position: absolute; left: 86.3%; top: 27.2%; width: 4.5%; height: 2.1%;
  background: #1B1F4B; opacity: 0;
  animation: blink 1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 1; } }

/* スクロールで出る（ドット絵らしく、段階的に） */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .5s steps(5), transform .5s steps(5); }
.reveal.is-in { opacity: 1; transform: none; }

/* 追従の申込ボタン（FVのボタンが見えなくなってから出す） */
.float-cta {
  position: fixed; left: 50%; bottom: 14px; z-index: 20;
  width: min(92vw, 520px); min-height: 56px;
  transform: translate(-50%, 140%);
  display: flex; align-items: center; justify-content: center; gap: 14px;
  background: #FFD23F; color: #1B1F4B; text-decoration: none;
  font-weight: 800; font-size: 18px; letter-spacing: .04em;
  border-radius: 6px;
  box-shadow: 0 6px 0 #D9A400, 0 10px 24px rgba(0,0,0,.25);
  transition: transform .3s ease;
}
.float-cta i { font-style: normal; font-size: 14px; }
.float-cta.is-shown { transform: translate(-50%, 0); }
.float-cta:active { box-shadow: 0 2px 0 #D9A400; transform: translate(-50%, 4px); }
.float-cta:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }

/* 動きを止めるボタン（左上の小さな切り替え。FVのロゴとは重ねない位置＝画面の右上） */
.motion-toggle {
  position: fixed; right: 10px; top: 10px; z-index: 21;
  width: 44px; height: 44px; padding: 0;
  font-size: 14px; line-height: 1; font-family: inherit;
  color: #fff; background: rgba(27,31,75,.82);
  border: 1px solid rgba(255,255,255,.5); border-radius: 50%; cursor: pointer; opacity: .85;
}
.motion-toggle[aria-pressed="true"] { background: rgba(60,176,67,.9); }

.footer { max-width: 560px; margin: 0 auto; padding: 24px 20px 110px; color: #fff; text-align: center; font-size: 13px; line-height: 1.8; }
.footer p { margin: 0; }
.footer .todo { margin-top: 6px; color: #FFD23F; }

/* 動きを止める（OSの設定・ボタン） */
.no-motion .cursor-blink { animation: none; opacity: 0; }
.no-motion .reveal { opacity: 1; transform: none; transition: none; }
.no-motion .float-cta { transition: none; }
@media (prefers-reduced-motion: reduce) {
  .cursor-blink { animation: none; opacity: 0; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .float-cta, .hit { transition: none; }
}

@media (min-width: 900px) {
  body {
    background-color: #1B1F4B;
    background-image:
      linear-gradient(45deg, #20255A 25%, transparent 25%, transparent 75%, #20255A 75%),
      linear-gradient(45deg, #20255A 25%, transparent 25%, transparent 75%, #20255A 75%);
    background-size: 32px 32px; background-position: 0 0, 16px 16px;
  }
}
