/* ============================================
   全部門展開向け 発表会スライド 専用スタイル
   （既存 slides.css を補完するアニメーション用）
   ============================================ */

/* ============================================
   16:9 固定アスペクト比（パワポ風レイアウト）
   ──────────────────────────────────────────────
   ブラウザサイズに関わらず 16:9 を維持。
   親要素は黒地で、中央に白いスライドを表示する。
   ============================================ */
body.intro-deck {
  background: #fff;
}
/* スライドは viewport いっぱいに広げる（フルスクリーン時の余白を解消）。
   コンテンツは padding と flex でアスペクト比に応じて自然にフィットする */
body.intro-deck .deck {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: #fff;
  overflow: hidden;
}

/* スライド内パディングを 16:9 想定で再調整（既存より少し詰めて、要素が画面いっぱい使えるよう） */
body.intro-deck .slide {
  padding: 4.5% 5%;
}

/* layout-text は上下中央寄せ（フルスクリーン時の下部空白を防ぐ）。
   コンテンツが画面より大きい場合は flex 仕様により上から始まる */
body.intro-deck .slide-body.layout-text {
  justify-content: center;
}

/* コンテンツ少なめで余白を強調したいスライドだけ gap を広く取る */
body.intro-deck .slide-body.layout-text.center-balanced {
  gap: 36px;
}

/* 見出しと本文の間に余裕を持たせる ＋ バッジとタイトルを中央揃えに */
body.intro-deck .slide-head {
  margin-bottom: 32px;
  align-items: center;
}

/* slide-body 全体の要素間 gap を広げる */
body.intro-deck .slide-body {
  gap: 22px;
}

/* layout-split / layout-image は既存の center align のまま */

/* ページ番号 N/16 が QR と重なるので、 intro 版は左下へ移動 */
body.intro-deck .counter {
  right: auto;
  left: 18px;
}

/* ナビバーのフルスクリーンボタン */
.nav-bar .fs-btn {
  background: rgba(255,255,255,.10);
  color: #e2e8f0;
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 6px;
  padding: 2px 10px;
  font-size: 12px;
  cursor: pointer;
  margin: 0 4px;
  font-family: inherit;
}
.nav-bar .fs-btn:hover {
  background: rgba(255,255,255,.20);
}

/* ---- アクセスコーナー（全スライド右下：マスコット＋QR＋吹き出し） ---- */
.access-corner {
  position: absolute;
  right: 18px;
  bottom: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  z-index: 5;
  pointer-events: none;
}
/* 表紙では非表示 */
.slide.title-slide .access-corner { display: none; }

.access-bubble {
  background: #fff;
  border: 2px solid #f59e0b;
  color: #92400e;
  padding: 5px 14px;
  border-radius: 16px;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(0,0,0,.14);
  position: relative;
  line-height: 1.3;
  letter-spacing: 0.02em;
}
/* 吹き出ししっぽ（QR寄りに） */
.access-bubble::after {
  content: "";
  position: absolute;
  bottom: -7px;
  right: 20%;
  border-top: 7px solid #f59e0b;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
}
.access-bubble::before {
  content: "";
  position: absolute;
  bottom: -4px;
  right: 20%;
  border-top: 7px solid #fff;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  z-index: 1;
}

.access-set {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* マスコット（access-set 内に配置、元のサイズを維持） */
.slide-mascot {
  width: 86px;
  height: auto;
  opacity: 0.95;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,.16));
  animation: mascotBreath 4s ease-in-out infinite;
  transform-origin: center bottom;
}

/* QRコード（マスコットと同程度のサイズで揃える） */
.access-qr {
  width: 80px;
  height: 80px;
  background: #fff;
  padding: 4px;
  border: 2px solid #1a56db;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(26,86,219,.20);
}

@keyframes mascotBreath {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.06) rotate(-2deg); }
}
@media print {
  .slide-mascot { animation: none !important; transform: none !important; }
  .access-bubble { box-shadow: none; }
}
@media (prefers-reduced-motion: reduce) {
  .slide-mascot { animation: none !important; }
}

