* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { background: #0b0710; color: #f3eaff; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Noto Sans JP", sans-serif;
  min-height: 100vh; min-height: 100dvh;
  display: flex; justify-content: center;
}
.wrap {
  width: 100%; max-width: 480px;
  padding: 20px 16px calc(24px + env(safe-area-inset-bottom));
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px;
  position: relative;
}
.head { font-size: 15px; font-weight: 700; letter-spacing: .05em; opacity: .9; }

/* プレイヤー */
.player {
  position: relative; width: 100%; aspect-ratio: 1 / 1;
  border-radius: 16px; overflow: hidden; background: #000;
  box-shadow: 0 0 40px rgba(190, 80, 255, .35);
}
.player video { width: 100%; height: 100%; object-fit: cover; display: block; }
.play {
  position: absolute; inset: 0; margin: auto;
  width: 88px; height: 88px; border-radius: 50%;
  border: 3px solid rgba(255,255,255,.9);
  background: rgba(20, 0, 40, .55); backdrop-filter: blur(4px);
  cursor: pointer; animation: pulse 1.6s ease-in-out infinite;
}
.play-icon {
  display: block; width: 0; height: 0; margin-left: 32px;
  border-style: solid; border-width: 17px 0 17px 28px;
  border-color: transparent transparent transparent #fff;
}
.player.playing .play, .player.done .play { display: none; }
.bar { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: rgba(255,255,255,.15); }
.bar-fill { height: 100%; width: 0; background: linear-gradient(90deg, #c26bff, #ff5fa2); }

@keyframes pulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255,255,255,.45); }
  50% { transform: scale(1.06); box-shadow: 0 0 0 14px rgba(255,255,255,0); }
}

/* 続きボタン */
.cta-area { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 10px; animation: rise .45s ease-out; }
.cta-area[hidden] { display: none; }
.cta {
  width: 100%; display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 20px 16px; border-radius: 999px;
  background: linear-gradient(90deg, #a845ff, #ff4f9a);
  color: #fff; font-size: 20px; font-weight: 800; text-decoration: none;
  box-shadow: 0 8px 28px rgba(255, 79, 154, .45);
  animation: pulse-cta 1.4s ease-in-out infinite;
}
.cta-sub { font-size: 13px; opacity: .8; }
.replay { background: none; border: none; color: #cdb6ff; font-size: 13px; text-decoration: underline; cursor: pointer; padding: 6px; }
@keyframes pulse-cta { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.04); } }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

.note { position: absolute; left: 0; right: 0; bottom: calc(14px + env(safe-area-inset-bottom)); text-align: center; font-size: 11px; opacity: .5; }

/* 確認ポップ */
.modal {
  position: fixed; inset: 0; z-index: 10;
  display: flex; align-items: center; justify-content: center; padding: 24px;
  background: rgba(0,0,0,.7); backdrop-filter: blur(3px);
}
.modal[hidden] { display: none; }
.modal-box { width: 100%; max-width: 340px; animation: rise .25s ease-out; }
.m-ok {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  width: 100%; padding: 16px 20px; border: none; border-radius: 999px; cursor: pointer; outline: none;
  color: #fff; background: linear-gradient(90deg, #a845ff, #ff4f9a);
  box-shadow: 0 8px 28px rgba(255, 79, 154, .45);
}
.m-ok:disabled { opacity: .7; cursor: wait; }
.m-ok-main { font-size: 20px; font-weight: 800; letter-spacing: .05em; }
.m-ok-note { font-size: 12px; font-weight: 700; opacity: .9; }
.m-ok-note:empty { display: none; }
