/* =========================================================
   チャット常駐型AIエージェント導入支援 サービス紹介資料
   スライド風HTML 共通スタイル
   - 外部CDN・外部フォント不使用（システムフォントのみ）
   - 基準デザインサイズ 1280x720（JSで拡縮）
   - 印刷時は1スライド=1ページ
   ========================================================= */

:root {
  --bg: #ffffff;
  --ink: #16233a;        /* 濃紺（本文） */
  --ink-soft: #47536b;   /* やや薄い本文 */
  --accent: #0b6bcb;     /* アクセント1色 */
  --accent-weak: #e8f1fb;
  --line: #d8dee9;
  --panel: #f5f7fa;
  --ok: #1d7a4f;
  --warn-bg: #fff7e6;
  --chip-bg: #eef2f7;
  --shadow: 0 8px 28px rgba(22, 35, 58, .14);
}

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

html, body {
  height: 100%;
  background: #e9edf2;
  color: var(--ink);
  font-family: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP",
               "Yu Gothic", "Meiryo", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
}

button { font-family: inherit; cursor: pointer; }

/* ---------- ステージ（画面中央に16:9を拡縮配置） ---------- */
.stage {
  position: fixed;
  inset: 0 0 56px 0;              /* 下部はコントロールバー分 */
  overflow: hidden;
}

/* 拡縮と中央配置はJS（fit）が translate+scale で行う。
   グリッド中央寄せはモバイルブラウザで巨大要素が片寄るため使わない */
.deck {
  width: 1280px;
  height: 720px;
  position: absolute;
  left: 0;
  top: 0;
  transform-origin: 0 0;
  background: var(--bg);
  box-shadow: var(--shadow);
  border-radius: 6px;
  overflow: hidden;
}

/* ---------- スライド共通 ---------- */
.slide {
  position: absolute;
  inset: 0;
  padding: 56px 72px 64px;
  display: none;
  flex-direction: column;
  background: var(--bg);
}
.slide.active { display: flex; }

@media (prefers-reduced-motion: no-preference) {
  .slide.active { animation: slidein .28s ease-out; }
  @keyframes slidein {
    from { opacity: 0; transform: translateX(14px); }
    to   { opacity: 1; transform: none; }
  }
}

.kicker {
  display: inline-block;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .14em;
  color: var(--accent);
  border-left: 4px solid var(--accent);
  padding-left: 10px;
  margin-bottom: 10px;
}

.slide h2 {
  font-size: 34px;
  line-height: 1.35;
  margin-bottom: 6px;
  letter-spacing: .01em;
}

.slide .lead {
  font-size: 17px;
  color: var(--ink-soft);
  line-height: 1.7;
  margin-bottom: 18px;
}

.grow { flex: 1; min-height: 0; }

