/*
 * サイト全体のスタイル（ランディング + ドキュメント）。
 * テーマ: 紙（paper）と墨（ink）、信号色のオレンジ（accent）、ウルトラマリン（blue）。
 * ダークモードは OS 設定に従い、ヘッダーのボタンで上書き（html[data-theme]）。色はすべて CSS 変数経由。
 */

:root {
  --paper: #f3eee4;
  --paper-2: #ebe4d6;
  --paper-3: #e1d8c6;
  --ink: #17140f;
  --ink-2: #4d463a;
  --ink-3: #7b7262;
  --line: #d6ccb9;
  --accent: #ff4f1f;
  --accent-ink: #fff8ec;
  --accent-soft: #ffdccc;
  --blue: #2f47ff;
  --green: #0f9d58;
  --code-bg: #1b1814;
  --code-ink: #efe7d6;
  --code-dim: #8f8573;
  --tk-k: #ff8a5c;
  --tk-s: #b8e07a;
  --tk-n: #8fb4ff;
  --shadow: 0 1px 0 rgba(23, 20, 15, 0.06), 0 18px 40px -18px rgba(23, 20, 15, 0.35);
  --radius: 14px;
  --font-display: 'Bricolage Grotesque', ui-sans-serif, system-ui, sans-serif;
  --font-body: 'Bricolage Grotesque', ui-sans-serif, system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --topbar-h: 60px;
  color-scheme: light;
}
:root:lang(ja) {
  --font-body: 'Zen Kaku Gothic New', 'Bricolage Grotesque', 'Hiragino Sans', sans-serif;
  --font-display-ja: 'Dela Gothic One', 'Zen Kaku Gothic New', sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --paper: #12110e;
    --paper-2: #1a1814;
    --paper-3: #24211b;
    --ink: #f0e9db;
    --ink-2: #c2b9a7;
    --ink-3: #8a8171;
    --line: #2f2b24;
    --accent: #ff6a3d;
    --accent-ink: #1a0d06;
    --accent-soft: #3a1c10;
    --blue: #8b97ff;
    --green: #4cd08a;
    --code-bg: #0b0a08;
    --shadow: 0 1px 0 rgba(0, 0, 0, 0.4), 0 18px 40px -18px rgba(0, 0, 0, 0.8);
    color-scheme: dark;
  }
}
:root[data-theme='dark'] {
  --paper: #12110e;
  --paper-2: #1a1814;
  --paper-3: #24211b;
  --ink: #f0e9db;
  --ink-2: #c2b9a7;
  --ink-3: #8a8171;
  --line: #2f2b24;
  --accent: #ff6a3d;
  --accent-ink: #1a0d06;
  --accent-soft: #3a1c10;
  --blue: #8b97ff;
  --green: #4cd08a;
  --code-bg: #0b0a08;
  --shadow: 0 1px 0 rgba(0, 0, 0, 0.4), 0 18px 40px -18px rgba(0, 0, 0, 0.8);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--topbar-h) + 16px); }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 16px/1.6 var(--font-body); font-optical-sizing: auto; overflow-x: hidden; }
a { color: inherit; }
img, svg { display: block; }
code, kbd, pre { font-family: var(--font-mono); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--ink); color: var(--paper); padding: 8px 14px; border-radius: 8px; }
.skip:focus { top: 10px; }

