
:root {
  --text: #333333;
  --muted: #767676;
  --border: #e3e6ea;
  --bg: #ffffff;
  --bg-alt: #f5fafd;
  --accent: #00a9e0;
  --accent-dark: #0089ba;
  --link: #00a9e0;
  --code-color: #0089ba;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "游ゴシック", YuGothic, "ヒラギノ角ゴ ProN W3",
    "Hiragino Kaku Gothic ProN", メイリオ, Meiryo, "Noto Sans JP",
    -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 15px;
  line-height: 1.75;
}

a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }

.topnav {
  border-bottom: 1px solid var(--border);
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 10;
}
.topnav-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}
.logo-img {
  height: 28px;
  width: auto;
  display: block;
}
.logo-label {
  font-weight: 500;
  font-size: 13px;
  color: var(--muted);
  padding-left: 10px;
  border-left: 1px solid var(--border);
  line-height: 1;
}
.topnav nav a {
  margin-left: 24px;
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
}
.topnav nav a:hover { color: var(--accent-dark); }

.hero {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
  color: #fff;
  padding: 48px 0;
}
.hero-inner { max-width: 1240px; margin: 0 auto; padding: 0 24px; }
.hero h1 {
  margin: 0;
  font-size: 28px;
  font-weight: 700;
  color: #fff;
}

.content-wrap {
  max-width: 1240px;
  margin: 0 auto;
  padding: 32px 24px 80px;
  display: flex;
  align-items: flex-start;
  gap: 40px;
}

.sidebar {
  flex: 0 0 280px;
  width: 280px;
  position: sticky;
  top: 72px;
  max-height: calc(100vh - 96px);
  overflow-y: auto;
}

.content {
  flex: 1 1 auto;
  min-width: 0;
}

.toc ul { list-style: none; margin: 0; padding: 0; }
.toc li { padding: 0; }
.toc a {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 0 6px 12px;
  border-left: 2px solid var(--border);
  color: var(--text);
  font-size: 13.5px;
  line-height: 1.4;
}
.toc a:hover {
  border-left-color: var(--accent-dark);
  color: var(--accent-dark);
  text-decoration: none;
}
.toc-label { flex: 1 1 auto; }
.toc-method {
  flex: 0 0 auto;
  color: #fff;
  font-weight: 700;
  font-size: 10px;
  letter-spacing: 0.02em;
  padding: 2px 6px;
  border-radius: 3px;
  line-height: 1.4;
}
.toc-level-3 a {
  padding-left: 24px;
  font-size: 13px;
  color: var(--muted);
}

.sitenav .nav-group { margin-bottom: 32px; }
.sitenav .nav-group:last-child { margin-bottom: 0; }
.nav-group-title {
  margin: 0 0 10px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--border);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--text);
}
.sitenav ul { list-style: none; margin: 0; padding: 0; }
.sitenav li { padding: 0; }
.sitenav a {
  display: block;
  padding: 6px 0 6px 12px;
  border-left: 2px solid var(--border);
  color: var(--text);
  font-size: 13.5px;
  line-height: 1.4;
}
.sitenav a:hover {
  border-left-color: var(--accent-dark);
  color: var(--accent-dark);
  text-decoration: none;
}
.sitenav a.current {
  border-left-color: var(--accent);
  color: var(--accent-dark);
  font-weight: 700;
  background: var(--bg-alt);
}
.sitenav li:has(> a.current) {
  background: var(--bg-alt);
  border-radius: 6px;
  padding-bottom: 6px;
  margin-bottom: 2px;
}
.sitenav li:has(> a.current) > a.current {
  border-radius: 6px 6px 0 0;
}
.sitenav .sub-toc {
  margin: 2px 0 0 12px;
  padding-left: 11px;
  border-left: 2px solid var(--border);
}
.sitenav .sub-toc a {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 0;
  border-left: none;
  color: var(--text);
  font-size: 12.5px;
  font-weight: 400;
  background: none;
  line-height: 1.4;
}
.sitenav .sub-toc a:hover {
  color: var(--accent-dark);
  text-decoration: none;
}

