/* ==========================================================================
   ノード株式会社 ウェブサイト 第2案（2026-11-10）
   一冊の本として読むサイト。夜明け前（紺）から日の出（金）へ、章が進むほど写真と地色が明けていく。
   見出しと本文は明朝、情報は角ゴシック、数字は欧文セリフ、時刻は等幅。差し色は「遠くの灯」の一色だけ。
   ========================================================================== */

:root {
  color-scheme: dark;
  --bg: #0a0d13;
  --bg-2: #0e121a;
  --surface: #141925;
  --fg: #ebe7de;
  --muted: #a8a59d;
  --faint: #72726e;
  --line: rgba(235, 231, 222, .14);
  --line-strong: rgba(235, 231, 222, .3);
  --accent: #f0b860;
  --on-accent: #1a1206;
  --bar-bg: rgba(10, 13, 19, .78);
  --on-photo: #f6f2e9;          /* 写真の上の文字。テーマによらず同じ */
  --on-photo-muted: rgba(246, 242, 233, .74);
  --scrim: 8, 10, 15;           /* 写真に重ねる暗幕（R,G,B） */

  --f-serif: "Shippori Mincho", "Hiragino Mincho ProN", "Yu Mincho", "YuMincho", serif;
  --f-sans: "Zen Kaku Gothic New", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", sans-serif;
  --f-num: "Fraunces", "Shippori Mincho", Georgia, serif;
  --f-mono: "IBM Plex Mono", Consolas, "Zen Kaku Gothic New", monospace;

  --gutter: clamp(20px, 5.5vw, 88px);
  --measure: 39em;
  --ease: cubic-bezier(.2, .7, .1, 1);
}
:root[data-phase="blue"] { --bg: #0c111a; --bg-2: #10161f; --surface: #161c28; --bar-bg: rgba(12, 17, 26, .78); }
:root[data-phase="dawn"] { --bg: #14110f; --bg-2: #1a1613; --surface: #221d19; --bar-bg: rgba(20, 17, 15, .78); }

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #eceef1;
  --bg-2: #e3e6ea;
  --surface: #f8f8f6;
  --fg: #14161b;
  --muted: #535862;
  --faint: #8a8e96;
  --line: rgba(20, 22, 27, .14);
  --line-strong: rgba(20, 22, 27, .34);
  --accent: #96580a;
  --on-accent: #fffaf0;
  --bar-bg: rgba(236, 238, 241, .82);
}
:root[data-theme="light"][data-phase="blue"] { --bg: #eff0ee; --bg-2: #e6e7e4; --surface: #faf9f6; --bar-bg: rgba(239, 240, 238, .82); }
:root[data-theme="light"][data-phase="dawn"] { --bg: #f5f1e8; --bg-2: #ece7db; --surface: #fcfaf4; --bar-bg: rgba(245, 241, 232, .82); }

/* ---------- 基本 ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 72px; }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font-family: var(--f-sans); font-size: 16px; line-height: 1.9; letter-spacing: .03em;
  -webkit-font-smoothing: antialiased;
  transition: background-color 1.4s var(--ease), color .6s var(--ease);
}
/* 紙とフィルムの粒子 */
body::after {
  content: ""; position: fixed; inset: 0; z-index: 70; pointer-events: none; opacity: .09; mix-blend-mode: soft-light;
  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='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .5 0 0 0 0 .5 0 0 0 0 .5 0 0 0 1.1 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
h1, h2, h3, p, ul, ol, dl, dd, figure, blockquote, fieldset { margin: 0; padding: 0; }
ul, ol { list-style: none; }
fieldset { border: 0; min-width: 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
img { display: block; max-width: 100%; }
svg { display: block; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
cite, em, address { font-style: normal; }
h1, h2, h3 { font-family: var(--f-serif); font-weight: 800; line-height: 1.4; letter-spacing: .04em; text-wrap: balance; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
::selection { background: var(--accent); color: var(--on-accent); }
[hidden] { display: none !important; }

.skip { position: fixed; left: 12px; top: -60px; z-index: 200; background: var(--accent); color: var(--on-accent); padding: 8px 16px; font-weight: 700; }
.skip:focus { top: 12px; }

.kicker { font-family: var(--f-sans); font-size: 13px; font-weight: 700; letter-spacing: .2em; color: var(--accent); }

.js [data-reveal] { opacity: 0; transform: translateY(26px); transition: opacity 1.1s var(--ease), transform 1.1s var(--ease); }
.js [data-reveal].in { opacity: 1; transform: none; }

/* ---------- 進捗・上部バー・時刻 ---------- */
.progress { position: fixed; inset: 0 0 auto 0; height: 2px; z-index: 120; pointer-events: none; }
.progress span { display: block; height: 100%; background: var(--accent); transform-origin: 0 50%; transform: scaleX(0); }

.bar { position: fixed; inset: 0 0 auto 0; z-index: 100; height: 64px; padding-inline: var(--gutter); display: flex; align-items: center; justify-content: space-between; gap: 16px; color: var(--on-photo); border-bottom: 1px solid transparent; transition: background-color .5s, color .5s, border-color .5s, transform .6s var(--ease); }
.bar.solid { background: var(--bar-bg); color: var(--fg); border-bottom-color: var(--line); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.bar.away { transform: translateY(-100%); }
.toc-open .bar { background: transparent; color: var(--fg); border-bottom-color: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; transform: none; }
.logo { display: flex; align-items: baseline; gap: 12px; }
.logo-en { font-family: var(--f-num); font-style: italic; font-weight: 500; font-size: 26px; letter-spacing: 0; line-height: 1; }
.logo-ja { font-size: 11px; letter-spacing: .2em; opacity: .8; }
.bar-tools { display: flex; align-items: center; gap: 6px; }
.bar-btn { height: 40px; min-width: 40px; padding: 0 10px; display: inline-flex; align-items: center; justify-content: center; gap: 10px; font-size: 13px; font-weight: 500; letter-spacing: .16em; border-radius: 999px; transition: background-color .3s; }
.bar-btn:hover { background: color-mix(in srgb, currentColor 12%, transparent); }
.toc-ico { display: grid; gap: 4px; width: 18px; }
.toc-ico i { height: 1.5px; background: currentColor; transition: transform .5s var(--ease), opacity .3s, width .4s var(--ease); }
.toc-ico i:nth-child(2) { width: 70%; }
.toc-open .toc-ico i:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
.toc-open .toc-ico i:nth-child(2) { opacity: 0; }
.toc-open .toc-ico i:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }
.theme-btn svg { width: 20px; height: 20px; }
.theme-btn .t-moon, .theme-btn .t-sun, .theme-btn .t-rays { transition: opacity .4s, transform .6s var(--ease); transform-origin: 12px 12px; }
:root[data-theme="dark"] .t-moon { opacity: 0; transform: rotate(-50deg) scale(.5); }
:root[data-theme="light"] .t-sun, :root[data-theme="light"] .t-rays { opacity: 0; transform: rotate(50deg) scale(.5); }
.bar-cta { margin-left: 6px; height: 38px; padding: 0 20px; display: inline-flex; align-items: center; border: 1px solid currentColor; border-radius: 999px; font-size: 13px; font-weight: 700; letter-spacing: .12em; transition: background-color .3s, color .3s, border-color .3s; }
.bar-cta:hover { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
@media (max-width: 560px) { .logo-ja, .toc-btn-label { display: none; } .bar-cta { padding: 0 14px; } }

.clock { position: fixed; left: var(--gutter); bottom: 20px; z-index: 90; display: flex; align-items: center; gap: 12px; padding: 7px 16px 7px 12px; border-radius: 999px; background: var(--bar-bg); border: 1px solid var(--line); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); font-size: 12px; opacity: 0; transform: translateY(12px); pointer-events: none; transition: opacity .6s, transform .6s var(--ease); }
.clock.show { opacity: 1; transform: none; }
.clock-time { font-family: var(--f-mono); font-weight: 500; color: var(--accent); letter-spacing: .06em; display: inline-flex; align-items: center; gap: 8px; }
.clock-time::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); }
.clock-label { font-family: var(--f-serif); font-weight: 600; letter-spacing: .12em; }
.clock.tick .clock-time, .clock.tick .clock-label { animation: tick .7s var(--ease); }
@keyframes tick { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- 目次 ---------- */
.toc { position: fixed; inset: 0; z-index: 95; background: var(--bg); overflow-y: auto; padding: 96px var(--gutter) 48px; opacity: 0; visibility: hidden; transition: opacity .5s, visibility .5s; }
.toc-open .toc { opacity: 1; visibility: visible; }
.toc-in { max-width: 1040px; margin-inline: auto; }
.toc-head { font-family: var(--f-serif); font-weight: 800; font-size: clamp(30px, 4vw, 48px); letter-spacing: .3em; display: flex; align-items: baseline; gap: 20px; }
.toc-head span { font-family: var(--f-num); font-style: italic; font-weight: 400; font-size: 16px; letter-spacing: .04em; color: var(--muted); }
.toc-list { margin-top: 24px; border-top: 1px solid var(--line-strong); }
.toc-list a { display: grid; grid-template-columns: 2.2em minmax(0, 1fr) auto 104px; align-items: center; gap: 0 clamp(12px, 2vw, 28px); padding: 14px 0; border-bottom: 1px solid var(--line); transform: translateY(16px); opacity: 0; transition: transform .7s var(--ease), opacity .7s, color .3s; }
.toc-open .toc-list a { transform: none; opacity: 1; }
.toc-no { font-family: var(--f-serif); font-weight: 800; font-size: 20px; color: var(--accent); }
.toc-t { display: grid; }
.toc-t b { font-family: var(--f-serif); font-weight: 800; font-size: clamp(20px, 2.4vw, 28px); letter-spacing: .14em; line-height: 1.5; }
.toc-t small { font-size: 13px; color: var(--muted); line-height: 1.6; }
.toc-time { font-family: var(--f-mono); font-size: 12.5px; color: var(--muted); }
.toc-list img { width: 104px; height: 60px; object-fit: cover; filter: saturate(.6) brightness(.85); transition: filter .5s, transform .6s var(--ease); }
.toc-list a:hover { color: var(--accent); }
.toc-list a:hover img { filter: none; transform: scale(1.06); }
.toc-contact { margin-top: 28px; display: inline-flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: .1em; color: var(--accent); }
.toc-contact svg, .more svg, .btn svg { width: 18px; height: 18px; transition: transform .4s var(--ease); }
.toc-contact:hover svg, a:hover > .more svg, .btn:hover svg { transform: translateX(5px); }
@media (max-width: 560px) { .toc-list a { grid-template-columns: 1.8em minmax(0, 1fr) 72px; } .toc-time { display: none; } .toc-list img { width: 72px; height: 48px; } }

/* ---------- 表紙 ---------- */
.cover { position: relative; height: 100svh; min-height: 640px; max-height: 1080px; overflow: clip; color: var(--on-photo); isolation: isolate; }
.cover-img, .opener-img, .finale-img, .contact-img { position: absolute; inset: 0; z-index: -1; overflow: clip; background: #0a0d13; }
.cover-img img, .opener-img img, .finale-img img, .contact-img img { width: 100%; height: 100%; object-fit: cover; }
.cover-img::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(var(--scrim), .5) 0%, rgba(var(--scrim), 0) 26%, rgba(var(--scrim), .1) 52%, rgba(var(--scrim), .88) 100%); }
.cover-img img { animation: cover-in 2.6s var(--ease) both; }
@keyframes cover-in { from { opacity: 0; transform: scale(1.08); } to { opacity: 1; transform: none; } }
.cover-in { position: absolute; inset: 0; padding: 96px var(--gutter) clamp(28px, 5vh, 56px); display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: minmax(0, 1fr) auto; gap: 24px; }
.cover-title { grid-column: 2; grid-row: 1 / -1; writing-mode: vertical-rl; font-size: clamp(34px, min(6.6vw, 9.4vh), 98px); line-height: 1.5; letter-spacing: .14em; font-feature-settings: "vpal"; text-wrap: initial; margin-top: 1vh; }
.cover-title span { display: block; white-space: nowrap; animation: line-in 1.5s var(--ease) both; }
.cover-title span:nth-child(1) { animation-delay: .5s; }
.cover-title span:nth-child(2) { animation-delay: .8s; padding-top: 1.1em; }
.cover-title span:nth-child(3) { animation-delay: 1.1s; padding-top: 2.2em; }
@keyframes line-in { from { opacity: 0; clip-path: inset(0 0 100% 0); transform: translateY(-18px); } to { opacity: 1; clip-path: inset(-10% -10% -10% -10%); transform: none; } }
.cover-foot { grid-column: 1; grid-row: 2; max-width: 34em; display: grid; gap: 18px; animation: fade-up 1.4s 1.5s var(--ease) both; }
@keyframes fade-up { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.cover-sub { font-family: var(--f-serif); font-weight: 600; font-size: clamp(22px, 2.6vw, 34px); line-height: 1.6; letter-spacing: .1em; }
.cover-note { font-size: 13.5px; line-height: 2; color: var(--on-photo-muted); max-width: 32em; }
.cover-start { justify-self: start; display: inline-grid; grid-template-columns: auto auto; align-items: center; gap: 2px 14px; padding: 12px 22px 12px 26px; border: 1px solid rgba(246, 242, 233, .5); border-radius: 999px; transition: background-color .4s, color .4s, border-color .4s; }
.cover-start span { font-family: var(--f-serif); font-weight: 800; letter-spacing: .2em; font-size: 15px; }
.cover-start small { grid-column: 1; font-size: 11px; letter-spacing: .12em; opacity: .75; line-height: 1.4; }
.cover-start svg { grid-column: 2; grid-row: 1 / 3; width: 20px; height: 20px; animation: nudge 2.2s ease-in-out infinite; }
@keyframes nudge { 50% { transform: translateY(5px); } }
.cover-start:hover { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.cover-stamp { position: absolute; left: var(--gutter); top: 92px; font-family: var(--f-mono); font-size: 12.5px; letter-spacing: .1em; display: flex; gap: 14px; align-items: center; color: var(--on-photo-muted); animation: fade-up 1.4s 1.8s var(--ease) both; }
.cover-stamp::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #f0b860; box-shadow: 0 0 12px #f0b860; animation: lamp 3s ease-in-out infinite; }
@keyframes lamp { 50% { opacity: .35; } }
.cover-stamp span { font-family: var(--f-serif); letter-spacing: .2em; }
@media (max-width: 720px) {
  .cover-in { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr) auto; }
  .cover-title { grid-column: 1; grid-row: 1; justify-self: end; margin-top: 40px; font-size: clamp(30px, min(9.4vw, 5.4vh), 46px); }
  .cover-foot { grid-row: 3; }
}

/* ---------- 章の扉 ---------- */
.chapter { position: relative; }
.opener { position: relative; height: 94svh; min-height: 560px; max-height: 940px; overflow: clip; color: var(--on-photo); isolation: isolate; }
.opener-img::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(var(--scrim), .55) 0%, rgba(var(--scrim), .08) 34%, rgba(var(--scrim), .18) 56%, rgba(var(--scrim), .86) 100%); }
.opener-in { position: absolute; inset: 0; padding: 104px var(--gutter) clamp(32px, 6vh, 64px); display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto minmax(0, 1fr) auto; column-gap: 24px; }
.opener-no { grid-column: 1; grid-row: 1; display: flex; align-items: flex-start; gap: 18px; }
.opener-no i { font-family: var(--f-num); font-style: italic; font-weight: 300; font-size: clamp(110px, 19vw, 270px); line-height: .78; letter-spacing: -.04em; color: rgba(246, 242, 233, .92); }
.opener-no span { writing-mode: vertical-rl; font-family: var(--f-serif); font-weight: 600; font-size: 14px; letter-spacing: .5em; padding-top: 6px; }
.opener-title { grid-column: 2; grid-row: 1 / 3; writing-mode: vertical-rl; font-size: clamp(64px, min(13vw, 17vh), 176px); line-height: 1.1; letter-spacing: .12em; text-wrap: initial; }
.opener-lead { grid-column: 1; grid-row: 3; font-family: var(--f-serif); font-weight: 600; font-size: clamp(24px, 3.8vw, 52px); line-height: 1.55; letter-spacing: .08em; }
.opener-time { grid-column: 2; grid-row: 3; align-self: end; justify-self: end; font-family: var(--f-mono); font-size: 13px; letter-spacing: .1em; display: flex; align-items: center; gap: 10px; color: var(--on-photo-muted); }
.opener-time::before { content: ""; width: 28px; height: 1px; background: currentColor; }

/* ---------- 本文 ---------- */
.prose { width: min(100% - var(--gutter) * 2, 1160px); margin-inline: auto; padding-block: clamp(64px, 9vw, 128px); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, var(--measure)) minmax(0, 1fr); row-gap: 1.9em; font-family: var(--f-serif); font-weight: 500; font-size: clamp(16px, 1.22vw, 18px); line-height: 2.2; letter-spacing: .05em; }
.prose > * { grid-column: 2; min-width: 0; }
.prose > .notes, .prose > .pull, .prose > .compare, .prose > .pair, .prose > .principles, .prose > .notdo, .prose > .route, .prose > .who, .prose > .night { grid-column: 1 / -1; }
.prose + .prose, .scrolly + .prose, .svc + .prose { padding-top: 0; }
.prose p { text-align: justify; }
.lede { font-size: 1.36em; line-height: 2; font-weight: 600; }
.lede::first-letter { font-size: 2.9em; float: left; line-height: 1.05; padding: .04em .12em 0 0; font-weight: 800; color: var(--accent); }
.prose h3 { font-size: clamp(22px, 2.5vw, 32px); margin-top: 1.4em; padding-top: 1.2em; border-top: 1px solid var(--line-strong); }
.turn { font-size: 1.3em; font-weight: 800; text-align: center !important; margin-top: 1.6em; letter-spacing: .14em; }
.turn::after { content: ""; display: block; width: 1px; height: 56px; margin: 22px auto 0; background: linear-gradient(var(--accent), transparent); }
.caption-note { font-family: var(--f-sans); font-size: 12px; color: var(--faint); margin-top: -1.2em; }

/* 写真 */
.fig { display: grid; gap: 12px; margin-block: 1em; }
.fig-frame { overflow: clip; background: var(--surface); aspect-ratio: 3 / 2; }
.fig-tall .fig-frame { aspect-ratio: 4 / 5; }
.fig-frame img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.6s var(--ease); }
.fig:hover .fig-frame img { transform: scale(1.04); }
.fig figcaption { font-family: var(--f-sans); font-size: 12.5px; letter-spacing: .08em; color: var(--muted); display: flex; align-items: center; gap: 12px; line-height: 1.6; }
.fig figcaption::before { content: ""; flex: none; width: 24px; height: 1px; background: var(--accent); }
.prose > .fig-right { grid-column: 2 / -1; width: min(100%, 440px); justify-self: end; }

/* 数字の注 */
.notes { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0; border-block: 1px solid var(--line-strong); margin-block: 1.4em; font-family: var(--f-sans); }
.note { padding: clamp(20px, 3vw, 36px) clamp(16px, 2.4vw, 32px); display: grid; gap: 6px; align-content: start; border-left: 1px solid var(--line); }
.note:first-child { border-left: 0; padding-left: 0; }
.note b { font-family: var(--f-num); font-weight: 300; font-size: clamp(64px, 8.4vw, 116px); line-height: 1; letter-spacing: -.03em; font-variant-numeric: tabular-nums lining-nums; }
.note b small { font-size: .34em; font-style: italic; margin-left: 4px; color: var(--accent); }
.note p { font-size: 14px; line-height: 1.7; text-align: left; font-weight: 500; letter-spacing: .03em; }
.note cite { font-family: var(--f-mono); font-size: 10.5px; color: var(--faint); letter-spacing: 0; line-height: 1.6; }
@media (max-width: 760px) { .note { border-left: 0; padding-inline: 0; border-top: 1px solid var(--line); } .note:first-child { border-top: 0; } }

/* 引用 */
.pull { margin-block: 1.6em; padding-block: clamp(28px, 5vw, 64px); text-align: center; position: relative; }
.pull::before { content: ""; display: block; width: 1px; height: 64px; margin: 0 auto 28px; background: linear-gradient(transparent, var(--accent)); }
.pull p { font-weight: 800; font-size: clamp(25px, 4.4vw, 58px); line-height: 1.55; letter-spacing: .08em; text-align: center; text-wrap: balance; }
.pull em { color: var(--accent); }
.pull footer { margin-top: 24px; font-family: var(--f-sans); font-size: 14px; color: var(--muted); letter-spacing: .06em; }

/* 写真と文の対 */
.compare { display: grid; gap: clamp(28px, 5vw, 80px); align-items: center; margin-block: 1em; }
.compare-body { display: grid; gap: 1.5em; }
.compare-body h3 { margin-top: 0; padding-top: 0; border-top: 0; }
@media (min-width: 860px) { .compare { grid-template-columns: minmax(0, .8fr) minmax(0, 1fr); } .compare-rev { grid-template-columns: minmax(0, .7fr) minmax(0, 1.1fr); align-items: start; } .compare-rev .fig { position: sticky; top: 96px; } }
.vs { display: grid; gap: 0; border-top: 1px solid var(--line-strong); font-family: var(--f-sans); }
.vs > div { display: grid; gap: 4px; padding: 18px 0 18px 20px; border-bottom: 1px solid var(--line); border-left: 2px solid transparent; color: var(--muted); }
.vs dt { font-family: var(--f-serif); font-weight: 800; font-size: 20px; letter-spacing: .12em; display: flex; align-items: baseline; gap: 12px; }
.vs dt small { font-family: var(--f-sans); font-size: 11.5px; font-weight: 500; letter-spacing: .1em; color: var(--faint); }
.vs dd { font-size: 14.5px; line-height: 1.9; letter-spacing: .03em; }
.vs .vs-on { border-left-color: var(--accent); color: var(--fg); }
.vs .vs-on dt { color: var(--accent); }

/* ---------- 第三章：写真が切り替わる手順 ---------- */
.scrolly { width: min(100% - var(--gutter) * 2, 1240px); margin-inline: auto; display: grid; gap: 0; padding-bottom: clamp(40px, 6vw, 88px); }
.scrolly-stage { position: sticky; top: 64px; z-index: 2; background: var(--bg); padding-block: 12px; transition: background-color 1.4s var(--ease); }
.scrolly-frame { position: relative; aspect-ratio: 3 / 2; max-height: 44svh; width: 100%; overflow: clip; background: var(--surface); }
.scrolly-frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: scale(1.08); transition: opacity 1.1s var(--ease), transform 2.4s var(--ease); }
.scrolly-frame img.on { opacity: 1; transform: none; }
.scrolly-count { position: absolute; right: 14px; bottom: 10px; font-family: var(--f-mono); font-size: 12px; color: var(--on-photo); letter-spacing: .1em; }
.scrolly-count b { font-family: var(--f-num); font-style: italic; font-weight: 400; font-size: 28px; }
.step { padding: 36px 0 36px 22px; border-left: 1px solid var(--line); display: grid; gap: 12px; align-content: center; transition: opacity .6s, border-color .6s; }
.step-k { font-family: var(--f-serif); font-weight: 600; font-size: 13.5px; letter-spacing: .4em; color: var(--faint); transition: color .5s; }
.step h3 { font-size: clamp(24px, 3vw, 40px); }
.step p:last-child { font-family: var(--f-serif); font-weight: 500; font-size: clamp(15.5px, 1.2vw, 17.5px); line-height: 2.1; color: var(--muted); max-width: 30em; text-align: justify; }
.step.active { border-left-color: var(--accent); }
.step.active .step-k { color: var(--accent); }
@media (min-width: 920px) {
  .scrolly { grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); column-gap: clamp(40px, 6vw, 96px); align-items: start; }
  .scrolly-stage { top: calc(50svh - min(36svh, 330px)); padding-block: 0; background: none; }
  .scrolly-frame { aspect-ratio: 5 / 4; max-height: min(72svh, 660px); }
  .step { min-height: min(84svh, 700px); padding-left: 40px; }
  .js .step:not(.active) { opacity: .3; }
}