/* ------------------------------------------------------------------ top bar */
.topbar { position: sticky; top: 0; z-index: 50; height: var(--topbar-h); background: color-mix(in srgb, var(--paper) 86%, transparent); backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid var(--line); }
.topbar-in { height: 100%; max-width: 1320px; margin: 0 auto; padding: 0 20px; display: flex; align-items: center; gap: 20px; }
.brand { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; font: 800 21px/1 var(--font-display); letter-spacing: -0.03em; }
.logo-mark { width: 30px; height: 19px; color: var(--accent); }
.topnav { display: flex; gap: 4px; margin-left: 8px; }
.topnav a { text-decoration: none; font-weight: 600; font-size: 15px; color: var(--ink-2); padding: 6px 10px; border-radius: 8px; display: inline-flex; align-items: center; gap: 4px; }
.topnav a:hover, .topnav a[aria-current='page'] { color: var(--ink); background: var(--paper-2); }
.ext { width: 10px; height: 10px; }
.tools { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.search-btn { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 10px 0 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper-2); color: var(--ink-3); font: inherit; font-size: 14px; cursor: pointer; min-width: 200px; }
.search-btn svg { width: 15px; height: 15px; }
.search-btn kbd, .search-box kbd { margin-left: auto; font-size: 11px; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px; padding: 1px 6px; color: var(--ink-3); background: var(--paper); }
.lang { font-weight: 700; font-size: 14px; text-decoration: none; padding: 7px 10px; border-radius: 8px; border: 1px solid var(--line); }
.lang:hover { background: var(--paper-2); }
.icon-btn { width: 36px; height: 36px; display: inline-grid; place-items: center; border: 1px solid var(--line); border-radius: 10px; background: transparent; color: var(--ink); cursor: pointer; }
.icon-btn svg { width: 18px; height: 18px; }
.theme-btn .moon { display: none; }
:root[data-theme='dark'] .theme-btn .sun { display: none; }
:root[data-theme='dark'] .theme-btn .moon { display: inline; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .theme-btn .sun { display: none; }
  :root:not([data-theme='light']) .theme-btn .moon { display: inline; }
}
.menu-btn { display: none; }

/* ------------------------------------------------------------------ buttons */
.btn { display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 22px; border-radius: 12px; font: 700 16px/1 var(--font-display); text-decoration: none; border: 2px solid var(--ink); transition: transform 0.15s ease, box-shadow 0.15s ease; }
.btn-primary { background: var(--accent); color: var(--accent-ink); border-color: var(--ink); box-shadow: 4px 4px 0 var(--ink); }
.btn-primary:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); }
.btn-primary:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--paper-2); }

/* ------------------------------------------------------------------ landing: hero */
.hero { position: relative; overflow: hidden; border-bottom: 2px solid var(--ink); background:
  radial-gradient(circle at 1px 1px, color-mix(in srgb, var(--ink) 14%, transparent) 1px, transparent 0) 0 0 / 22px 22px, var(--paper); }
.hero-in { position: relative; max-width: 1320px; margin: 0 auto; padding: 88px 20px 96px; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 56px; align-items: center; }
.eyebrow, .kicker { display: inline-block; font: 700 13px/1 var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); margin: 0 0 22px; }
.eyebrow { background: var(--ink); color: var(--paper); padding: 8px 12px; border-radius: 999px; }
.hero h1 { font: 800 clamp(44px, 7.4vw, 104px)/0.92 var(--font-display); letter-spacing: -0.045em; margin: 0 0 28px; font-variation-settings: 'opsz' 96; }
.hero h1 span { display: block; }
.hero h1 .h1-b { color: var(--accent); -webkit-text-stroke: 0; }
:root:lang(ja) .hero h1 { font-family: var(--font-display-ja); font-weight: 400; letter-spacing: -0.02em; line-height: 1.08; font-size: clamp(38px, 5.6vw, 78px); }
.lead { font-size: clamp(18px, 1.6vw, 21px); line-height: 1.5; color: var(--ink-2); max-width: 34ch; margin: 0 0 32px; }
:root:lang(ja) .lead { max-width: 30em; }
.ctas { display: flex; flex-wrap: wrap; gap: 14px; }
.install { margin: 22px 0 0; color: var(--ink-3); font-size: 14px; }
.install code { background: var(--paper-2); border: 1px dashed var(--line); padding: 4px 8px; border-radius: 6px; color: var(--ink-2); }

/* 雲（ピクセル風の階段形を box-shadow で描く）: 背景でゆっくり流れる */
.sky { position: absolute; inset: 0; pointer-events: none; }
.cloud { position: absolute; width: 16px; height: 16px; color: color-mix(in srgb, var(--ink) 7%, transparent); background: currentColor;
  box-shadow: 16px 0, 32px 0, 48px 0, 16px -16px, 32px -16px, -16px 0, 64px 0, 0 16px, 16px 16px, 32px 16px, 48px 16px, 64px 16px, -16px 16px, 80px 16px;
  animation: drift 90s linear infinite; }
.c1 { top: 18%; left: -10%; transform: scale(2.4); }
.c2 { top: 70%; left: -30%; transform: scale(1.6); animation-duration: 120s; animation-delay: -40s; }
.c3 { top: 36%; left: -50%; transform: scale(3.2); animation-duration: 150s; animation-delay: -90s; color: color-mix(in srgb, var(--accent) 12%, transparent); }
@keyframes drift { to { translate: 170vw 0; } }