/* ---- 表紙：「が」を小さくしてメリハリ ---- */
.title-slide.intro .small-ga {
  font-size: 0.62em;
  opacity: 0.88;
  margin: 0 0.05em;
  display: inline-block;
}
/* 表紙では別途大きく表示するので非表示 */
.slide.title-slide .slide-mascot {
  display: none;
}

/* ============================================
   文字サイズの全体的な底上げ（資料として見やすく）
   既存 slides.css の値を intro 用に上書き
   ============================================ */
body.intro-deck .slide-head h2 {
  font-size: 38px;
  font-weight: 800;
}
body.intro-deck .step-no {
  font-size: 16px;
  padding: 5px 14px;
  /* バッジ幅をスライド間で統一（最長文字数「管理者 ①」「内製の強み」に合わせる） */
  min-width: 120px;
  text-align: center;
  box-sizing: border-box;
}
body.intro-deck .big-list {
  font-size: 25px;
  line-height: 1.9;
}
body.intro-deck .big-list li {
  padding: 9px 0 9px 44px;
}
body.intro-deck .big-list li::before {
  width: 32px; height: 32px; font-size: 16px; top: 10px;
}
body.intro-deck .numbered-list {
  font-size: 25px;
  line-height: 1.9;
}
body.intro-deck .callout {
  font-size: 19px;
  padding: 16px 24px;
  line-height: 1.65;
}
body.intro-deck .hl {
  background: linear-gradient(transparent 60%, #fde68a 60%);
}

/* 動機①：痛みカード */
body.intro-deck .pain-grid {
  gap: 22px;
}
body.intro-deck .pain-card {
  padding: 28px 30px;
  gap: 20px;
  min-height: 140px;
}
body.intro-deck .pain-card .pain-icon { font-size: 46px; }
body.intro-deck .pain-card h3 { font-size: 22px; margin-bottom: 8px; }
body.intro-deck .pain-card p { font-size: 17px; line-height: 1.7; }

/* 動機②：連鎖 */
body.intro-deck .chain {
  gap: 16px;
  margin: 18px 0 28px;
}
body.intro-deck .chain-step {
  font-size: 19px;
  min-width: 200px;
  padding: 16px 22px;
}
body.intro-deck .chain-arrow { font-size: 34px; }
body.intro-deck .chain-conclusion {
  font-size: 48px;
  margin-top: 12px;
}

/* Before/After */
body.intro-deck .ba-box {
  padding: 26px 28px;
  gap: 12px;
}
body.intro-deck .ba-box .ba-icon { font-size: 44px; }
body.intro-deck .ba-box h3 { font-size: 22px; }
body.intro-deck .ba-box ul { font-size: 18px; line-height: 1.85; }
body.intro-deck .ba-arrow { font-size: 56px; }

/* 5ポイント */
body.intro-deck .point-card { padding: 22px 14px; gap: 10px; }
body.intro-deck .point-card .point-icon { font-size: 46px; }
body.intro-deck .point-card h3 { font-size: 17px; line-height: 1.35; }
body.intro-deck .point-card p { font-size: 14px; line-height: 1.6; }

/* スライド7：ランキング画像下のデモ注釈 */
body.intro-deck .demo-note {
  font-size: 13px;
  color: #9ca3af;
  text-align: center;
  margin: 8px 0 0;
  line-height: 1.4;
  font-style: italic;
}

/* スライド7：集計カード画像（横長で大きめに表示） */
body.intro-deck .summary-cards-img {
  display: block;
  width: 100%;
  max-width: 1080px;
  height: auto;
  margin: 0 auto;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,.08);
}