/* ---------- ラベル（実績／試算／想定例） ---------- */
.tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 999px;
  vertical-align: middle;
  margin-left: 6px;
  white-space: nowrap;
}
.tag.fact    { background: #e3f2e9; color: var(--ok); }
.tag.trial   { background: var(--accent-weak); color: var(--accent); }
.tag.example { background: var(--warn-bg); color: #8a5a00; }

/* ---------- 表紙 ---------- */
.slide.cover {
  justify-content: center;
  background:
    linear-gradient(135deg, rgba(11,107,203,.06), rgba(11,107,203,0) 55%),
    var(--bg);
}
.cover .brandline {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .2em;
  color: var(--accent);
  margin-bottom: 26px;
}
.cover h1 {
  font-size: 54px;
  line-height: 1.42;
  letter-spacing: .015em;
  margin-bottom: 22px;
}
.cover h1 .em { color: var(--accent); }
.cover .sub {
  font-size: 20px;
  line-height: 1.8;
  color: var(--ink-soft);
  margin-bottom: 30px;
}
.cover .points { display: flex; gap: 14px; margin-bottom: 34px; }
.cover .points span {
  background: var(--chip-bg);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 9px 20px;
  font-size: 16px;
  font-weight: 600;
}
.cover .issuer { font-size: 14px; color: var(--ink-soft); }

/* ---------- 汎用カード・グリッド ---------- */
.cols { display: grid; gap: 18px; }
.cols.c2 { grid-template-columns: 1fr 1fr; }
.cols.c3 { grid-template-columns: 1fr 1fr 1fr; }

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px 18px;
}
.card h3 {
  font-size: 16px;
  margin-bottom: 8px;
  color: var(--ink);
}
.card h3 .icon { margin-right: 6px; }
.card ul { list-style: none; }
.card li {
  font-size: 14.5px;
  line-height: 1.65;
  padding-left: 16px;
  position: relative;
  margin-bottom: 4px;
  color: var(--ink-soft);
}
.card li::before {
  content: "";
  position: absolute;
  left: 2px; top: .62em;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
}

/* ---------- 仕組みフロー図 ---------- */
.flow {
  display: grid;
  grid-template-columns: 1fr 34px 1fr 34px 1fr 34px 1fr;
  align-items: stretch;
  gap: 0;
  margin: 14px 0 20px;
}
.flow .step {
  background: var(--bg);
  border: 2px solid var(--accent);
  border-radius: 12px;
  padding: 14px 12px;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.flow .step.human { border-color: var(--line); background: var(--panel); }
.flow .step .who {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: .08em;
  margin-bottom: 6px;
}
.flow .step.human .who { color: var(--ink-soft); }
.flow .step .what { font-size: 15.5px; font-weight: 700; line-height: 1.5; }
.flow .step .note { font-size: 12px; color: var(--ink-soft); margin-top: 6px; line-height: 1.5; }
.flow .arrow {
  display: grid;
  place-items: center;
  color: var(--accent);
  font-size: 20px;
  font-weight: 700;
}

/* ---------- 事例ページ ---------- */
.case-head {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 4px;
}
.case-client {
  font-size: 14.5px;
  color: var(--ink-soft);
  margin-bottom: 12px;
}
.case-client b { color: var(--ink); }

.beforeafter {
  display: grid;
  grid-template-columns: 1fr 30px 1.15fr;
  gap: 0;
  margin-bottom: 14px;
}
.ba-box {
  border-radius: 10px;
  padding: 13px 16px;
}
.ba-box.before { background: var(--panel); border: 1px solid var(--line); }
.ba-box.after  { background: var(--accent-weak); border: 1px solid rgba(11,107,203,.35); }
.ba-box .ba-label {
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .1em;
  margin-bottom: 6px;
  color: var(--ink-soft);
}
.ba-box.after .ba-label { color: var(--accent); }
.ba-box p { font-size: 14.5px; line-height: 1.65; }
.ba-arrow { display: grid; place-items: center; color: var(--accent); font-size: 20px; font-weight: 700; }

.duty {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 14px;
}
.duty .card { padding: 12px 16px; }
.duty .card h3 { font-size: 14.5px; }
.duty .card li { font-size: 13.5px; margin-bottom: 2px; }

.metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 12px; }
.metric {
  background: var(--bg);
  border: 1px solid var(--line);
  border-top: 4px solid var(--accent);
  border-radius: 10px;
  padding: 12px 14px 10px;
  text-align: center;
}
.metric .num {
  font-size: 34px;
  font-weight: 800;
  color: var(--accent);
  line-height: 1.15;
  letter-spacing: .01em;
}
.metric .num small { font-size: 16px; font-weight: 700; }
.metric .desc { font-size: 12.5px; color: var(--ink-soft); margin-top: 4px; line-height: 1.5; }

.others {
  border-top: 1px dashed var(--line);
  padding-top: 10px;
}
.others .others-label {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink-soft);
  letter-spacing: .08em;
  margin-bottom: 6px;
}
.others ul { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 1px 22px; }
.others li {
  font-size: 12.5px;
  color: var(--ink-soft);
  line-height: 1.6;
  padding-left: 14px;
  position: relative;
}
.others li::before {
  content: "・";
  position: absolute; left: 0;
  color: var(--accent);
}

/* ---------- 導入・費用ページ ---------- */
.steps4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 8px 0 12px; }
.steps4 .st {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  position: relative;
}
.steps4 .st .no {
  display: inline-grid;
  place-items: center;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 8px;
}
.steps4 .st h3 { font-size: 15px; margin-bottom: 4px; }
.steps4 .st p { font-size: 12.5px; color: var(--ink-soft); line-height: 1.55; }

.pricing {
  display: grid;
  grid-template-columns: 1fr 40px 1fr;
  align-items: stretch;
  margin-bottom: 10px;
}
.price-box {
  border: 2px solid var(--accent);
  border-radius: 12px;
  padding: 10px 16px;
  background: var(--bg);
}
.price-box.monthly { border-style: dashed; }
.price-box .pb-label { font-size: 13px; font-weight: 700; color: var(--accent); margin-bottom: 4px; }
.price-box .pb-main { font-size: 18px; font-weight: 800; margin-bottom: 4px; }
.price-box p { font-size: 12.5px; color: var(--ink-soft); line-height: 1.55; }
.price-plus { display: grid; place-items: center; font-size: 26px; font-weight: 800; color: var(--accent); }

/* ---------- ROIシミュレーター ---------- */
.roi {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 16px;
  margin-bottom: 10px;
}
.roi .roi-title { font-size: 14px; font-weight: 700; margin-bottom: 8px; }
.roi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr) 1.3fr;
  gap: 10px;
  align-items: end;
}
.roi label { display: block; font-size: 11.5px; color: var(--ink-soft); margin-bottom: 3px; }
.roi input {
  width: 100%;
  font-size: 15px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-family: inherit;
  color: var(--ink);
  background: var(--bg);
}
.roi input:focus { outline: 2px solid var(--accent); border-color: var(--accent); }
.roi .roi-result {
  background: var(--bg);
  border: 1px solid rgba(11,107,203,.4);
  border-radius: 8px;
  padding: 8px 12px;
  text-align: center;
}
.roi .roi-result .rr-num { font-size: 22px; font-weight: 800; color: var(--accent); line-height: 1.3; }
.roi .roi-result .rr-desc { font-size: 11px; color: var(--ink-soft); }
.roi .roi-note { font-size: 11.5px; color: var(--ink-soft); margin-top: 8px; line-height: 1.5; }