/* hero demo: code card + effects */
.hero-demo { position: relative; display: grid; gap: 16px; }
.code-card { margin: 0; background: var(--code-bg); color: var(--code-ink); border: 2px solid var(--ink); border-radius: 16px; box-shadow: 8px 8px 0 var(--ink); overflow: hidden; }
.code-card figcaption { display: flex; align-items: center; gap: 12px; padding: 12px 16px; font: 500 12px/1 var(--font-mono); color: var(--code-dim); border-bottom: 1px solid rgba(255, 255, 255, 0.07); }
.dots { display: inline-flex; gap: 6px; }
.dots i { width: 10px; height: 10px; border-radius: 50%; background: #3a352d; }
.dots i:first-child { background: var(--accent); }
.code-card pre { margin: 0; padding: 18px 0; overflow-x: auto; font-size: clamp(12px, 1.12vw, 14.5px); line-height: 1.5; }
.ln { display: block; padding: 6px 18px; border-left: 3px solid transparent; animation: line-on 9s infinite; white-space: pre; }
.ln .note { display: block; color: var(--code-dim); font-size: 0.86em; padding-top: 2px; }
.l2 { animation-delay: 3s; }
.l3 { animation-delay: 6s; }
@keyframes line-on { 0%, 33% { background: rgba(255, 106, 61, 0.14); border-left-color: var(--accent); } 34%, 100% { background: transparent; border-left-color: transparent; } }
.tk-k { color: var(--tk-k); }
.tk-s { color: var(--tk-s); }
.tk-n { color: var(--tk-n); }
.tk-c { color: var(--code-dim); font-style: italic; }

.effects { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.fx { background: var(--paper); border: 2px solid var(--ink); border-radius: 14px; padding: 14px; box-shadow: 4px 4px 0 var(--ink); font-size: 13px; }
.fx-title { margin: 0 0 10px; font: 700 11px/1 var(--font-mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); }
.fx-title b { color: var(--ink); letter-spacing: 0.14em; }
.mini-lb { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; position: relative; }
.mini-lb li { display: grid; grid-template-columns: 1.6em 1fr auto; gap: 6px; padding: 5px 8px; border-radius: 8px; font-variant-numeric: tabular-nums; }
.mini-lb b { color: var(--ink-3); }
.mini-lb em { font-style: normal; font-weight: 700; }
.mini-lb .me { background: var(--accent); color: var(--accent-ink); animation: climb 9s infinite; animation-delay: 3s; }
.mini-lb .me b { color: inherit; }
.mini-lb .drop { animation: fall 9s infinite; animation-delay: 3s; }
@keyframes climb { 0% { transform: translateY(66px); } 6%, 100% { transform: translateY(0); } }
@keyframes fall { 0% { transform: translateY(-33px); } 6%, 100% { transform: translateY(0); } }
/* 2026-09-27 flat-site: ランキングを隠している間のヒーローの 2 つ目の効果（セーブ）。コードの 2 行目が光る 3 秒目に、保存した値が光る */
.save-json { margin: 0; font: 600 14px/1.4 var(--font-mono); font-variant-numeric: tabular-nums; }
.save-new { padding: 1px 4px; border-radius: 5px; animation: saved 9s infinite; animation-delay: 3s; }
@keyframes saved { 0%, 12% { background: var(--accent); color: var(--accent-ink); } 30%, 100% { background: transparent; color: inherit; } }
.arena { position: relative; height: 62px; border-radius: 10px; background: var(--paper-2); overflow: hidden;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 14px 14px; }
.cur { position: absolute; width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--ink); }
.cur.a { background: var(--accent); animation: wander-a 4.5s ease-in-out infinite alternate; }
.cur.b { background: var(--blue); animation: wander-b 5.2s ease-in-out infinite alternate; opacity: 0; animation-name: wander-b, appear; animation-duration: 5.2s, 9s; animation-iteration-count: infinite; animation-delay: 0s, 6s; }
@keyframes wander-a { 0% { left: 10%; top: 20%; } 50% { left: 55%; top: 60%; } 100% { left: 80%; top: 15%; } }
@keyframes wander-b { 0% { left: 75%; top: 55%; } 50% { left: 30%; top: 10%; } 100% { left: 20%; top: 60%; } }
@keyframes appear { 0% { opacity: 0; transform: scale(0); } 4%, 100% { opacity: 1; transform: scale(1); } }
.fx-sub { margin: 8px 0 0; font-size: 12px; color: var(--ink-3); line-height: 1.35; }
.fx-deploy { grid-column: 1 / -1; font: 500 13px/1.4 var(--font-mono); background: var(--ink); color: var(--paper); display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; }
.prompt { color: var(--accent); }
.fx-deploy .ok { color: #7fe0a8; margin-left: auto; }

/* ------------------------------------------------------------------ landing: sections */
.section-in { max-width: 1320px; margin: 0 auto; padding: 96px 20px; }
section h2 { font: 800 clamp(32px, 4.4vw, 58px)/1 var(--font-display); letter-spacing: -0.035em; margin: 0 0 48px; max-width: 18ch; }
:root:lang(ja) section h2 { font-family: var(--font-display-ja); font-weight: 400; letter-spacing: 0; line-height: 1.2; max-width: 22em; font-size: clamp(28px, 3.6vw, 46px); }

.feat-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(12, 1fr); gap: 16px; }
.feat { position: relative; grid-column: span 3; background: var(--paper-2); border: 2px solid var(--ink); border-radius: var(--radius); padding: 22px 22px 20px; display: flex; flex-direction: column; min-height: 230px; transition: transform 0.2s ease, box-shadow 0.2s ease; }
.feat:hover { transform: translate(-3px, -3px); box-shadow: 6px 6px 0 var(--ink); }
.feat-3, .feat-6 { grid-column: span 6; background: var(--ink); color: var(--paper); }
/* 反転カード（地が墨）。.feat p より後で効くよう詳細度を上げる（ダークモードで地がクリームになっても読めるように） */
.feat.feat-3 p, .feat.feat-6 p { color: color-mix(in srgb, var(--paper) 78%, var(--ink)); }
.feat-8 { background: var(--accent); color: var(--accent-ink); }
.feat.feat-8 p { color: inherit; opacity: 0.88; }
.feat-no { font: 700 12px/1 var(--font-mono); color: var(--ink-3); }
.feat-3 .feat-no, .feat-6 .feat-no, .feat-8 .feat-no { color: inherit; opacity: 0.6; }
.feat-glyph { width: 30px; height: 30px; position: absolute; top: 18px; right: 18px; color: var(--accent); }
.feat-8 .feat-glyph { color: var(--accent-ink); }
.feat h3 { font: 800 23px/1.1 var(--font-display); letter-spacing: -0.02em; margin: 30px 0 8px; }
.feat p { margin: 0 0 18px; color: var(--ink-2); font-size: 15px; line-height: 1.5; }
.feat code { margin-top: auto; font-size: 12.5px; align-self: flex-start; background: color-mix(in srgb, var(--ink) 8%, transparent); padding: 5px 8px; border-radius: 6px; }
.feat.feat-3 code, .feat.feat-6 code { background: var(--code-bg); color: var(--tk-s); }

.how { background: var(--paper-2); border-block: 2px solid var(--ink); }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; counter-reset: s; }
.step { position: relative; padding: 0 28px 0 0; }
.step + .step { padding-left: 28px; border-left: 2px dashed var(--line); }
.step-no { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); border: 2px solid var(--ink); font: 800 20px/1 var(--font-display); }
.term { font: 600 15px/1 var(--font-mono); background: var(--code-bg); color: var(--code-ink); padding: 14px 16px; border-radius: 10px; margin: 22px 0 18px; white-space: nowrap; overflow-x: auto; }
.step h3 { font: 800 22px/1.15 var(--font-display); margin: 0 0 8px; }
.step p:last-child { color: var(--ink-2); margin: 0; }

