/* ============================================================
   engine/slide.css — コアエンジン層（編集不要）
   16:9ロック / ナビUI / スケーリング / PDF出力
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background: var(--color-chrome, #111);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── デッキ（常に 1280×720） ── */
.deck {
  width: 1280px;
  height: 720px;
  position: relative;
  flex-shrink: 0;
  transform-origin: center center;
}

/* ── スライド共通 ── */
.slide {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
  padding: var(--sp-xl, 64px);
  background: var(--color-bg, #0f0f0f);
  color: var(--color-fg, #f0f0ee);
  overflow: hidden;
}
.slide.is-active { display: flex; }

/* ── 背景画像フォールバック（印刷用） ── */
.slide-bg-print { display: none; }

/* ── ナビUI（deck の外側に固定） ── */
.slide-ui {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 100;
}

.slide-counter {
  position: absolute;
  bottom: 1.5rem;
  left: 2rem;
  font-size: .7rem;
  font-family: var(--font-mono, monospace);
  color: rgba(255,255,255,.25);
  letter-spacing: .08em;
}

.slide-nav {
  position: absolute;
  bottom: 1.25rem;
  right: 1.5rem;
  display: flex;
  gap: .375rem;
  pointer-events: all;
}

.slide-nav button {
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.12);
  color: rgba(255,255,255,.5);
  padding: .35rem .9rem;
  border-radius: 3px;
  cursor: pointer;
  font-size: .7rem;
  letter-spacing: .06em;
  transition: background .12s, color .12s;
}
.slide-nav button:hover {
  background: rgba(255,255,255,.15);
  color: rgba(255,255,255,.9);
}

/* ── スライド内ページ番号（JSで注入） ── */
.slide-page-num {
  position: absolute;
  bottom: 20px;
  right: 28px;
  font-family: var(--font-mono, monospace);
  font-size: .75rem;
  color: var(--color-num, rgba(0,0,0,.18));
  letter-spacing: .1em;
  pointer-events: none;
  z-index: 20;
}

/* ── PDF / 印刷 ── */
@media print {
  @page { size: 254mm 142.875mm; margin: 0; }

  * { print-color-adjust: exact !important; -webkit-print-color-adjust: exact !important; }

  /* フォントweight正規化: 印刷では2段階のみ */
  * { font-weight: 400 !important; }
  strong, b, h1, h2, h3, .bold, .tag { font-weight: 600 !important; }

  html, body {
    width: 254mm;
    height: auto;
    display: block;
    background: transparent;
    overflow: visible;
  }

  .deck {
    transform: none !important;
    position: static;
    width: 254mm;
    height: auto;
    display: block;
  }

  .slide {
    position: static !important;
    display: flex !important;
    width: 254mm;
    height: 142.875mm;
    z-index: 0;
    break-after: page;
    overflow: hidden;
  }

  /* 背景画像フォールバック（CSS background-imageは印刷で消える） */
  .slide-bg-print {
    display: block !important;
    position: absolute !important;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
  }

  /* リスト要素の位置補正 */
  .list li { position: relative; }

  /* 丸型要素のアスペクト比補正 */
  [style*="border-radius: 50%"],
  .circle { aspect-ratio: 1/1; }

  .slide-ui { display: none !important; }
}
