/* 操作マニュアル — 公開ドキュメント共通スタイル
   一般ユーザー向け・SEO 用の静的ページ（SPA とは別、認証なしで配信）。
   Bakusoku.AI / Platio Canvas AI 共通（2026-07-15、ブランド名を含まない中立版に変更）。 */

:root {
  --brand: #7c3aed;
  --brand-dark: #6d28d9;
  --ink: #1f2433;
  --muted: #5b6478;
  --line: #e6e8ef;
  --bg: #fbfbfe;
  --card: #ffffff;
  --soft: #f5f3ff;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic ProN",
    "Noto Sans JP", "Yu Gothic", Meiryo, sans-serif;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── ヘッダー ── */
.site-header {
  background: #fff;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 10;
}
.site-header .inner {
  max-width: 880px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.site-header .brand { font-weight: 700; font-size: 15px; }
.site-header nav { margin-left: auto; font-size: 13px; }

/* ── レイアウト ── */
.wrap { max-width: 880px; margin: 0 auto; padding: 40px 20px 80px; }

.breadcrumb { font-size: 13px; color: var(--muted); margin-bottom: 16px; }
.breadcrumb a { color: var(--muted); }

h1 { font-size: 30px; line-height: 1.4; margin: 0 0 12px; letter-spacing: -0.01em; }
.lead { font-size: 16px; color: var(--muted); margin: 0 0 8px; }

h2 {
  font-size: 22px; margin: 56px 0 14px; padding-top: 8px;
  letter-spacing: -0.01em;
}
h3 { font-size: 17px; margin: 28px 0 8px; }

/* FAQ の質問見出し（Q. マーカー付き・間隔は詰める） */
h2.qa { font-size: 18px; margin: 32px 0 8px; }
h2.qa::before { content: "Q. "; color: var(--brand); font-weight: 800; }

p { margin: 12px 0; }
ul, ol { padding-left: 1.4em; }
li { margin: 6px 0; }

/* 手順番号付きの大見出し */
.step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--brand); color: #fff; font-size: 14px; font-weight: 700;
  margin-right: 10px; flex-shrink: 0; vertical-align: middle;
}

/* 画像（スクリーンショット） */
figure { margin: 20px 0; }
figure img {
  width: 100%; height: auto; display: block;
  border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 6px 24px rgba(31, 36, 51, 0.08);
}
figcaption { font-size: 13px; color: var(--muted); text-align: center; margin-top: 8px; }

/* ヒント */
.tip {
  background: var(--soft); border-left: 4px solid var(--brand);
  border-radius: 8px; padding: 12px 16px; margin: 16px 0;
  font-size: 14px;
}

/* フロー（図解・アニメーション付き） */
.flow {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 16px; margin: 18px 0; font-weight: 600; font-size: 14px;
}
.flow span:not(.arrow) {
  padding: 6px 12px; border-radius: 999px; background: var(--soft); color: var(--ink);
  transition: background 0.3s, color 0.3s, transform 0.3s;
}
.flow .arrow { color: var(--brand); transition: transform 0.3s, opacity 0.3s; }
/* 各ステップが順番に点灯して「流れ」を見せる（軽くループ） */
.flow.animate span:not(.arrow) { animation: flowPulse 6s infinite; }
.flow.animate span:not(.arrow):nth-of-type(1) { animation-delay: 0s; }
.flow.animate span:not(.arrow):nth-of-type(3) { animation-delay: 0.5s; }
.flow.animate span:not(.arrow):nth-of-type(5) { animation-delay: 1s; }
.flow.animate span:not(.arrow):nth-of-type(7) { animation-delay: 1.5s; }
.flow.animate span:not(.arrow):nth-of-type(9) { animation-delay: 2s; }
@keyframes flowPulse {
  0%, 40%, 100% { background: var(--soft); color: var(--ink); transform: translateY(0); }
  8%, 20% { background: var(--brand); color: #fff; transform: translateY(-3px); }
}

/* スクロールで図がふわっと出る */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

/* 動きを減らす設定の人には無効化（アクセシビリティ） */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .flow.animate span:not(.arrow) { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* 管理者が有効にしたときだけ出る機能の注記 */
.tip.gated {
  background: #f8fafc; border-left-color: #94a3b8; color: var(--muted);
}

/* 機能カード（一覧表示・リンクなし） */
.cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 18px 0; }
.cards .card {
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 14px 16px;
}
.cards .card h3 { margin: 0 0 4px; font-size: 15px; }
.cards .card p { margin: 0; font-size: 13px; color: var(--muted); }

/* 画面上のボタン名・タブ名を本文中で示す */
.ui {
  display: inline-block; background: var(--soft); border: 1px solid #ddd6fe;
  border-radius: 6px; padding: 1px 7px; font-size: 13px; font-weight: 600;
  white-space: nowrap;
}

/* ページ末尾の「次に読む」 */
.next {
  display: flex; flex-wrap: wrap; gap: 10px; margin: 32px 0 0;
  padding-top: 20px; border-top: 1px solid var(--line);
}
.next a {
  border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px;
  font-size: 13px; background: var(--card);
}
.next a:hover { border-color: var(--brand); text-decoration: none; }

/* ブランド別の出し分け（platio-canvas-ai.com のみ / bakusoku のみ）
   既定は非表示。<head> のインラインスクリプトが html に brand-* を付けた側だけ出す。
   JS 無効時はどちらも出ないため、共通部分だけが読める安全側に倒れる。 */
[data-brand] { display: none; }
html.brand-platio   [data-brand~="platio"]   { display: revert; }
html.brand-bakusoku [data-brand~="bakusoku"] { display: revert; }

/* テーブル */
table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 14px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--soft); font-weight: 700; }