.compare-table { width: 100%; border-collapse: separate; border-spacing: 0; border: 2px solid var(--ink); border-radius: var(--radius); overflow: hidden; font-size: 15px; }
.compare-table th, .compare-table td { text-align: left; padding: 16px 18px; border-bottom: 1px solid var(--line); vertical-align: top; }
.compare-table tr:last-child > * { border-bottom: 0; }
.compare-table thead th { font: 700 12px/1 var(--font-mono); text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-3); background: var(--paper-2); }
.compare-table thead th.us { background: var(--accent); color: var(--accent-ink); }
.compare-table tbody th { font-weight: 700; width: 22%; }
.compare-table td:nth-child(2) { color: var(--ink-3); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--ink-3) 45%, transparent); }
.compare-table td:last-child { background: color-mix(in srgb, var(--accent) 7%, transparent); width: 30%; }
.compare-table code { font-size: 13px; font-weight: 600; }
.fine { color: var(--ink-3); font-size: 13px; margin: 14px 0 0; }

.trust { background: var(--ink); color: var(--paper); }
.trust h2 { color: var(--paper); }
.trust-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.trust-grid li { border-top: 3px solid var(--accent); padding-top: 18px; }
.trust-grid h3 { font: 800 21px/1.2 var(--font-display); margin: 0 0 8px; }
.trust-grid p { margin: 0; color: color-mix(in srgb, var(--paper) 70%, transparent); }

