@charset "utf-8";


body{
  margin: 0;
  padding: 0;

  background-color: black;
  min-height: 100vh;
  display: flex;
  justify-content: center; /* 横中央寄せ */
  z-index: 0;
}

.container {
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  padding: 0;       /* 横の余白は好みで調整 */
  /* box-sizing: border-box; */
  position: relative;

}

@media (max-width: 640px) {
  .container {
    max-width: 100%;
  }
}


/* top */

.top{
  width: 100%;
  /* height: 130px; */
  position: relative;
  /* background-color: red; */

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

  margin-top: 30px;
}


.top-title{
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%
}
.top-title > img{
  width: 70%;
  height: auto;
  scale: 1.2;
}


/* play */

.play{
  background-color: rgba(0, 0, 0, 0.7);

  margin: 50px 0;
  padding: 50px 1rem;

  position: relative;
}
.play::before,
.play::after{
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: rgba(255, 255, 255, 1.0);
}
.play::before{
  top: 0;
  box-shadow: 0 4px rgba(255, 255, 255, 1.0);
}
.play::after{
  bottom: 0;
  box-shadow: 0 -4px rgba(255, 255, 255, 1.0);
}





/* タブボタンのデザイン */
.tab-buttons {
  display: flex;
  justify-content: center;
  margin-bottom: 8px;
  gap: 5px;
}

.tab-btn {
  padding: 8px 16px;
  border: none;
  background-color: #a4a4a47d;
  color: white;
  cursor: pointer;
  font-weight: bold;
  border-radius: 5px;
  transition: background-color 0.3s;

  font-family:"Times New Roman",serif;
  font-weight: 1000;
  font-size: 12px;
}

.tab-btn.active {
  background-color: white;
  color: black;
}





/* タブコンテンツの共通設定 */
.tab-contents {
  padding: 20px;
  /* border: 1px solid white; */
  border-radius: 10px;

  background-color: white;
  color: black;
  
  
}

/* 非表示タブ */
.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}


/* step1 */

/* サムネイル枠 */
.story-video-container {
  position: relative;
  width: 300px;
  /* aspect-ratio: 9/16; */
  height: 170px;

  background-color: black;
  border: 2px solid white;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  margin: 20px auto;
}

/* サムネイル内の文字 */
.video-thumbnail-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);

  color: white;
  font-size: 24px;
  font-family: 'Times New Roman', Times, serif;
  font-weight: bold;
  z-index: 1;
}



.fs-btn{
  position: absolute;
  right: 30px;
  bottom: 30px;
  background: rgba(0,0,0,.6);
  color: #fff;
  border: 1px solid #fff3;
  border-radius: 10px;
  padding: 8px 12px;
  cursor: pointer;
}


/* モーダル */
.video-modal {
  display: none;
  position: fixed;
  z-index: 9999;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.85);
  justify-content: center;
  align-items: center;
}

/* モーダルの中身 */
.modal-content {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0;
}

/* モーダルの動画 */
.modal-content video {
  max-width: 90%;     /* 画面幅の90%以内 */
  max-height: 90vh; /* 画面高さの90%以内 */
  width: auto;
  height: auto;
  border-radius: 12px;
  object-fit: contain;
}

/* 閉じるボタン */
.close-btn {
  position: absolute;
  top: 30px;
  right: 30px;
  background-color: black;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 6px rgb(255, 255, 255, 0.1);
  padding: 0;
}
.close-btn svg {
  width: 25px;
  height: 25px;
}

/* --- 不正解オーバーレイ調整 --- */
.feedback-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0,0,0,0.55);
  display: grid;
  place-items: center;
  animation: overlayFade 2s ease;
}
.feedback-overlay[hidden]{
  display: none !important;
}


.feedback-overlay__inner {
  text-align: center;
  color: #6bb6ff;       /* 青 */
}

.feedback-x {
  display: block;
  margin: 0 auto 16px;  /* 下に余白を追加 */
  width: 200px;         /* ←サイズを大きく */
  height: 200px;
  color: #6bb6ff;
}

.feedback-text {
  margin: 0;
  font-size: clamp(32px, 6vw, 56px); /* 大きくする */
  font-weight: 900;
  font-family:"Times New Roman",serif;
  letter-spacing: .2em;
  color: #6bb6ff;       /* 青 */
}

