/* SYMBIONT — site.css
   ASL 文法層: 単一フルスクリーン生成空間 + 隅の極小メニュー + overlay。
   全ての色・時間・字間は shared/tokens.css の変数を経由する (生色なし)。
   参照文法: ASL (Astral Space Lab) — cursor LFO 0.01618 / exclusion menu /
   hairline underline 0→100% / popup translateY(20px)→0。 */

:root { --cursor-x: 50vw; --cursor-y: 50vh; }
/* ambient cursor light — 紙に光が落ちる (works.html 系譜) */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(600px circle at var(--cursor-x) var(--cursor-y),
    oklch(from var(--ink) calc(1 - l) 0 h / 0.07), transparent 60%);
  z-index: 2;
  transition: background 0.8s ease;
}
@media (pointer: coarse), (prefers-reduced-motion: reduce) { body::after { display: none; } }

/* ── interaction 未来化 (2026-06-10) — タイポと時間で語る ── */
/* 可変 Manrope: hover でウェイトが呼吸する。 装飾ではなく文字自身が応える */
#menu .links a, .d-t, .chip, .tr-name, .nmodal-related .rel {
  font-variation-settings: 'wght' 430;
  transition-property: color, background-size, font-variation-settings, letter-spacing;
}
#menu .links a:hover, #menu .links a:focus-visible,
.door:hover .d-t, .chip:hover, .chip.active,
.nmodal-related .rel:hover { font-variation-settings: 'wght' 580; }

/* キーヒント — 読書中だけ、 下端中央に極小で */
#keysHint {
  position: fixed;
  bottom: 0.8rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 70;
  font-family: var(--ff-mono);
  font-size: 9.5px;
  letter-spacing: var(--ak-9);
  color: var(--ink-4);
  opacity: 0;
  pointer-events: none;
  user-select: none;
  transition: opacity var(--t-3) var(--e-phi) 1s;
  font-variant-numeric: tabular-nums;
}
body.reading #keysHint { opacity: 0.8; }
@media (max-width: 768px), (pointer: coarse) { #keysHint { display: none; } }

/* 読書進捗 — 上端 1px、 読み位置だけを語る */
#readProgress {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 1.618px;
  background: var(--olo);
  transform-origin: left center;
  transform: scaleX(0);
  opacity: 0;
  z-index: 90;
  pointer-events: none;
  transition: opacity var(--t-2) var(--e-phi);
}
#readProgress.on { opacity: 0.7; }

/* sec scroll-reveal — スクロールに合わせ立ち上がる (φ ease) */
.ov .sec, .ov .pull, .ov .spec {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity var(--t-3) var(--e-phi), transform var(--t-3) var(--e-phi);
}
.ov .sec.vis, .ov .pull.vis, .ov .spec.vis { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  .ov .sec, .ov .pull, .ov .spec { opacity: 1; transform: none; }
}

/* ── ⌘K command palette — プロツールの鏡像 ── */
#pal {
  position: fixed;
  inset: 0;
  z-index: 95;
  background: oklch(from var(--bg) l c h / 0.25);
  opacity: 0;
  transition: opacity var(--t-1) var(--e-phi);
}
#pal.on { opacity: 1; }
.pal-box {
  position: absolute;
  left: 50%;
  top: 16vh;
  transform: translateX(-50%);
  width: min(560px, calc(100vw - 2rem));
  background: oklch(from var(--bg-1) l c h / 0.98);
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
#palInput {
  width: 100%;
  padding: 0.95rem 1.1rem;
  font-family: var(--ff-jp);
  font-size: 15px;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  outline: 0;
  letter-spacing: 0.02em;
}
#palInput::placeholder { color: var(--ink-4); }
#palList { max-height: 46vh; overflow-y: auto; padding: 0.4rem 0; scrollbar-width: thin; }
.pal-kind {
  font-family: var(--ff-mono);
  font-size: 9.5px;
  letter-spacing: var(--ls-title);
  text-transform: uppercase;
  color: var(--ink-4);
  padding: 0.55rem 1.1rem 0.2rem;
}
.pal-row {
  padding: 0.45rem 1.1rem;
  font-family: var(--ff-jp);
  font-size: 13.5px;
  color: var(--ink-2);
  border-left: 2px solid transparent;
  transition: background var(--t-pulse) linear;
}
.pal-row.sel {
  background: oklch(from var(--bg-2) l c h / 0.8);
  border-left-color: var(--olo);
  color: var(--ink);
}
.pal-foot {
  display: flex;
  gap: 0.6rem;
  justify-content: flex-end;
  padding: 0.5rem 1.1rem;
  border-top: 1px solid oklch(from var(--line) l c h / 0.5);
}
/* kbd — ショートカットの意匠 */
.kbd {
  font-family: var(--ff-mono);
  font-size: 9.5px;
  letter-spacing: 0.04em;
  color: var(--ink-4);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 1px 5px;
  font-variant-numeric: tabular-nums;
}
.kbd-chip {
  font-family: var(--ff-mono);
  font-size: clamp(9px, 0.4rem + 0.2vw, 10.5px);
  letter-spacing: 0.04em;
  color: var(--ink-4);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 1px 6px;
  transition: color var(--t-hover) var(--e-phi), border-color var(--t-hover) var(--e-phi);
}
.kbd-chip:hover { color: var(--ink); border-color: var(--ink-3); }
.kbd-chip:active { color: var(--act); border-color: var(--act); }
@media (pointer: coarse) { .kbd-chip, #keysHint { display: none; } }

/* ── hacker / 研究文書セマンティクス (2026-06-10 裁定) ── */
::selection { background: var(--olo); color: var(--bg); }
/* brand の点滅ブロックカーソル — 端末の鼓動 */
#menu .brand-line::after {
  content: '▌';
  color: var(--olo);
  margin-left: 0.25em;
  animation: caret 1.2s steps(1) infinite;
}
@keyframes caret { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { #menu .brand-line::after { animation: none; opacity: 0.6; } }
/* kicker はコメント行 — // が文書の文法を宣言する */
.ov-kicker::before { content: '// '; color: var(--ink-4); }
/* ASCII 図 — 言語非依存、 mono、 罫線素片 */
.ascii {
  /* 罫線素片の整列には物理的に等幅が要る — ここだけ ui-monospace (ネイティブ) */
  font-family: ui-monospace, "SF Mono", "Menlo", monospace;
  font-size: clamp(10px, 0.5rem + 0.18vw, 12px);
  font-weight: 400;
  line-height: 1.55;
  letter-spacing: 0;
  color: var(--ink-3);
  white-space: pre;
  overflow-x: auto;
  margin: 1rem 0 1.2rem;
  user-select: text;
}
.ascii b { color: var(--olo); font-weight: 400; }
/* 研究文書メタ行 — rev / LOC / tests / telemetry */
.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem 1.4rem;
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid oklch(from var(--line) l c h / 0.4);
  font-family: var(--ff-mono);
  font-size: 11px;
  letter-spacing: var(--ak-11);
  color: var(--ink-4);
  font-variant-numeric: tabular-nums;
}
.meta-row b { color: var(--ink-3); font-weight: 400; }

/* ── ground ─────────────────────────────────────── */
html, body {
  height: 100%;
  overflow: hidden;
}
body {
  position: fixed;
  inset: 0;
  font-weight: 300;
}
@media (pointer: fine) {
  body, .field, #menu, #fieldName, .ov, .ov-backdrop { cursor: none; }
  input, textarea { cursor: text; }
}

/* ── field — the living ground ──────────────────── */
.field {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  opacity: 0;
  /* カーソル視差 — 場はカーソルと逆へ 1.8% 泳ぐ (1.2s organic lag = 奥の層)。
     scale 1.035 は translate で縁が見えないための余白 */
  scale: 1.035;
  translate: calc((50vw - var(--cursor-x, 50vw)) * 0.018)
             calc((50vh - var(--cursor-y, 50vh)) * 0.018);
  transition: opacity 2618ms var(--e-phi), translate 1200ms var(--e-organic);
}
@media (pointer: coarse), (prefers-reduced-motion: reduce) {
  .field { scale: none; translate: none; }
}
.field.live { opacity: 1; }
/* static fallback behind canvases — also the reduced-motion ground */
.field-fallback {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse at 62% 40%,
      oklch(from var(--ink) l c h / 0.04) 0%, transparent 62%);
}

