:root {
  --bg: #f7f6f3;
  --surface: #ffffff;
  --text: #1f2328;
  --muted: #5b616b;
  --line: #e2e0da;
  --accent: #2357c6;
  --accent-soft: #e8eefb;
  --warn-soft: #fdf3e1;
  --warn-line: #e6c27a;
  --code-bg: #f1f0ec;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #15171a;
    --surface: #1d2024;
    --text: #e8e9eb;
    --muted: #a2a8b1;
    --line: #2f343a;
    --accent: #7ea6ff;
    --accent-soft: #1f2a42;
    --warn-soft: #2e2617;
    --warn-line: #7a6330;
    --code-bg: #262a30;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic", sans-serif;
  font-size: 17px;
  line-height: 1.8;
  padding-bottom: env(safe-area-inset-bottom);
}
a { color: var(--accent); }
header.site {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 10;
}
.site-inner, main, footer { max-width: 44rem; margin: 0 auto; padding-left: 16px; padding-right: 16px; }
.brand { display: block; padding-top: 12px; font-weight: 700; font-size: 15px; color: var(--text); text-decoration: none; }
nav.pages {
  display: flex; gap: 6px; overflow-x: auto; padding: 8px 0 10px;
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
nav.pages::-webkit-scrollbar { display: none; }
nav.pages a {
  flex: none; padding: 6px 12px; border-radius: 999px; font-size: 14px;
  text-decoration: none; color: var(--muted); border: 1px solid var(--line); background: var(--bg);
}
nav.pages a[aria-current="page"] { color: var(--accent); background: var(--accent-soft); border-color: transparent; font-weight: 600; }
main { padding-top: 24px; padding-bottom: 32px; }
h1 { font-size: 26px; line-height: 1.4; margin: 0 0 8px; }
.lead { color: var(--muted); margin: 0 0 24px; }
h2 { font-size: 20px; line-height: 1.5; margin: 36px 0 10px; padding-top: 4px; }
h3 { font-size: 17px; margin: 24px 0 6px; }
p, ul, ol { margin: 0 0 14px; }
ul, ol { padding-left: 1.4em; }
li { margin-bottom: 6px; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  padding: 16px; margin: 0 0 16px;
}
.note { background: var(--warn-soft); border: 1px solid var(--warn-line); border-radius: 12px; padding: 14px 16px; margin: 0 0 16px; }
.note > :last-child, .card > :last-child { margin-bottom: 0; }
.prompt { margin: 0 0 18px; }
.prompt .label { font-size: 14px; font-weight: 600; color: var(--muted); margin-bottom: 4px; }
.prompt pre {
  margin: 0; white-space: pre-wrap; word-break: break-word;
  background: var(--code-bg); border: 1px solid var(--line); border-radius: 10px 10px 0 0;
  padding: 12px 14px; font-family: inherit; font-size: 16px; line-height: 1.7;
}
.prompt button {
  display: block; width: 100%; border: 1px solid var(--line); border-top: 0;
  border-radius: 0 0 10px 10px; background: var(--surface); color: var(--accent);
  font: inherit; font-size: 15px; font-weight: 600; padding: 10px; cursor: pointer;
  min-height: 44px;
}
.prompt button:active { background: var(--accent-soft); }
table { width: 100%; border-collapse: collapse; margin: 0 0 16px; font-size: 16px; }
th, td { text-align: left; vertical-align: top; padding: 10px 8px; border-bottom: 1px solid var(--line); }
th { font-size: 14px; color: var(--muted); font-weight: 600; }
.steps { counter-reset: s; list-style: none; padding: 0; }
.steps li { counter-increment: s; position: relative; padding-left: 40px; margin-bottom: 14px; }
.steps li::before {
  content: counter(s); position: absolute; left: 0; top: 2px;
  width: 28px; height: 28px; border-radius: 50%; background: var(--accent-soft); color: var(--accent);
  font-weight: 700; font-size: 15px; display: flex; align-items: center; justify-content: center;
}
.pager { display: flex; justify-content: space-between; gap: 12px; margin-top: 40px; }
.pager a {
  flex: 1; display: block; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--surface); text-decoration: none; font-size: 15px; min-height: 44px;
}
.pager a.next { text-align: right; }
.pager small { display: block; color: var(--muted); font-size: 13px; }
footer { border-top: 1px solid var(--line); padding-top: 16px; padding-bottom: 32px; color: var(--muted); font-size: 14px; }
code { background: var(--code-bg); padding: 1px 5px; border-radius: 5px; font-size: 0.92em; }
