/* o-family: washi paper by day, sumi ink by night, a vermilion seal for accent. */
:root {
  --paper: #f3eee3;
  --paper-2: #ebe4d5;
  --paper-3: #e2d9c6;
  --ink: #1d1a16;
  --ink-2: #4a443b;
  --ink-3: #6f675a;
  --rule: #d3c8b2;
  --grid: rgba(160, 60, 40, 0.07);
  --shu: #c23b25;
  --shu-ink: #fff8ef;
  --matcha: #2c7651;
  --term: #18181d;
  --term-2: #222229;
  --term-fg: #e9e4d8;
  --term-dim: #8f8a80;
  --term-str: #9fd5a6;
  --term-com: #7d7a73;
  --shadow: 0 1px 0 rgba(255,255,255,.6) inset, 0 24px 48px -28px rgba(60, 40, 20, .45);
  /* the brand face: Zen Maru Gothic Bold, a rounded gothic close to the round-stroke
     family wordmarks; it draws the hero, the brand name, titles and the Japanese names */
  --brand: "Zen Maru Gothic", "Hiragino Maru Gothic ProN", "Arial Rounded MT Bold", system-ui, sans-serif;
  --serif: var(--brand);
  --sans: "IBM Plex Sans", -apple-system, "Segoe UI", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #121110;
    --paper-2: #1a1916;
    --paper-3: #24221e;
    --ink: #ece6d8;
    --ink-2: #c3baa8;
    --ink-3: #9a917f;
    --rule: #34302a;
    --grid: rgba(255, 106, 77, 0.06);
    --shu: #ff6a4d;
    --shu-ink: #1a0d08;
    --matcha: #67c995;
    --term: #0c0c0e;
    --term-2: #17171b;
    --shadow: 0 0 0 1px rgba(255,255,255,.04), 0 30px 60px -30px rgba(0,0,0,.8);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.65 var(--sans);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
/* washi fibre: a faint fixed noise over everything */
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 100;
  opacity: .05; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .3 0 0 0 0 .2 0 0 0 0 .1 0 0 0 1 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
@media (prefers-color-scheme: dark) { body::before { mix-blend-mode: screen; opacity: .035; } }

img { max-width: 100%; height: auto; }
a { color: inherit; text-decoration-color: color-mix(in srgb, var(--shu) 55%, transparent); text-underline-offset: .2em; text-decoration-thickness: 1px; }
a:hover { color: var(--shu); text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--shu); outline-offset: 3px; border-radius: 3px; }
code, kbd, pre { font-family: var(--mono); font-size: .88em; }
:not(pre) > code { background: var(--paper-2); border: 1px solid var(--rule); padding: .05em .35em; border-radius: 4px; white-space: nowrap; }
kbd { border: 1px solid var(--rule); border-bottom-width: 3px; border-radius: 5px; padding: 0 .45em; background: var(--paper-2); }
.mono { font-family: var(--mono); }
.jp { font-family: var(--serif); }
.sr, .skip:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip:focus { position: fixed; top: 8px; left: 8px; z-index: 200; background: var(--ink); color: var(--paper); padding: .5em 1em; }