/* ---------- 第四章 ---------- */
.principles { margin-block: 1em; font-family: var(--f-sans); }
.principles h3 { margin-top: 0; }
.principles ul { margin-top: 28px; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 0 clamp(28px, 4vw, 64px); counter-reset: none; }
.principles li { display: grid; gap: 8px; padding: 24px 0; border-top: 1px solid var(--line); align-content: start; }
.principles b { font-family: var(--f-serif); font-weight: 800; font-size: clamp(19px, 1.8vw, 23px); letter-spacing: .08em; line-height: 1.6; }
.principles span { font-size: 14.5px; line-height: 1.95; color: var(--muted); letter-spacing: .03em; }

.pair { display: grid; gap: 24px; margin-block: 1em; align-items: start; }
@media (min-width: 760px) { .pair { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); } .pair .fig:last-child { margin-top: clamp(48px, 9vw, 140px); } }

.night { font-family: var(--f-sans); border-top: 1px solid var(--line-strong); margin-top: .4em; }
.night li { display: grid; grid-template-columns: 5.2em minmax(0, 1fr); grid-template-areas: "time cmd" "time desc" "time who"; gap: 0 16px; padding: 16px 0; border-bottom: 1px solid var(--line); align-items: baseline; transition: opacity .7s, background-color .7s; }
.night time { grid-area: time; font-family: var(--f-serif); font-weight: 800; font-size: 15px; letter-spacing: .14em; color: var(--muted); }
.night code { grid-area: cmd; font-family: var(--f-mono); font-size: 12px; color: var(--faint); }
.night p { grid-area: desc; font-size: 15.5px; font-weight: 500; line-height: 1.7; text-align: left; letter-spacing: .03em; }
.night em { grid-area: who; font-size: 12px; color: var(--muted); }
.night .human time, .night .human em { color: var(--accent); }
.night .human p { font-family: var(--f-serif); font-weight: 800; font-size: 19px; letter-spacing: .08em; }
.js .night.run li { opacity: .28; }
.js .night.run li.lit { opacity: 1; }
@media (min-width: 760px) { .night li { grid-template-columns: 7em 7em minmax(0, 1fr) 9em; grid-template-areas: "time cmd desc who"; } .night em { text-align: right; } }