.final { text-align: center; }
.final .section-in { padding-block: 120px; }
.final h2 { margin: 0 auto 18px; max-width: 16ch; }
:root:lang(ja) .final h2 { max-width: 20em; }
.final p { color: var(--ink-2); font-size: 18px; max-width: 46ch; margin: 0 auto 32px; }
.final .ctas { justify-content: center; }

.site-footer { border-top: 2px solid var(--ink); background: var(--paper-2); }
.footer-in { max-width: 1320px; margin: 0 auto; padding: 36px 20px; display: flex; flex-wrap: wrap; gap: 12px 28px; align-items: center; }
.footer-in p { margin: 0; color: var(--ink-3); font-size: 14px; }
.footer-links { margin-left: auto !important; }
.footer-links a { color: var(--ink-2); }

/* ------------------------------------------------------------------ docs */
.docs-shell { max-width: 1320px; margin: 0 auto; display: grid; grid-template-columns: 250px minmax(0, 1fr) 220px; gap: 48px; padding: 0 20px; }
.sidebar { position: sticky; top: var(--topbar-h); align-self: start; max-height: calc(100vh - var(--topbar-h)); overflow-y: auto; padding: 28px 0 40px; }
.nav-group + .nav-group { margin-top: 22px; }
.nav-label { margin: 0 0 8px; font: 700 11px/1 var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); }
.sidebar ul, .toc ul { list-style: none; margin: 0; padding: 0; }
.sidebar a { display: block; text-decoration: none; padding: 6px 10px; margin-left: -10px; border-radius: 8px; color: var(--ink-2); font-size: 15px; }
.sidebar a:hover { background: var(--paper-2); color: var(--ink); }
.sidebar a[aria-current='page'] { background: var(--ink); color: var(--paper); font-weight: 600; }
.doc { padding: 36px 0 80px; min-width: 0; }
.doc-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 0 0 8px; }
.doc-head .crumb { margin: 0; }
/* 「Markdown をコピー」（2026-09-28 ai-docs）。本文の邪魔をしない小さな枠のボタン。JS が無いときは .md へのリンク */
.copy-md { font: 600 12px/1 var(--font-mono); color: var(--ink-3); text-decoration: none; border: 1px solid var(--line); border-radius: 6px; padding: 6px 9px; white-space: nowrap; }
.copy-md:hover, .copy-md:focus-visible { color: var(--ink); border-color: var(--ink-3); }
.copy-md.done { color: var(--accent); border-color: var(--accent); }
.crumb { margin: 0 0 8px; font: 700 12px/1 var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }
.lang-notice { border: 2px dashed var(--line); border-radius: 10px; padding: 10px 14px; color: var(--ink-2); font-size: 14px; }
.toc { position: sticky; top: var(--topbar-h); align-self: start; padding: 36px 0; max-height: calc(100vh - var(--topbar-h)); overflow-y: auto; }
.toc li a { display: block; text-decoration: none; color: var(--ink-3); font-size: 13.5px; padding: 4px 0 4px 12px; border-left: 2px solid var(--line); }
.toc li.l3 a { padding-left: 24px; }
.toc li a:hover, .toc li a.active { color: var(--ink); border-left-color: var(--accent); }

