/* =========================
   共通
========================= */

.page {
  position: relative;

  width: 100%;
  max-width: 393px;
  min-height: 100vh;

  margin: 0 auto;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  font-family: "Zen Kaku Gothic New", sans-serif;
  font-weight: 400;
}

.hero,
.question {
  background: #5c7fb9;
}

:root {
  --side-padding: 52px;
}

.hero,
.question-inner,
.message__inner,
.answer-block {
  padding-left: var(--side-padding);
  padding-right: var(--side-padding);
}

/* =========================
   MODAL
========================= */

.modal {
  position: fixed;
  inset: 0;

  display: flex;
  justify-content: center;
  align-items: center;

  opacity: 0;
  pointer-events: none;

  transition: 0.4s;

  z-index: 5000;
}

.modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.modal__overlay {
  position: absolute;
  inset: 0;
}

.modal__content {
  position: relative;

  width: calc(100% - 48px);
  max-width: 320px;
  min-height: 420px;

  background: #1c293da6;

  z-index: 2;

  display: flex;
  justify-content: center;
  align-items: center;

  padding: 40px 32px;

  border-radius: 20px;

  backdrop-filter: blur(1px);
}

.modal__inner {
  text-align: center;
}

.modal__title {
  color: #fff;

  text-align: center;
  font-size: 1.25rem;
  font-weight: 400;

  margin-bottom: 32px;
}

.modal__text {
  color: #fff;
  text-align: center;

  font-size: 0.875rem;
  line-height: 2;
  letter-spacing: 0.04em;
}

/* =========================
   MODAL BUTTON
========================= */

.modal-button {
  margin-top: 40px;

  display: flex;
  flex-direction: column;
  align-items: center;
}

.modal-button__text {
  color: #fff;

  font-size: 0.875rem;

  margin-bottom: 16px;

  letter-spacing: 0.04em;
}

.modal__close {
  position: absolute;

  top: 20px;
  right: 20px;

  background: none;
  border: none;

  cursor: pointer;
}

.modal__close img {
  width: 28px;
  height: auto;
}

/* =========================
   SWITCH
========================= */

.modal-switch {
  position: relative;

  display: inline-block;

  width: 96px;
  height: 52px;

  margin-top: 0px;
}

.modal-switch input {
  display: none;
}

.modal-switch__slider {
  position: absolute;
  inset: 0;

  background: #d9d9d9;

  border-radius: 999px;

  transition: 0.3s;
}

.modal-switch__slider::before {
  content: "";

  position: absolute;

  width: 40px;
  height: 40px;

  left: 6px;
  top: 6px;

  border-radius: 50%;

  background: #12223c;

  transition: 0.3s;
}

.modal-switch input:checked + .modal-switch__slider {
  background: #0b1627;
}

.modal-switch input:checked + .modal-switch__slider::before {
  transform: translateX(44px);
}

/* =========================
   DARK MODE
========================= */

body::after {
  content: "";

  position: fixed;
  inset: 0;

  background: rgba(0, 0, 0, 1);
  opacity: 0;
  transition: opacity 3s ease;

  z-index: 9998;

  pointer-events: none;
}

body.is-dark::after {
  opacity: 1;
}

/* =========================
   HERO
========================= */

.hero {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
}

/* =========================
   CHARACTER
========================= */

.hero__character {
  position: absolute;

  width: 375px;
  height: auto;

  z-index: 2;
}

.hero__character--top {
  top: 10px;
  left: 45%;
  transform: translateX(-50%) rotate(12deg);
  animation: floatTop 6s ease-in-out infinite;
}

.hero__character--bottom {
  bottom: 10px;
  left: 55%;
  transform: translateX(-50%) rotate(180deg);

  animation: floatBottom 6s ease-in-out infinite;
}

/* =========================
   MESSAGE
========================= */

.hero__message {
  position: absolute;

  top: 50%;
  left: var(--side-padding);
  right: var(--side-padding);

  transform: translateY(-50%);

  z-index: 3;
}

.hero__message p {
  text-align: left;

  color: #fff;

  font-size: 1.07rem;
  line-height: 1.6;
  font-weight: 400;

  letter-spacing: 0.04em;
}

/* =========================
   CLOUD02
========================= */
.question__cloud,
.hero__cloud {
  position: absolute;
  z-index: 1;
}

.question__cloud img,
.hero__cloud img {
  display: block;
  width: 300px;
}

/* heroの雲01 */

.hero__cloud01 {
  top: 171px;
  right: -120px;

  animation: cloudFloatLeft 18s ease-in-out infinite;
}

.hero__cloud02 {
  top: 480px;
  left: -180px;

  animation: cloudFloatRight 22s ease-in-out infinite;
}
/* questionの雲02 */

.question__cloud02 {
  top: 100px;
  left: -230px;

  animation: cloudFloatRight 22s ease-in-out infinite;
}

/* heroの雲03 */

