/* =========================
  Base
========================= */
*{
  margin:0;
  padding:0;
  box-sizing:border-box;
}

html,body{
  width:100%;
  height:100%;
  background:#000;
  font-family:-apple-system,BlinkMacSystemFont,"Helvetica Neue",sans-serif;
}

/* =========================
  App / Stage (横幅制御の核)
========================= */
.app{
  position:relative;
  width:100%;
  height:100svh;
  overflow:hidden;
}

.stage{
  position:absolute;
  inset:0;
  margin:0 auto;
  width:100%;
  max-width:768px; /* PCでもここから広がらない */
  overflow:hidden;
  background:#000;
}

/* =========================
  Background Video
========================= */
.bg-wrap{
  position:absolute;
  inset:0;
  z-index:0;
  transition:opacity .45s ease;
}

.bg-wrap.is-hide{
  opacity:0;
}

.bg-video{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

.bg-dim{
  position:absolute;
  inset:0;
  background:rgba(0,0,0,.5); /* ← ここで暗さ調整 */
  z-index:1;
  pointer-events:none;
  transition:opacity .35s ease;
}

/* 明るさ戻す */
.bg-dim.is-off{
  opacity:0;
}

/* 選択後の背景（動画の上に固定） */
.picked-bg{
  position:absolute;
  inset:0;
  z-index:1;
  pointer-events:none;
  opacity:0;
  transition:opacity .35s ease;
}

.picked-bg.is-on{
  opacity:1;
}

.picked-bg img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

/* =========================
  Foreground Content
========================= */
.content{
  position:relative;
  z-index:3;
  width:100%;
  height:100%;
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  padding:20px 16px;
  padding-bottom:300px; /* ← フッター分の逃げ */
}

/* Top */
.top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px;
  margin-left:3%;
  position: relative;
  z-index: 10000;
}

.top-text{
  color:#fff;
  text-shadow: 3px 3px 3px rgba(0, 0, 0, 0.65);
  font-weight:800;
  font-size:28px;
  line-height:1.1;
}

.logo{
  width:160px;
  height:auto;
  display:block;
  margin-left:-10%;
}

/* Cards */
.cards{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:16px;
  align-items:center;
  justify-items:center;
}

.card{
  width:100%;
  max-width:180px;
  aspect-ratio:3 / 4;
  border: 1;
  border-color:#ddd;
  background:none;
  padding:0;
  cursor:pointer;
}

.card img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

/* Bottom */
.bottom{
  padding-top:50px;
  text-align:center;
}

.question{
  color:#fff;
  font-weight:800;
  font-size:26px;
}

.question2{
  color:#ff0;
  font-weight:800;
  font-size:18px;
}
/* =========================
  Chat UI (カード選択後に表示)
========================= */
.chat-area{
  position:absolute;
  inset:0;
  z-index:5;

  display:flex;
  flex-direction:column;
  align-items:center;

  padding-left:16px;
  padding-right:16px;
  padding-top:40vh; /* 画面中央やや下 */

  pointer-events:none;
}

.bubble{
  pointer-events:auto;

  width:100%;
  max-width:520px;

  background:rgba(22,22,22,.92);
  color:#fff;

  border-radius:16px;
  padding:18px 20px;

  font-size:22px;
  line-height:1.6;

  box-shadow:0 10px 28px rgba(0,0,0,.35);
}

.caret{
  margin-left:2px;
  opacity:.9;
  animation:blink 1s infinite;
}

/* =========================
  Choices（チャット欄の直下に表示）
========================= */
.choices{
  pointer-events:auto;

  margin-top:14px;        /* ← チャットのすぐ下 */
  width:100%;
  max-width:520px;

  display:flex;
  flex-wrap:wrap;
  gap:12px;
  justify-content:center;

  padding-bottom:2px;
}

.choice-btn{
  min-height:52px;

  padding:14px 20px;

  border-radius:999px;
  border:1px solid rgba(255,255,255,.18);

  background:rgba(22,22,22,.92);
  color:#fff;

  font-size:20px;
  cursor:pointer;

  -webkit-tap-highlight-color: transparent;
}

.choice-btn:active{
  transform:scale(.98);
}

/* =========================
  Transition / Animation
========================= */
.fade{
  position:fixed;
  inset:0;
  z-index:7;
  background:#000;
  opacity:0;
  pointer-events:none;
  transition:opacity .35s ease;
}

.fade.is-on{
  opacity:.55;
}

@keyframes blink{
  0%,50%,100%{opacity:1;}
  25%,75%{opacity:0;}
}

/* =========================
  Selected Card Animation (clone)
========================= */
.card-clone{
  position:fixed;
  top:50%;
  left:50%;
  width:180px;
  aspect-ratio:3/4;
  transform:translate(-50%,-50%) rotateX(0deg) scale(1);
  transform-style:preserve-3d;
  transition:transform .55s cubic-bezier(.22,.61,.36,1);
  z-index:999;
}

.card-clone img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
  backface-visibility:hidden;
}

.card-clone.is-flip{
  transform:translate(-50%,-50%) rotateX(75deg) scale(1.05);
}

.card-clone.is-zoom{
  transform:translate(-50%,-50%) rotateX(0deg) scale(3.0);
}

/* =========================
  PC tweak
========================= */
@media (min-width:769px){
  .top-text{font-size:32px;}
  .question{font-size:30px;}
}

/* =========================
  Hide initial content after pick
========================= */
.content.is-hide{
  opacity:0;
  transition:opacity .25s ease;
  pointer-events:none;
}

/* =========================
  LP Footer（必ず表示）
========================= */
.lp-footer{
  position:absolute;
  left:0;
  right:0;
  bottom:0;
  z-index:4;
  text-align:center;
  color:#ccc;
  font-size:12px;
  padding:16px 8px 20px;
  opacity:.85;
}

.footer-links{
  margin-bottom:6px;
}

.footer-links a{
  color:#ccc;
  text-decoration:none;
}

.footer-links span{
  margin:0 6px;
}

.footer-copy{
  line-height:1.4;
}

/* 操作ロック中は一切触れなくする */
.is-locked{
  pointer-events:none;
}

/* フッター非表示 */
.lp-footer.is-hide{
  display:none;
}


/* =========================
  Policy Overlay
========================= */
.policy-overlay{
  position:fixed;
  inset:0;
  z-index:20000;
  background:rgba(0,0,0,.55);
  display:none;
  align-items:center;
  justify-content:center;
  padding:16px;
}

.policy-overlay.is-open{
  display:flex;
}

.policy-box{
  position:relative;
  width:100%;
  max-width:520px;
  max-height:80vh;
  background:#fff;
  border-radius:18px;
  padding:20px 18px;
  overflow-y:auto;
  box-sizing:border-box;
  font-size:14px;
  line-height:1.7;
}

.policy-close{
  position:absolute;
  top:8px;
  right:10px;
  border:none;
  background:none;
  font-size:22px;
  cursor:pointer;
}