/* ── 目次（ハブ）カード ── */
.toc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 24px; }
.toc-card {
  display: block; background: var(--card); border: 1px solid var(--line);
  border-radius: 14px; padding: 18px 20px; transition: all 0.15s;
}
a.toc-card:hover { border-color: var(--brand); box-shadow: 0 8px 24px rgba(124,58,237,0.12); text-decoration: none; transform: translateY(-1px); }
.toc-card .ico { font-size: 24px; }
.toc-card h3 { margin: 8px 0 4px; font-size: 16px; color: var(--ink); }
.toc-card p { margin: 0; font-size: 13px; color: var(--muted); }
.toc-card.soon { opacity: 0.6; }
.badge {
  display: inline-block; font-size: 11px; font-weight: 700; border-radius: 999px;
  padding: 2px 10px; margin-top: 10px;
}
.badge.ready { background: #ecfdf5; color: #047857; }
.badge.soon { background: #f1f5f9; color: #64748b; }

.section-label { font-size: 13px; font-weight: 700; color: var(--muted); margin: 36px 0 4px; }

/* ── マニュアル内検索（manual.js がヘッダーに差し込む） ── */
.ms { position: relative; display: flex; align-items: center; margin-left: auto; }
.ms-ico { position: absolute; left: 11px; font-size: 12px; opacity: 0.5; pointer-events: none; }
.ms-input {
  width: 190px; max-width: 100%;
  padding: 7px 12px 7px 31px;
  border: 1px solid var(--line); border-radius: 999px;
  background: #fff; color: var(--ink);
  font-family: inherit; font-size: 13px; line-height: 1.5;
  -webkit-appearance: none; appearance: none;
  transition: width 0.18s ease, border-color 0.18s, box-shadow 0.18s;
}
.ms-input::placeholder { color: var(--muted); opacity: 1; }
.ms-input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }
.ms-input:focus {
  outline: none; width: 260px;
  border-color: var(--brand); box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.12);
}

.ms-panel {
  position: absolute; top: calc(100% + 8px); right: 0;
  width: 520px; max-width: calc(100vw - 32px);
  max-height: min(70vh, 460px); overflow-y: auto;
  padding: 6px; z-index: 30;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 14px 36px rgba(31, 36, 51, 0.16);
  text-align: left; line-height: 1.6;
}
.ms-item { display: block; padding: 9px 12px; border-radius: 8px; color: var(--ink); }
.ms-item:hover, .ms-item.is-active { background: var(--soft); text-decoration: none; }
.ms-item-page { display: block; font-size: 11px; font-weight: 700; color: var(--brand); }
.ms-item-head { display: block; font-size: 14px; font-weight: 700; }
.ms-item-snip { display: block; font-size: 12.5px; color: var(--muted); margin-top: 1px; }
.ms-note { margin: 0; padding: 10px 12px; font-size: 13px; color: var(--muted); }
.ms-note-sub { font-size: 12px; }

/* 一致した語のしるし（結果一覧・開いたページの本文とも同じ見た目） */
.ms-item mark, mark.ms-hit {
  background: #fde68a; color: inherit; border-radius: 2px; padding: 0 1px;
}
/* 追従ヘッダーの下に隠れないよう、ジャンプ先に余白を取る */
mark.ms-hit, h1, h2, h3 { scroll-margin-top: 84px; }

@media (max-width: 640px) {
  .site-header .inner { flex-wrap: wrap; }
  .ms { order: 3; flex-basis: 100%; margin-left: 0; }
  .ms-input, .ms-input:focus { width: 100%; }
  .ms-panel { right: auto; left: 0; width: 100%; max-width: none; }
}

/* フッター */
.site-footer { border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.site-footer .inner { max-width: 880px; margin: 0 auto; padding: 24px 20px; }

@media (max-width: 640px) {
  .cards { grid-template-columns: 1fr; }
  h1 { font-size: 24px; }
  h2 { font-size: 19px; margin-top: 40px; }
  .toc-grid { grid-template-columns: 1fr; }
  .wrap { padding: 28px 16px 64px; }
}