.hero__cloud03 {
  top: 700px;
  right: -37px;

  animation: cloudFloatLeft 20s ease-in-out infinite;
}

/* questionの雲03 */

.question__cloud03 {
  top: 250px;
  right: -140px;

  animation: cloudFloatLeft 20s ease-in-out infinite;
}

.question {
  position: relative;
  min-height: 760px;
  overflow: hidden;
}
/* =====================
   コンテンツ
===================== */

.question-inner {
  position: relative;
  z-index: 2;

  width: calc(100% - 40px);

  margin: 0 auto;
  padding: 120px var(--side-padding) 0;
}

/* =====================
   質問文
===================== */

.question-text {
  text-align: left;
  color: #fff;

  font-size: 1.05rem;
  line-height: 1.7;

  margin-bottom: 48px;
}

/* =====================
   選択肢
===================== */

.choice-area {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.button-option {
  width: 100%;
  height: 96px;

  display: flex;
  justify-content: center;
  align-items: center;

  padding: 24px;

  border: none;
  border-radius: 18px;

  background: #ffffff;
  color: #333;

  font-size: 0.875rem;
  line-height: 1.5;
  text-align: center;

  cursor: pointer;

  transition: 0.2s;
}

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

/* =========================
   ANSWER
========================= */

.answer {
  position: relative;

  width: 100%;
  overflow: hidden;

  padding: 120px 0;

  background: linear-gradient(
    180deg,
    #5c7fb9 0%,
    #466393 4.81%,
    #314870 15.38%,
    #223657 30.77%,
    #12223c 57.17%
  );
}

.answer__background {
  position: absolute;

  top: 0;
  left: 50%;

  width: 120%;
  height: 100%;

  object-fit: cover;

  transform: translateX(-50%);

  z-index: 0;

  pointer-events: none;
}

.answer__bg {
  position: absolute;

  top: 0;
  left: 50%;

  width: 419px;
  height: auto;

  transform: translateX(-50%);

  z-index: 1;
  pointer-events: none;
}

.answer__contents {
  position: relative;
  z-index: 2;

  display: flex;
  flex-direction: column;
  gap: 180px;
}

.answer-block {
  position: relative;

  width: 100%;
  height: 852px;

  padding: 0 53px;

  overflow: hidden;
}

.answer-block__decoration {
  position: absolute;

  top: 175px;
  left: -10%;

  width: 115%;
  height: auto;

  z-index: 1;

  pointer-events: none;
}

.answer-block__character {
  position: absolute;

  top: 50%;
  left: 50%;

  width: 220px;
  height: auto;

  transform: translate(-50%, -50%);

  animation: answerFloat 6s ease-in-out infinite;

  z-index: 4;
}

/* 01 */

.answer01 .answer-block__character {
  width: 300px;

  animation: answerFloatRotate 12s ease-in-out infinite;
}

/* 02 */

.answer02 .answer-block__character {
  width: 400px;
}

/* 03 */

.answer03 .answer-block__character {
  width: 180px;
}

.answer-block__info {
  position: absolute;

  top: 10px;
  left: 53px;
  right: 53px;

  z-index: 5;
}

.answer-block__text {
  font-size: 0.875rem;
  line-height: 1.8;
  color: #fff;
  letter-spacing: 0.04em;
}

.answer-block__number {
  color: #fff;
  font-size: 3rem;
  font-weight: 300;

  line-height: 1;
  text-align: center;

  margin-bottom: 24px;
}

.answer-block {
  min-width: 100%;
  scroll-snap-align: start;
}

.suggestion {
  position: absolute;

  left: 0;
  right: 0;
  bottom: 116px;

  z-index: 5;

  width: 100%;
  max-width: 280px;

  margin: 0 auto;

  display: flex;
  flex-direction: column;
  align-items: center;
}

.suggestion__label {
  color: #fff;

  font-size: 0.875rem;

  margin-bottom: 10px;
}

.suggestion-list {
  display: flex;

  gap: 16px;

  width: max-content;

  padding: 0;

  list-style: none;
}

.suggestion-list li {
  list-style: none;
}

.suggestion-btn {
  display: flex;

  justify-content: center;
  align-items: center;

  text-align: center;

  gap: 12px;

  width: 140px;
  height: 140px;

  flex-shrink: 0;

  padding: 14px 18px;

  border: none;

  background: #394c6ba6;

  font-size: 0.875rem;
  color: #fff;
  backdrop-filter: blur(1px);
}

.suggestion__tap {
  margin-top: 15px;

  color: #fff;

  font-size: 0.75rem;
}

.suggestion-scroll {
  width: 100%;

  overflow-x: auto;
  overflow-y: hidden;

  scrollbar-width: none;

  -webkit-overflow-scrolling: touch;
}

.suggestion-scroll::-webkit-scrollbar {
  display: none;
}

/* =========================
   MESSAGE
========================= */

.message {
  width: 100%;

  /* footer 32px を除いた残りを使用 */
  min-height: calc(100vh - 32px);

  background: #12223c;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 40px 24px;
}

.message__inner {
  width: 100%;
}

.message__inner p {
  color: #ffffff;

  text-align: left;

  font-size: 0.875rem;
  line-height: 1.7;

  letter-spacing: 0.04em;
}

/* =========================
   FOOTER
========================= */

.footer {
  width: 100%;
  height: 32px;

  background: #0b1627;

  display: flex;
  align-items: center;
  justify-content: center;
}

.footer p {
  color: #ffffff;

  font-size: 0.6rem;
  line-height: 1;
}

/* =========================
   SCREEN DARK
========================= */

.screen-dark {
  position: fixed;

  inset: 0;

  background: rgba(0, 0, 0, 1);

  opacity: 0;
  pointer-events: none;

  transition: opacity 3s ease;

  z-index: 9998;
}

/* 暗転ON */
.screen-dark.is-active {
  opacity: 1;
}

/* =========================
   CURTAIN
========================= */

.curtain {
  position: fixed;

  top: 0;
  left: 50%;

  transform: translateX(-50%);

  width: 100%;
  max-width: 393px;
  height: 100vh;

  z-index: 5000;

  pointer-events: none;

  overflow: hidden;
}

.curtain-open,
.curtain-closing,
.curtain-closed {
  opacity: 0;

  transition: opacity 0.8s ease;
}

.curtain-open.is-show,
.curtain-closing.is-show,
.curtain-closed.is-show {
  opacity: 1;
}

/* =========================
   CURTAIN IMAGE
========================= */

.curtain__left,
.curtain__right,
.curtain__closing-left,
.curtain__closing-right {
  width: 55%;
  height: 100%;

  object-fit: contain;
  position: absolute;
  transition: opacity 1.2s ease;
}
.curtain__closed {
  position: absolute;

  top: 0;

  display: block;

  height: 100%;

  object-fit: cover;
}

/* 左カーテン */
.curtain__left {
  left: -18%;
}

/* 右カーテン */

.curtain__right {
  right: -18%;
}

/* 閉じかけ左カーテン */
.curtain__closing-left {
  left: -12%;
}

/* 閉じかけ右カーテン */
.curtain__closing-right {
  right: -12%;
}

/* 閉じたカーテン */
.curtain__closed {
  position: absolute;

  top: 0;
  left: 0;

  width: 105%;
  height: 105%;

  object-fit: cover;
}
/* =========================
   SLEEP EFFECT
========================= */

.page {
  transition:
    filter 3s ease,
    transform 3s ease,
    opacity 3s ease;
}

/* 眠り演出 */

.page.is-sleeping {
  filter: blur(0.6px);
}

/* =========================
   FLOAT ANIMATION
========================= */

@keyframes floatTop {
  0% {
    transform: translateX(-50%) translateY(0);
  }

  50% {
    transform: translateX(-50%) translateY(-12px);
  }

  100% {
    transform: translateX(-50%) translateY(0);
  }
}

@keyframes floatBottom {
  0% {
    transform: translateX(-50%) rotate(0deg) translateY(0);
  }

  50% {
    transform: translateX(-50%) rotate(0deg) translateY(-12px);
  }

  100% {
    transform: translateX(-50%) rotate(0deg) translateY(0);
  }
}

@keyframes answerFloat {
  0% {
    transform: translate(-50%, -50%) translateY(0);
  }

  50% {
    transform: translate(-50%, -50%) translateY(-4px);
  }

  100% {
    transform: translate(-50%, -50%) translateY(0);
  }
}

@keyframes answerFloatRotate {
  0% {
    transform: translate(-50%, -50%) translateY(0) rotate(0deg);
  }

  25% {
    transform: translate(-50%, -50%) translateY(-2px) rotate(4deg);
  }

  50% {
    transform: translate(-50%, -50%) translateY(-4px) rotate(0deg);
  }

  75% {
    transform: translate(-50%, -50%) translateY(-2px) rotate(-4deg);
  }

  100% {
    transform: translate(-50%, -50%) translateY(0) rotate(0deg);
  }
}
/* =========================
   PC表示
========================= */

@media (min-width: 768px) {
  body {
    background: linear-gradient(
      180deg,
      #5c7fb9 0%,
      #466393 20%,
      #314870 40%,
      #223657 65%,
      #12223c 100%
    );

    display: flex;
    justify-content: center;
  }

  .page {
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.15);
  }
}

/* =========================
   CLOUD ANIMATION
========================= */

@keyframes cloudFloatLeft {
  0% {
    transform: translateX(0);
  }

  50% {
    transform: translateX(16px);
  }

  100% {
    transform: translateX(0);
  }
}

@keyframes cloudFloatRight {
  0% {
    transform: translateX(0);
  }

  50% {
    transform: translateX(-16px);
  }

  100% {
    transform: translateX(0);
  }
}