/* field system name — bottom-left, barely there */
#fieldName {
  position: fixed;
  left: 1rem;
  bottom: 0.8rem;
  z-index: 3;
  font-family: var(--ff-mono);
  font-size: clamp(9px, 0.40rem + 0.2vw, 11px);
  letter-spacing: 0.1618em;
  text-transform: lowercase;
  color: var(--ink-4);
  user-select: none;
  pointer-events: none;
  transition: opacity var(--t-5) var(--e-phi);
}
#fieldName .sep { opacity: 0.5; margin: 0 0.382em; }
#fieldName .prompt { color: var(--olo); margin-right: 0.5em; }
#fieldName { max-width: min(72vw, 760px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#fieldName .eq { color: var(--ink-4); opacity: 0.85; letter-spacing: 0.04em; text-transform: none; }

/* version — bottom-right */
#verLine {
  position: fixed;
  right: 1rem;
  bottom: 0.8rem;
  z-index: 3;
  font-family: var(--ff-mono);
  font-size: clamp(9px, 0.40rem + 0.2vw, 11px);
  letter-spacing: 0.1618em;
  color: var(--ink-4);
  user-select: none;
  pointer-events: none;
}

/* ── custom cursor — dot + φ-LFO breathing ring ── */
.cur-dot, .cur-ring {
  position: fixed;
  left: 0; top: 0;
  pointer-events: none;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  z-index: 4000;   /* above ColorOrb full-screen overlay (3000) */
  opacity: 0;
  transition: opacity var(--t-1) var(--e-phi);
}
.cur-dot {
  width: 5px; height: 5px;
  background: var(--olo);
}
.cur-ring {
  width: 15px; height: 15px;
  border: calc(var(--sw-sub-micro) * 1px) solid oklch(from var(--ink) l c h / 0.618);  /* φ⁻¹ × φ⁻¹ */
  z-index: 4001;
  transition: border-color var(--t-hover) var(--e-phi);
}
.cur-ring.hot { border-color: oklch(from var(--olo) l c h / 0.85); }
body.cur-on .cur-dot, body.cur-on .cur-ring { opacity: 1; }
@media (pointer: coarse), (max-width: 768px) {
  .cur-dot, .cur-ring { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .cur-ring { display: none; }
}

/* ── corner menu — top-left, ink over silver (z 80 > .ov 50: 常駐 nav) ── */
#menu {
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 80;
  color: var(--ink);
  opacity: 0.9;
  transition: opacity 2s ease;
  line-height: 2;
  user-select: none;
}
#menu:hover { opacity: 1; }
.menu-head { display: flex; align-items: center; gap: 0.55em; margin-bottom: 0.15rem; }
#menu .mark {
  display: inline-flex;
  color: var(--olo);
}
#menu .mark svg { width: 21px; height: 21px; transition: opacity var(--t-2) var(--e-phi); }
body.reading #menu .mark { opacity: 0.7; }
#menu .brand-line {
  font-family: var(--ff-mono);
  font-size: clamp(11.5px, 0.55rem + 0.25vw, 14.5px);
  font-weight: 500;
  letter-spacing: 0.1618em;
  color: var(--ink);
}
/* brand 行は logo と同一 row の常時表示 (user 裁定 2026-06-11)。
   fine (統計行) は従来通り地上のみ。 */
body.reading #menu .fine { max-height: 0; opacity: 0; margin: 0; }
#menu .links {
  font-family: var(--ff-sans);
  font-size: clamp(11.5px, 0.50rem + 0.25vw, 14px);
  font-weight: 400;
  letter-spacing: 0.0618em;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  column-gap: 1em;
  row-gap: 0;
}
#menu .links a {
  color: var(--ink);
  background-image: linear-gradient(var(--olo), var(--olo));
  background-repeat: no-repeat;
  background-position: bottom left;
  background-size: 0 1px;
  padding-bottom: 1px;
  transition: color var(--t-hover) var(--e-phi), background-size var(--t-hover) var(--e-phi);
}
#menu .links a:active { transition-duration: var(--t-pulse); color: var(--act); }
#menu .links a:hover, #menu .links a:focus-visible {
  color: var(--olo);
  background-size: 100% 1px;
  outline: none;
}
#menu .links a[aria-current="true"] {
  color: var(--olo);
  background-size: 100% 1px;
}
#menu .fine {
  font-family: var(--ff-mono);
  font-size: clamp(8.5px, 0.36rem + 0.2vw, 10.5px);
  font-weight: 300;
  letter-spacing: var(--ak-9);
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
  max-height: 2em;
  overflow: hidden;
  transition: max-height var(--t-2) var(--e-phi), opacity var(--t-2) var(--e-phi);
}
/* lang toggle + orb live inside the menu, same micro scale */
#menu .lang-toggle {
  border: 0;
  font-family: var(--ff-mono);
  font-size: clamp(9.5px, 0.42rem + 0.2vw, 11.5px);
  letter-spacing: 0.1em;
  color: var(--ink-3);
  padding: 0;
}
#menu .lang-toggle:hover, #menu .lang-toggle:focus-visible { color: var(--ink); outline: none; }
#menu .lang-toggle:active { color: var(--act); }
#menu .lang-toggle [data-active] { color: var(--olo); }
#menu .lang-toggle .sep { color: var(--ink-4); }
#menu #orbMount { display: inline-flex; align-items: center; transform: translateY(2px); }

