:root {
  --bg: #0e1116;
  --surface: #151a21;
  --surface-2: #1b2129;
  --line: #262d36;
  --line-soft: #1f252d;
  --text: #e9edf2;
  --text-2: #9aa4b2;
  --accent: #46a8c2;
  --accent-fg: #05161c;
  --radius: 10px;
  --font: 14.5px/1.7 -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Sans",
    "Noto Sans JP", Meiryo, sans-serif;
  --mono: 13px/1.65 "Cascadia Code", Consolas, "SFMono-Regular", Menlo, monospace;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: var(--font);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
code, pre { font: var(--mono); }
.wrap { max-width: 1060px; margin: 0 auto; padding: 0 22px; }

header.site {
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
header.site .wrap {
  display: flex; align-items: center; gap: 18px;
  min-height: 56px; padding-top: 10px; padding-bottom: 10px; flex-wrap: wrap;
}
.brand {
  display: inline-flex; align-items: center; gap: 9px;
  font-weight: 650; letter-spacing: 0.06em; color: var(--text);
  font-size: 13.5px;
}
.brand:hover { text-decoration: none; }
.brand img { width: 22px; height: 22px; border-radius: 5px; display: block; }
.brand small {
  display: block; font-size: 10px; font-weight: 500; letter-spacing: 0.16em;
  color: var(--text-2); text-transform: uppercase;
}
nav.site { display: flex; gap: 4px; }
nav.site a {
  padding: 6px 11px; border-radius: 999px; font-size: 13px; color: var(--text-2);
}
nav.site a:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
nav.site a.active { background: var(--surface-2); color: var(--text); }
.spacer { flex: 1; }
.head-actions { display: flex; gap: 8px; }
.btn {
  display: inline-block; padding: 7px 13px; border-radius: 8px;
  border: 1px solid var(--line); background: var(--surface-2);
  color: var(--text); font-size: 13px; font-weight: 600;
  white-space: nowrap;
}
.btn:hover { border-color: var(--accent); text-decoration: none; }

main { padding: 28px 0 64px; }
h1 { margin: 0 0 10px; font-size: 21px; font-weight: 650; letter-spacing: -0.01em; }
h2 {
  margin: 34px 0 6px; font-size: 16px; font-weight: 650;
  display: flex; align-items: baseline; gap: 9px; flex-wrap: wrap;
}
h2:first-of-type { margin-top: 26px; }
p.note { margin: 0 0 10px; font-size: 13px; color: var(--text-2); }
.pill {
  display: inline-block; padding: 1px 8px; border-radius: 999px;
  border: 1px solid var(--line); font-size: 11px; font-weight: 500;
  color: var(--text-2);
}
.endpoint {
  margin: 0 0 10px; padding: 6px 10px; border: 1px solid var(--line);
  border-radius: 7px; background: var(--surface-2); font-family: var(--mono);
  font-size: 12.5px; color: var(--text-2); display: inline-block;
}
dl.meta {
  margin: 0 0 6px; display: grid;
  grid-template-columns: max-content minmax(0, 1fr); gap: 4px 14px;
  font-size: 13.5px;
}
dl.meta dt { color: var(--text-2); }
dl.meta dd { margin: 0; font-family: var(--mono); font-size: 12.5px; overflow-wrap: anywhere; }

pre.code {
  margin: 0; padding: 13px 15px; overflow-x: auto;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: #0b0e12; color: #d8e2ec; white-space: pre;
}
.code-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin: 14px 0 6px;
}
.code-head span {
  font-size: 11px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--text-2);
}
.copy {
  padding: 4px 10px; border-radius: 7px; border: 1px solid var(--line);
  background: var(--surface-2); color: var(--text-2); font-size: 11.5px;
  font-weight: 600; cursor: pointer; font-family: inherit;
}
.copy:hover { border-color: var(--accent); color: var(--text); }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table-wrap > table { min-width: 620px; }
th, td { padding: 10px 12px; text-align: left; vertical-align: top; }
th {
  font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--text-2); background: var(--surface-2);
  border-bottom: 1px solid var(--line); white-space: nowrap;
}
td { border-bottom: 1px solid var(--line-soft); }
tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: color-mix(in srgb, var(--text) 3%, transparent); }
.nowrap { white-space: nowrap; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.sub { display: block; margin-top: 3px; font-size: 12px; color: var(--text-2); }
.model-link {
  font-family: var(--mono); font-size: 12.5px; padding: 3px 7px;
  border: 1px solid var(--line); border-radius: 5px; background: var(--surface-2);
  color: var(--text);
  display: inline-block;
  max-width: 100%;
  /* UUID のモデルIDでも列幅を超えないよう、どこでも折り返す。 */
  word-break: break-all;
}
/* モデルIDがUUIDのことがあるため、列が潰れないよう幅を固定する。
   table-layout: fixed では th の幅の合計が 100% になる必要がある（6列）。 */
table.models { min-width: 820px; table-layout: fixed; }
table.models th:nth-child(1) { width: 19%; }
table.models th:nth-child(2) { width: 17%; }
table.models th:nth-child(3) { width: 22%; }
table.models th:nth-child(4) { width: 17%; }
table.models th:nth-child(5) { width: 13%; }
table.models th:nth-child(6) { width: 12%; }
dl.endpoints { margin: 0; }
dl.endpoints > div { padding: 12px 0; border-top: 1px solid var(--line-soft); }
dl.endpoints > div:first-child { border-top: none; padding-top: 0; }
dl.endpoints dt { font-family: var(--mono); font-size: 13px; margin-bottom: 4px; }
dl.endpoints dt .method {
  display: inline-block; padding: 1px 7px; margin-right: 8px; border-radius: 5px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.04em;
  background: var(--surface-2); border: 1px solid var(--line); color: var(--text-2);
}
dl.endpoints dt .method--post {
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 40%, transparent);
}
dl.endpoints dd { margin: 0; color: var(--text-2); font-size: 13.5px; }
footer.site {
  border-top: 1px solid var(--line); padding: 20px 0 36px;
  color: var(--text-2); font-size: 12.5px;
}
footer.site .wrap { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  header.site .wrap { gap: 8px; }
  nav.site { order: 3; width: 100%; overflow-x: auto; padding-bottom: 2px; }
  nav.site a { white-space: nowrap; }
  .head-actions { gap: 6px; margin-left: auto; }
  .head-actions .btn { padding: 6px 10px; font-size: 12.5px; }
  main { padding: 22px 0 48px; }
  table.models { min-width: 660px; font-size: 12.5px; }
  th, td { padding: 9px 10px; }
  dl.meta { grid-template-columns: minmax(0, 1fr); }
}