.cta {
  background: var(--accent);
  color: #fff;
  border-radius: 12px;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.cta .cta-main { font-size: 20px; font-weight: 800; line-height: 1.5; }
.cta .cta-sub { font-size: 13px; opacity: .92; line-height: 1.6; text-align: right; }

/* ---------- フッター ---------- */
.slide-foot {
  position: absolute;
  left: 72px; right: 72px; bottom: 20px;
  display: flex;
  justify-content: space-between;
  font-size: 11.5px;
  color: #8a93a5;
}

/* ---------- コントロールバー ---------- */
.controls {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  height: 56px;
  background: #101c30;
  color: #e8edf5;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 16px;
  z-index: 40;
}
.controls .spacer { flex: 1; }
.ctl {
  background: #22304a;
  color: #e8edf5;
  border: 1px solid #37476a;
  border-radius: 8px;
  min-height: 36px;
  padding: 0 14px;
  font-size: 13.5px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.ctl:hover { background: #2c3d5e; }
.ctl:focus-visible { outline: 2px solid #7db4ec; outline-offset: 1px; }
.ctl[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); }
.ctl:disabled { opacity: .45; cursor: default; }
.pageno { font-size: 14px; font-weight: 700; min-width: 64px; text-align: center; letter-spacing: .06em; }
.audio-state { font-size: 12px; color: #9fb2cc; min-width: 110px; }

/* ---------- ナレーション原稿パネル ---------- */
.notes-panel {
  position: fixed;
  right: 14px;
  bottom: 68px;
  width: min(430px, calc(100vw - 28px));
  max-height: 42vh;
  overflow: auto;
  background: rgba(16, 28, 48, .95);
  color: #eef3fa;
  border-radius: 12px;
  padding: 14px 18px;
  font-size: 13.5px;
  line-height: 1.8;
  z-index: 35;
  box-shadow: var(--shadow);
}
.notes-panel[hidden] { display: none; }
.notes-panel .np-title {
  font-size: 12px;
  font-weight: 700;
  color: #8fc1f2;
  letter-spacing: .1em;
  margin-bottom: 6px;
}

/* ---------- ナレーション有効化ゲート ---------- */
.gate {
  position: fixed;
  inset: 0;
  background: rgba(10, 18, 32, .55);
  display: grid;
  place-items: center;
  z-index: 60;
}
.gate[hidden] { display: none; }
.gate .gate-card {
  background: var(--bg);
  border-radius: 14px;
  padding: 30px 36px;
  max-width: 460px;
  text-align: center;
  box-shadow: var(--shadow);
}
.gate h2 { font-size: 20px; margin-bottom: 10px; }
.gate p { font-size: 13.5px; color: var(--ink-soft); line-height: 1.7; margin-bottom: 18px; }
.gate .gate-btns { display: flex; gap: 10px; justify-content: center; }
.gate .primary {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 11px 22px;
  font-size: 15px;
  font-weight: 700;
}
.gate .secondary {
  background: var(--bg);
  color: var(--ink-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 18px;
  font-size: 14px;
}

/* ---------- 小さめ画面（スマホ・タブレット）への対応 ----------
   .deck はJSがtransform: scaleで縮小するため文字は破綻しない。
   コントロールバーはスマホ幅でも収まるよう圧縮し、
   万一収まらない場合も横スクロールで全ボタンに届くようにする。 */
.controls { overflow-x: auto; }
@media (max-width: 760px) {
  .controls { gap: 5px; padding: 0 8px; }
  .ctl { padding: 0 8px; font-size: 12px; min-height: 34px; }
  .pageno { min-width: 46px; font-size: 12.5px; }
  .audio-state { display: none; }
  .gate .gate-card { margin: 16px; padding: 22px 20px; }
}

/* ---------- 印刷 / PDF保存 ---------- */
@media print {
  html, body { background: #fff; height: auto; }
  .stage { position: static; inset: auto; display: block; overflow: visible; }
  .deck {
    position: static;
    width: auto; height: auto;
    transform: none !important;
    box-shadow: none;
    border-radius: 0;
    overflow: visible;
  }
  .slide {
    display: flex !important;
    position: relative;
    width: 1280px;
    height: 720px;
    page-break-after: always;
    break-after: page;
    border-bottom: none;
  }
  .slide:last-child { page-break-after: auto; }
  .controls, .notes-panel, .gate { display: none !important; }
}
@page { size: 1280px 720px; margin: 0; }
