/* 全体設定 */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Sans",
    "Noto Sans JP", "Yu Gothic UI", "Yu Gothic", Meiryo, sans-serif;
  line-height: 1.9;
  color: #333;
  background: #fff;
}

.wrap {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 20px 16px 40px;
}

/* 見出し */
h1 {
  font-size: 26px;
  border-bottom: 2px solid #e5e7eb;
  padding-bottom: 8px;
  margin-bottom: 20px;
}

h2 {
  position: relative;
  font-size: 21px;
  padding-left: 26px;
  margin-top: 34px;
  margin-bottom: 14px;
  line-height: 1.4;
}

h2::before {
  content: "▸";
  position: absolute;
  left: 10px;
  color: #7a7a7a;
}

h2::after {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 1.3em;
  background-color: #1e40af;
}

h3 {
  font-size: 18px;
  margin: 24px 0 10px;
  color: #222;
}

/* テキスト・リスト */
p {
  margin: 0 0 16px;
}

ul,
ol {
  margin: 0 0 16px 0;
  padding-left: 1.4em;
}

li {
  margin: 6px 0;
}

a {
  color: #004aad;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* 画像・コード */
img {
  max-width: 100%;
  height: auto;
}

pre {
  margin: 10px 0 16px;
  padding: 12px 14px;
  background: #fafafa;
  border: 1px solid #ddd;
  overflow-x: auto;
  white-space: pre-wrap;
}

code {
  font-family: Consolas, Monaco, "Courier New", monospace;
}

/* テーブルデザイン（サポートページ版を優先） */
.table-wrap {
  margin: 20px 0;
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
  table-layout: fixed;
  font-size: 15px;
}

table th,
table td {
  border: 1px solid #ddd;
  padding: 12px 14px;
  vertical-align: top;
  word-break: break-word;
}

table th {
  background: #eef2f7;
  color: #222;
  font-weight: 700;
  text-align: left;
  width: 180px;
  white-space: nowrap;
}
table td {
  background: #ffffff;
}

/* 行ストライプとホバー効果 */
table tr:nth-child(even) td {
  background: #f8fafc;
}

table tr:hover td {
  background: #eef6ff;
}

/* 特殊リスト */
.check-list {
  list-style: none;
  padding-left: 0;
  margin-left: 0;
}

.check-list li {
  position: relative;
  padding-left: 1.7em;
  margin: 10px 0;
}

.check-list li::before {
  content: "✔";
  position: absolute;
  left: 0;
  top: 0;
  color: #169b45;
  font-weight: 700;
}

/* 各種ボックス */
.lead {
  font-size: 16px;
}

.box {
  background: #f0fdf4;
  border: 1px solid #86efac;
  padding: 14px 16px;
  margin: 20px 0;
  border-radius: 6px;
}

.box p {
  margin: 0;
}

.recommend {
  border: 1px solid #b7dfc1;
  background: #f2fbf4;
  padding: 14px 16px;
  margin: 16px 0 18px;
}

.recommend strong {
  color: #12823a;
}

.note {
  color: #666;
  font-size: 14px;
  margin-top: 6px;
}

/* フッター */
.footer {
  margin-top: 40px;
  padding-top: 15px;
  border-top: 1px solid #ccc;
  text-align: center;
  font-size: 14px;
}

.copyright {
  margin-top: 8px;
  color: #666;
}

/* モバイル対応 */
@media (max-width: 640px) {
  .wrap {
    padding: 16px 14px 32px;
  }

  h1 {
    font-size: 23px;
  }

  h2 {
    font-size: 19px;
    padding-left: 24px;
  }

  h2::before {
    left: 9px;
    font-size: 14px;
  }

  table th,
  table td {
    padding: 11px 12px;
  }

  pre {
    font-size: 13px;
  }
}

/* リストボックス */
ol,
ul {
  background: #f3faf5;
  padding: 18px 24px 18px 34px;
  margin: 20px 0;
  border-radius: 6px;
}

.table-wrap table {
  table-layout: fixed;
}

/* 行間 */
li {
  margin: 6px 0;
}

.table-wrap table {
  table-layout: fixed;
  width: 100% !important;
}
.table-wrap table th:first-child,
.table-wrap table td:first-child {
  width: 110px !important; /* 左表幅調整 */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.to-top {
  position: fixed;
  right: 16px;
  bottom: 16px;
  width: 40px;
  height: 40px;
  background: #111827;
  border-radius: 6px;
  opacity: 0;
  pointer-events: none;
  z-index: 1000;
  transition: 0.2s;
}

.to-top.show {
  opacity: 1;
  pointer-events: auto;
}

.to-top::before {
  content: "";
  width: 10px;
  height: 10px;
  border-top: 2px solid #fff;
  border-left: 2px solid #fff;
  transform: rotate(45deg);
  position: absolute;
  top: 14px;
  left: 14px;
}

.to-top:hover {
  background: #000;
  transform: translateY(-2px);
}