.wrap { width: 100%; max-width: calc(var(--wrap) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }

/* ── masthead ─────────────────────────────── */
.masthead {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  backdrop-filter: blur(10px) saturate(1.2);
  -webkit-backdrop-filter: blur(10px) saturate(1.2);
  border-bottom: 1px solid var(--rule);
}
.masthead-in { display: flex; align-items: center; justify-content: space-between; height: 60px; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: .6em; text-decoration: none; }
.brand img { border-radius: 7px; }
.brand-name { font-family: var(--brand); font-weight: 700; font-size: 1.35rem; letter-spacing: 0; }
.nav { display: flex; gap: clamp(.75rem, 2.4vw, 2rem); font-family: var(--mono); font-size: .74rem; letter-spacing: .14em; text-transform: uppercase; }
.nav a { text-decoration: none; color: var(--ink-2); padding: .4em 0; border-bottom: 1px solid transparent; }
.nav a:hover, .nav a[aria-current] { color: var(--ink); border-bottom-color: var(--shu); }
@media (max-width: 520px) { .nav a[href="/#principles"] { display: none; } .brand-name { font-size: 1.1rem; } }

/* ── shared type ──────────────────────────── */
.eyebrow { font-family: var(--mono); font-size: .74rem; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); margin: 0 0 1rem; display: flex; align-items: center; gap: .75em; }
.display { font-family: var(--serif); font-weight: 700; font-size: clamp(2.3rem, 4.9vw, 4.1rem); line-height: 1.06; letter-spacing: -.012em; margin: 0 0 1.25rem; text-wrap: balance; }
.display em { font-style: normal; color: var(--shu); position: relative; white-space: nowrap; }
.display em::after { content: ""; position: absolute; left: 0; right: 0; bottom: .02em; height: .09em; background: currentColor; opacity: .35; transform-origin: left; animation: brush 1.1s .6s cubic-bezier(.6,.05,.3,1) both; }
.display-brand { font-family: var(--brand); font-weight: 700; font-size: clamp(2.4rem, 4.4vw, 3.75rem); line-height: 1.06; letter-spacing: -.02em; }
@keyframes brush { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.lede { font-size: clamp(1.05rem, 1.6vw, 1.2rem); color: var(--ink-2); max-width: 38em; margin: 0 0 1.75rem; }
.h2 { font-family: var(--serif); font-weight: 700; font-size: clamp(1.8rem, 3.4vw, 2.7rem); line-height: 1.12; margin: 0 0 .75rem; letter-spacing: -.005em; text-wrap: balance; }
.section { padding: clamp(64px, 9vw, 120px) 0; position: relative; }
.section-alt { background: var(--paper-2); border-block: 1px solid var(--rule); }
.section-head { max-width: 46rem; margin-bottom: clamp(32px, 5vw, 56px); }
.section-lede { color: var(--ink-2); margin: 0; }
.prose { max-width: 38em; color: var(--ink-2); }
.caption { font-size: .75rem; color: var(--ink-3); margin: .9rem 0 0; line-height: 1.5; }

/* the seal */
.hanko {
  display: inline-grid; place-items: center; width: 2.1em; height: 2.1em; flex: none;
  background: var(--shu); color: var(--shu-ink); border-radius: 22%;
  font: 700 1.05rem/1 var(--serif); letter-spacing: 0; text-transform: none;
  transform: rotate(-6deg);
  box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--shu-ink) 25%, transparent);
}
.hanko-sm { font-size: 1.3rem; }