@keyframes overlayFade {
  0%   { opacity: 0; }
  10%  { opacity: 1; }
  80%  { opacity: 1; }
  100% { opacity: 0; }
}


/* step1-question */

/* step1-question を hidden 属性で制御 */
/* .step1-question[hidden]{
  display: none !important;
} */

/* hidden属性で確実に消す */
[hidden] { display: none !important; }


/* 縦並びの謎画像 */
.riddle-images{
  max-width: 560px;     
  margin: 0px auto 0px;    /* 中央寄せ */
  display: flex;
  flex-direction: column;
  gap: 5px;                 /* 画像間の余白 */
  /* background-color: red; */
}

.riddle-img{
  width: 100%;
  margin: 5px auto 5px;    /* 中央寄せ */
  border: 1px solid #e6e6e6; /* 白背景に馴染む淡い枠 */
  border-radius: 12px;
  overflow: hidden;
  background: #fafafa;
  box-shadow: 0 2px 10px rgba(0,0,0,.06);
}

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


/* === 画像モーダル === */
.image-modal[hidden]{ display: none; }
.image-modal{
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0,0,0,0.85);
  display: flex;
  justify-content: center;
  align-items: center;
}

.image-modal__dialog{
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
}

.image-modal__dialog img{
  max-width: 100%;
  max-height: 90vh;
  border-radius: 12px;
  object-fit: contain;
}

.image-modal__close{
  position: absolute;
  top: -50px;
  right: 0px;
  width: 40px;
  height: 40px;
  border: none;
  background: rgba(0,0,0,0.6);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
}
.image-modal__close:hover{ filter: brightness(1.2); }