/* ── entry — 紹介の正面: 定義 + 6 つの扉 (works.html 系譜) ── */
#entry {
  position: fixed;
  inset: 0;
  z-index: 5;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: clamp(6.5rem, 16vh, 10rem) max(1.618rem, calc((100vw - 1040px) / 2)) 4rem;
  transition: opacity var(--t-3) var(--e-phi);
}
.entry-mark {
  font-family: var(--ff-sans);
  font-weight: 250;
  font-variation-settings: 'wght' 250;
  font-size: clamp(54px, 8.5vw, 128px);
  line-height: 1;
  letter-spacing: 0.08em;
  color: var(--ink);
  position: relative;
  display: inline-block;
  user-select: none;
}
.entry-mark::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 0;
  width: 0;
  height: 1.618px;
  background: var(--ink);
  animation: drawX 1.2s var(--e-phi) 0.5s forwards;
}
@keyframes entryRise {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
.entry-mark, .entry-title, .entry-lede, .entry-meta, .doors {
  animation: entryRise var(--t-3) var(--e-phi) backwards;
}
.entry-title { animation-delay: 100ms; }
.entry-lede { animation-delay: 190ms; }
.entry-meta { animation-delay: 260ms; }
.doors { animation-delay: 340ms; }
@media (prefers-reduced-motion: reduce) {
  .entry-mark, .entry-title, .entry-lede, .entry-meta, .doors { animation: none; }
}

.entry-title {
  font-family: var(--ff-jp);
  font-weight: 400;
  font-size: clamp(17px, 1.6vw, 24px);
  letter-spacing: 0.06em;
  line-height: 1.5;
  color: var(--ink-2);
  margin-top: 1.6rem;
  display: block;
}
.entry-title em { font-style: normal; color: var(--olo); }
@keyframes drawX { to { width: 100%; } }
.entry-lede {
  margin-top: 2.2rem;
  margin-left: clamp(0px, 9vw, 150px);
  max-width: 42ch;
  font-family: var(--ff-jp);
  font-weight: 400;
  font-size: clamp(14.5px, 0.85rem + 0.35vw, 18px);
  line-height: 2;
  color: var(--ink-2);
}
.entry-meta {
  margin-top: 1.5rem;
  margin-left: clamp(0px, 9vw, 150px);
  font-family: var(--ff-mono);
  font-size: 11.5px;
  letter-spacing: var(--ak-11);
  color: var(--ink-4);
  font-variant-numeric: tabular-nums;
}
/* doors — hover で行が滑り、 矢印が回転して現れ、 番号が育つ */
.doors {
  margin-top: clamp(2.6rem, 7vh, 4.4rem);
  margin-left: clamp(0px, 13vw, 210px);
  max-width: 660px;
  list-style: none;
}
/* 扉の階段 — 一段ごとに右へ降りる対角 */
.door:nth-child(2) { margin-left: clamp(0px, 1.6vw, 26px); }
.door:nth-child(3) { margin-left: clamp(0px, 3.2vw, 52px); }
.door:nth-child(4) { margin-left: clamp(0px, 4.8vw, 78px); }
.door:nth-child(5) { margin-left: clamp(0px, 6.4vw, 104px); }
.door:nth-child(6) { margin-left: clamp(0px, 8vw, 130px); }
.door:nth-child(7) { margin-left: clamp(0px, 9.6vw, 156px); }
.door {
  display: grid;
  grid-template-columns: 2.4em 6.5em 1fr auto;
  align-items: baseline;
  gap: 0 0.8em;
  padding: 1.05rem 0.8rem;
  position: relative;
  color: inherit;
  transition: padding-left 500ms var(--e-phi), background var(--t-2) var(--e-phi);
}
.door::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 0;
  height: 1px;
  background: var(--line);
}
.doors.drawn .door::before { width: 100%; transition: width 0.8s var(--e-phi); }
.doors.drawn .door:nth-child(2)::before { transition-delay: 90ms; }
.doors.drawn .door:nth-child(3)::before { transition-delay: 180ms; }
.doors.drawn .door:nth-child(4)::before { transition-delay: 270ms; }
.doors.drawn .door:nth-child(5)::before { transition-delay: 360ms; }
.doors.drawn .door:nth-child(6)::before { transition-delay: 450ms; }
.door:last-child::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 0;
  height: 1px;
  background: var(--line);
}
.doors.drawn .door:last-child::after { width: 100%; transition: width 0.8s var(--e-phi) 540ms; }
.door:hover { padding-left: 2rem; background: oklch(from var(--bg-2) l c h / 0.5); }
.d-i {
  font-family: var(--ff-mono);
  font-size: 10px;
  font-weight: 500;
  color: var(--ink-4);
  letter-spacing: var(--ak-10);
  font-variant-numeric: tabular-nums;
  transition: color var(--t-hover) var(--e-phi), transform var(--t-hover) var(--e-phi);
}
.door:hover .d-i { color: var(--ink-2); transform: scale(1.1); }
.d-t {
  font-family: var(--ff-jp);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--ink);
  transition: letter-spacing 500ms var(--e-phi), color var(--t-hover) var(--e-phi);
}
.door:hover .d-t { letter-spacing: 0.10em; }
.d-d {
  font-family: var(--ff-jp);
  font-size: 13.5px;
  font-weight: 400;
  color: var(--ink-3);
  transition: color var(--t-hover) var(--e-phi), transform 500ms var(--e-phi);
}
.door:hover .d-d { color: var(--ink-2); transform: translateX(3px); }
.d-a {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-3);
  opacity: 0;
  transform: translateX(-13px) rotate(-45deg);
  transition: all 500ms var(--e-phi);
}
.door:hover .d-a { opacity: 1; transform: translateX(0) rotate(0deg); }
.door:active .d-t, .door:active .d-a, .door:active .d-i { color: var(--act); transition-duration: var(--t-pulse); }
@media (max-width: 640px) {
  #entry { padding: 5.5rem 1.2rem 3rem; }
  .door { grid-template-columns: 2em 1fr auto; }
  .d-d { grid-column: 2 / 4; grid-row: 2; }
}

/* ── ground footer — 著作権 + 法的文書への静かな出口 ── */
.ground-foot {
  margin-top: clamp(3rem, 8vh, 5rem);
  padding-top: 1.2rem;
  border-top: 1px solid oklch(from var(--line) l c h / 0.4);
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 2rem;
  font-family: var(--ff-mono);
  font-size: 10px;
  letter-spacing: var(--ak-10);
  color: var(--ink-4);
  font-variant-numeric: tabular-nums;
}
.ground-foot a {
  color: var(--ink-4);
  background-image: linear-gradient(var(--olo), var(--olo));
  background-repeat: no-repeat;
  background-position: bottom left;
  background-size: 0 1px;
  padding-bottom: 1px;
  transition: color var(--t-hover) var(--e-phi), background-size var(--t-hover) var(--e-phi);
}
.ground-foot a:hover { color: var(--ink-2); background-size: 100% 1px; }
.ground-foot a:active { color: var(--act); }
.ground-foot .px { color: var(--ink-4); opacity: 0.5; margin: 0 0.55em; }
.legal-line {
  margin-top: 2.2rem;
  padding-top: 1rem;
  border-top: 1px solid oklch(from var(--line) l c h / 0.3);
  font-family: var(--ff-mono);
  font-size: 10px;
  letter-spacing: var(--ak-10);
  color: var(--ink-4);
}
.legal-line a { color: var(--ink-4); }
.legal-line a:hover { color: var(--olo); }
.legal-line .px { opacity: 0.5; margin: 0 0.55em; }

/* ── overlay system — content floats above the field ── */
/* 全画面層が viewport を覆うため backdrop は視覚的役割を持たない
   (二重スクリムは場を殺す — 別画面っぽさ回避の一部)。 構造としては残す。 */
.ov-backdrop { display: none; }

/* content layer — ワンレイヤー (2026-06-10 user 裁定):
   スクリム・ガラス面を持たない。 コンテンツは場と同じ空間に直接立ち、
   層が開くと場そのものが沈む (body.reading → .field が 0.26 へ、 2.618 s)。
   覆うのではなく、 部屋が暗くなる。 menu は層の上に常駐し nav になる。 */