/* スライド7：3カラムの大型カード（数値強調） */
body.intro-deck .point-grid-3 {
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
body.intro-deck .point-grid-3 .point-card {
  padding: 28px 18px;
  gap: 12px;
}
body.intro-deck .point-grid-3 .point-card .point-icon { font-size: 52px; }
body.intro-deck .point-grid-3 .point-card h3 { font-size: 18px; }
body.intro-deck .point-grid-3 .point-card p {
  font-size: 17px;
  white-space: nowrap;
}
body.intro-deck .point-grid-3 .point-card .countup {
  font-size: 28px;
}

/* 費用対効果 比較表 */
body.intro-deck .cost-compare {
  font-size: 20px;
}
body.intro-deck .cost-compare th,
body.intro-deck .cost-compare td {
  padding: 18px 22px;
}
body.intro-deck .cost-compare thead th {
  font-size: 22px;
}
body.intro-deck .cost-compare tbody th {
  font-size: 18px;
}
body.intro-deck .cost-compare .savings {
  font-size: 22px;
}

/* 内製の強み */
body.intro-deck .strength-list {
  font-size: 23px;
  line-height: 1.85;
}
body.intro-deck .strength-list li {
  padding: 12px 0 12px 48px;
}
body.intro-deck .strength-list li::before {
  width: 34px; height: 34px; font-size: 18px; top: 14px;
}

/* 強み1の具体例ノート（メール通知事例） */
body.intro-deck .example-note {
  margin-top: 10px;
  background: linear-gradient(135deg, #ecfdf5 0%, #f0fdf4 100%);
  border-left: 4px solid #10b981;
  border-radius: 8px;
  padding: 12px 18px;
  font-size: 17px;
  line-height: 1.7;
  color: #065f46;
  font-weight: 500;
}
body.intro-deck .example-note strong {
  color: #047857;
  font-weight: 700;
}
body.intro-deck .example-tag {
  display: inline-block;
  background: #10b981;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 4px;
  margin-right: 10px;
  letter-spacing: 0.04em;
}

/* 締めスライド：3 step + QR を横並びにするグリッド */
.closing-grid {
  display: grid;
  grid-template-columns: 1fr 200px;
  gap: 24px;
  align-items: center;
  margin: 12px 0 16px;
}
.qr-block {
  background: #fff;
  border: 3px solid #1a56db;
  border-radius: 14px;
  padding: 14px 16px;
  text-align: center;
  box-shadow: 0 6px 18px rgba(26,86,219,.18);
}
.qr-block .qr-label {
  font-size: 14px;
  font-weight: 700;
  color: #1a56db;
  margin-bottom: 8px;
  line-height: 1.3;
}
.qr-block .qr-image {
  width: 150px;
  height: 150px;
  display: block;
  margin: 0 auto;
  border-radius: 4px;
}
.qr-block .qr-url {
  margin-top: 6px;
  font-size: 13px;
  font-family: Consolas, "Courier New", monospace;
  color: #374151;
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* 導入ステップ */
body.intro-deck .step-flow {
  gap: 18px;
  margin: 0;
}
body.intro-deck .step-flow .step-item {
  padding: 22px 18px;
}
body.intro-deck .step-flow .step-num {
  width: 38px; height: 38px; line-height: 38px;
  font-size: 18px;
  margin-bottom: 12px;
}
body.intro-deck .step-flow .step-item h4 {
  font-size: 19px;
  margin-bottom: 6px;
}
body.intro-deck .step-flow .step-item p {
  font-size: 14px;
  line-height: 1.65;
}

/* CTA */
body.intro-deck .cta-button {
  font-size: 22px;
  padding: 18px 36px;
  gap: 12px;
}

/* 表紙 */
body.intro-deck .slide.title-slide h1 {
  font-size: 56px;
  line-height: 1.25;
}
body.intro-deck .slide.title-slide .subtitle {
  font-size: 24px;
}
body.intro-deck .slide.title-slide .meta {
  font-size: 16px;
}
body.intro-deck .slide.title-slide .mascot {
  height: 190px;
}

/* 各種inline-style指定 p (font-size:18px) の上書き
   ※ .chain-conclusion 等の特殊なフォントサイズ指定済みクラスは除外
   ※ layout-split の col 内にもある p を含めるため、 .slide-body 配下全てが対象 */
body.intro-deck .slide-body > p:not(.chain-conclusion):not(.callout):not(.cta-button) {
  font-size: 19px !important;
  line-height: 1.75;
}
/* col 内の inline-style font-size:18px の p も拡大 */
body.intro-deck .slide-body .col > p[style*="font-size:18px"],
body.intro-deck .slide-body .col > p[style*="font-size: 18px"] {
  font-size: 20px !important;
  line-height: 1.75;
}

/* スライド16 のmargin詰め（コンテンツ多いため） */
body.intro-deck .slide:last-of-type .step-flow { margin: 10px 0 14px; }

/* ---- 連鎖アニメ：active なスライド内の [data-anim] を順に表示 ---- */
.slide [data-anim] {
  opacity: 0;
  transform: translateY(14px);
}
.slide.active [data-anim] {
  animation: introFadeUp .55s cubic-bezier(.22,.61,.36,1) forwards;
}
.slide.active [data-anim="1"]  { animation-delay: .05s; }
.slide.active [data-anim="2"]  { animation-delay: .18s; }
.slide.active [data-anim="3"]  { animation-delay: .31s; }
.slide.active [data-anim="4"]  { animation-delay: .44s; }
.slide.active [data-anim="5"]  { animation-delay: .57s; }
.slide.active [data-anim="6"]  { animation-delay: .70s; }
.slide.active [data-anim="7"]  { animation-delay: .83s; }
.slide.active [data-anim="8"]  { animation-delay: .96s; }
.slide.active [data-anim="9"]  { animation-delay: 1.09s; }
.slide.active [data-anim="10"] { animation-delay: 1.22s; }

@keyframes introFadeUp {
  to { opacity: 1; transform: translateY(0); }
}

/* ---- ポップイン（カード・アイコン） ---- */
.slide [data-anim-pop] {
  opacity: 0;
  transform: scale(.85);
}
.slide.active [data-anim-pop] {
  animation: introPop .55s cubic-bezier(.34,1.56,.64,1) forwards;
}
.slide.active [data-anim-pop="1"] { animation-delay: .10s; }
.slide.active [data-anim-pop="2"] { animation-delay: .28s; }
.slide.active [data-anim-pop="3"] { animation-delay: .46s; }
.slide.active [data-anim-pop="4"] { animation-delay: .64s; }
.slide.active [data-anim-pop="5"] { animation-delay: .82s; }

@keyframes introPop {
  to { opacity: 1; transform: scale(1); }
}

/* ---- マスコットのふんわり浮遊 ---- */
.title-slide.intro .mascot {
  animation: introFloat 4s ease-in-out infinite;
}
@keyframes introFloat {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-10px); }
}

/* ---- カウントアップ用（HTMLにdata-target/JSで実数挿入） ---- */
.countup {
  font-variant-numeric: tabular-nums;
  font-weight: 800;
}

/* ---- スライド表紙のサブテキスト演出 ---- */
.title-slide.intro h1 {
  text-shadow: 0 4px 18px rgba(0,0,0,.25);
}
.title-slide.intro .subtitle {
  background: rgba(255,255,255,.15);
  display: inline-block;
  padding: 8px 24px;
  border-radius: 999px;
  backdrop-filter: blur(4px);
}

/* ---- 課題カード（スライド2「動機①」） ---- */
.pain-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  width: 100%;
}
.pain-card {
  background: #fff5f5;
  border-left: 5px solid #e11d48;
  border-radius: 10px;
  padding: 18px 22px;
  box-shadow: 0 4px 12px rgba(225,29,72,.10);
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.pain-card .pain-icon {
  font-size: 32px;
  flex-shrink: 0;
  line-height: 1;
}
.pain-card h3 {
  margin: 0 0 4px;
  font-size: 18px;
  color: #9f1239;
  font-weight: 700;
}
.pain-card p {
  margin: 0;
  font-size: 14px;
  color: #4b5563;
  line-height: 1.55;
}

/* ---- 担当者の声 吹き出し（スライド3） ---- */
.voice-bubbles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin: 4px 0 4px;
}
.voice-bubble {
  background: #fef3c7;
  border: 2px solid #f59e0b;
  border-radius: 18px;
  padding: 16px 20px;
  font-size: 19px;
  font-weight: 700;
  color: #78350f;
  text-align: center;
  line-height: 1.55;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 12px rgba(245,158,11,.18);
}
/* 吹き出しのしっぽ */
.voice-bubble::after {
  content: "";
  position: absolute;
  bottom: -12px;
  left: 50%;
  transform: translateX(-50%);
  border-top: 12px solid #f59e0b;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
}
.voice-bubble::before {
  content: "";
  position: absolute;
  bottom: -9px;
  left: 50%;
  transform: translateX(-50%);
  border-top: 12px solid #fef3c7;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  z-index: 1;
}
.voice-bubble .voice-icon {
  font-size: 36px;
  line-height: 1;
  color: #92400e;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.voice-bubble .voice-icon svg {
  width: 46px;
  height: 46px;
  stroke: #b45309;
  stroke-width: 2;
  fill: none;
  filter: drop-shadow(0 1px 2px rgba(146,64,14,.20));
}

