/* トレーナー向けヘルプ（admin/help/）。scripts/build-help.mjs が admin/help/help.css にコピーする。
   色は管理画面（admin/style.css）のはじめの緑に揃える。スマホでも読めるように1列・大きめの文字 */
:root {
  --accent: #0e7c66;
  --accent-strong: #0a6150;
  --accent-soft: #e3f3ee;
  --bg: #f4f7f5;
  --surface: #ffffff;
  --text: #1c2622;
  --muted: #5f6f69;
  --border: #dbe4e0;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --accent: #3fbf9f;
    --accent-strong: #5fd4b6;
    --accent-soft: #173a31;
    --bg: #0f1513;
    --surface: #18211e;
    --text: #e6eeeb;
    --muted: #9db0a9;
    --border: #2a3632;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN",
    "Noto Sans JP", "Yu Gothic", "Meiryo", sans-serif;
  font-size: 16px;
  line-height: 1.8;
  -webkit-text-size-adjust: 100%;
  overflow-wrap: anywhere;
}

a { color: var(--accent-strong); }
a:focus-visible, summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 12px 16px;
}
.site-title {
  display: block;
  max-width: 760px;
  margin: 0 auto;
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
}

.content {
  max-width: 760px;
  margin: 0 auto;
  padding: 16px 16px 32px;
}

.doc {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 8px 20px 20px;
}

h1 { font-size: 1.6rem; line-height: 1.4; margin: 16px 0 12px; }
h2 {
  font-size: 1.25rem;
  line-height: 1.4;
  margin: 32px 0 8px;
  padding-left: 10px;
  border-left: 4px solid var(--accent);
}
h3 { font-size: 1.08rem; line-height: 1.5; margin: 24px 0 4px; }
h2, h3 { scroll-margin-top: 16px; }
p, ul, ol { margin: 8px 0; }
ul, ol { padding-left: 1.5em; }
li { margin: 4px 0; }
strong { font-weight: 700; }

/* スクリーンショット（押すと原寸の画像が開く） */
.shot { margin: 12px 0 20px; }
.shot-link { display: block; }
.shot img, .doc img {
  display: block;
  max-width: 100%;
  height: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #ffffff;
}
.shot img.tall, .doc img.tall { max-width: min(100%, 360px); }
.shot figcaption { color: var(--muted); font-size: 0.875rem; margin-top: 4px; }

/* 表（スマホでは横にスクロール） */
table {
  display: block;
  overflow-x: auto;
  border-collapse: collapse;
  margin: 12px 0;
  font-size: 0.94rem;
}
th, td { border: 1px solid var(--border); padding: 8px 10px; text-align: left; vertical-align: top; min-width: 10em; }
th { background: var(--accent-soft); }

/* 目次（ほかのページ） */
.toc {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 8px 16px;
  margin-bottom: 16px;
}
.toc summary { cursor: pointer; font-weight: 700; color: var(--accent-strong); padding: 4px 0; }
.toc ol { margin: 8px 0 4px; }
.toc [aria-current="page"] { font-weight: 700; }

/* 前後のページ */
.pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 16px;
}
.pager-link {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  text-decoration: none;
  min-height: 48px;
}
.pager-next { text-align: right; }
.pager-empty { background: transparent; border-color: transparent; }
.pager-label { display: block; color: var(--muted); font-size: 0.85rem; }
.pager-title { display: block; color: var(--accent-strong); font-weight: 700; }

.site-footer {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 16px 32px;
  color: var(--muted);
  font-size: 0.875rem;
}

@media (max-width: 480px) {
  .doc { padding: 4px 14px 16px; border-radius: 10px; }
  h1 { font-size: 1.4rem; }
  .pager { grid-template-columns: 1fr; }
  .pager-empty { display: none; }
  .pager-next { text-align: left; }
}