/* ── hero ─────────────────────────────────── */
.hero, .phero { position: relative; overflow: hidden; padding: clamp(48px, 8vw, 104px) 0 clamp(56px, 8vw, 96px); }
.genko {
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 32px 32px;
  -webkit-mask-image: radial-gradient(ellipse 60% 52% at 25% 24%, #000 5%, transparent 68%);
  mask-image: radial-gradient(ellipse 60% 52% at 25% 24%, #000 5%, transparent 68%);
}
.tate {
  position: absolute; top: 96px; right: max(8px, calc((100vw - var(--wrap)) / 2 - 64px));
  writing-mode: vertical-rl; margin: 0;
  font: 700 1.05rem/1 var(--serif); letter-spacing: .5em; color: var(--ink-3); opacity: .55;
}
@media (max-width: 1320px) { .tate { display: none; } }
.hero-in { position: relative; display: grid; gap: clamp(40px, 5vw, 72px); grid-template-columns: minmax(0, 1fr); align-items: center; }
@media (min-width: 980px) { .hero-in { grid-template-columns: minmax(0, .95fr) minmax(0, 1.15fr); } }
.hero-links { display: flex; flex-wrap: wrap; gap: .6rem; margin: 1.5rem 0 0; }
.hero-demo { position: relative; }
.hero + .section { padding-top: clamp(40px, 6vw, 80px); }
.hero-demo::before { /* a vermilion offset block behind the window */
  content: ""; position: absolute; inset: 22px -14px -14px 22px; border-radius: 14px;
  background: repeating-linear-gradient(-45deg, color-mix(in srgb, var(--shu) 22%, transparent) 0 2px, transparent 2px 9px);
  z-index: -1;
}
.hero-demo .term { position: relative; }

.btn {
  display: inline-flex; align-items: center; gap: .5em; min-height: 42px;
  padding: .55em 1.1em; border: 1px solid var(--ink); border-radius: 999px;
  font: 500 .78rem/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; text-decoration: none;
  transition: transform .15s ease, background-color .15s ease, color .15s ease;
}
.btn:hover { color: var(--paper); background: var(--ink); }
.btn-ink { background: var(--ink); color: var(--paper); }
.btn-ink:hover { background: var(--shu); border-color: var(--shu); color: var(--shu-ink); }
.btn:active { transform: translateY(1px); }

/* entrance */
.rise { animation: rise .8s cubic-bezier(.2,.7,.2,1) both; animation-delay: calc(var(--d, 0) * 90ms + 60ms); }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .rise, .display em::after { animation: none; } }

/* ── terminal frame ───────────────────────── */
.term { margin: 0; background: var(--term); border-radius: 12px; overflow: hidden; box-shadow: var(--shadow); border: 1px solid color-mix(in srgb, var(--term) 70%, var(--rule)); }
.term-bar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .55rem .9rem; background: var(--term-2); color: var(--term-dim); font: 400 .72rem/1.2 var(--mono); letter-spacing: .04em; border-bottom: 1px solid rgba(255,255,255,.06); }
.term-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.term-title::before { content: "~ "; color: var(--shu); }
.term-tag { display: inline-flex; align-items: center; gap: .45em; text-transform: uppercase; letter-spacing: .14em; font-size: .66rem; }
.term-tag::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #e5533d; box-shadow: 0 0 0 3px rgba(229,83,61,.18); animation: blink 2.4s steps(2, jump-none) infinite; }
@keyframes blink { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .term-tag::before { animation: none; } }
.term img { display: block; width: 100%; height: auto; background: var(--term); }

/* ── install tabs (pi-style) ──────────────── */
.install { border: 1px solid var(--rule); border-radius: 10px; background: color-mix(in srgb, var(--paper-2) 80%, transparent); max-width: 40rem; overflow: hidden; }
.install-tabs { display: flex; overflow-x: auto; border-bottom: 1px solid var(--rule); scrollbar-width: none; }
.install-tabs::-webkit-scrollbar { display: none; }
.install-tabs button {
  flex: none; appearance: none; border: 0; border-right: 1px solid var(--rule); background: transparent; cursor: pointer;
  font: 500 .72rem/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3);
  padding: .95em 1.15em; min-height: 42px; border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.install-tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--shu); background: var(--paper); }
.install-tabs button:hover { color: var(--ink); }
.install-panel { display: flex; align-items: center; gap: .75rem; padding: .9rem 1rem; }
.js .install-panel[data-hidden] { display: none; }
.cmd { margin: 0; flex: 1; min-width: 0; overflow-x: auto; font-size: .84rem; line-height: 1.55; white-space: pre; }
.cmd code { font-size: inherit; }
.cmd .ln::before, .install-panel .cmd code::before { content: "$ "; color: var(--ink-3); user-select: none; }
.cmd .c { color: var(--ink-3); }
.copy {
  flex: none; appearance: none; cursor: pointer; background: transparent; color: var(--shu);
  border: 1px solid var(--rule); border-radius: 6px; padding: .55em .8em; min-height: 36px;
  font: 500 .7rem/1 var(--mono); letter-spacing: .12em; text-transform: uppercase;
}
.copy:hover { border-color: var(--shu); }
.copy[data-done] { color: var(--matcha); border-color: var(--matcha); }
html:not(.js) .copy { display: none; }