.ov {
  position: fixed;
  inset: 0;
  transform: translate(var(--shift-x, 0px), 14px);
  z-index: 50;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: none;
  padding: clamp(7rem, 14vh, 9rem) max(1.618rem, calc((100vw - 1040px) / 2)) 10rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--t-3) var(--e-phi), transform var(--t-3) var(--e-phi), visibility var(--t-3) var(--e-phi);
}
/* reading state — the room dims, content and field stay one space */
body.reading .field.live { opacity: 0.26; }
body.reading #entry { opacity: 0; pointer-events: none; }
body.reading .field-fallback { opacity: 0.5; }
body.reading #fieldName, body.reading #verLine { opacity: 0; }
.field-fallback { transition: opacity 2618ms var(--e-phi); }
#fieldName, #verLine { transition: opacity var(--t-3) var(--e-phi); }
.ov.active {
  opacity: 1;
  visibility: visible;
  transform: translate(0, 0);
}
.ov::-webkit-scrollbar { width: 4px; }
.ov::-webkit-scrollbar-thumb { background: var(--line); }
.ov, .nmodal { scrollbar-width: thin; scrollbar-color: var(--line) transparent; }

.ov .ov-close, #nmodalClose {
  transition: opacity var(--t-1) var(--e-phi), background var(--t-1) var(--e-phi), transform var(--t-2) var(--e-phi), color var(--t-1) var(--e-phi);
}
.ov .ov-close:hover, #nmodalClose:hover { transform: rotate(90deg); color: var(--ink); }
.ov .ov-close:active, #nmodalClose:active { color: var(--act); }
.ov .ov-close {
  position: fixed;
  top: 1.2rem;
  right: 1.2rem;
  font-family: var(--ff-mono);
  font-size: 15px;
  color: var(--ink-3);
  width: 2rem;
  height: 2rem;
  border-radius: var(--r-x);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.6;
  transition: opacity var(--t-1) var(--e-phi), background var(--t-1) var(--e-phi);
}
.ov .ov-close:hover, .ov .ov-close:focus-visible {
  opacity: 1;
  background: oklch(from var(--ink) l c h / 0.08);
  outline: none;
}

/* overlay typography — ASL popup scale */
.ov .ov-kicker {
  font-family: var(--ff-mono);
  font-size: 11px;
  letter-spacing: var(--ls-title);
  text-transform: uppercase;
  color: var(--olo);
  margin-bottom: 1rem;
}
/* layer head — 表題はディスプレイスケール (スケール対比が退屈を殺す) */
.ov-head { max-width: 640px; margin-bottom: clamp(4.2rem, 12vh, 7rem); }
.ov-title {
  font-family: var(--ff-jp);
  font-weight: 300;
  font-size: clamp(32px, 4vw, 52px);
  letter-spacing: 0.005em;
  line-height: 1.28;
  color: var(--ink);
  margin: 0.6rem 0 0;
}
.ov-title em { font-style: normal; color: var(--olo); }
.ov-title::after {
  content: '';
  display: block;
  width: 0;
  height: 1.618px;
  background: oklch(from var(--ink) l c h / 0.7);
  margin-top: 0.5rem;
}
.ov.active .ov-title::after { width: 3.2em; transition: width 1.1s var(--e-phi) 0.3s; }
.ov-lede { margin-top: 1.4rem; max-width: 52ch; margin-left: clamp(0px, 6vw, 96px); }
.ov-head .meta-row { margin-left: clamp(0px, 6vw, 96px); }

/* sec — 非対称 4:8 グリッド。 左柱 = 巨大薄数字 + 小見出し (sticky)、 右柱 = 本文 */
.sec {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  gap: var(--s-5) var(--s-7);
  align-items: start;
  margin: 0 clamp(0px, 4.5vw, 72px) clamp(4.5rem, 14vh, 8rem) 0;
}
/* 千鳥 — 偶数ブロックは鏡像 (数字柱が右)、 全体が空間を左右に振れて降りる */
.sec:nth-of-type(even) {
  grid-template-columns: minmax(0, 8fr) minmax(0, 4fr);
  margin: 0 0 clamp(4.5rem, 14vh, 8rem) clamp(0px, 4.5vw, 72px);
}
.sec:nth-of-type(even) .sec-l { order: 2; text-align: right; }
.sec:nth-of-type(even) .sec-r { order: 1; padding-top: 2.4rem; }
.sec:nth-of-type(even) .sec-note { margin-left: auto; }
.sec:nth-of-type(odd) .sec-gn { transform: translateX(calc(-1 * clamp(0px, 1.6vw, 24px))); }
.sec:nth-of-type(even) .sec-gn { transform: translateX(clamp(0px, 1.6vw, 24px)); }
.sec-l { position: sticky; top: clamp(7rem, 14vh, 9rem); }
.sec-gn {
  display: block;
  font-family: var(--ff-mono);
  font-weight: 200;
  font-size: clamp(52px, 6.5vw, 104px);
  line-height: 0.92;
  letter-spacing: -0.01em;
  color: oklch(from var(--olo) l c h / 0.26);
  font-variant-numeric: tabular-nums;
}
.sec-t {
  margin: 0.7rem 0 0;
  font-family: var(--ff-jp);
  font-weight: 400;
  font-size: 14.5px;
  letter-spacing: 0.12em;
  color: var(--ink-3);
}
[lang="en"] .sec-t { text-transform: uppercase; font-size: 11px; letter-spacing: var(--ls-title); }
/* CJK cap-height parity (C++ cjkAdjustedSize 系譜の web 適応) — JP label は
   全角フレームが Latin cap-height より大きく見えるため一段沈める */
[lang="ja"] .sec-t { font-size: 13.5px; letter-spacing: var(--ak-13); }
.sec-note {
  margin-top: 0.8rem;
  font-size: 13px;
  line-height: 1.9;
  color: var(--ink-4);
  max-width: 22ch;
}

/* pull-quote — 哲学的な締め (symbiont.old .pull-quote 系譜) */
.pull {
  margin: clamp(4rem, 11vh, 6.5rem) 0 0 clamp(0px, 18vw, 280px);
  padding: var(--s-5) var(--s-6) var(--s-4) var(--s-5);
  border-left: 2px solid var(--olo);
  background: oklch(from var(--olo) l c h / 0.04);
  border-radius: 0 var(--r-2) var(--r-2) 0;
  max-width: 56ch;
}
.pull span {
  font-family: var(--ff-jp);
  font-weight: 300;
  font-size: clamp(19px, 2vw, 28px);
  line-height: 1.6;
  color: var(--ink);
}
.pull cite {
  display: block;
  font-style: normal;
  font-family: var(--ff-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--ink-4);
  margin-top: var(--s-3);
}