.content h2 {
  font-size: 20px;
  font-weight: 700;
  margin: 56px 0 20px;
  padding: 10px 16px;
  background: var(--bg-alt);
  border-left: 4px solid var(--accent);
  border-radius: 0 6px 6px 0;
}
.content h2:first-child { margin-top: 0; }
.content h3 {
  font-size: 16.5px;
  font-weight: 700;
  margin: 28px 0 12px;
}
.content h4 {
  font-size: 14.5px;
  font-weight: 700;
  margin: 20px 0 8px;
  color: var(--muted);
  text-transform: none;
}
.content p { margin: 12px 0; }
.content p.faq-q {
  margin: 24px 0 4px;
  font-weight: 700;
}
.content p.faq-a {
  margin: 0 0 12px;
  padding-left: 1.4em;
  color: var(--text);
}
.content ul, .content ol { padding-left: 1.4em; margin: 12px 0; }
.content li { margin: 4px 0; }

code {
  font-family: "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.85em;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 2px 5px;
  color: var(--code-color);
}

.code-block {
  background: #1e1e1e;
  color: #d4d4d4;
  border-radius: 6px;
  padding: 16px 18px;
  overflow-x: auto;
  margin: 16px 0;
}
.code-block code {
  background: none;
  border: none;
  color: inherit;
  padding: 0;
  font-size: 13px;
}

.table-wrap { overflow-x: auto; margin: 16px 0; }
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 13.5px;
}
th, td {
  border: 1px solid var(--border);
  padding: 8px 12px;
  text-align: left;
  vertical-align: top;
}
th {
  background: var(--bg-alt);
  font-weight: 700;
  white-space: nowrap;
}

blockquote.note {
  margin: 16px 0;
  padding: 10px 16px;
  border-left: 3px solid #d8dade;
  background: #f7f7f8;
  border-radius: 0 4px 4px 0;
  color: var(--muted);
  font-size: 14px;
}
blockquote.note p { margin: 0; }

.endpoint {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 12px 0 20px;
}
.endpoint .method {
  color: #fff;
  font-weight: 700;
  font-size: 12.5px;
  padding: 6px 12px;
  border-radius: 4px;
  letter-spacing: 0.02em;
}
.endpoint .path {
  font-size: 14px;
  background: none;
  border: none;
  padding: 0;
  color: var(--text);
}

.index-list { list-style: none; padding: 0; }
.index-list li {
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.index-list a { font-size: 15px; }

.site-footer {
  background: #f5f5f5;
  padding: 48px 24px;
  text-align: center;
}
.footer-links {
  list-style: none;
  margin: 0 0 32px;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 28px;
}
.footer-links a {
  font-size: 13px;
  color: var(--text);
}
.footer-links a:hover { color: var(--accent-dark); }
.footer-copy {
  margin: 0;
  font-size: 13px;
  color: var(--text);
}

hr { border: none; border-top: 1px solid var(--border); margin: 32px 0; }

pre.mermaid {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 16px;
}

@media (max-width: 900px) {
  .content-wrap { flex-direction: column; gap: 8px; }
  .sidebar {
    position: static;
    width: 100%;
    max-height: none;
    border: 1px solid var(--border);
    background: var(--bg-alt);
    border-radius: 6px;
    padding: 16px 20px;
    margin-bottom: 16px;
  }
}

@media (max-width: 640px) {
  .hero { padding: 32px 0; }
  .hero-inner { padding: 0 16px; }
  .content-wrap { padding: 24px 16px 60px; }
  .topnav-inner { padding: 12px 16px; flex-wrap: wrap; }
  .topnav nav a { margin-left: 14px; font-size: 13px; }
  .site-search { order: 3; flex-basis: 100%; max-width: none; margin-top: 10px; }
}

.site-search {
  position: relative;
  flex: 1 1 auto;
  max-width: 320px;
  margin: 0 24px;
}
.site-search input[type="search"] {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 13.5px;
  font-family: inherit;
  background: var(--bg-alt);
  color: var(--text);
  box-sizing: border-box;
}
.site-search input[type="search"]:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0, 169, 224, 0.15);
  background: #fff;
}
.site-search-results {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(17, 17, 17, 0.12);
  max-height: 420px;
  overflow-y: auto;
  z-index: 50;
}
.site-search-item {
  display: block;
  padding: 9px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}
.site-search-item:last-child { border-bottom: none; }
.site-search-item:hover { background: var(--bg-alt); text-decoration: none; }
.site-search-item-main {
  display: flex;
  align-items: center;
  gap: 6px;
}
.site-search-item-title { flex: 1 1 auto; font-size: 13.5px; }
.site-search-item-breadcrumb {
  margin-top: 2px;
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.site-search-method {
  flex: 0 0 auto;
  color: #fff;
  font-weight: 700;
  font-size: 9.5px;
  padding: 2px 5px;
  border-radius: 3px;
  letter-spacing: 0.02em;
}
.site-search-empty { padding: 14px; color: var(--muted); font-size: 13px; }