/* ---------- 第五章：サービス ---------- */
.svc { padding-bottom: clamp(48px, 7vw, 104px); }
.svc-track { display: flex; gap: clamp(16px, 2.4vw, 32px); overflow-x: auto; scroll-snap-type: x mandatory; padding-inline: max(var(--gutter), calc((100% - 1160px) / 2)); scroll-padding-inline: max(var(--gutter), calc((100% - 1160px) / 2)); scrollbar-width: none; overscroll-behavior-x: contain; }
.svc-track::-webkit-scrollbar { display: none; }
.svc-card { flex: 0 0 min(86vw, 980px); scroll-snap-align: start; display: grid; background: var(--surface); border: 1px solid var(--line); transition: background-color 1.4s var(--ease); }
.svc-card figure { overflow: clip; aspect-ratio: 3 / 2; background: var(--bg-2); }
.svc-card img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.8s var(--ease); }
.svc-card:hover img { transform: scale(1.05); }
.svc-body { padding: clamp(22px, 3vw, 44px); display: grid; gap: 12px; align-content: start; }
.svc-en { font-family: var(--f-num); font-style: italic; font-size: 18px; color: var(--accent); display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; line-height: 1.4; }
.svc-en span { font-family: var(--f-sans); font-style: normal; font-size: 11.5px; font-weight: 700; letter-spacing: .1em; color: var(--fg); border: 1px solid var(--line-strong); border-radius: 999px; padding: 1px 12px; }
.svc-card h3 { font-size: clamp(21px, 2.3vw, 30px); letter-spacing: .06em; word-break: keep-all; overflow-wrap: anywhere; text-wrap: initial; }
.svc-sum { font-family: var(--f-serif); font-weight: 600; font-size: 16.5px; letter-spacing: .06em; }
.svc-card dl { margin-top: 8px; border-top: 1px solid var(--line-strong); }
.svc-card dl > div { display: grid; gap: 2px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.svc-card dt { font-size: 12px; font-weight: 700; letter-spacing: .16em; color: var(--muted); }
.svc-card dd { font-size: 14.5px; line-height: 1.9; }
@media (min-width: 900px) { .svc-card { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); } .svc-card figure { aspect-ratio: auto; height: 100%; min-height: 520px; } }
.svc-nav { width: min(100% - var(--gutter) * 2, 1160px); margin: 20px auto 0; display: flex; align-items: center; gap: 16px; }
.svc-nav button { width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--line-strong); display: grid; place-items: center; transition: background-color .3s, color .3s, border-color .3s, opacity .3s; }
.svc-nav button svg { width: 20px; height: 20px; }
.svc-nav button:hover:not(:disabled) { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.svc-nav button:disabled { opacity: .3; cursor: default; }
.svc-pos { font-family: var(--f-mono); font-size: 13px; color: var(--muted); letter-spacing: .1em; }
.svc-pos b { font-family: var(--f-num); font-style: italic; font-weight: 400; font-size: 26px; color: var(--fg); }

.route { display: grid; gap: 0; font-family: var(--f-sans); margin-top: .2em; }
.route li { position: relative; padding: 30px 0 30px 34px; display: grid; gap: 8px; border-left: 1px solid var(--line-strong); }
.route li::before { content: ""; position: absolute; left: -6px; top: 38px; width: 11px; height: 11px; border-radius: 50%; background: var(--bg); border: 1px solid var(--accent); transition: background-color 1.4s var(--ease); }
.route li:last-child::before { background: var(--accent); box-shadow: 0 0 14px var(--accent); }
.route-k { font-family: var(--f-serif); font-weight: 800; font-size: 22px; letter-spacing: .12em; display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; text-align: left !important; }
.route-k span { font-family: var(--f-mono); font-weight: 400; font-size: 12px; letter-spacing: .04em; color: var(--accent); }
.route li > p:last-child { font-size: 14.5px; line-height: 1.95; color: var(--muted); letter-spacing: .03em; text-align: left; }
@media (min-width: 860px) {
  .route { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .route li { padding: 36px 32px 0 0; border-left: 0; border-top: 1px solid var(--line-strong); }
  .route li::before { left: 0; top: -6px; }
}

.who { font-family: var(--f-sans); border-top: 1px solid var(--line-strong); margin-top: .2em; }
.who li { display: grid; gap: 4px 40px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.who b { font-family: var(--f-serif); font-weight: 800; font-size: clamp(17px, 1.7vw, 21px); letter-spacing: .08em; line-height: 1.7; }
.who span { font-size: 14.5px; color: var(--muted); line-height: 1.9; letter-spacing: .03em; }
@media (min-width: 860px) { .who li { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); align-items: baseline; } }

/* ---------- 第六章 ---------- */
.reasons { font-family: var(--f-sans); border-top: 1px solid var(--line-strong); }
.reasons li { display: grid; gap: 6px; padding: 24px 0; border-bottom: 1px solid var(--line); }
.reasons b { font-family: var(--f-serif); font-weight: 800; font-size: clamp(19px, 1.9vw, 24px); letter-spacing: .08em; line-height: 1.6; }
.reasons span { font-size: 14.5px; line-height: 1.95; color: var(--muted); letter-spacing: .03em; }
.notdo { font-family: var(--f-sans); margin-top: 1em; }
.notdo h3 { margin-top: 0; }
.notdo ul { margin-top: 20px; display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 0 clamp(28px, 4vw, 64px); }
.notdo li { display: grid; gap: 4px; padding: 18px 0; border-top: 1px solid var(--line); }
.notdo s { font-family: var(--f-serif); font-weight: 600; font-size: 18px; letter-spacing: .06em; text-decoration-color: var(--accent); text-decoration-thickness: 1.5px; }
.notdo span { font-size: 14px; color: var(--muted); letter-spacing: .03em; }

/* ---------- 終章 ---------- */
.finale { position: relative; min-height: 100svh; overflow: clip; color: var(--on-photo); isolation: isolate; display: grid; align-items: end; }
.finale-img::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(var(--scrim), .42) 0%, rgba(var(--scrim), 0) 30%, rgba(var(--scrim), .3) 58%, rgba(var(--scrim), .9) 100%); }
.finale-in { padding: 140px var(--gutter) clamp(48px, 9vh, 104px); display: grid; gap: clamp(20px, 3vw, 40px); max-width: 1320px; width: 100%; margin-inline: auto; }
.finale-no { font-family: var(--f-serif); font-weight: 800; font-size: 20px; letter-spacing: .3em; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; }
.finale-no span { font-size: 13px; font-weight: 600; padding: 2px 12px 2px 16px; border: 1px solid rgba(246, 242, 233, .5); border-radius: 999px; }
.finale-no time { font-family: var(--f-mono); font-weight: 400; font-size: 12.5px; letter-spacing: .1em; color: #f6cf8a; }
.finale-title { font-size: clamp(40px, 9vw, 140px); line-height: 1.3; letter-spacing: .06em; }
.finale-body { display: grid; gap: 1.2em; max-width: 38em; font-family: var(--f-serif); font-weight: 500; font-size: clamp(15.5px, 1.25vw, 18px); line-height: 2.2; letter-spacing: .05em; color: rgba(246, 242, 233, .9); text-align: justify; }

/* ---------- お問い合わせ ---------- */
.contact { position: relative; overflow: clip; isolation: isolate; }
.contact-img::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(var(--scrim), .82) 0%, rgba(var(--scrim), .5) 48%, rgba(var(--scrim), .3) 100%); }
.contact-in { width: min(100% - var(--gutter) * 2, 1240px); margin-inline: auto; padding-block: clamp(80px, 11vw, 160px); display: grid; gap: 40px; }
.contact-head { color: var(--on-photo); display: grid; gap: 22px; align-content: start; }
.contact-head .kicker { color: #f6cf8a; }
.contact-head h2 { font-size: clamp(34px, 5.6vw, 76px); line-height: 1.35; }
.contact-head p:last-child { font-size: 15px; line-height: 2.1; max-width: 30em; color: var(--on-photo-muted); }
@media (min-width: 980px) { .contact-in { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(48px, 7vw, 112px); align-items: start; } .contact-head { position: sticky; top: 120px; } }
.form { background: var(--surface); color: var(--fg); padding: clamp(24px, 3.6vw, 52px); display: grid; gap: 22px; box-shadow: 0 40px 80px -40px rgba(0, 0, 0, .6); transition: background-color 1.4s var(--ease), color .6s; }
.field { display: grid; gap: 6px; min-width: 0; }
.field-row { display: grid; gap: 22px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.field label, .chips legend { font-size: 13px; font-weight: 700; letter-spacing: .12em; display: flex; align-items: center; gap: 10px; }
.field label i { font-style: normal; font-size: 10.5px; color: var(--accent); border: 1px solid currentColor; padding: 0 6px; line-height: 1.6; letter-spacing: .08em; }
.field input, .field textarea { width: 100%; font: inherit; font-size: 16px; color: var(--fg); background: transparent; border: 0; border-bottom: 1px solid var(--line-strong); border-radius: 0; padding: 8px 2px 10px; transition: border-color .3s, box-shadow .3s; resize: vertical; }
.field input:focus, .field textarea:focus { outline: none; border-bottom-color: var(--accent); box-shadow: 0 1px 0 var(--accent); }
.field.err input, .field.err textarea { border-bottom-color: #e0634a; box-shadow: 0 1px 0 #e0634a; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips legend { margin-bottom: 12px; }
.chips input { position: absolute; opacity: 0; }
.chips span { display: block; border: 1px solid var(--line-strong); border-radius: 999px; padding: 5px 18px; font-size: 14px; cursor: pointer; transition: background-color .3s, color .3s, border-color .3s; }
.chips input:checked + span { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.chips input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 3px; }
.form-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 22px; margin-top: 4px; }
.btn { display: inline-flex; align-items: center; gap: 12px; height: 56px; padding: 0 32px; border-radius: 999px; background: var(--accent); color: var(--on-accent); font-weight: 700; letter-spacing: .16em; transition: transform .4s var(--ease), box-shadow .4s; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 14px 30px -12px var(--accent); }
.form-note { font-size: 13.5px; color: var(--muted); line-height: 1.7; flex: 1 1 220px; min-width: 0; }
.form-note.ng { color: #e0634a; }

/* ---------- 付録・奥付 ---------- */
.appendix { background: var(--bg-2); transition: background-color 1.4s var(--ease); }
.appendix-in { width: min(100% - var(--gutter) * 2, 1240px); margin-inline: auto; padding-block: clamp(72px, 10vw, 144px); display: grid; gap: clamp(72px, 10vw, 144px); }
.app-block { display: grid; gap: 28px; }
.app-head { display: grid; gap: 10px; align-content: start; }
.app-head h2 { font-size: clamp(26px, 3vw, 38px); letter-spacing: .1em; word-break: keep-all; overflow-wrap: anywhere; }
@media (min-width: 980px) { .app-block { grid-template-columns: minmax(0, .55fr) minmax(0, 1.45fr); gap: 56px; align-items: start; } .app-head { position: sticky; top: 96px; } }

.faq { border-top: 1px solid var(--line-strong); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 20px; align-items: center; padding: 22px 0; font-family: var(--f-serif); font-weight: 800; font-size: clamp(16.5px, 1.5vw, 20px); letter-spacing: .06em; line-height: 1.7; transition: color .3s; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; width: 14px; height: 14px; background: linear-gradient(currentColor, currentColor) center / 100% 1.5px no-repeat, linear-gradient(currentColor, currentColor) center / 1.5px 100% no-repeat; transition: transform .5s var(--ease); }
.faq summary:hover { color: var(--accent); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 40px 26px 0; color: var(--muted); font-size: 15px; line-height: 2.1; max-width: 44em; animation: fade-up .6s var(--ease); }

.biz { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: clamp(20px, 3vw, 40px); }
.biz-card { display: grid; gap: 10px; align-content: start; }
.biz-card figure { overflow: clip; aspect-ratio: 3 / 2; background: var(--surface); margin-bottom: 8px; }
.biz-card img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.6s var(--ease); }
.biz-card:hover img { transform: scale(1.06); }
.biz-en { font-family: var(--f-num); font-style: italic; font-size: 17px; color: var(--accent); line-height: 1.3; }
.biz-card h3 { font-size: clamp(22px, 2.4vw, 30px); letter-spacing: .08em; }
.biz-card > p:not(.biz-en) { font-size: 14.5px; color: var(--muted); line-height: 2; }
.more { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 700; letter-spacing: .1em; margin-top: 4px; }

.news { border-top: 1px solid var(--line-strong); }
.news li { display: grid; gap: 4px 28px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.news time { font-family: var(--f-mono); font-size: 13px; color: var(--accent); }
.news p { font-family: var(--f-serif); font-weight: 600; letter-spacing: .05em; }
@media (min-width: 700px) { .news li { grid-template-columns: 8em minmax(0, 1fr); align-items: baseline; } }

.colophon-img { grid-column: 1 / -1; overflow: clip; aspect-ratio: 21 / 9; background: var(--surface); }
.colophon-img img { width: 100%; height: 100%; object-fit: cover; }
.colophon-table { border-top: 1px solid var(--line-strong); }
.colophon-table > div { display: grid; gap: 4px 28px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.colophon-table dt { font-size: 13px; font-weight: 700; letter-spacing: .16em; color: var(--muted); }
.colophon-table dd { font-family: var(--f-serif); font-weight: 500; letter-spacing: .05em; line-height: 2; }
.colophon-table dd small { font-family: var(--f-num); font-style: italic; font-size: 15px; margin-left: 14px; color: var(--muted); }
@media (min-width: 700px) { .colophon-table > div { grid-template-columns: 8em minmax(0, 1fr); align-items: baseline; } }

/* ---------- フッター ---------- */
.footer { padding: clamp(56px, 8vw, 112px) var(--gutter) 88px; display: grid; gap: 36px; border-top: 1px solid var(--line); }
.footer-line { font-family: var(--f-serif); font-weight: 800; font-size: clamp(26px, 5.4vw, 80px); letter-spacing: .08em; line-height: 1.5; }
.footer-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 16px 40px; }
.footer-name { font-family: var(--f-serif); font-weight: 600; letter-spacing: .16em; display: flex; align-items: baseline; gap: 14px; }
.footer nav { display: flex; flex-wrap: wrap; gap: 6px 22px; font-family: var(--f-serif); font-weight: 600; font-size: 14px; letter-spacing: .1em; }
.footer nav a, .footer-small a { color: var(--muted); transition: color .3s; }
.footer nav a:hover, .footer-small a:hover { color: var(--accent); }
.footer-small { padding-top: 20px; border-top: 1px solid var(--line); color: var(--faint); font-size: 12px; }
.footer-small a { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; letter-spacing: .1em; }
.footer-small svg { width: 16px; height: 16px; }

/* ---------- スクロールに連動する写真の動き（対応ブラウザのみ） ---------- */
@supports ((animation-timeline: view()) and (animation-range: 0% 100%)) {
  @media (prefers-reduced-motion: no-preference) {
    .opener-img img, .finale-img img, .contact-img img {
      animation: drift linear both; animation-timeline: view(); animation-range: cover 0% cover 100%;
    }
    .cover-img { animation: cover-out linear both; animation-timeline: view(); animation-range: exit 0% exit 100%; }
    .fig-frame, .colophon-img, .biz-card figure {
      animation: unveil linear both; animation-timeline: view(); animation-range: entry 0% cover 34%;
    }
    .opener-title, .opener-no i { animation: sink linear both; animation-timeline: view(); animation-range: exit 0% exit 100%; }
    @keyframes drift { from { transform: translateY(-7%) scale(1.16); } to { transform: translateY(7%) scale(1.16); } }
    @keyframes cover-out { to { transform: translateY(12%) scale(1.06); opacity: .5; } }
    @keyframes unveil { from { clip-path: inset(16% 11%); } to { clip-path: inset(0); } }
    @keyframes sink { to { transform: translateY(-70px); opacity: .15; } }
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; transition-delay: 0ms !important; }
  .js [data-reveal] { opacity: 1; transform: none; }
}

/* スマホ幅では、表紙の写真を左へ寄せて遠くの灯を残す */
@media (max-width: 720px) { .cover-img img { object-position: 14% 50%; } }