/* spec — 巨大 tabular 数字 + 微小ラベルの key-value 行 (symbiont.old stage-foot 系譜) */
.spec {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: var(--s-1);
  border-top: 1px solid var(--line);
  padding-top: var(--s-6);
  margin: clamp(3rem, 8vh, 5rem) 0 0;
}
.spec-i { padding: 0 var(--s-4) 0 0; border-left: 1px solid oklch(from var(--line) l c h / 0.5); padding-left: var(--s-4); }
.spec-i:first-child { border-left: 0; padding-left: 0; }
.spec-i:nth-child(even) { margin-top: 1.5rem; }
.spec dd {
  margin: 0;
  font-family: var(--ff-mono);
  font-weight: 200;
  font-size: clamp(30px, 4vw, 58px);
  line-height: 1.1;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.spec dt {
  margin-top: var(--s-2);
  font-family: var(--ff-mono);
  font-size: 10px;
  letter-spacing: var(--ak-10);
  text-transform: uppercase;
  color: var(--ink-4);
}
[lang="ja"] .spec dt { font-family: var(--ff-jp); font-size: 10px; text-transform: none; letter-spacing: var(--ak-10); }

/* tiers — 価格表は信頼 = 厳密整列 (千鳥はここでは使わない)。
   索引 (i–iv) + 名前/仕様 + 右端に tabular 価格。 featured = 完全な楽器 */
.tiers { border-top: 1px solid var(--line); }
.tier-row {
  display: grid;
  grid-template-columns: 2.4em minmax(0, 1fr) auto;
  gap: 0 var(--s-5);
  align-items: baseline;
  padding: 2rem 0;
  border-bottom: 1px solid oklch(from var(--line) l c h / 0.4);
}
.tr-i {
  font-family: var(--ff-mono);
  font-size: 10.5px;
  color: var(--ink-4);
  letter-spacing: var(--ak-10);
}
.tier-row.featured .tr-name { color: var(--ink); font-variation-settings: 'wght' 640; }
.tier-row.featured .tr-price { color: var(--ink); }
.tr-zero { color: var(--ink-4); }
/* tier 内部 — 名前 + 役割の一言、 そして同一 4 スロットの fact 列
   (行を縦に見れば違いが一瞬で分かる — 表組みなしの比較性) */
.tr-head { display: flex; align-items: baseline; gap: 1em; flex-wrap: wrap; }
.tr-role {
  font-family: var(--ff-jp);
  font-size: 12.5px;
  color: var(--ink-4);
  letter-spacing: 0.04em;
}
.tr-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.4rem var(--s-5);
  margin: 0.9rem 0 0;
}
.tf dt {
  font-family: var(--ff-mono);
  font-size: 9.5px;
  letter-spacing: var(--ak-10);
  text-transform: uppercase;
  color: var(--ink-4);
  margin-bottom: 0.15rem;
}
[lang="ja"] .tf dt { font-family: var(--ff-jp); text-transform: none; font-size: 10.5px; letter-spacing: 0.08em; }
.tf dd {
  margin: 0;
  font-family: var(--ff-jp);
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}
.tr-note {
  display: block;
  margin-top: 0.8rem;
  font-family: var(--ff-jp);
  font-size: 12px;
  color: var(--ink-4);
}
.tr-note::before { content: '↗ '; color: var(--olo); }
/* acq-foot — 表の後の下半分: 左 = 共鳴者の声 / 右 = 実務の束。
   バラバラの小段落の左寄せ積みを、 二柱の対話に組む */
.acq-foot {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 0 clamp(2rem, 6vw, 6rem);
  align-items: start;
  margin-top: clamp(2.6rem, 7vh, 4rem);
  padding-top: 1.6rem;
  border-top: 1px solid oklch(from var(--line) l c h / 0.4);
}
.af-r {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}
.af-r .mono-line, .af-r .contact-line { margin: 0; }
.af-r .legal-line { margin-top: 0.6rem; padding-top: 1.1rem; }
@media (max-width: 768px) {
  .acq-foot { grid-template-columns: 1fr; gap: 2rem 0; }
}