/* ── project cards ────────────────────────── */
.cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; background: var(--rule); border: 1px solid var(--rule); border-radius: 14px; overflow: hidden; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); }
.card { background: var(--paper); padding: clamp(22px, 3vw, 32px); display: flex; flex-direction: column; gap: .7rem; transition: background-color .2s ease; position: relative; }
.card:hover { background: color-mix(in srgb, var(--paper) 70%, var(--paper-2)); }
.card:hover .card-icon { transform: rotate(-4deg) scale(1.04); }
.card-top { display: flex; justify-content: space-between; align-items: flex-start; }
.card-icon { border-radius: 14px; transition: transform .25s cubic-bezier(.3,1.4,.5,1); }
.card-n { font-size: .72rem; color: var(--ink-3); letter-spacing: .08em; }
.card-name { font: 700 1.6rem/1.15 var(--serif); margin: .4rem 0 0; }
.card-name a { text-decoration: none; }
.card-name .jp { font-size: .95rem; font-weight: 500; color: var(--ink-3); margin-left: .35em; }
.card-tag { color: var(--ink-2); margin: 0; flex: 1; font-size: .98rem; }
.card-links { display: flex; flex-wrap: wrap; gap: 1.1rem; margin: .4rem 0 0; font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; }
.card-links a { text-decoration: none; border-bottom: 1px solid var(--rule); padding-bottom: 2px; }
.card-links a:hover { border-color: var(--shu); }
.card-links a:first-child::after { content: " →"; }

.chips { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0; }
.chip { display: inline-block; font-family: var(--mono); font-size: .66rem; letter-spacing: .1em; text-transform: uppercase; padding: .3em .6em; border: 1px solid var(--rule); border-radius: 4px; color: var(--ink-2); line-height: 1.2; }
.chip-library { color: var(--matcha); border-color: color-mix(in srgb, var(--matcha) 45%, var(--rule)); }
.chip-app, .chip-host { color: var(--shu); border-color: color-mix(in srgb, var(--shu) 45%, var(--rule)); }
.chip-status { border-style: dashed; }

.card-more { background: var(--paper-2); justify-content: flex-end; }
.card-more:hover { background: var(--paper-3); }
.card-more .card-name { margin-top: auto; }
.hanko-lg { font-size: 1.6rem; margin-bottom: auto; }
.card-more .card-links a:first-child::after { content: " ↓"; }

/* ── menu (oshinagaki) ────────────────────── */
.menu { margin-top: clamp(48px, 7vw, 88px); border-top: 3px double var(--rule); padding-top: 2rem; }
.menu-title { font: 700 1.5rem/1.2 var(--serif); margin: 0 0 .35rem; display: flex; align-items: baseline; gap: .6em; flex-wrap: wrap; }
.menu-title .jp { color: var(--shu); }
.menu-note { color: var(--ink-3); margin: 0 0 1.75rem; font-size: .95rem; }
.menu-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.1rem clamp(24px, 5vw, 72px); grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); }
.menu-row { display: grid; grid-template-columns: auto 1fr auto; align-items: center; column-gap: .75rem; }
.menu-name { display: inline-flex; align-items: center; gap: .55em; font: 700 1.08rem/1.3 var(--serif); text-decoration: none; }
.menu-name img { border-radius: 5px; }
.menu-name .jp { font-weight: 500; font-size: .85rem; color: var(--ink-3); }
.menu-dots { border-bottom: 2px dotted var(--rule); transform: translateY(.2em); min-width: 1rem; }
.menu-tag { grid-column: 1 / -1; margin: .2rem 0 0; color: var(--ink-2); font-size: .93rem; }

