/* カスタマイズ自動実行 公開サイト 共通スタイル */
:root {
  --text: #1c2430;
  --muted: #4d5a68;
  --bg: #ffffff;
  --soft: #f3f6f8;
  --line: #d3dbe2;
  --accent: #0b5c7a;
  --accent-dark: #084660;
  --accent-soft: #e6f1f5;
  --warn-bg: #fdeceb;
  --warn-line: #b3261e;
  --warn-text: #7a1410;
  --todo-bg: #fff0b3;
  --todo-text: #5a3b00;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Yu Gothic", Meiryo, "Noto Sans JP", sans-serif;
  font-size: 16px;
  line-height: 1.85;
  overflow-wrap: anywhere;
}

a { color: var(--accent); text-underline-offset: 0.2em; }
a:hover { color: var(--accent-dark); }
a:focus-visible, summary:focus-visible { outline: 3px solid #f0a000; outline-offset: 2px; }

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--accent); color: #fff; padding: 8px 16px; z-index: 10;
}
.skip:focus { left: 8px; top: 8px; color: #fff; }

.wrap { max-width: 880px; margin: 0 auto; padding: 0 20px; }

/* ヘッダー */
.site-header { border-bottom: 1px solid var(--line); background: var(--bg); }
.site-header .wrap {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 4px 24px; padding-top: 14px; padding-bottom: 14px;
}
.brand { font-weight: 700; font-size: 1.05rem; color: var(--text); text-decoration: none; letter-spacing: 0.02em; }
.brand small { display: block; font-weight: 400; font-size: 0.72rem; color: var(--muted); line-height: 1.4; }
.site-nav ul { list-style: none; display: flex; flex-wrap: wrap; gap: 2px 4px; margin: 0; padding: 0; }
.site-nav a {
  display: block; padding: 6px 12px; border-radius: 4px;
  color: var(--text); text-decoration: none; font-size: 0.93rem;
}
.site-nav a:hover { background: var(--soft); }
.site-nav a[aria-current="page"] { background: var(--accent-soft); color: var(--accent-dark); font-weight: 700; }

/* 本文 */
main { padding: 40px 0 72px; }
h1 { font-size: 1.85rem; line-height: 1.45; margin: 0 0 16px; letter-spacing: 0.01em; }
h2 {
  font-size: 1.35rem; line-height: 1.5; margin: 56px 0 16px;
  padding-bottom: 8px; border-bottom: 2px solid var(--accent);
}
h3 { font-size: 1.08rem; line-height: 1.6; margin: 32px 0 8px; }
h4 { font-size: 1rem; margin: 24px 0 6px; }
p { margin: 0 0 14px; }
ul, ol { margin: 0 0 16px; padding-left: 1.5em; }
li { margin-bottom: 6px; }
.lead { font-size: 1.08rem; color: var(--text); }
.note { color: var(--muted); font-size: 0.92rem; }

.hero { background: var(--soft); border-bottom: 1px solid var(--line); padding: 48px 0 40px; }
.hero h1 { font-size: 2rem; }
.hero + main { padding-top: 8px; }
.facts { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0 0; }
.facts li {
  margin: 0; padding: 4px 12px; background: var(--bg);
  border: 1px solid var(--line); border-radius: 4px; font-size: 0.9rem;
}

.actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 24px 0 8px; }
.button {
  display: inline-block; padding: 12px 22px; border-radius: 4px;
  background: var(--accent); color: #fff; font-weight: 700; text-decoration: none;
  border: 1px solid var(--accent);
}
.button:hover { background: var(--accent-dark); color: #fff; }
.button.secondary { background: var(--bg); color: var(--accent-dark); }
.button.secondary:hover { background: var(--accent-soft); color: var(--accent-dark); }

/* 番号付きの手順 */
ol.steps { list-style: none; padding: 0; counter-reset: step; }
ol.steps > li {
  counter-increment: step; position: relative;
  padding: 2px 0 14px 52px; margin: 0 0 8px; min-height: 40px;
}
ol.steps > li::before {
  content: counter(step);
  position: absolute; left: 0; top: 0;
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--accent); color: #fff; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
ol.steps > li > strong:first-child { display: block; }

/* 表 */
.table-scroll { overflow-x: auto; margin: 0 0 20px; }
table { border-collapse: collapse; width: 100%; font-size: 0.95rem; }
caption { text-align: left; font-weight: 700; padding: 0 0 8px; }
th, td { border: 1px solid var(--line); padding: 10px 12px; text-align: left; vertical-align: top; }
thead th { background: var(--accent-soft); }
tbody th { background: var(--soft); font-weight: 700; white-space: nowrap; }
@media (max-width: 560px) { tbody th { white-space: normal; } }

/* 囲み */
.box { border: 1px solid var(--line); border-left: 4px solid var(--accent); background: var(--soft); padding: 14px 18px; margin: 0 0 20px; border-radius: 0 4px 4px 0; }
.box > :last-child { margin-bottom: 0; }
.box.caution { border-left-color: #a15c00; background: #fff8ea; }
.box strong.title { display: block; margin-bottom: 4px; }

.price { font-size: 1.6rem; font-weight: 700; line-height: 1.4; }
.price small { font-size: 0.9rem; font-weight: 400; color: var(--muted); }

.draft {
  border: 2px solid var(--warn-line); background: var(--warn-bg); color: var(--warn-text);
  padding: 12px 18px; margin: 0 0 28px; border-radius: 4px; font-weight: 700;
}
.draft span { display: block; font-weight: 400; font-size: 0.92rem; }

mark.todo {
  background: var(--todo-bg); color: var(--todo-text);
  border: 1px dashed #8a5a00; border-radius: 3px; padding: 1px 4px; font-weight: 700;
}

code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.9em; background: var(--soft); border: 1px solid var(--line); border-radius: 3px; padding: 1px 5px; }
pre { background: #18222c; color: #eef3f7; padding: 16px 18px; border-radius: 4px; overflow-x: auto; line-height: 1.6; font-size: 0.88rem; margin: 0 0 20px; }
pre code { background: none; border: 0; padding: 0; color: inherit; font-size: inherit; }

/* 目次 */
.toc { background: var(--soft); border: 1px solid var(--line); border-radius: 4px; padding: 14px 20px; margin: 24px 0 8px; }
.toc p { font-weight: 700; margin: 0 0 6px; }
.toc ol, .toc ul { margin: 0; }
.toc li { margin-bottom: 2px; }

/* よくある質問 */
.faq-item { border-bottom: 1px solid var(--line); padding: 4px 0 12px; }
.faq-item h3 { margin-top: 20px; }
.faq-item h3::before { content: "Q. "; color: var(--accent); }

/* 規約類 */
.legal h2 { font-size: 1.15rem; border-bottom: 1px solid var(--line); margin-top: 40px; }
.legal ol { padding-left: 1.7em; }
.legal ol ol { list-style: none; padding-left: 0.5em; counter-reset: sub; }
.legal ol ol > li { counter-increment: sub; position: relative; padding-left: 2.2em; }
.legal ol ol > li::before { content: "(" counter(sub) ")"; position: absolute; left: 0; }

/* フッター */
.site-footer { border-top: 1px solid var(--line); background: var(--soft); padding: 28px 0 36px; font-size: 0.9rem; color: var(--muted); }
.site-footer ul { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 20px; padding: 0; margin: 0 0 12px; }
.site-footer li { margin: 0; }
.site-footer p { margin: 0; }

@media (max-width: 640px) {
  h1, .hero h1 { font-size: 1.5rem; }
  h2 { font-size: 1.2rem; margin-top: 44px; }
  .hero { padding: 32px 0 28px; }
  .button { width: 100%; text-align: center; }
}

@media print {
  .site-nav, .skip, .actions { display: none; }
  body { font-size: 11pt; }
}