/* ---- 負の連鎖（スライド3「動機②」） ---- */
.chain {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: 12px 0 20px;
}
.chain.compact {
  margin: 6px 0 8px;
  gap: 10px;
}
.chain-step {
  background: #fff;
  border: 2px solid #f59e0b;
  border-radius: 12px;
  padding: 12px 18px;
  font-size: 16px;
  font-weight: 700;
  color: #92400e;
  min-width: 160px;
  text-align: center;
  box-shadow: 0 3px 8px rgba(245,158,11,.18);
}
.chain-arrow {
  font-size: 28px;
  color: #f59e0b;
  font-weight: 800;
}
.chain-conclusion {
  text-align: center;
  font-size: 38px;
  font-weight: 900;
  color: #b91c1c;
  letter-spacing: .08em;
  margin-top: 8px;
  text-shadow: 0 2px 6px rgba(185,28,28,.18);
}

/* ---- Before/After（スライド4） ---- */
.ba-grid {
  display: grid;
  grid-template-columns: 1fr 60px 1fr;
  gap: 18px;
  align-items: stretch;
  width: 100%;
}
.ba-box {
  border-radius: 14px;
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ba-box.before {
  background: #f3f4f6;
  border: 1px solid #d1d5db;
  color: #6b7280;
}
.ba-box.after {
  background: linear-gradient(135deg, #ecfdf5 0%, #dbeafe 100%);
  border: 2px solid #10b981;
  color: #065f46;
  box-shadow: 0 6px 18px rgba(16,185,129,.18);
}
.ba-box h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
}
.ba-box .ba-icon { font-size: 36px; }
.ba-box ul {
  margin: 4px 0 0;
  padding-left: 20px;
  font-size: 15px;
  line-height: 1.7;
}
.ba-box.after ul li { font-weight: 600; }
.ba-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 44px;
  color: #10b981;
  font-weight: 900;
}

