/* =====================================================================
   AIモデル辞典 — デザインシステム v2（§34 徹底作り込み）
   ビルドレスの素CSS。CSSで画像的表現・カード/表・スクロール演出。
   モバイルファースト / ダークモード / prefers-reduced-motion 対応。
   ===================================================================== */

:root {
  /* ベース */
  --bg: #f5f7fb;
  --bg-2: #eef2f9;
  --surface: #ffffff;
  --surface-2: #f1f5fb;
  --surface-glass: rgba(255, 255, 255, .72);
  --border: #e0e7f1;
  --border-strong: #c9d4e3;
  --text: #131a26;
  --text-muted: #5a6677;
  --text-soft: #8593a6;

  /* ブランド（青→紫グラデを基調） */
  --brand: #2f5fe6;
  --brand-dark: #1d44c4;
  --brand-2: #7c3aed;
  --brand-soft: #e9f0ff;
  --grad-brand: linear-gradient(135deg, #2f5fe6 0%, #7c3aed 100%);
  --grad-hero: linear-gradient(135deg, #3b6cf0 0%, #7c3aed 55%, #a855f7 100%);
  --grad-sheen: linear-gradient(120deg, transparent 30%, rgba(255,255,255,.55) 50%, transparent 70%);

  /* 判定信号色（色＋ラベル＋アイコン §38） */
  --signal-green: #0f9d58;  --signal-green-bg: #e6f7ee;  --signal-green-glow: rgba(15,157,88,.35);
  --signal-yellow:#c08401;  --signal-yellow-bg:#fdf3df;  --signal-yellow-glow: rgba(192,132,1,.32);
  --signal-red:   #d33a3a;  --signal-red-bg:  #fdeaea;   --signal-red-glow: rgba(211,58,58,.32);
  --signal-gray:  #6b7686;  --signal-gray-bg: #eef1f6;   --signal-gray-glow: rgba(107,118,134,.28);

  --radius-xl: 22px;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow-sm: 0 1px 2px rgba(16,30,54,.06), 0 2px 6px rgba(16,30,54,.05);
  --shadow: 0 2px 6px rgba(16,30,54,.07), 0 12px 30px rgba(16,30,54,.08);
  --shadow-lift: 0 10px 24px rgba(33,55,120,.16), 0 24px 60px rgba(33,55,120,.14);
  --shadow-glow: 0 8px 30px rgba(47,95,230,.28);
  --maxw: 1120px;
  --ease: cubic-bezier(.22,.61,.36,1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0f17;
    --bg-2: #0e131d;
    --surface: #141b27;
    --surface-2: #1a2331;
    --surface-glass: rgba(20, 27, 39, .72);
    --border: #26303f;
    --border-strong: #34415380;
    --text: #e8edf5;
    --text-muted: #a3b1c4;
    --text-soft: #7c8aa0;
    --brand: #6f9bff;
    --brand-dark: #8fb0ff;
    --brand-2: #b07cff;
    --brand-soft: #18233c;
    --signal-green-bg:#10241a; --signal-yellow-bg:#272010; --signal-red-bg:#2a1414; --signal-gray-bg:#1a212c;
    --shadow-sm: 0 1px 2px rgba(0,0,0,.5);
    --shadow: 0 2px 8px rgba(0,0,0,.4), 0 16px 40px rgba(0,0,0,.45);
    --shadow-lift: 0 12px 40px rgba(0,0,0,.6);
    --shadow-glow: 0 8px 34px rgba(111,155,255,.30);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Hiragino Kaku Gothic ProN",
    "Hiragino Sans", "Noto Sans JP", "Yu Gothic", Meiryo, sans-serif;
  line-height: 1.78;
  color: var(--text);
  background: var(--bg);
  font-size: 16px;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: var(--brand); text-decoration: none; transition: color .15s; }
a:hover { color: var(--brand-dark); }

h1,h2,h3,h4 { line-height: 1.32; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 1.15rem; }

/* ===== 装飾背景（CSSで「画像っぽい」オーロラ） ===== */
.aurora {
  position: fixed; inset: 0; z-index: -2; overflow: hidden; pointer-events: none;
}
.aurora::before, .aurora::after {
  content: ""; position: absolute; width: 56vw; height: 56vw; border-radius: 50%;
  filter: blur(90px); opacity: .55; will-change: transform;
}
.aurora::before {
  top: -16vw; right: -10vw;
  background: radial-gradient(circle at 30% 30%, #6d8bff, transparent 60%);
  animation: drift1 22s var(--ease) infinite alternate;
}
.aurora::after {
  bottom: -20vw; left: -12vw;
  background: radial-gradient(circle at 60% 40%, #b07cff, transparent 60%);
  animation: drift2 26s var(--ease) infinite alternate;
}
.grid-overlay {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image: linear-gradient(var(--border) 1px, transparent 1px),
                    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, #000 0%, transparent 70%);
          mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, #000 0%, transparent 70%);
  opacity: .35;
}
@keyframes drift1 { to { transform: translate3d(-6vw, 6vh, 0) scale(1.12); } }
@keyframes drift2 { to { transform: translate3d(7vw, -5vh, 0) scale(1.08); } }

/* ===== ヘッダー ===== */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--surface-glass);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
          backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow .25s, background .25s;
}
.site-header.scrolled { box-shadow: var(--shadow-sm); }
.site-header .container { display: flex; align-items: center; gap: .75rem; height: 62px; }
.site-logo { display: flex; align-items: center; gap: .55rem; font-weight: 800; color: var(--text); font-size: 1.1rem; letter-spacing: .01em; }
.site-logo .logo-mark {
  width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center;
  background: var(--grad-brand); box-shadow: var(--shadow-glow); color: #fff; flex: none;
}
.site-logo .logo-mark svg { width: 20px; height: 20px; }
.site-logo:hover .logo-mark { animation: pop .5s var(--ease); }
@keyframes pop { 50% { transform: scale(1.12) rotate(-6deg); } }

.site-nav { margin-left: auto; display: flex; gap: 1.15rem; align-items: center; }
.site-nav a { color: var(--text-muted); font-size: .94rem; font-weight: 600; position: relative; padding: .2rem 0; }
.site-nav a::after {
  content: ""; position: absolute; left: 0; bottom: -2px; height: 2px; width: 0;
  background: var(--grad-brand); border-radius: 2px; transition: width .25s var(--ease);
}
.site-nav a:hover { color: var(--brand); }
.site-nav a:hover::after { width: 100%; }

/* モバイルナビ（チェックボックスハック / JS不要） */
.nav-toggle, .nav-toggle-label { display: none; }
.nav-toggle-label { cursor: pointer; margin-left: auto; width: 42px; height: 42px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.nav-toggle-label span, .nav-toggle-label span::before, .nav-toggle-label span::after {
  content: ""; position: absolute; width: 20px; height: 2px; background: var(--text); border-radius: 2px; transition: .25s var(--ease);
}
.nav-toggle-label span { position: relative; display: block; margin: 20px auto; }
.nav-toggle-label span::before { top: -6px; left: 0; }
.nav-toggle-label span::after { top: 6px; left: 0; }

@media (max-width: 860px) {
  .nav-toggle-label { display: block; }
  .site-nav {
    position: fixed; inset: 62px 0 auto 0; flex-direction: column; gap: 0; align-items: stretch;
    background: var(--surface); border-bottom: 1px solid var(--border);
    max-height: 0; overflow: hidden; transition: max-height .3s var(--ease); box-shadow: var(--shadow);
  }
  .site-nav a { padding: .95rem 1.2rem; border-top: 1px solid var(--border); font-size: 1rem; }
  .site-nav a::after { display: none; }
  .nav-toggle:checked ~ .site-nav { max-height: 70vh; }
  .nav-toggle:checked ~ .nav-toggle-label span { background: transparent; }
  .nav-toggle:checked ~ .nav-toggle-label span::before { top: 0; transform: rotate(45deg); }
  .nav-toggle:checked ~ .nav-toggle-label span::after { top: 0; transform: rotate(-45deg); }
}

/* ===== ヒーロー ===== */
.hero { position: relative; padding: clamp(3rem, 8vw, 5.5rem) 0 clamp(2.4rem, 6vw, 4rem); }
.hero-grid { display: grid; gap: 2.2rem; grid-template-columns: 1fr; align-items: center; }
@media (min-width: 900px) { .hero-grid { grid-template-columns: 1.15fr .85fr; } }

.eyebrow {
  display: inline-flex; align-items: center; gap: .5rem; font-size: .82rem; font-weight: 700;
  color: var(--brand); background: var(--brand-soft); border: 1px solid var(--border);
  padding: .35rem .8rem; border-radius: 999px; letter-spacing: .02em;
}
.eyebrow .pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--signal-green); box-shadow: 0 0 0 0 var(--signal-green-glow); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }

.hero h1 {
  font-size: clamp(1.9rem, 5.4vw, 3.1rem); margin: .9rem 0 .7rem; letter-spacing: .005em; font-weight: 800;
}
.hero h1 .grad {
  background: var(--grad-hero); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero .lead { font-size: clamp(1rem, 2.3vw, 1.18rem); color: var(--text-muted); margin: 0 0 1.7rem; max-width: 40em; }

/* ===== ボタン ===== */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .78rem 1.3rem; border-radius: var(--radius-sm); font-weight: 700; font-size: .98rem;
  cursor: pointer; border: 1px solid transparent; overflow: hidden;
  transition: transform .12s var(--ease), box-shadow .2s, background .2s, color .2s, border-color .2s;
}
.btn-primary { background: var(--grad-brand); color: #fff; box-shadow: var(--shadow-glow); }
.btn-primary:hover { transform: translateY(-2px); color: #fff; box-shadow: 0 12px 34px rgba(47,95,230,.42); }
.btn-primary::after {
  content: ""; position: absolute; inset: 0; background: var(--grad-sheen); transform: translateX(-120%);
}
.btn-primary:hover::after { animation: sheen .8s var(--ease); }
@keyframes sheen { to { transform: translateX(120%); } }
.btn-ghost { background: var(--surface); color: var(--text); border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); transform: translateY(-2px); }
.btn-lg { padding: .95rem 1.6rem; font-size: 1.05rem; }

/* ===== 検索ボックス ===== */
.search-box {
  display: flex; gap: .5rem; flex-wrap: wrap; max-width: 640px;
  background: var(--surface); padding: .4rem; border-radius: 14px; border: 1px solid var(--border);
  box-shadow: var(--shadow); transition: box-shadow .2s, border-color .2s;
}
.search-box:focus-within { border-color: var(--brand); box-shadow: var(--shadow-glow); }
.search-box input[type="text"], .search-box input[type="search"] {
  flex: 1 1 240px; min-width: 0; padding: .7rem .9rem; font-size: 1rem;
  border: 0; background: transparent; color: var(--text); outline: none;
}

/* ===== ヒーローのCSS製イラスト（モデルカード・スタック＋ゲージ） ===== */
.hero-art { position: relative; min-height: 320px; perspective: 1200px; }
.float-cards { position: relative; height: 100%; transform-style: preserve-3d; }
.mock-card {
  position: absolute; width: 220px; border-radius: 16px; padding: 1rem;
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-lift);
  animation: floaty 7s var(--ease) infinite;
}
.mock-card .thumb { height: 86px; border-radius: 10px; background: var(--grad-hero); position: relative; overflow: hidden; }
.mock-card .thumb::after { content: ""; position: absolute; inset: 0; background: var(--grad-sheen); transform: translateX(-100%); animation: sheen 4s var(--ease) infinite; }
.mock-card .line { height: 9px; border-radius: 5px; background: var(--surface-2); margin-top: .6rem; }
.mock-card .line.s { width: 60%; }
.mock-card.c1 { top: 8%; left: 4%; transform: rotate(-7deg); z-index: 3; }
.mock-card.c2 { top: 34%; right: 2%; transform: rotate(6deg); animation-delay: -2.2s; z-index: 2; }
.mock-card.c3 { bottom: 4%; left: 22%; transform: rotate(2deg); animation-delay: -4.4s; z-index: 1; opacity: .96; }
@keyframes floaty { 50% { transform: translateY(-14px) rotate(var(--r, 0deg)); } }
.mock-card.c1 { --r: -7deg; } .mock-card.c2 { --r: 6deg; } .mock-card.c3 { --r: 2deg; }

.gauge {
  position: absolute; top: 2%; right: 8%; width: 96px; height: 96px; border-radius: 50%;
  background: conic-gradient(var(--signal-green) 0 72%, var(--surface-2) 72% 100%);
  display: grid; place-items: center; box-shadow: var(--shadow-lift); z-index: 4;
  animation: floaty 6s var(--ease) infinite; --r: 0deg;
}
.gauge::before { content: ""; position: absolute; inset: 12px; border-radius: 50%; background: var(--surface); }
.gauge b { position: relative; font-size: 1.4rem; font-weight: 800; color: var(--signal-green); }
.tag-float { position: absolute; bottom: 10%; right: 4%; display: flex; flex-direction: column; gap: .4rem; z-index: 4; }
.tag-float .chip { animation: floaty 8s var(--ease) infinite; --r: 0deg; }

/* ===== セクション ===== */
section.block { padding: clamp(2.6rem, 6vw, 4.2rem) 0; position: relative; }
.section-head { text-align: center; max-width: 44rem; margin: 0 auto 2.2rem; }
section.block > .container > h2, .section-head h2 { font-size: clamp(1.5rem, 3.4vw, 2rem); margin: 0 0 .5rem; font-weight: 800; }
section.block .sub, .section-head .sub { color: var(--text-muted); margin: 0; }
.kicker { display: inline-block; font-size: .8rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--brand-2); margin-bottom: .4rem; }

/* ===== カード／グリッド ===== */
.grid { display: grid; gap: 1.1rem; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.card {
  position: relative; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.3rem; box-shadow: var(--shadow);
  transition: transform .2s var(--ease), box-shadow .25s, border-color .2s;
}
.card.lift { display: block; color: inherit; }
.card.lift:hover { transform: translateY(-5px); box-shadow: var(--shadow-lift); border-color: var(--border-strong); }
.card h3 { margin: .2rem 0 .45rem; font-size: 1.12rem; }
.card p { margin: 0; color: var(--text-muted); font-size: .94rem; }

/* 機能カードのアイコン（グラデの角丸タイル） */
.feat-icon {
  width: 50px; height: 50px; border-radius: 14px; display: grid; place-items: center; font-size: 1.5rem;
  background: var(--brand-soft); border: 1px solid var(--border); margin-bottom: .7rem;
  transition: transform .25s var(--ease);
}
.card.lift:hover .feat-icon { transform: scale(1.08) rotate(-4deg); }
.feat-card { overflow: hidden; }
.feat-card::before {
  content: ""; position: absolute; inset: 0; padding: 1px; border-radius: var(--radius);
  background: var(--grad-brand); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude; opacity: 0; transition: opacity .25s;
}
.card.lift.feat-card:hover::before { opacity: 1; }

/* ===== 判定カード（信号機風 + グロー） ===== */
.judge {
  display: inline-flex; align-items: center; gap: .45rem; padding: .35rem .75rem; border-radius: 999px;
  font-weight: 800; font-size: .9rem; border: 1px solid transparent; white-space: nowrap;
}
.judge .dot { width: .68rem; height: .68rem; border-radius: 50%; flex: none; }
.judge-green  { background: var(--signal-green-bg);  color: var(--signal-green);  border-color: var(--signal-green); }
.judge-green .dot  { background: var(--signal-green);  box-shadow: 0 0 0 3px var(--signal-green-glow); }
.judge-yellow { background: var(--signal-yellow-bg); color: var(--signal-yellow); border-color: var(--signal-yellow); }
.judge-yellow .dot { background: var(--signal-yellow); box-shadow: 0 0 0 3px var(--signal-yellow-glow); }
.judge-red    { background: var(--signal-red-bg);    color: var(--signal-red);    border-color: var(--signal-red); }
.judge-red .dot    { background: var(--signal-red);    box-shadow: 0 0 0 3px var(--signal-red-glow); }
.judge-gray   { background: var(--signal-gray-bg);   color: var(--signal-gray);   border-color: var(--signal-gray); }
.judge-gray .dot   { background: var(--signal-gray);  box-shadow: 0 0 0 3px var(--signal-gray-glow); }

/* ===== 注意・警告ボックス ===== */
.notice {
  position: relative; background: var(--signal-yellow-bg); border: 1px solid var(--signal-yellow);
  border-left-width: 4px; border-radius: var(--radius-sm); padding: .9rem 1rem; color: var(--text);
  font-size: .92rem; margin: 1rem 0;
}
.notice strong { color: var(--signal-yellow); }
.warn { background: var(--signal-red-bg); border: 1px solid var(--signal-red); border-left: 4px solid var(--signal-red); border-radius: var(--radius-sm); padding: .9rem 1rem; margin: 1rem 0; }
.warn strong { color: var(--signal-red); }

/* ===== 統計ストリップ ===== */
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
@media (min-width: 720px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stat { text-align: center; padding: 1.2rem 1rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.stat .num { font-size: 1.7rem; font-weight: 800; background: var(--grad-brand); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat .lbl { color: var(--text-muted); font-size: .86rem; }

/* ===== ステップ ===== */
.steps { display: grid; gap: 1rem; grid-template-columns: 1fr; counter-reset: step; }
@media (min-width: 760px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.step { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem 1.3rem 1.3rem; box-shadow: var(--shadow-sm); }
.step::before { counter-increment: step; content: counter(step); position: absolute; top: -16px; left: 1.3rem; width: 34px; height: 34px; border-radius: 10px; background: var(--grad-brand); color: #fff; display: grid; place-items: center; font-weight: 800; box-shadow: var(--shadow-glow); }
.step h3 { margin: .6rem 0 .4rem; font-size: 1.05rem; }
.step p { margin: 0; color: var(--text-muted); font-size: .92rem; }

/* ===== テーブル ===== */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--radius); border: 1px solid var(--border); }
table.matrix { border-collapse: collapse; width: 100%; min-width: 440px; background: var(--surface); }
table.matrix th, table.matrix td { border-bottom: 1px solid var(--border); padding: .6rem .75rem; text-align: center; }
table.matrix thead th { background: var(--surface-2); font-weight: 800; position: sticky; top: 0; }
table.matrix tbody tr:hover { background: var(--surface-2); }
.kv { width: 100%; border-collapse: collapse; }
.kv th, .kv td { text-align: left; padding: .6rem .2rem; border-bottom: 1px solid var(--border); vertical-align: top; }
.kv th { width: 44%; color: var(--text-muted); font-weight: 600; white-space: nowrap; }
.kv tr:last-child th, .kv tr:last-child td { border-bottom: 0; }

/* ===== チップ ===== */
.chips { display: flex; flex-wrap: wrap; gap: .45rem; margin: .35rem 0; }
.chip { background: var(--brand-soft); color: var(--brand-dark); border: 1px solid var(--border); border-radius: 999px; padding: .25rem .7rem; font-size: .85rem; font-weight: 600; }
.chip.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--surface-2); color: var(--text); }
.badge { display: inline-block; background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; padding: .18rem .65rem; font-size: .78rem; color: var(--text-muted); font-weight: 600; }

/* ===== 詳細レイアウト ===== */
.detail-grid { display: grid; gap: 1.3rem; grid-template-columns: 1fr; }
@media (min-width: 860px) { .detail-grid { grid-template-columns: 1.9fr 1fr; align-items: start; } }
.section-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.4rem 1.5rem; box-shadow: var(--shadow); margin-bottom: 1.2rem; transition: box-shadow .25s; }
.section-card:hover { box-shadow: var(--shadow-lift); }
.section-card h2, .section-card h3 { margin-top: 0; }
.page-hero { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-xl); padding: 1.6rem 1.7rem; box-shadow: var(--shadow); position: relative; overflow: hidden; }
.page-hero::before { content: ""; position: absolute; top: -40%; right: -10%; width: 340px; height: 340px; background: radial-gradient(circle, var(--brand-soft), transparent 65%); pointer-events: none; }
.filter-form { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.1rem; box-shadow: var(--shadow-sm); }
pre.code { background: #0d1424; color: #d7e3ff; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); padding: .9rem 1rem; overflow-x: auto; font-size: .86rem; line-height: 1.6; margin: .4rem 0 1rem; }
pre.code code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }

/* 記事本文 */
.prose { font-size: 1.02rem; line-height: 1.9; }
.prose h2 { margin: 1.8rem 0 .6rem; font-size: 1.3rem; padding-bottom: .3rem; border-bottom: 2px solid var(--border); }
.prose h3 { margin: 1.4rem 0 .5rem; font-size: 1.12rem; }
.prose p { margin: .8rem 0; }
.prose ul, .prose ol { margin: .8rem 0; padding-left: 1.4rem; }
.prose li { margin: .35rem 0; }
.prose strong { color: var(--text); }
.prose a { text-decoration: underline; }
.prose code { background: var(--surface-2); border: 1px solid var(--border); border-radius: 5px; padding: .1rem .35rem; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .9em; }
.prose blockquote { border-left: 4px solid var(--brand); background: var(--brand-soft); margin: 1rem 0; padding: .6rem 1rem; border-radius: 0 8px 8px 0; }

/* 系統図ツリー */
ul.lineage, ul.lineage ul { list-style: none; margin: 0; padding: 0; }
ul.lineage { padding-left: .2rem; }
ul.lineage ul { margin-left: 1.1rem; padding-left: 1.1rem; border-left: 2px solid var(--border-strong); }
ul.lineage li { position: relative; padding: .35rem 0; }
ul.lineage ul > li::before { content: ""; position: absolute; left: -1.1rem; top: 1.25rem; width: .9rem; height: 2px; background: var(--border-strong); }
.lin-node { display: inline-flex; align-items: center; gap: .5rem; background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: .35rem .9rem; box-shadow: var(--shadow-sm); }
.lin-node:hover { border-color: var(--brand); }
.filter-form select { padding: .4rem .55rem; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text); }