/* patron — 共鳴者の声 (acq-foot 左柱) */
.patron {
  max-width: 56ch;
}
.patron .pt-name {
  display: block;
  font-family: var(--ff-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: var(--ls-title);
  text-transform: uppercase;
  color: var(--ink-4);
  margin-bottom: 0.5rem;
}
.patron p {
  font-family: var(--ff-jp);
  font-size: clamp(13px, 0.7rem + 0.25vw, 15px);
  line-height: 2.05;
  color: var(--ink-3);
}
.tr-name {
  display: block;
  font-family: var(--ff-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
}
.tr-price {
  font-family: var(--ff-mono);
  font-weight: 200;
  font-size: clamp(26px, 2.8vw, 40px);
  color: var(--olo);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}
.tr-price .tr-list {
  display: block;
  font-size: 0.42em;
  letter-spacing: 0.06em;
  color: var(--ink);
  opacity: 0.5;
  text-decoration: line-through;
  text-align: right;
}

/* brand-axis — 1400px+ の左縁、 縦書きの枠 (symbiont.old 系譜)。 層の上にも残る */
.brand-axis {
  display: none;
  position: fixed;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  writing-mode: vertical-rl;
  font-family: var(--ff-mono);
  font-size: 9.5px;
  font-weight: 400;
  letter-spacing: 0.30em;
  color: oklch(from var(--ink) l c h / 0.25);
  user-select: none;
  pointer-events: none;
  z-index: 60;
}
@media (min-width: 1400px) { .brand-axis { display: block; } }
.ov p {
  font-family: var(--ff-sans);
  font-weight: 300;
  font-size: clamp(14px, 0.8rem + 0.3vw, 17px);
  letter-spacing: calc(0.01rem + 0.01vw);
  line-height: 1.95;
  color: var(--ink-2);
  margin-bottom: 0.8rem;
}
[lang="ja"] .ov p { font-family: var(--ff-jp); font-weight: 400; line-height: 1.95; }
.ov .mono-line {
  font-family: var(--ff-mono);
  font-size: clamp(13px, 0.72rem + 0.28vw, 16px);
  letter-spacing: var(--ak-13);
  color: var(--ink-3);
  line-height: 2.05;
  font-variant-numeric: tabular-nums;
}
.ov .mono-line b { color: var(--ink); font-weight: 500; }
.ov .mono-line em { font-style: normal; color: var(--olo); }
/* numbered line — fixed number column, solid left rhythm */
.ov .ln {
  display: grid;
  grid-template-columns: 2.4em 1fr;
  column-gap: 0.6em;
  align-items: baseline;
  padding: 0.46rem 0;
  border-bottom: 1px solid oklch(from var(--line) l c h / 0.22);
}
.ov .ln:last-of-type { border-bottom: 0; }
.ov .ln b { color: var(--olo); font-weight: 500; letter-spacing: 0.06em; }
/* 星座配置 (2026-06-11) — sec 直下の情報行はリストではなく、
   一行ずつ空間に置かれる: 罫線なし、 viewport スケールの行間、
   4 周期の横ドリフト、 46ch の島。 sticky の巨大数字が錨になる。
   (.x expander 内・tiers・log は機能面なので従来の詰まった組みのまま) */
.sec-r > .ln {
  border-bottom: 0;
  padding: 0;
  margin: 0 0 clamp(2.4rem, 6.5vh, 4.5rem);
}
.sec-r > .ln:last-of-type { margin-bottom: 0; }
.sec-r > .ln > span { max-width: 46ch; }
.sec-r > .ln:nth-of-type(4n+2) { margin-left: clamp(0px, 6vw, 88px); }
.sec-r > .ln:nth-of-type(4n+3) { margin-left: clamp(0px, 2.5vw, 36px); }
.sec-r > .ln:nth-of-type(4n)   { margin-left: clamp(0px, 9vw, 132px); }
.sec-r > .ascii { margin: clamp(1.8rem, 5vh, 3rem) 0; }

.ov.active .ln { animation: lnIn var(--t-3) var(--e-phi) backwards; }
.ov.active .ln:nth-of-type(1) { animation-delay: 120ms; }
.ov.active .ln:nth-of-type(2) { animation-delay: 190ms; }
.ov.active .ln:nth-of-type(3) { animation-delay: 260ms; }
.ov.active .ln:nth-of-type(4) { animation-delay: 330ms; }
.ov.active .ln:nth-of-type(5) { animation-delay: 400ms; }
.ov.active .ln:nth-of-type(6) { animation-delay: 470ms; }
.ov.active .ln:nth-of-type(7) { animation-delay: 540ms; }
.ov.active .ln:nth-of-type(8) { animation-delay: 610ms; }
@keyframes lnIn {
  from { opacity: 0; transform: translateX(-10px); }
  to   { opacity: 1; transform: translateX(0); }
}
@media (prefers-reduced-motion: reduce) { .ov.active .ln { animation: none; } }
.ov .rule {
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, var(--line) 14%, var(--line) 70%, transparent 100%);
  margin: 2.6rem 0;
  transform-origin: left center;
  transform: scaleX(0);
}
.ov.active .rule { transform: scaleX(1); transition: transform 0.8s var(--e-phi) 0.2s; }
.ov ul.quiet {
  list-style: none;
  padding: 0;
  margin: 0 0 0.8rem;
}
.ov ul.quiet li {
  font-family: var(--ff-sans);
  font-weight: 300;
  font-size: clamp(13px, 0.7rem + 0.25vw, 15.5px);
  line-height: 2;
  color: var(--ink-3);
  opacity: 0.85;
  transition: opacity var(--t-1) var(--e-phi), color var(--t-1) var(--e-phi);
}
.ov ul.quiet li:hover { opacity: 1; color: var(--ink-2); }
[lang="ja"] .ov ul.quiet li { font-family: var(--ff-jp); font-weight: 400; }

/* log — date + one line per release */
.ov .log-line {
  display: grid;
  grid-template-columns: 7em 1fr;
  gap: 1em;
  padding: 0.82rem 0;
  font-family: var(--ff-mono);
  font-size: clamp(12.5px, 0.62rem + 0.25vw, 15px);
  letter-spacing: var(--ak-13);
  line-height: 1.8;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
  border-bottom: 1px solid oklch(from var(--line) l c h / 0.35);
}
.ov .log-line:last-of-type { border-bottom: 0; }
.ov .log-line .l-v { color: var(--ink); white-space: nowrap; }
.ov .log-line .l-t { font-family: var(--ff-sans); font-weight: 300; }
[lang="ja"] .ov .log-line .l-t { font-family: var(--ff-jp); font-weight: 400; }
.ov .log-line.current .l-v { color: var(--olo); }

/* paradigms — names as a typographic field */
.ov .pfield {
  font-family: var(--ff-sans);
  font-weight: 300;
  font-size: clamp(13.5px, 0.7rem + 0.28vw, 16.5px);
  line-height: 2.2;
  letter-spacing: 0.02em;
  color: var(--ink-3);
  text-wrap: balance;
}
.ov .pfield i {
  font-style: normal;
  color: var(--ink-4);
  margin: 0 0.45em;
}
.ov .pfield b { font-weight: 400; color: var(--ink-2); }
.ov .pfield em { font-style: normal; color: var(--olo); }

/* ── nodes layer — 図譜も他 overlay と同じ 1040px editorial column に住む ── */

/* atlas inside the nodes overlay */
#ov-nodes .ov-head { margin-bottom: clamp(2.2rem, 6vh, 3.4rem); }  /* 索引は head 直後から働く — 他 page より呼吸を詰める */
.atlas-bar { display: flex; flex-wrap: wrap; gap: 0.618rem 1.618rem; align-items: baseline; margin-bottom: 1rem; padding-right: 3rem; }
.atlas-bar .ov-kicker { margin-bottom: 0; }
.atlas-search { flex: 1 1 200px; max-width: 320px; }
.atlas-search input {
  width: 100%;
  padding: 4px 0;
  font-family: var(--ff-mono);
  font-size: 13px;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  letter-spacing: 0.02em;
  outline: 0;
  transition: border-color var(--t-2) var(--e-phi);
}
.atlas-search input:focus { border-color: var(--olo); }
.atlas-search input::placeholder { color: var(--ink-4); }
#resultCount { font-family: var(--ff-mono); font-size: 11px; color: var(--ink-4); letter-spacing: 0.06em; font-variant-numeric: tabular-nums; }

.chips { display: flex; flex-wrap: wrap; gap: 0.2rem 1rem; }
.chip {
  font-family: var(--ff-mono);
  font-size: 10.5px;
  font-variant-numeric: tabular-nums;
  letter-spacing: var(--ak-11);
  text-transform: uppercase;
  color: var(--ink-3);
  background-image: linear-gradient(var(--olo), var(--olo));
  background-repeat: no-repeat;
  background-position: bottom left;
  background-size: 0 1px;
  padding-bottom: 2px;
  transition: color var(--t-1) var(--e-phi), background-size var(--t-1) var(--e-phi);
}
.chip { transition-duration: var(--t-hover); }
.chip:hover, .chip:focus-visible { color: var(--ink); outline: none; }
.chip:active { transition-duration: var(--t-pulse); color: var(--act); }
.chip.active { color: var(--olo); background-size: 100% 1px; }
.chip-count { font-size: 9.5px; color: var(--ink-4); margin-left: 3px; }

/* atlas — 活字索引 (typographic index)。 card を持たない:
   category / subcategory の小見出し + ノード名の列組み、 hover で下部 hint 行に tagline */
.atlas-hint {
  font-family: var(--ff-mono);
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: 0.03em;
  min-height: 1.6em;
  margin-top: 0.618rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: opacity var(--t-2) var(--e-phi);
}
.atlas-grid {
  padding: 1rem 0 2.618rem;
  animation: idxIn 480ms var(--e-phi) backwards;
}
@keyframes idxIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) { .atlas-grid { animation: none; } }
.aidx-block {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  gap: var(--s-5) var(--s-7);
  align-items: start;
  margin-bottom: clamp(3.2rem, 9vh, 5rem);
}
.aidx-rail { position: sticky; top: clamp(7rem, 14vh, 9rem); }
.aidx-cn {
  display: block;
  font-family: var(--ff-mono);
  font-weight: 200;
  font-size: clamp(40px, 5vw, 72px);
  line-height: 0.95;
  letter-spacing: -0.01em;
  color: oklch(from var(--cat-color, var(--ink)) l c h / 0.38);
  font-variant-numeric: tabular-nums;
}
.aidx-cat {
  display: block;
  margin-top: 0.45rem;
  font-family: var(--ff-mono);
  font-size: 10px;
  color: var(--ink-3);
  letter-spacing: var(--ls-title);
  text-transform: uppercase;
}
.aidx-body { min-width: 0; }
.aidx-sub {
  margin: 1.4rem 0 0.45rem;
  font-family: var(--ff-mono);
  font-size: 9.5px;
  font-weight: 400;
  color: var(--ink-4);
  letter-spacing: 0.07em;
  text-transform: uppercase;
}
.aidx-body .aidx-sub:first-child { margin-top: 0.2rem; }
.aidx-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 0.85rem;
  max-width: 76rem;
}
/* 静かなタイル — 休止時はアイコン + 活字のみ。 hover で初めて枠 (カードの仕掛け) が現れる */
.aidx-name {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 10px 4px 7px;
  margin-left: -7px;            /* 枠ぶんの余白を相殺し、 休止時は活字組みとして揃う */
  border: 1px solid transparent;
  border-radius: var(--r-1);
  background: transparent;
  transition: border-color var(--t-hover) var(--e-phi), background var(--t-hover) var(--e-phi);
}
.aidx-ic {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  color: var(--ink-4);
  transition: color var(--t-hover) var(--e-phi);
}
.aidx-nm {
  font-family: var(--ff-sans);
  font-size: 13.5px;
  font-weight: 400;
  color: var(--ink-2);
  line-height: 1.5;
  transition: color var(--t-hover) var(--e-phi);
}
.aidx-name:hover, .aidx-name:focus-visible {
  border-color: oklch(from var(--cat-color, var(--olo)) l c h / 0.65);
  background: oklch(from var(--bg-2) l c h / 0.6);
  outline: none;
}
.aidx-name:hover .aidx-ic, .aidx-name:focus-visible .aidx-ic { color: var(--cat-color, var(--olo)); }
.aidx-name:hover .aidx-nm, .aidx-name:focus-visible .aidx-nm { color: var(--ink); }
.aidx-name:active { border-color: var(--act); transition-duration: var(--t-pulse); }
/* node 詳細を開いている間、 背後の索引は退く (SSP .card.open 系譜) */
body.nmodal-open .atlas-grid, body.nmodal-open .atlas-bar, body.nmodal-open .chips, body.nmodal-open .atlas-hint {
  filter: blur(2px);
  opacity: 0.45;
  transition: filter var(--t-2) var(--e-phi), opacity var(--t-2) var(--e-phi);
}
.empty { padding: 2.618rem; text-align: center; color: var(--ink-3); font-family: var(--ff-mono); font-size: 12px; }