.prose { max-width: 76ch; font-size: 16.5px; }
.prose h1 { font: 800 clamp(34px, 4.4vw, 50px)/1.02 var(--font-display); letter-spacing: -0.035em; margin: 0 0 22px; }
:root:lang(ja) .prose h1 { font-family: var(--font-display-ja); font-weight: 400; letter-spacing: 0; line-height: 1.25; font-size: clamp(28px, 3.6vw, 40px); }
.prose[lang='en'] h1 { font-family: var(--font-display); font-weight: 800; letter-spacing: -0.035em; }
.prose h2 { font: 800 28px/1.15 var(--font-display); letter-spacing: -0.02em; margin: 52px 0 14px; padding-top: 18px; border-top: 2px solid var(--ink); }
.prose h3 { font: 700 20px/1.25 var(--font-display); margin: 32px 0 10px; }
.prose h4 { font-size: 16px; margin: 24px 0 8px; }
:root:lang(ja) .prose h2, :root:lang(ja) .prose h3 { font-family: var(--font-body); font-weight: 700; letter-spacing: 0; }
.anchor { margin-left: 8px; text-decoration: none; color: var(--ink-3); opacity: 0; font-weight: 400; }
.prose :is(h2, h3):hover .anchor, .anchor:focus { opacity: 1; }
.prose p, .prose li { color: var(--ink-2); line-height: 1.7; }
:root:lang(ja) .prose p, :root:lang(ja) .prose li { line-height: 1.9; }
.prose strong { color: var(--ink); }
.prose a { color: var(--ink); text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.prose a:hover { background: var(--accent-soft); }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin: 4px 0; }
.prose li::marker { color: var(--accent); }
.prose :not(pre) > code { font-size: 0.86em; background: var(--paper-2); border: 1px solid var(--line); padding: 1px 6px; border-radius: 6px; color: var(--ink); overflow-wrap: anywhere; }
.prose hr { border: 0; border-top: 2px dashed var(--line); margin: 40px 0; }
.code { position: relative; margin: 20px 0; background: var(--code-bg); border-radius: 12px; border: 1px solid color-mix(in srgb, var(--ink) 30%, transparent); overflow: hidden; }
.code figcaption { font: 500 12px/1 var(--font-mono); color: var(--code-dim); padding: 11px 16px; border-bottom: 1px solid rgba(255, 255, 255, 0.07); }
.code pre { margin: 0; padding: 16px 18px; overflow-x: auto; color: var(--code-ink); font-size: 13.5px; line-height: 1.6; tab-size: 2; }
.copy { position: absolute; top: 8px; right: 8px; font: 600 11px/1 var(--font-mono); color: var(--code-dim); background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 6px; padding: 6px 8px; cursor: pointer; opacity: 0; transition: opacity 0.15s; }
.code:hover .copy, .copy:focus-visible, .copy.done { opacity: 1; }
.copy.done { color: #7fe0a8; }
.table-wrap { overflow-x: auto; margin: 20px 0; border: 1px solid var(--line); border-radius: 12px; }
.prose table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.prose th, .prose td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose thead th { background: var(--paper-2); font-size: 13px; color: var(--ink); white-space: nowrap; }
.prose tbody tr:last-child td { border-bottom: 0; }
.prose td { color: var(--ink-2); }
/* 表の 1 列目（メソッド名・キー名）は折らない。表全体は .table-wrap が横スクロールする */
.prose td:first-child code { white-space: nowrap; overflow-wrap: normal; }
.prose blockquote { margin: 22px 0; padding: 14px 18px; border-left: 4px solid var(--ink-3); background: var(--paper-2); border-radius: 0 10px 10px 0; }
.prose blockquote p { margin: 0; }
.callout-note { border-left-color: var(--blue) !important; }
.callout-tip { border-left-color: var(--green) !important; }
.callout-warn { border-left-color: var(--accent) !important; }
.callout-soon { border-left-color: var(--accent) !important; background: var(--accent-soft) !important; }
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 64px; max-width: 76ch; }
.pager a { display: block; text-decoration: none; border: 2px solid var(--ink); border-radius: 12px; padding: 14px 16px; font-weight: 700; transition: box-shadow 0.15s, transform 0.15s; }
.pager a:hover { transform: translate(-2px, -2px); box-shadow: 4px 4px 0 var(--ink); }
.pager small { display: block; font: 600 11px/1 var(--font-mono); color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 6px; }
.pager .next { text-align: right; grid-column: 2; }
.notfound { max-width: 720px; margin: 0 auto; padding: 120px 20px; }
.notfound h1 { font: 800 clamp(40px, 6vw, 72px)/1 var(--font-display); letter-spacing: -0.04em; }

