/* =============================================================
 * cv_improvements_v7.css (2026-05-08)
 * KPI ギャップ解消 第7弾。
 *
 * 背景 (tasks/daily_report_2026-05-08_opcon_lp.md):
 *   - 平均スクロール深度 16.71% (LP /lp/webroot/, 直近30日)
 *   - レイジクリック: mv-trust-strip GW特価 4件 / h1見出し 2件
 *   - LP→決済完了 CVR 0.054% (KPI 10% 比 -9.95pt)
 *   - cta_click/PV ≒ 14.1% (KPI 40% 比 -25.9pt)
 *   - デッドクリック改善は v3〜v6 の効果で 130/月 → 1〜3/日へ低下中
 *
 * 主な追加:
 *   1. .lp-desktop-sticky-cta : デスクトップ専用フローティングCTA
 *   2. .mv-title.is-rescuing  : h1 レイジクリック検知時のハイライト演出
 *   3. .lp-cta-pulse          : 8秒非操作時の主CTAパルスアニメ
 *   4. .lp-scroll-milestone   : スクロール深度 30%/60%/90% 時のミニ通知
 *   5. .mv-trial-reassure-v7  : 4点訴求 (クレカ不要 / 1分で開始 / 自動課金なし / いつでも本登録)
 *
 * 既存スタイルとの上書きは最小化し、すべて新規クラスで追加。
 * ============================================================= */

/* ---------- 1. デスクトップ Sticky CTA ---------- */
.lp-desktop-sticky-cta {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 1100;
  display: none; /* JS で 1280px 以上 + ヒーロー外時に表示 */
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  background: linear-gradient(135deg, #16a34a 0%, #059669 100%);
  color: #fff;
  border-radius: 999px;
  box-shadow: 0 12px 28px rgba(15, 99, 50, 0.32);
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 0.04em;
  text-decoration: none;
  transition: transform .18s ease, box-shadow .18s ease, opacity .18s ease;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
}

.lp-desktop-sticky-cta.is-visible {
  display: inline-flex;
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.lp-desktop-sticky-cta:hover,
.lp-desktop-sticky-cta:focus {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 16px 32px rgba(15, 99, 50, 0.4);
}

.lp-desktop-sticky-cta .lp-desktop-sticky-cta__icon {
  font-size: 18px;
  line-height: 1;
}

.lp-desktop-sticky-cta .lp-desktop-sticky-cta__sub {
  display: block;
  font-size: 11px;
  font-weight: 600;
  opacity: 0.95;
  margin-top: 2px;
  letter-spacing: 0.02em;
}

@media (max-width: 1279.98px) {
  .lp-desktop-sticky-cta { display: none !important; }
}

/* タブレット縦 + モバイルでは fixed-cta (既存) を尊重 */
@media (max-width: 768px) {
  .lp-desktop-sticky-cta { display: none !important; }
}

/* ---------- 2. h1 レイジクリック救出 ---------- */
.mv-title.is-rescuing {
  position: relative;
}

.mv-title.is-rescuing::after {
  content: "↓ クリックは下のボタンから ↓";
  position: absolute;
  left: 50%;
  bottom: -28px;
  transform: translateX(-50%);
  background: #fff7d6;
  color: #b45309;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid #facc15;
  box-shadow: 0 6px 14px rgba(180, 83, 9, 0.18);
  white-space: nowrap;
  pointer-events: none;
  animation: lp-rescue-fade 4.2s ease both;
  z-index: 5;
}

@keyframes lp-rescue-fade {
  0%   { opacity: 0; transform: translate(-50%, -8px); }
  10%  { opacity: 1; transform: translate(-50%, 0); }
  85%  { opacity: 1; transform: translate(-50%, 0); }
  100% { opacity: 0; transform: translate(-50%, 4px); }
}

/* ---------- 3. CTA pulse (8秒非操作時) ---------- */
@keyframes lp-cta-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.55); transform: scale(1); }
  60%  { box-shadow: 0 0 0 18px rgba(22, 163, 74, 0); transform: scale(1.025); }
  100% { box-shadow: 0 0 0 0 rgba(22, 163, 74, 0); transform: scale(1); }
}

.lp-cta-pulse {
  animation: lp-cta-pulse 1.6s ease-out 1;
  border-radius: inherit;
}

/* btn-trial / btn-green は <div> + <a> 構造のため、外側 <div> に当てる */
.btn.btn-trial.lp-cta-pulse,
.btn.btn-green.lp-cta-pulse {
  border-radius: 999px;
}

/* ---------- 4. Scroll milestone toast ---------- */
.lp-scroll-milestone-toast {
  position: fixed;
  left: 50%;
  /* 2026-05-29 fix: bottom 88px だと .fixed-cta (高さ ~80px + iOS safe-area)
     と縦に重なっていた。fixed-cta の上にクリアランス 16px を残せるよう、
     env(safe-area-inset-bottom) + fixed-cta 全高 + 余白を確保する。 */
  bottom: calc(env(safe-area-inset-bottom, 0px) + 120px);
  transform: translateX(-50%) translateY(20px);
  z-index: 1080;
  padding: 8px 16px;
  background: rgba(15, 23, 42, 0.94);
  color: #f1f5f9;
  font-size: 13px;
  font-weight: 700;
  border-radius: 999px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.32);
  opacity: 0;
  transition: opacity .35s ease, transform .35s ease;
  pointer-events: none;
  letter-spacing: 0.04em;
}

.lp-scroll-milestone-toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.lp-scroll-milestone-toast strong {
  color: #fde047;
  font-weight: 900;
  margin-right: 6px;
}

/* ---------- 5. mv-trial-reassure v7 (4点訴求拡張) ---------- */
.mv-trial-reassure.is-v7 {
  flex-direction: row;
  flex-wrap: wrap;
  gap: 4px 12px;
  padding: 6px 14px;
  font-size: 12.5px;
  line-height: 1.45;
}

.mv-trial-reassure.is-v7 .mv-trial-reassure__item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.mv-trial-reassure.is-v7 .mv-trial-reassure__item::before {
  content: "✓";
  color: #16a34a;
  font-weight: 900;
}

@media (max-width: 480px) {
  .mv-trial-reassure.is-v7 {
    font-size: 11.5px;
    padding: 6px 12px;
    gap: 2px 10px;
  }
}

/* ---------- 6. smooth scroll が JS なしでも効くように補助 ---------- */
html.lp-smooth-scroll {
  scroll-behavior: smooth;
  scroll-padding-top: 80px; /* ヘッダ余白 */
}

/* prefers-reduced-motion を尊重 */
@media (prefers-reduced-motion: reduce) {
  html.lp-smooth-scroll {
    scroll-behavior: auto;
    scroll-padding-top: 0;
  }

  .mv-title.is-rescuing::after,
  .lp-cta-pulse,
  .lp-scroll-milestone-toast,
  .lp-desktop-sticky-cta { animation: none !important; transition: none !important; }
}