/* ============================================
   スライド5：気づきから見える化までのジャーニー
   ============================================ */
.journey-flow {
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 8px;
  margin: 12px 0 28px;
  width: 100%;
}
.journey-step {
  flex: 1;
  min-width: 0;
  background: #fff;
  border: 2.5px solid #1a56db;
  border-radius: 14px;
  padding: 18px 12px 16px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 12px rgba(26,86,219,.10);
}
.journey-step.highlight {
  border-color: #0e9f6e;
  background: linear-gradient(135deg, #ecfdf5 0%, #f0fdfa 100%);
  box-shadow: 0 6px 16px rgba(16,185,129,.22);
  transform: scale(1.03);
}
.journey-icon {
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #1a56db;
}
.journey-step.highlight .journey-icon { color: #0e9f6e; }
.journey-icon svg {
  width: 52px;
  height: 52px;
  stroke-width: 2;
  fill: none;
  stroke: currentColor;
}
.journey-title {
  font-size: 18px;
  font-weight: 800;
  color: #1f2937;
  line-height: 1.3;
}
.journey-step.highlight .journey-title { color: #065f46; }
.journey-desc {
  font-size: 13px;
  color: #4b5563;
  line-height: 1.55;
}
.journey-step.highlight .journey-desc { color: #047857; font-weight: 600; }
.journey-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: #1a56db;
  font-weight: 800;
  flex-shrink: 0;
  padding: 0 2px;
}

/* スライド5：見える化の Before/After 帯 */
.visibility-callout {
  display: grid;
  grid-template-columns: 1fr 56px 1fr;
  gap: 14px;
  align-items: stretch;
  width: 100%;
}
.vc-item {
  padding: 16px 22px;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 17px;
  line-height: 1.55;
}
.vc-item.vc-before {
  background: #f3f4f6;
  border-left: 5px solid #6b7280;
  color: #4b5563;
}
.vc-item.vc-after {
  background: linear-gradient(135deg, #ecfdf5 0%, #f0fdfa 100%);
  border-left: 5px solid #10b981;
  color: #065f46;
}
.vc-tag {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.06em;
  padding: 2px 0;
}
.vc-item.vc-before .vc-tag { color: #374151; }
.vc-item.vc-after .vc-tag { color: #047857; }
.vc-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  color: #10b981;
  font-weight: 900;
}

/* ---- 3者関係図（旧スライド5：未使用） ---- */
.flow-diagram {
  width: 100%;
  max-width: 880px;
  height: auto;
  margin: 0 auto;
}
.flow-diagram .flow-line {
  stroke: #1a56db;
  stroke-width: 3;
  fill: none;
  stroke-dasharray: 8 8;
}
.slide.active .flow-diagram .flow-line {
  animation: flowDash 1.4s linear infinite;
}
@keyframes flowDash {
  to { stroke-dashoffset: -32; }
}
.flow-diagram .flow-node {
  fill: #fff;
  stroke: #1a56db;
  stroke-width: 2.5;
}
.flow-diagram text {
  font-family: "Hiragino Sans", "Yu Gothic UI", "Meiryo", system-ui, sans-serif;
  fill: #1f2937;
}

/* ---- スクショ自動切替（スライド6） ---- */
.screenshot-stack {
  position: relative;
  width: 100%;
  max-width: 320px;
  max-height: 540px;
  aspect-ratio: 9 / 16;
  margin: 0 auto;
}
/* PC画面切替用：フォーム部分は cover で切り取って大きく見せる方式 */
.screenshot-stack.screenshot-stack-wide {
  max-width: 540px;
  max-height: 420px;
  aspect-ratio: 16 / 12;
  background: #fff;
}

/* スライド7：ランキング画像切替用（横長アスペクト） */
.screenshot-stack.screenshot-stack-rank {
  max-width: 600px;
  max-height: 400px;
  aspect-ratio: 16 / 10;
  background: #fff;
}
.screenshot-stack.screenshot-stack-rank img {
  object-fit: contain;
}

/* 2枚用：8秒で1ループ（各4秒） */
.slide.active .screenshot-stack.stack2 img {
  animation: stackCycle2 8s linear infinite;
}
.slide.active .screenshot-stack.stack2 img:nth-child(1) { animation-delay: 0s; }
.slide.active .screenshot-stack.stack2 img:nth-child(2) { animation-delay: 4s; }
@keyframes stackCycle2 {
  0%, 100% { opacity: 0; }
  5%       { opacity: 1; }
  45%      { opacity: 1; }
  50%      { opacity: 0; }
}

/* スライド8：履歴モーダル切替用（4:3・4枚ループ） */
.screenshot-stack.screenshot-stack-history {
  width: 100%;
  max-width: 640px;
  max-height: 480px;
  aspect-ratio: 4 / 3;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
}
.screenshot-stack.screenshot-stack-history img {
  object-fit: contain;
}
/* 4枚ループ用キーフレーム（12秒で1周） */
.slide.active .screenshot-stack.screenshot-stack-history img {
  animation: stackCycle4 12s linear infinite;
}
.slide.active .screenshot-stack.screenshot-stack-history img:nth-child(1) { animation-delay: 0s; }
.slide.active .screenshot-stack.screenshot-stack-history img:nth-child(2) { animation-delay: 3s; }
.slide.active .screenshot-stack.screenshot-stack-history img:nth-child(3) { animation-delay: 6s; }
.slide.active .screenshot-stack.screenshot-stack-history img:nth-child(4) { animation-delay: 9s; }
@keyframes stackCycle4 {
  0%, 100% { opacity: 0; }
  4%       { opacity: 1; }
  22%      { opacity: 1; }
  25%      { opacity: 0; }
}
/* ログイン/送信完了：画像をそのまま contain で表示（独立画面） */
.screenshot-stack.screenshot-stack-wide .ss-fit {
  object-fit: contain;
}
/* フォーム部分：cover で切り取り、object-position で見せる場所を変える */
.screenshot-stack.screenshot-stack-wide .ss-crop {
  object-fit: cover;
}
.screenshot-stack.screenshot-stack-wide .ss-crop-top    { object-position: center 0%; }
.screenshot-stack.screenshot-stack-wide .ss-crop-mid    { object-position: center 45%; }
.screenshot-stack.screenshot-stack-wide .ss-crop-bottom { object-position: center 100%; }
.screenshot-stack img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 6px 18px rgba(0,0,0,.10);
  opacity: 0;
}
/* 5枚をループで切り替え（15秒で1周、無限ループ）。
   active が外れるとアニメ停止、再度 active になると JS の clone&replace で
   要素ごと差し替えられて、必ず1枚目から再開される */
.slide.active .screenshot-stack img {
  animation: stackCycle5 15s linear infinite;
}
.slide.active .screenshot-stack img:nth-child(1) { animation-delay: 0s; }
.slide.active .screenshot-stack img:nth-child(2) { animation-delay: 3s; }
.slide.active .screenshot-stack img:nth-child(3) { animation-delay: 6s; }
.slide.active .screenshot-stack img:nth-child(4) { animation-delay: 9s; }
.slide.active .screenshot-stack img:nth-child(5) { animation-delay: 12s; }

@keyframes stackCycle5 {
  0%, 100% { opacity: 0; }
  3%       { opacity: 1; }
  18%      { opacity: 1; }
  20%      { opacity: 0; }
}

/* ---- ハイライト5ポイント（スライド13） ---- */
.point-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
  width: 100%;
}
.point-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 18px 12px;
  text-align: center;
  box-shadow: 0 4px 14px rgba(0,0,0,.06);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.point-card .point-icon {
  font-size: 38px;
  line-height: 1;
}
.point-card h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: #1a56db;
  line-height: 1.4;
}
.point-card p {
  margin: 0;
  font-size: 12px;
  color: #4b5563;
  line-height: 1.55;
}

/* ---- 費用対効果 比較表（スライド14） ---- */
.cost-compare {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 17px;
}
.cost-compare th, .cost-compare td {
  padding: 14px 18px;
  border-bottom: 1px solid #e5e7eb;
  text-align: left;
  vertical-align: top;
}
.cost-compare thead th {
  background: #f9fafb;
  font-weight: 800;
  text-align: center;
}
.cost-compare thead th.head-out { color: #6b7280; }
.cost-compare thead th.head-in  { color: #047857; background: #ecfdf5; }
.cost-compare tbody th {
  background: #f3f4f6;
  font-weight: 700;
  white-space: nowrap;
  color: #374151;
}
.cost-compare td.cell-out {
  color: #6b7280;
  background: #fff;
}
.cost-compare td.cell-in {
  background: #ecfdf5;
  color: #065f46;
  font-weight: 700;
}
.cost-compare .savings {
  color: #b91c1c;
  font-weight: 900;
  font-size: 19px;
}

/* ---- 内製の強み（スライド15） ---- */
.strength-list {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 20px;
  line-height: 1.7;
}
.strength-list li {
  padding: 10px 0 10px 44px;
  position: relative;
}
.strength-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 12px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #10b981;
  color: #fff;
  font-size: 16px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---- CTAボタン（スライド16） ---- */
.cta-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, #1a56db 0%, #0e9f6e 100%);
  color: #fff;
  font-size: 18px;
  font-weight: 800;
  padding: 14px 28px;
  border-radius: 999px;
  text-decoration: none;
  box-shadow: 0 6px 16px rgba(26,86,219,.30);
}
.slide.active .cta-button {
  animation: ctaPulse 2.2s ease-in-out infinite;
}
@keyframes ctaPulse {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.04); }
}

/* ---- 導入ステップ（スライド16） ---- */
.step-flow {
  display: flex;
  gap: 14px;
  align-items: stretch;
  width: 100%;
  margin: 8px 0 18px;
}
.step-flow .step-item {
  flex: 1;
  background: #fff;
  border: 2px solid #1a56db;
  border-radius: 14px;
  padding: 16px;
  text-align: center;
  position: relative;
}
.step-flow .step-num {
  display: inline-block;
  background: #1a56db;
  color: #fff;
  width: 32px;
  height: 32px;
  line-height: 32px;
  border-radius: 50%;
  font-weight: 900;
  margin-bottom: 8px;
}
.step-flow .step-item h4 {
  margin: 0 0 4px;
  font-size: 16px;
  color: #1a56db;
}
.step-flow .step-item p {
  margin: 0;
  font-size: 13px;
  color: #4b5563;
  line-height: 1.5;
}

/* ---- スライド内画像の共通枠 ---- */
.slide .frame-img {
  max-width: 100%;
  max-height: 60vh;
  object-fit: contain;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  box-shadow: 0 6px 18px rgba(0,0,0,.10);
}

/* ---- 「ハイライト枠が走る」エフェクト ---- */
.spotlight-frame {
  position: relative;
  display: inline-block;
}
.spotlight-frame::after {
  content: "";
  position: absolute;
  inset: -3px;
  border: 3px solid #f59e0b;
  border-radius: 12px;
  opacity: 0;
}
.slide.active .spotlight-frame::after {
  animation: spotlight 2s ease-in-out 1 forwards;
  animation-delay: .5s;
}
@keyframes spotlight {
  0%   { opacity: 0; transform: scale(.96); }
  30%  { opacity: 1; transform: scale(1.02); }
  70%  { opacity: 1; transform: scale(1); }
  100% { opacity: .7; transform: scale(1); }
}

/* ====== 印刷時はアニメ全停止 + レイアウト最適化 ====== */
@media print {
  .slide [data-anim],
  .slide [data-anim-pop] {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
  }
  .title-slide.intro .mascot,
  .slide.active .flow-diagram .flow-line,
  .slide.active .cta-button,
  .slide.active .spotlight-frame::after,
  .slide.active .screenshot-stack img {
    animation: none !important;
  }
  /* スクショスタックは1枚目だけ印刷で見えるように */
  .screenshot-stack img { opacity: 0 !important; }
  .screenshot-stack img:nth-child(3) { opacity: 1 !important; }

  /* CTAボタン拡縮停止 */
  .cta-button { transform: none !important; }

  /* カウントアップは最終値を直接表示（JSが動かなくてもtarget値を出す） */
  .countup::after { content: attr(data-target); }
  .countup { font-size: 0; }
  .countup::after {
    font-size: initial;
    font-variant-numeric: tabular-nums;
    font-weight: 800;
  }

  /* 印刷時のフォントサイズ微調整 */
  .pain-card h3 { font-size: 11pt; }
  .pain-card p  { font-size: 9pt; }
  .chain-step   { font-size: 10pt; padding: 6pt 10pt; min-width: 110pt; }
  .chain-conclusion { font-size: 22pt; }
  .ba-box h3    { font-size: 12pt; }
  .ba-box ul    { font-size: 10pt; }
  .point-card h3 { font-size: 10pt; }
  .point-card p  { font-size: 8pt; }
  .point-card .point-icon { font-size: 26pt; }
  .cost-compare { font-size: 10pt; }
  .cost-compare th, .cost-compare td { padding: 6pt 8pt; }
  .strength-list { font-size: 11pt; }
  .step-flow .step-item h4 { font-size: 10pt; }
  .step-flow .step-item p  { font-size: 8pt; }
  .cta-button { font-size: 11pt; padding: 6pt 14pt; }

  /* 色を印刷に反映 */
  .pain-card, .ba-box, .chain-step, .point-card,
  .cost-compare thead th.head-in, .cost-compare td.cell-in,
  .strength-list li::before, .cta-button,
  .chain-conclusion {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}

/* ====== prefers-reduced-motion 配慮 ====== */
@media (prefers-reduced-motion: reduce) {
  .slide [data-anim],
  .slide [data-anim-pop] {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
  }
  .title-slide.intro .mascot,
  .slide.active .flow-diagram .flow-line,
  .slide.active .cta-button,
  .slide.active .screenshot-stack img,
  .slide.active .spotlight-frame::after {
    animation: none !important;
  }
  .screenshot-stack img:nth-child(3) { opacity: 1 !important; }
}

/* ====== レスポンシブ：1000px未満 ====== */
@media (max-width: 1000px) {
  .pain-grid { grid-template-columns: 1fr; }
  .ba-grid { grid-template-columns: 1fr; }
  .ba-arrow { transform: rotate(90deg); padding: 8px 0; }
  .point-grid { grid-template-columns: repeat(2, 1fr); }
  .step-flow { flex-direction: column; }
  .chain { flex-direction: column; }
  .chain-arrow { transform: rotate(90deg); }
}