/* ------------------------------------------------------------------ search */
.search-dialog { width: min(640px, calc(100% - 24px)); max-height: min(70vh, 640px); margin: 12vh auto auto; padding: 0; border: 2px solid var(--ink); border-radius: 16px; background: var(--paper); color: var(--ink); box-shadow: 10px 10px 0 var(--ink); }
.search-dialog::backdrop { background: color-mix(in srgb, var(--ink) 40%, transparent); backdrop-filter: blur(2px); }
.search-box { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.search-box svg { width: 18px; height: 18px; color: var(--ink-3); flex: none; }
.search-box input { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--ink); font: 500 17px/1.2 var(--font-body); outline: none; }
.search-results { list-style: none; margin: 0; padding: 8px; overflow-y: auto; max-height: calc(min(70vh, 640px) - 64px); }
.search-results:empty::after { content: attr(data-empty); display: block; padding: 20px 12px; color: var(--ink-3); font-size: 14px; }
.search-results.idle:empty::after { content: none; }
.search-results a { display: block; text-decoration: none; padding: 10px 12px; border-radius: 10px; }
.search-results a[aria-selected='true'], .search-results a:hover { background: var(--ink); color: var(--paper); }
.search-results a[aria-selected='true'] .sr-snip, .search-results a:hover .sr-snip { color: color-mix(in srgb, var(--paper) 75%, transparent); }
.sr-title { font-weight: 700; }
.sr-group { font: 600 11px/1 var(--font-mono); text-transform: uppercase; letter-spacing: 0.06em; opacity: 0.6; margin-left: 6px; }
.sr-snip { display: block; font-size: 13px; color: var(--ink-3); margin-top: 3px; line-height: 1.45; }
.search-results mark { background: var(--accent); color: var(--accent-ink); border-radius: 3px; padding: 0 2px; }

/* ------------------------------------------------------------------ responsive */
@media (max-width: 1180px) {
  .docs-shell { grid-template-columns: 230px minmax(0, 1fr); }
  .toc { display: none; }
  .feat { grid-column: span 6; }
  .feat-3, .feat-6 { grid-column: span 6; }
}
@media (max-width: 960px) {
  .hero-in { grid-template-columns: 1fr; padding: 56px 20px 64px; gap: 44px; }
  .topnav { display: none; }
  .search-btn { min-width: 0; }
  .search-btn span, .search-btn kbd { display: none; }
  .steps, .trust-grid { grid-template-columns: 1fr; gap: 36px; }
  .step, .step + .step { padding: 0; border-left: 0; }
}
@media (max-width: 860px) {
  .menu-btn { display: inline-grid; }
  .docs-shell { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .sidebar { position: fixed; z-index: 40; inset: var(--topbar-h) auto 0 0; width: min(300px, 86vw); max-height: none; background: var(--paper); border-right: 2px solid var(--ink); padding: 24px 20px; transform: translateX(-105%); transition: transform 0.22s ease; }
  body.nav-open .sidebar { transform: none; box-shadow: 20px 0 60px rgba(0, 0, 0, 0.25); }
}
@media (max-width: 640px) {
  :root { --topbar-h: 56px; }
  .topbar-in { gap: 10px; padding: 0 16px; }
  .brand { font-size: 19px; }
  .section-in { padding: 64px 16px; }
  .hero-in { padding: 44px 16px 52px; }
  .feat, .feat-3, .feat-6 { grid-column: span 12; min-height: 0; }
  .effects { grid-template-columns: 1fr; }
  .ln .note { display: none; }
  .compare-table { font-size: 14px; }
  .compare-table th, .compare-table td { padding: 12px; }
  .compare-table tbody th { width: auto; }
  .docs-shell { padding: 0 16px; }
  .prose { font-size: 16px; }
  .prose h2 { font-size: 24px; }
  .pager { grid-template-columns: 1fr; }
  .pager .next { grid-column: 1; }
  .footer-links { margin-left: 0 !important; }
  .btn { width: 100%; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .cur.b { opacity: 1; }
}

/* グリッドの子は既定で min-width: auto = 中の <pre> の幅まで広がり、スマホで右にはみ出す。0 にして pre 側で横スクロールさせる */
.hero-copy, .hero-demo, .code-card { min-width: 0; }
/* 日本語の見出しは語の途中で折らない（句読点で折る）。収まらない時だけ任意の位置で折る */
:root:lang(ja) :is(h1, h2, h3) { word-break: keep-all; overflow-wrap: anywhere; }
@media (max-width: 640px) {
  .code-card { box-shadow: 4px 4px 0 var(--ink); }
}