/* ── stack ────────────────────────────────── */
.diagram {
  margin: 0 0 2.5rem; padding: clamp(18px, 3vw, 32px); overflow-x: auto;
  background: var(--term); color: var(--term-fg); border-radius: 12px; box-shadow: var(--shadow);
  font-size: clamp(.68rem, 1.35vw, .9rem); line-height: 1.6;
}
.diagram a { color: #ffb19c; font-weight: 500; text-decoration: none; border-bottom: 1px solid rgba(255,177,156,.35); }
.diagram a:hover { color: #fff; border-color: #fff; }
.diagram .dl { color: var(--term-dim); text-transform: uppercase; letter-spacing: .08em; }
.diagram .dc { color: var(--term-dim); }
.layers { display: grid; gap: 1.5rem clamp(24px, 4vw, 48px); grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); margin: 0; }
.layers dt { font: 700 1.2rem/1.2 var(--serif); margin-bottom: .45rem; }
.layers dt::before { content: ""; display: inline-block; width: .55em; height: .55em; background: var(--shu); border-radius: 2px; margin-right: .5em; transform: rotate(45deg) translateY(-2px); }
.layers dd { margin: 0; color: var(--ink-2); font-size: .97rem; }

/* ── principles & features (tuios-style numbering) ── */
.principles, .features { list-style: none; margin: 0; padding: 0; display: grid; gap: clamp(32px, 4vw, 48px) clamp(24px, 4vw, 56px); }
.principles { grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr)); }
.features { grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.principle, .feature { border-top: 1px solid var(--ink); padding-top: 1rem; min-width: 0; }
.principle-n { font-size: .72rem; color: var(--ink-3); letter-spacing: .1em; margin: 0 0 .7rem; }
.principle-title { font: 700 clamp(1.5rem, 2.6vw, 2rem)/1.15 var(--serif); margin: 0 0 .7rem; }
.feature-title { font: 700 1.25rem/1.25 var(--serif); margin: 0 0 .5rem; }
.principle p, .feature p:not(.principle-n) { color: var(--ink-2); margin: 0 0 1rem; }
.feature p:last-child { margin: 0; font-size: .97rem; }
.mini, .code pre { margin: 0; padding: 1rem 1.1rem; overflow-x: auto; background: var(--term); color: var(--term-fg); border-radius: 8px; font-size: .8rem; line-height: 1.6; }
.mini .ln::before { content: "$ "; color: var(--term-dim); user-select: none; }
.mini .c, .code .c { color: var(--term-com); font-style: italic; }
.mini .s, .code .s { color: var(--term-str); }
.code .ln::before { content: "$ "; color: var(--term-dim); user-select: none; }
.code .p { color: var(--term-dim); }
.code .k { color: #ffffff; }
.code .o { color: var(--term-dim); }
.code { margin: 1.5rem 0 0; border-radius: 10px; overflow: hidden; box-shadow: var(--shadow); }
.code pre { border-radius: 0; }
.code-bar { display: flex; justify-content: space-between; padding: .5rem 1rem; background: var(--term-2); color: var(--term-dim); font-size: .7rem; letter-spacing: .06em; }
.code-lang { text-transform: uppercase; letter-spacing: .14em; }

/* ── install grid ─────────────────────────── */
.install-grid { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 520px), 1fr)); }
.install-item { min-width: 0; }
.install-name { display: flex; align-items: center; gap: .6em; font: 700 1.2rem/1.2 var(--serif); margin: 0 0 .6rem; }
.install-name img { border-radius: 7px; }
.install-name a { text-decoration: none; }
.snips { display: grid; gap: .5rem; }
.snip { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "label label" "cmd copy"; align-items: center; column-gap: .75rem; background: var(--paper); border: 1px solid var(--rule); border-radius: 8px; padding: .6rem .8rem .7rem; }
.snip-label { grid-area: label; font-size: .64rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); margin-bottom: .25rem; }
.snip .cmd { grid-area: cmd; font-size: .8rem; white-space: pre-wrap; overflow-wrap: anywhere; }
.snip .copy { grid-area: copy; }
.section-alt .snip { background: var(--paper); }
.p-side .snip { background: var(--paper-2); }