/* 画像モーダル：保存ボタン */
.image-modal__save{
  position: absolute;
  top: 12px;
  right: 60px;                 /* ×ボタンの左に配置（×が right:12px 前提） */
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: rgba(0,0,0,.6);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.image-modal__save:hover{ filter: brightness(1.15); }
.image-modal__save:active{ transform: translateY(1px); }

/* 念のため、×ボタン位置も統一（参考：既存が -40px なら内側に） */
.image-modal__close{
  position: absolute;
  top: 12px;
  right: 12px;
  width: 44px;
  height: 44px;
  border: none;
  background: rgba(0,0,0,.6);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  z-index: 2;
}




/* ===== ボタンの暗号 ===== */
.cipher{ 
  max-width: 560px; margin: 20px auto 24px; 
  padding: 16px 12px; border-radius: 14px;
  /* background: linear-gradient(180deg,#0c1118,#0b0f16); */
  border: 1px solid #223048;
}
.cipher-title{
  margin: 0 0 10px; padding: 0 6px;
  color: black; font-weight: 800; letter-spacing: .08em; font-size: 14px;
  font-family: 'Times New Roman', Times, serif;
}

/* 3x4 グリッド（正方形ボタン） */
.cipher-grid{
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  
}
.cipher-btn{
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  background: #0f1520 center / 70% no-repeat;
  border: 1px solid #2b3a54;
  box-shadow: 0 6px 16px rgba(0,0,0,.25) inset, 0 2px 10px rgba(0,0,0,.2);
  cursor: pointer;
  transition: transform .08s ease, filter .2s ease;
}
.cipher-btn:hover{ filter: brightness(1.08); }
.cipher-btn:active{ transform: translateY(1px); }
.cipher-btn[aria-disabled="true"]{ cursor: default; filter: saturate(.2) brightness(.8); }

/* 番号（押下順） */
.cipher-num{
  position: absolute; inset: 0;
  display: grid; place-items: center;
  font-weight: 900; font-size: clamp(24px, 6vw, 42px);
  color: #eaf2ff; text-shadow: 0 0 18px rgba(183,209,255,.45);
}

/* リセットボタン */
.cipher-actions{ margin-top: 12px; text-align: right; }
.cipher-reset{
  height: 40px; padding: 0 16px; border-radius: 10px; border: none;
  background: #56c0ff; color: #fff; font-weight: 700; letter-spacing: .06em;
  cursor: pointer; box-shadow: 0 6px 16px rgba(86,192,255,.25);
  font-family: 'Times New Roman', Times, serif;
}
.cipher-reset:hover{ filter: brightness(1.05); }
.cipher-reset:active{ transform: translateY(1px); }

/* 画面全体フラッシュ */
.cipher-flash[hidden]{ display: none !important; }
.cipher-flash{
  position: fixed; inset: 0; z-index: 10010;
  background: rgba(0,0,0,.7); display: grid; place-items: center;
  animation: cipherFade 3s ease;
}
.cipher-flash__text{
  margin: 0; font-weight: 900; letter-spacing: .24em;
  font-size: clamp(28px, 7vw, 64px); color: #8ec8ff;
  text-shadow: 0 0 24px rgba(142,200,255,.6);
  font-family: 'Times New Roman', Times, serif;
}

/* 背景イラストの割り当て（お好みでパスを調整） */
.icon-eye     { background-image: url('../image/cipher/eye.webp'); }
.icon-rhino   { background-image: url('../image/cipher/rhino.webp'); }
.icon-snake   { background-image: url('../image/cipher/snake.webp'); }
.icon-fire    { background-image: url('../image/cipher/fire.webp'); }
.icon-octopus { background-image: url('../image/cipher/octopus.webp'); }
.icon-shrimp  { background-image: url('../image/cipher/shrimp.webp'); }
.icon-tree    { background-image: url('../image/cipher/tree.webp'); }
.icon-hand    { background-image: url('../image/cipher/hand.webp'); }
.icon-elephant{ background-image: url('../image/cipher/elephant.webp'); }
.icon-rose    { background-image: url('../image/cipher/rose.webp'); }
.icon-door    { background-image: url('../image/cipher/door.webp'); }
.icon-tooth   { background-image: url('../image/cipher/teeth.webp'); }

/* 押したらイラストを薄く（数字を強調） */
.cipher-btn.used{ background-size: 0%; }

/* フェード（3秒で消える雰囲気） */
@keyframes cipherFade{
  0%{ opacity: 0; } 10%{ opacity: 1; } 85%{ opacity: 1; } 100%{ opacity: 0; }
}






/* step1-answer */

/* 中央寄せ＆幅を揃える */
.step-answer{
  max-width: 560px;         /* 好みで 480〜640px */
  margin: 24px auto;        /* 画面中央寄せ（横） */
  text-align: center;
}

/* 入力と送信ボタンの高さを統一 */
:root{ --ctrl-h: 48px; }    /* 高さの基準。必要なら 52px などに */

.answer-row{
  display: flex;
  align-items: stretch;
  gap: 10px;
}

.answer-input{
  flex: 1 1 auto;
  height: var(--ctrl-h);
  padding: 0 14px;
  border-radius: 10px;
  background: white;
  color: gray;
  border: 1px solid #24324a;
  box-sizing: border-box;
  font-weight: 600;
  font-size: 1rem;
  font-family: 'Times New Roman', Times, serif;
}
.answer-input::placeholder{ color:gray; }
.answer-input:focus{
  outline: none;
  border-color: #6ea7ff;
  box-shadow: 0 0 0 3px #6ea7ff33;
}

/* 送信ボタン：角丸・水色・白文字 */
.answer-send{
  height: var(--ctrl-h);
  padding: 0 24px;
  border-radius: 10px;
  border: none;
  background: #56c0ff;            /* 水色 */
  color: #fff;                     /* 文字は白 */
  font-weight: 600;
  font-family: 'Times New Roman', Times, serif;
  letter-spacing:0em;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(86,192,255,.25);
}
.answer-send:hover{ filter: brightness(1.05); }
.answer-send:active{ transform: translateY(1px); }

/* 「ヒントを見る」を同デザインのボタン化 */
.answer-help{ margin-top: 10px; }
.hint-link{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: var(--ctrl-h);
  padding: 0 16px;
  border-radius: 12px;
  background: gray;            /* 送信ボタンと同色 */
  color: #fff;                     /* 文字は白 */
  text-decoration: none;
  font-weight: 600;
  font-family: 'Times New Roman', Times, serif;
  letter-spacing: .06em;
  border: none;
  box-shadow: 0 6px 16px rgba(86,192,255,.25);
}
.hint-link:hover{ filter: brightness(1.05); }
.hint-link:active{ transform: translateY(1px); }




/* background */

.background{
  position: fixed;
  top: 0;
  /* left: 50%;                  */
  width: 640px;             
  height: 100%;
  /* transform: translateX(-50%);  */
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  z-index: -1;
  pointer-events: none;
}

.wedding-background{
  background-image: url('../../../assets/image/background/09_wedding_background.webp');
  /* background-color: #343434; */
}
