/* ===== マニュアル共通スタイル（manual1〜5.html 共通）=====
   各HTMLの <body style="--c:テーマ色"> でテーマカラーを切り替える */
:root { --c: #1d6fd8; }
/* 派生色は body で計算する（各HTMLの body style で --c を上書きしても追従させるため）*/
body {
  --tint:  color-mix(in srgb, var(--c) 10%, #fff);
  --tint2: color-mix(in srgb, var(--c) 18%, #fff);
  --line:  color-mix(in srgb, var(--c) 35%, #fff);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: #f4f6f9; color: #222; line-height: 1.8;
  font-family: "Hiragino Kaku Gothic ProN","Meiryo","Yu Gothic",sans-serif; }

/* ---- ヘッダー ---- */
.mhead { position: sticky; top: 0; z-index: 10; background: var(--c); color: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.18); }
.mhead-in { max-width: 1200px; margin: 0 auto; padding: 12px 20px; display: flex; align-items: center; gap: 12px; }
.mhead .ico { font-size: 1.7rem; line-height: 1; }
.mhead h1 { margin: 0; font-size: 1.4rem; line-height: 1.3; }
.mhead .tag { margin-left: auto; padding: 3px 14px; font-size: .85rem; white-space: nowrap; border: 1px solid rgba(255,255,255,.75); border-radius: 999px; background: rgba(255,255,255,.18); }

/* ---- 2カラム（左=目次 / 右=内容）---- */
.layout { max-width: 1200px; margin: 24px auto 48px; padding: 0 20px; display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 24px; align-items: start; }

/* 目次 */
.toc { position: sticky; top: 84px; max-height: calc(100vh - 108px); overflow: auto; background: #fff; border: 1px solid #d0d7e2; border-top: 5px solid var(--c); border-radius: 10px; padding: 14px 10px 12px; }
.toc h2 { margin: 0 10px 8px; font-size: .95rem; color: var(--c); }
.toc ol { list-style: none; margin: 0; padding: 0; }
.toc a { display: block; padding: 5px 10px; border-left: 4px solid transparent; border-radius: 0 6px 6px 0; color: #333; text-decoration: none; font-size: .88rem; line-height: 1.5; }
.toc .l1 > a { margin-top: 6px; font-weight: bold; font-size: .95rem; }
.toc .l2 a { padding-left: 26px; color: #555; }
.toc a:hover { background: var(--tint); }
.toc a.active { background: var(--tint2); border-left-color: var(--c); color: var(--c); font-weight: bold; }
.toc .empty { margin: 0 10px; color: #98a3b3; font-size: .85rem; }

/* 内容 */
.content { background: #fff; border: 1px solid #d0d7e2; border-radius: 10px; padding: 28px 34px 36px; min-height: 420px; }
.content h2 { margin: 0 0 18px; padding: 10px 16px; font-size: 1.35rem; color: var(--c); background: var(--tint); border-left: 7px solid var(--c); border-radius: 0 8px 8px 0; }
.content h3 { margin: 32px 0 12px; padding: 0 0 6px; font-size: 1.12rem; border-bottom: 2px solid var(--c); }
.content h3 .num { color: var(--c); margin-right: .6em; }
.content section { scroll-margin-top: 84px; }
.content p { margin: 0 0 12px; }
.content p a { color: var(--c); }

/* 部品：補足ボックス／リンクボタン／作成中の枠 */
.box { margin: 0 0 14px; padding: 12px 16px; background: var(--tint); border: 1px solid var(--line); border-left: 5px solid var(--c); border-radius: 8px; }
.linkbtn { display: inline-block; margin: 2px 0 14px; padding: 8px 18px; color: #fff; background: var(--c); border-radius: 8px; text-decoration: none; font-weight: bold; font-size: .92rem; }
.linkbtn:hover { filter: brightness(1.1); }
.placeholder { margin: 0 0 14px; padding: 26px 16px; text-align: center; color: #8a94a3; background: #fafbfd; border: 2px dashed var(--line); border-radius: 8px; }
.placeholder.big { padding: 80px 16px; font-size: 1.3rem; font-weight: bold; color: var(--c); background: var(--tint); }

/* 部品：表（担当者一覧など） */
.tbl-wrap { margin: 0 0 16px; overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: .92rem; }
.tbl th, .tbl td { padding: 8px 12px; border: 1px solid var(--line); text-align: left; vertical-align: top; }
.tbl th { background: var(--tint2); color: var(--c); white-space: nowrap; }
.tbl tbody tr:nth-child(even) td { background: #fafbfd; }
.tbl td.role { white-space: nowrap; font-weight: bold; }
.tbl a { color: inherit; }

/* スマホ：1カラム（目次を上に） */
@media (max-width: 800px) {
  .layout { grid-template-columns: 1fr; margin-top: 16px; }
  .toc { position: static; max-height: none; }
  .content { padding: 20px 18px 28px; }
  .mhead h1 { font-size: 1.15rem; }
  .content section { scroll-margin-top: 72px; }
}