/* ── project page ─────────────────────────── */
.phero { padding-bottom: clamp(32px, 5vw, 56px); }
.phero-in { position: relative; }
.crumbs { font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); margin: 0 0 1.75rem; }
.crumbs a { text-decoration: none; }
.p-title { margin: 0 0 1rem; line-height: 1; }
.p-logo { height: clamp(64px, 9vw, 104px); width: auto; display: block; }
.p-wordmark { display: inline-flex; align-items: center; gap: .3em; font: 700 clamp(2.8rem, 7vw, 4.6rem)/1 var(--serif); letter-spacing: -.01em; }
.p-wordmark img { border-radius: 16px; width: .95em; height: .95em; }
.p-meaning { color: var(--ink-3); margin: 0 0 1.5rem; font-size: .98rem; }
.p-meaning .jp { color: var(--shu); font-size: 1.4rem; margin-right: .3em; }
.p-lede { font-size: clamp(1.1rem, 1.9vw, 1.35rem); max-width: 40em; color: var(--ink); font-family: var(--sans); font-weight: 400; line-height: 1.5; }
.p-lede code { font-size: .78em; }
.phero .chips { margin-top: -.5rem; }
.p-demo { margin-bottom: clamp(16px, 3vw, 32px); }
.p-demo .term { max-width: 1000px; }
.p-overview { display: grid; gap: clamp(32px, 5vw, 72px); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 980px) { .p-overview { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.p-side .eyebrow { margin-bottom: .75rem; }
.p-example2 { max-width: 760px; margin-top: clamp(32px, 5vw, 56px); }
.gallery { list-style: none; margin: 0; padding: 0; display: grid; gap: 2.5rem 2rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 460px), 1fr)); }
.gallery-title { font: 700 1.15rem/1.3 var(--serif); margin: 0 0 .7rem; }
.gallery-title .mono { color: var(--shu); font-size: .8rem; margin-right: .4em; }
.doclinks { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .6rem; font-size: .78rem; letter-spacing: .06em; }
.doclinks a { display: inline-flex; align-items: center; min-height: 40px; padding: .4em 1em; border: 1px solid var(--rule); border-radius: 6px; text-decoration: none; background: var(--paper); }
.doclinks a:hover { border-color: var(--shu); }
.pager { display: flex; justify-content: space-between; gap: 1rem; padding-top: 2rem; padding-bottom: 3rem; border-top: 1px solid var(--rule); font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; }
.pager a { text-decoration: none; padding: .6em 0; }

/* ── docs ─────────────────────────────────── */
.docs { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; border-top: 1px solid var(--rule); }
.doc-row { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 1.25rem; padding: 1.75rem 0; border-bottom: 1px solid var(--rule); }
.doc-row img { border-radius: 11px; }
.doc-name { font: 700 1.45rem/1.2 var(--serif); margin: 0 0 .4rem; }
.doc-name a { text-decoration: none; }
.doc-name .jp { font-size: .9rem; font-weight: 500; color: var(--ink-3); }
.doc-tag { color: var(--ink-2); margin: 0 0 1rem; }
.docs-more { margin-top: 3.5rem; font-size: 1.6rem; }
.docs-more-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .9rem; }
.docs-more-list a { font: 700 1.05rem var(--serif); }
.docs-more-list .doc-tag { display: block; margin: .15rem 0 0; font-size: .95rem; }
.nf .display { max-width: 16ch; }

/* ── footer ───────────────────────────────── */
.footer { --f-fg: var(--paper); background: var(--ink); color: var(--f-fg); padding: clamp(48px, 7vw, 80px) 0 0; margin-top: 0; }
.footer a { text-decoration-color: color-mix(in srgb, var(--f-fg) 35%, transparent); }
.footer a:hover { color: var(--shu); }
.footer-in { display: grid; gap: 2.5rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 820px) { .footer-in { grid-template-columns: minmax(0, 1.6fr) minmax(0, .7fr) minmax(0, 1fr); } }
.footer .eyebrow { color: color-mix(in srgb, var(--f-fg) 60%, transparent); }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; font-size: .95rem; }
.footer-names { margin: 1.25rem 0 .75rem; max-width: 34em; color: color-mix(in srgb, var(--f-fg) 82%, transparent); font-size: .95rem; }
.footer-host { font-size: .75rem; letter-spacing: .08em; color: color-mix(in srgb, var(--f-fg) 55%, transparent); margin: 0; }
.footer-base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .75rem; margin-top: clamp(40px, 6vw, 64px); padding-top: 1.25rem; padding-bottom: 1.5rem; border-top: 1px solid color-mix(in srgb, var(--f-fg) 15%, transparent); font-size: .72rem; letter-spacing: .06em; color: color-mix(in srgb, var(--f-fg) 55%, transparent); }
.footer-base code { background: transparent; border-color: color-mix(in srgb, var(--f-fg) 20%, transparent); color: inherit; }
@media (prefers-color-scheme: dark) {
  .footer { --f-fg: var(--ink); background: #0a0a09; border-top: 1px solid var(--rule); }
}