/* ===== パンくず ===== */
.breadcrumbs { font-size: .85rem; }
.breadcrumbs .container { padding-top: .8rem; padding-bottom: .2rem; }
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: .35rem; margin: 0; padding: 0; }
.breadcrumbs li::after { content: "›"; margin-left: .35rem; color: var(--text-soft); }
.breadcrumbs li:last-child::after { content: ""; }
.breadcrumbs a { color: var(--text-muted); }

/* ===== フッター ===== */
.site-footer { background: var(--surface); border-top: 1px solid var(--border); margin-top: 3rem; padding: 2.6rem 0 1.6rem; color: var(--text-muted); font-size: .9rem; position: relative; }
.site-footer::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--grad-hero); }
.site-footer .cols { display: grid; gap: 1.6rem; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.site-footer a { color: var(--text-muted); }
.site-footer a:hover { color: var(--brand); }
.site-footer h4 { color: var(--text); font-size: .95rem; margin: 0 0 .6rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin: .35rem 0; }
.copyright { margin-top: 1.6rem; padding-top: 1.2rem; border-top: 1px solid var(--border); color: var(--text-soft); font-size: .82rem; }

/* ===== スクロール演出 ===== */
[data-reveal] { opacity: 0; transform: translateY(20px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
[data-reveal].in { opacity: 1; transform: none; }
[data-reveal].d1 { transition-delay: .08s; } [data-reveal].d2 { transition-delay: .16s; }
[data-reveal].d3 { transition-delay: .24s; } [data-reveal].d4 { transition-delay: .32s; }

/* ===== ユーティリティ ===== */
.muted { color: var(--text-muted); } .soft { color: var(--text-soft); }
.center { text-align: center; }
.row { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; }
.mt-1 { margin-top: .5rem; } .mt-2 { margin-top: 1rem; } .mt-3 { margin-top: 1.6rem; } .mt-4 { margin-top: 2.4rem; }
.skip-link { position: absolute; left: -999px; }
.skip-link:focus { left: 1rem; top: .5rem; background: var(--surface); padding: .5rem .8rem; z-index: 200; border-radius: 6px; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 4px; }

/* 動きを減らす設定を尊重 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  [data-reveal] { opacity: 1 !important; transform: none !important; }
}