/* node detail — second layer above the nodes overlay */
.nmodal {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, calc(-50% + 20px));
  width: min(46rem, calc(100vw - 2rem));
  max-height: 84vh;
  overflow-y: auto;
  overscroll-behavior: contain;
  z-index: 85;
  background: oklch(from var(--bg-1) l c h / 0.97);
  border: 1px solid var(--line);
  border-radius: var(--r-1);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: var(--shadow-lg), inset 0 0 0 0.5px oklch(from var(--ink) l c h / 0.04);
  padding: 2rem 2.2rem 1.618rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--t-2) var(--e-phi), transform var(--t-2) var(--e-phi), visibility var(--t-2) var(--e-phi);
}
.nmodal.active { opacity: 1; visibility: visible; transform: translate(-50%, -50%); }
.nmodal-tag { font-family: var(--ff-mono); font-size: 10px; letter-spacing: var(--ls-title); text-transform: uppercase; color: var(--olo); }
.nmodal-title { font-family: var(--ff-sans); font-weight: 300; font-size: clamp(26px, 3.4vw, 40px); line-height: 1.1; letter-spacing: -0.01em; margin-top: 0.5rem; color: var(--ink); }
.nmodal-meta { font-family: var(--ff-mono); font-size: 10.5px; color: var(--ink-4); margin-top: 0.4rem; letter-spacing: var(--ak-11); }
.nmodal-tagline { font-family: var(--ff-jp); font-size: 15px; line-height: 1.8; color: var(--ink-2); margin-top: 1rem; }
[lang="en"] .nmodal-tagline { font-family: var(--ff-sans); font-weight: 300; }
.nmodal-desc { font-size: 14.5px; line-height: 1.9; color: var(--ink-3); margin-top: 0.8rem; font-weight: 300; }
[lang="ja"] .nmodal-desc { font-family: var(--ff-jp); font-weight: 400; }
.nmodal-sect-h { font-family: var(--ff-mono); font-size: 10px; letter-spacing: 0.14em; color: var(--olo); margin: 1.618rem 0 0.4rem; text-transform: uppercase; }
.nmodal-rows { font-family: var(--ff-mono); font-size: 11.5px; color: var(--ink-3); letter-spacing: var(--ak-11); }
.nmodal-rows .row { display: grid; grid-template-columns: 110px 64px 1fr; gap: 1rem; padding: 4px 0; border-bottom: 1px solid oklch(from var(--line) l c h / 0.4); }
.nmodal-rows .row:last-child { border-bottom: 0; }
.nmodal-rows .nm, .nmodal-rows .pn { color: var(--ink); }
.nmodal-rows .sg { color: var(--olo); font-size: 10.5px; letter-spacing: 0.06em; }
.nmodal-rows .dr, .nmodal-rows .pr { color: var(--ink-4); font-size: 10.5px; }
.nmodal-rows .pd { color: var(--ink-3); font-size: 11px; font-family: var(--ff-sans); font-weight: 300; }
[lang="ja"] .nmodal-rows .pd { font-family: var(--ff-jp); font-weight: 400; }
/* anatomy — long-form per-node overview (the maniacal layer) */
.nmodal-overview {
  font-size: 13.5px;
  line-height: 2.0;
  color: var(--ink-3);
  font-weight: 300;
  font-family: var(--ff-sans);
  white-space: pre-line;
}
[lang="ja"] .nmodal-overview { font-family: var(--ff-jp); font-weight: 400; line-height: 2.0; }
/* tips — patching advice */
.nmodal-tip { padding: 0.5rem 0; border-bottom: 1px solid oklch(from var(--line) l c h / 0.4); }
.nmodal-tip:last-of-type { border-bottom: 0; }
.nmodal-tip b {
  display: block;
  font-family: var(--ff-mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.05em;
  color: var(--ink);
  margin-bottom: 0.2rem;
}
.nmodal-tip b::before { content: '· '; color: var(--olo); }
.nmodal-tip p {
  font-size: 13.5px;
  line-height: 1.95;
  color: var(--ink-3);
  font-weight: 300;
  font-family: var(--ff-sans);
}
[lang="ja"] .nmodal-tip p { font-family: var(--ff-jp); font-weight: 400; }

.nmodal-related { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 0.4rem; }
.nmodal-related .rel {
  font-family: var(--ff-mono); font-size: 11px; color: var(--ink-3);
  background-image: linear-gradient(var(--olo), var(--olo));
  background-repeat: no-repeat; background-position: bottom left; background-size: 0 1px;
  padding-bottom: 2px;
  transition: color var(--t-1) var(--e-phi), background-size var(--t-1) var(--e-phi);
}
.nmodal-related .rel:hover, .nmodal-related .rel:focus-visible { color: var(--olo); background-size: 100% 1px; outline: none; }
@media (max-width: 640px) {
  .nmodal { padding: 1.2rem 1rem 1rem; }
  .nmodal-rows .row { grid-template-columns: 1fr 1fr; }
  .nmodal-rows .dr, .nmodal-rows .pd { grid-column: 1 / -1; padding-top: 2px; }
}

/* ── x — 展開機構 (native details/summary)。 見出しを押すと詳細が開く ── */
.x {
  border-top: 1px solid oklch(from var(--line) l c h / 0.5);
}
.x:last-of-type { border-bottom: 1px solid oklch(from var(--line) l c h / 0.5); }
.x summary {
  display: grid;
  grid-template-columns: minmax(0, auto) 1fr auto;
  align-items: baseline;
  gap: 0 1em;
  padding: 0.95rem 0.5rem;
  list-style: none;
  transition: background var(--t-hover) var(--e-phi), padding-left 500ms var(--e-phi);
}
.x summary::-webkit-details-marker { display: none; }
.x summary:hover { background: oklch(from var(--bg-2) l c h / 0.5); padding-left: 1.1rem; }
.x summary:active .x-t { color: var(--act); }
.x-t {
  font-family: var(--ff-jp);
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
  font-variation-settings: 'wght' 460;
  transition: font-variation-settings var(--t-hover) var(--e-phi);
}
.x summary:hover .x-t { font-variation-settings: 'wght' 600; }
.x-d {
  font-family: var(--ff-jp);
  font-size: 12.5px;
  color: var(--ink-4);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.x-i {
  font-family: var(--ff-mono);
  font-size: 13px;
  color: var(--ink-4);
  transition: transform var(--t-2) var(--e-phi), color var(--t-2) var(--e-phi);
  transform-origin: center;
  align-self: center;
}
.x[open] > summary .x-i { transform: rotate(45deg); color: var(--olo); }
.x[open] > summary .x-t { color: var(--olo); }
/* 本文 — 開いた瞬間に段差で立ち上がる */
.x-step {
  padding: 0.6rem 0.5rem 0.7rem 1.6rem;
}
.x[open] .x-step { animation: entryRise var(--t-3) var(--e-phi) backwards; }
.x[open] .x-step:nth-child(2) { animation-delay: 60ms; }
.x[open] .x-step:nth-child(3) { animation-delay: 120ms; }
.x[open] .x-step:nth-child(4) { animation-delay: 180ms; }
.x[open] .x-step:nth-child(5) { animation-delay: 240ms; }
@media (prefers-reduced-motion: reduce) { .x[open] .x-step { animation: none; } }
.x-step b {
  display: block;
  font-family: var(--ff-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: var(--ak-11);
  color: var(--ink-2);
  margin-bottom: 0.15rem;
}
.x-step b .pn { font-style: normal; color: var(--olo); margin-right: 0.5em; font-size: 10px; }
.x-step p {
  font-family: var(--ff-jp);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.95;
  color: var(--ink-3);
  max-width: 58ch;
}
/* 名前の川 — algorithms / temperaments の列挙 */
.x-flow { max-width: none !important; line-height: 2.1 !important; }
.x-flow i { font-style: normal; font-family: var(--ff-mono); font-size: 9.5px; color: var(--ink-4); margin-right: 0.4em; font-variant-numeric: tabular-nums; }
.x-flow i.tn { margin-left: 0.4em; margin-right: 0; color: var(--ink-4); }
.x-flow .px { color: var(--ink-4); opacity: 0.5; margin: 0 0.7em; }
/* 文献 — hanging indent の書誌様式 (lang 非依存、原語のまま) */
.x-cite {
  padding: 0.32rem 0.5rem 0.32rem 2.8rem;
  text-indent: -1.2rem;
  font-family: var(--ff-sans);
  font-size: 12.5px;
  font-weight: 400;
  line-height: 1.8;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}
.x-cite b { font-weight: 500; color: var(--ink-2); }
.x-cite i { font-style: italic; color: var(--ink-3); }
.x-cite .y { font-family: var(--ff-mono); font-size: 10px; color: var(--olo); margin-right: 0.5em; letter-spacing: 0.04em; }

/* 奥付 — colophon */
.colophon {
  margin-top: clamp(3.5rem, 9vh, 5.5rem);
  padding-top: 1rem;
  border-top: 1px solid oklch(from var(--line) l c h / 0.4);
  font-family: var(--ff-mono);
  font-size: 10px;
  letter-spacing: var(--ak-10);
  line-height: 2.1;
  color: var(--ink-4);
  max-width: 60ch;
}
.colophon b { color: var(--ink-3); font-weight: 400; }

/* tutorial カテゴリ見出し */
.x-group-h {
  font-family: var(--ff-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: var(--ls-title);
  text-transform: uppercase;
  color: var(--ink-4);
  margin: 2.4rem 0 0.8rem;
}
[lang="ja"] .x-group-h { font-family: var(--ff-jp); text-transform: none; letter-spacing: 0.1em; font-size: 11px; }
/* log 行の details 化 — summary 内の .log-line は grid のまま生かす */
.x-log summary { grid-template-columns: 1fr auto; }
.x-log .log-line { border-bottom: 0; padding: 0; }

/* email — cipher line in acquire (shared/cipher-email.js emits .ce-char spans) */
.ov .contact-line {
  font-family: var(--ff-mono);
  font-size: clamp(12px, 0.6rem + 0.22vw, 14px);
  letter-spacing: 0.05em;
  color: var(--ink-3);
}
.ov .contact-line a { color: var(--olo); }
.cipher-email { letter-spacing: 0.08em; }
.cipher-email .ce-char { transition: color var(--t-1) var(--e-phi), opacity var(--t-1) var(--e-phi); }
.cipher-email .ce-char--masked { color: var(--ink-4); opacity: 0.7; }
.cipher-email .ce-char--cycling { color: var(--ink-3); }
.cipher-email .ce-char--decoded { color: var(--olo); }
.cipher-email .ce-char--fixed, .cipher-email .ce-char--bracket { color: var(--ink-3); }

/* ── noscript / no-js static document fallback ── */
html.no-js body { position: static; overflow: auto; height: auto; }
html.no-js .ov { position: static; transform: none; opacity: 1; visibility: visible; width: auto; max-width: 40rem; margin: 2rem auto; max-height: none; box-shadow: none; border: 1px solid var(--line); }
html.no-js .ov-backdrop, html.no-js .field, html.no-js .cur-dot, html.no-js .cur-ring { display: none; }
html.no-js #menu { position: static; mix-blend-mode: normal; margin: 2rem auto 0; max-width: 40rem; }
html.no-js .ov .sec, html.no-js .ov .pull, html.no-js .ov .spec { opacity: 1; transform: none; }
html.no-js .entry-title, html.no-js .entry-lede, html.no-js .entry-meta, html.no-js .doors { animation: none; }

/* ── reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  .field { transition: none; }
  #fieldName { display: none; }
}

/* ── mobile ── */
@media (max-width: 768px) {
  #menu { top: 0.8rem; left: 0.8rem; }
  #menu .links { column-gap: 0.8em; }
  #menu .links a { padding: 4px 0; }
  .ov { padding: 6rem 1.2rem 4rem; }
  .sec, .sec:nth-of-type(even) { grid-template-columns: 1fr; gap: var(--s-3); margin-left: 0; margin-right: 0; }
  .aidx-block { grid-template-columns: 1fr; gap: var(--s-3); }
  .aidx-rail { position: static; display: flex; align-items: baseline; gap: var(--s-3); }
  .aidx-cn { font-size: 32px; }
  .aidx-cat { margin-top: 0; }
  .sec:nth-of-type(even) .sec-l { order: 0; text-align: left; }
  .sec:nth-of-type(even) .sec-r { order: 0; padding-top: 0; }
  .sec-l { position: static; display: flex; align-items: baseline; gap: var(--s-3); }
  .pull { margin-left: 0; }
  .tier-row { grid-template-columns: minmax(0, 1fr) auto; }
  .tr-i { display: none; }
  .tr-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .entry-lede, .entry-meta { margin-left: 0; }
  .doors { margin-left: 0; }
  .door:nth-child(n) { margin-left: 0; }
  .ov-lede, .ov-head .meta-row { margin-left: 0; }
  .sec-r > .ln { margin: 0 0 1.8rem; }
  .sec-r > .ln:nth-of-type(n) { margin-left: 0; }
  .spec-i:nth-child(even) { margin-top: 0; }
  .sec:nth-of-type(n) .sec-gn { transform: none; }
  .sec-gn { font-size: 30px; }
  .sec-t { margin: 0; }
  .sec-note { display: none; }
  .ov-title { font-size: clamp(28px, 8vw, 40px); }
  .entry-mark { font-size: clamp(40px, 13vw, 64px); letter-spacing: 0.05em; }
  .tier-row { gap: var(--s-4); }
  #verLine { display: none; }
}
