/* ============================================================
   KITAMURA PLANNING INC. — prototype v3 / TOP案B「長回し」専用CSS
   台本: creative/projects/2026-05-04-corporate-website/
         2026-07-08-top-one-cut-script.md
   共有 styles.css には依存しない（必要スタイルはここに複製）。

   三重フォールバック（既存規約踏襲）:
   - 基本レイアウト（このファイルの素の規則）= no-JS / CDN失敗 /
     reduced-motion 向けの静的な縦積み表示。全コンテンツが読める
   - html.js かつデスクトップ幅のときだけ「劇場レイアウト」
     （sticky区間・絶対配置レイヤー・潜在状態）を上書きで適用する
   ============================================================ */

:root {
  --ink: #0A0A0A;
  --paper: #FAF8F5;
  --vermilion: #B8482E;
  --muted-dark: rgba(250, 248, 245, 0.62);
  --muted-light: #6B6661;
  --hairline-dark: rgba(250, 248, 245, 0.14);
  --hairline-light: #E4E0DB;
  --font-jp: "Noto Sans JP", "Yu Gothic Medium", "游ゴシック Medium", YuGothic, sans-serif;
  --font-serif: "Cormorant Garamond", Georgia, serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", monospace;
  --header-height: 64px;
  --gutter: clamp(24px, 5vw, 72px);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }

html {
  background: var(--ink);
  scrollbar-width: thin;
  scrollbar-color: #57524C transparent;
}

html, body { margin: 0; min-height: 100%; }

body {
  font-family: var(--font-jp);
  font-weight: 400;
  background: var(--ink);
  color: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  /* overflow-x: clip はスクロールコンテナを作らないため position: sticky と共存できる
     （hidden だと一部環境で sticky が死ぬ）。非対応ブラウザは hidden にフォールバック */
  overflow-x: hidden;
  overflow-x: clip;
}

a { color: inherit; text-decoration: none; }
img, video { max-width: 100%; }

::selection { background: var(--vermilion); color: var(--paper); }

::-webkit-scrollbar { width: 9px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: #57524C;
  border: 2px solid transparent;
  background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover { background: #7A746D; background-clip: padding-box; border: 2px solid transparent; }

:focus { outline: none; }
:focus-visible {
  outline: 1px solid var(--vermilion);
  outline-offset: 4px;
}

/* ---------- Loading veil ---------- */

.veil {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 999;
  background: var(--ink);
  pointer-events: none;
}

.veil::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 22px;
  height: 22px;
  margin: -11px 0 0 -11px;
  background: var(--vermilion);
  opacity: 0.9;
}

html.js .veil { display: block; }

/* ============================================================
   映像記号(A): タイムコード（fixed・JS駆動。no-JS/reduced-motionでは非表示）
   ============================================================ */

.tc {
  display: none;
  position: fixed;
  left: var(--gutter);
  bottom: 20px;
  z-index: 120;
  margin: 0;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  font-variant-numeric: tabular-nums;
  color: rgba(250, 248, 245, 0.6);
  transition: color 0.5s ease;
  pointer-events: none;
}

html.js .tc { display: block; }

html.is-paper-mode .tc { color: var(--muted-light); }

/* ============================================================
   フィルムグレイン（全編通し。opacity は JS(scrub) が所有）
   ============================================================ */

.film-grain {
  position: fixed;
  inset: 0;
  z-index: 400;
  pointer-events: none;
  opacity: 0.04;
  mix-blend-mode: screen;
  --grain-rgb: 255, 255, 255;
  background-image:
    radial-gradient(circle at 20% 20%, rgba(var(--grain-rgb), 0.18) 0 0.7px, transparent 0.9px),
    radial-gradient(circle at 80% 30%, rgba(var(--grain-rgb), 0.14) 0 0.8px, transparent 1px),
    radial-gradient(circle at 40% 75%, rgba(var(--grain-rgb), 0.12) 0 0.7px, transparent 0.95px),
    repeating-linear-gradient(0deg, rgba(var(--grain-rgb), 0.025) 0 1px, transparent 1px 3px),
    repeating-linear-gradient(90deg, rgba(var(--grain-rgb), 0.02) 0 1px, transparent 1px 4px);
  background-size: 170px 170px, 210px 210px, 260px 260px, 100% 100%, 100% 100%;
  animation: grain-drift 12s steps(6) infinite;
}

/* 紙面到達後: 白グレイン(screen)を紙繊維(multiply・暗色)へ切替 */
html.is-paper-mode .film-grain {
  --grain-rgb: 26, 24, 22;
  mix-blend-mode: multiply;
  opacity: 0.02;
}

@keyframes grain-drift {
  0%   { transform: translate3d(0, 0, 0); }
  25%  { transform: translate3d(-1.5%, 1%, 0); }
  50%  { transform: translate3d(1%, -1.2%, 0); }
  75%  { transform: translate3d(1.4%, 0.8%, 0); }
  100% { transform: translate3d(0, 0, 0); }
}

@media (max-width: 768px) {
  .film-grain { animation: none; opacity: 0.035; }
}

/* ============================================================
   Header（現TOPと同一構造。no-JS時も読めるよう常時薄い黒地）
   ============================================================ */

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: var(--header-height);
  padding: 0 var(--gutter);
  color: rgba(250, 248, 245, 0.94);
  background: rgba(10, 10, 10, 0.78);
  transition: background-color 0.5s ease, border-color 0.5s ease, color 0.5s ease;
  border-bottom: 1px solid transparent;
}

/* JS時はヒーロー上で透明から始める（is-scrolled で黒地が敷かれる） */
html.js .site-header { background: transparent; }

html.js .site-header.is-scrolled {
  background: rgba(10, 10, 10, 0.78);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom-color: var(--hairline-dark);
}

/* シーン4頂点で紙面モードへ（main.jsのis-on-paperと同型） */
.site-header.is-on-paper { color: var(--ink); }
html.js .site-header.is-on-paper.is-scrolled {
  background: rgba(250, 248, 245, 0.88);
  border-bottom-color: var(--hairline-light);
}

.site-logo { display: inline-flex; align-items: center; transition: opacity 0.4s ease; }
.site-logo:hover { opacity: 0.6; }

.site-logo__jp {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.14em;
  white-space: nowrap;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(16px, 2.4vw, 34px);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.12em;
  white-space: nowrap;
}

.site-nav a {
  position: relative;
  padding: 6px 0;
  transition: color 0.4s ease;
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: 100% 50%;
  transition: transform 0.55s var(--ease-out);
}

.site-nav a:hover::after,
.site-nav a:focus-visible::after {
  transform: scaleX(1);
  transform-origin: 0 50%;
}

/* ============================================================
   シーン1「ファースト・フレーム」
   ============================================================ */

.sc { position: relative; background: var(--ink); }

.sc__sticky { position: relative; }

.sc1__sticky {
  min-height: 100vh;
  overflow: hidden;
}

.hero-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  pointer-events: none;
  will-change: transform;
}

.hero__background,
.hero__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.hero__background {
  background:
    radial-gradient(circle at 18% 24%, rgba(184, 72, 46, 0.08), transparent 32%),
    radial-gradient(circle at 78% 68%, rgba(250, 248, 245, 0.04), transparent 30%);
}

.hero__overlay {
  background:
    linear-gradient(180deg, rgba(10, 10, 10, 0.55) 0%, rgba(10, 10, 10, 0.38) 40%, rgba(10, 10, 10, 0.72) 100%);
}

.hero-meta,
.hero__content,
.hero-scroll,
.hero-seal {
  position: absolute;
  z-index: 10;
}

.hero-meta {
  top: calc(var(--header-height) + 38px);
  right: var(--gutter);
  margin: 0;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.3em;
  white-space: nowrap;
  color: var(--muted-dark);
}

.hero__content {
  top: 50%;
  left: var(--gutter);
  transform: translateY(-50%);
  max-width: 860px;
  text-align: left;
}

.hero-copy__prefix {
  margin: 0;
  font-size: clamp(20px, 2.3vw, 32px);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 0.2em;
  color: rgba(250, 248, 245, 0.88);
}

.hero-copy__title {
  margin: 14px 0 0;
  font-size: clamp(44px, 8.6vw, 124px);
  font-weight: 500;
  line-height: 1.04;
  letter-spacing: 0.04em;
  font-feature-settings: "palt" 1;
  color: rgba(250, 248, 245, 0.98);
}

/* 見出しの「語のまとまり」は内部で折り返さない。ヒーロー見出しは JS で
   1文字ずつ inline-block に分解されるため、これが無いと任意の文字間で折れる
   （2026-08-19 iPhone Safari で下層ページ見出しの1文字落ちが発生。paper.css /
   services.css と同一規則） */
.nowrap { white-space: nowrap; }

.hero-copy__rule {
  width: 88px;
  height: 1px;
  margin: 34px 0;
  background: var(--vermilion);
}

.hero-copy__subtitle {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.34em;
  color: rgba(250, 248, 245, 0.78);
}

.hero-scroll {
  left: var(--gutter);
  bottom: 56px;
  margin: 0;
  padding-bottom: 10px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.3em;
  color: rgba(250, 248, 245, 0.7);
}

.hero-scroll::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 56px;
  height: 1px;
  background: rgba(250, 248, 245, 0.4);
  transform-origin: 0 50%;
  animation: scroll-sweep 2.8s var(--ease-out) infinite;
}

@keyframes scroll-sweep {
  0%        { transform: scaleX(0); transform-origin: 0 50%; }
  45%, 55%  { transform: scaleX(1); transform-origin: 0 50%; }
  56%       { transform-origin: 100% 50%; }
  100%      { transform: scaleX(0); transform-origin: 100% 50%; }
}

.hero-seal {
  right: var(--gutter);
  bottom: 34px;
  width: 28px;
  height: 28px;
}

.seal-svg { display: block; width: 100%; height: 100%; }

.seal-svg__stroke {
  fill: none;
  stroke: var(--vermilion);
  stroke-width: 3;
}

.seal-svg__fill { fill: var(--vermilion); }

/* JS有効時のみ「未押印」に巻き戻す（ヒーローのみ。フッターは常時押印済み＝静的） */
html.js .hero-seal .seal-svg__stroke {
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
}

html.js .hero-seal .seal-svg__fill { opacity: 0; }

/* ============================================================
   シーン2〜4 共通コンテナ
   ============================================================ */

.sc234 { background: var(--ink); }

.sc234__sticky { position: relative; }

.section-label {
  margin: 0;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.3em;
  color: var(--muted-dark);
}

/* ---------- 基本レイアウト（no-JS / モバイル）: 縦積み ---------- */

.sc2-numerals { display: none; }
.sc2-stills { display: none; }
.whiteout { display: none; }

.sc2-head { padding: clamp(72px, 10vw, 120px) var(--gutter) clamp(32px, 5vw, 56px); }

.sc2-rows {
  margin: 0;
  padding: 0 var(--gutter);
  list-style: none;
}

.sc2-rows li { margin: 0 0 clamp(28px, 5vw, 48px); }

.svc-row {
  --f: 1;
  position: relative;
  display: grid;
  grid-template-columns: clamp(56px, 10vw, 150px) 1fr auto;
  align-items: baseline;
  gap: 18px;
  padding: clamp(20px, 3vw, 36px) 0;
  border-bottom: 1px solid var(--hairline-dark);
  transform-origin: 0 50%;
}

.svc-row__no {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(22px, 2.4vw, 32px);
  letter-spacing: 0.06em;
  color: rgba(250, 248, 245, calc(0.28 + 0.5 * var(--f)));
}

.svc-row__name {
  font-size: clamp(26px, 3.4vw, 46px);
  font-weight: 500;
  letter-spacing: 0.06em;
  font-feature-settings: "palt" 1;
  line-height: 1.3;
  color: rgba(250, 248, 245, calc(0.35 + 0.65 * var(--f)));
}

.svc-row__arrow {
  font-size: clamp(18px, 2vw, 24px);
  color: var(--muted-dark);
  opacity: var(--f);
  transform: translateX(calc(-12px + 12px * var(--f)));
}

.svc-row:hover .svc-row__no,
.svc-row:focus-visible .svc-row__no { color: var(--vermilion); }

/* 事業スチール（縦積み時: 行の下に静的表示） */
.svc-still-inline {
  position: relative;
  margin: clamp(16px, 3vw, 24px) 0 0;
  max-width: 720px;
}

.svc-still-inline img,
.rack-still img,
.rail-item img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  /* 台本 §2-4: 暗部に沈めたグレード（静的。scrubで動かさない） */
  filter: brightness(0.85) saturate(0.85);
}

/* ---------- 映像記号(B): ファインダー記号（コーナートンボ4点＋センタークロス） ---------- */

.finder {
  --fc: rgba(250, 248, 245, 0.35);
  position: absolute;
  inset: 10px;
  pointer-events: none;
  background-image:
    linear-gradient(var(--fc), var(--fc)),
    linear-gradient(var(--fc), var(--fc)),
    linear-gradient(var(--fc), var(--fc)),
    linear-gradient(var(--fc), var(--fc)),
    linear-gradient(var(--fc), var(--fc)),
    linear-gradient(var(--fc), var(--fc)),
    linear-gradient(var(--fc), var(--fc)),
    linear-gradient(var(--fc), var(--fc)),
    linear-gradient(var(--fc), var(--fc)),
    linear-gradient(var(--fc), var(--fc));
  background-position:
    center center, center center,
    left top, left top,
    right top, right top,
    left bottom, left bottom,
    right bottom, right bottom;
  background-size:
    22px 1px, 1px 22px,
    16px 1px, 1px 16px,
    16px 1px, 1px 16px,
    16px 1px, 1px 16px,
    16px 1px, 1px 16px;
  background-repeat: no-repeat;
}

.still-no {
  position: absolute;
  left: 16px;
  bottom: 10px;
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 500;
  font-size: 17px;
  letter-spacing: 0.1em;
  color: rgba(250, 248, 245, 0.66);
  pointer-events: none;
}

/* ---------- シーン3 レール（基本＝ネイティブ横スワイプ。手法7の定石） ---------- */

.sc3-head { padding: clamp(56px, 8vw, 96px) var(--gutter) clamp(24px, 4vw, 40px); }

.rail-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding-bottom: clamp(48px, 8vw, 96px);
}

.rail-wrap::-webkit-scrollbar { display: none; }

.rail {
  display: flex;
  gap: 20px;
  padding: 0 var(--gutter);
  width: max-content;
}

.rail-item {
  position: relative;
  flex: 0 0 84vw;
  max-width: 720px;
  margin: 0;
  scroll-snap-align: center;
}

/* ============================================================
   シーン5「納品 — 紙の上」（納品物の世界: ファインダー記号なし）
   ============================================================ */

.sc5 {
  position: relative;
  background: var(--paper);
  color: var(--ink);
  padding: clamp(96px, 14vh, 160px) var(--gutter) clamp(96px, 12vw, 160px);
}

.home-directory__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 5vw, 72px);
}

.dir-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: clamp(36px, 4.4vw, 56px) clamp(20px, 2.4vw, 32px);
  border-top: 1px solid var(--hairline-light);
  border-bottom: 1px solid var(--hairline-light);
  background: rgba(255, 255, 255, 0.55);
}

.dir-card__label {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.3em;
  color: var(--muted-light);
}

.dir-card__title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  font-size: clamp(28px, 3vw, 42px);
  font-weight: 500;
  letter-spacing: 0.08em;
  font-feature-settings: "palt" 1;
  color: var(--ink);
}

.dir-card__title::after {
  content: "→";
  font-size: 0.55em;
  color: var(--muted-light);
  transform: translateX(-10px);
  opacity: 0;
  transition: opacity 0.5s ease, transform 0.6s var(--ease-out);
}

.dir-card__desc {
  margin: 0;
  font-size: 13px;
  line-height: 2;
  letter-spacing: 0.04em;
  color: var(--muted-light);
  max-width: 420px;
}

.dir-card::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 100%;
  height: 1px;
  background: var(--vermilion);
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform 0.7s var(--ease-out);
}

.dir-card:hover::after,
.dir-card:focus-visible::after { transform: scaleX(1); }
.dir-card:hover .dir-card__title::after,
.dir-card:focus-visible .dir-card__title::after { opacity: 1; transform: translateX(0); }

/* ============================================================
   シーン6 FOOTER（紙面クレジット）
   ============================================================ */

.site-footer {
  position: relative;
  padding: 0 var(--gutter) 44px;
  background: var(--paper);
  color: var(--muted-light);
}

.site-footer__rule {
  height: 1px;
  background: var(--hairline-light);
}

.site-footer__top {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
  padding: clamp(56px, 7vw, 96px) 0 clamp(40px, 5vw, 64px);
}

.site-footer__wordmark {
  margin: 0;
  font-size: clamp(40px, 6vw, 84px);
  font-weight: 500;
  line-height: 1.04;
  letter-spacing: 0.04em;
  color: rgba(10, 10, 10, 0.08);
  user-select: none;
}

.site-footer__nav {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
}

.site-footer__nav a {
  position: relative;
  padding: 2px 0;
  transition: color 0.4s ease;
}

.site-footer__nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: 100% 50%;
  transition: transform 0.55s var(--ease-out);
}

.site-footer__nav a:hover { color: var(--ink); }
.site-footer__nav a:hover::after { transform: scaleX(1); transform-origin: 0 50%; }

.site-footer__bottom {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
  padding-top: 28px;
  border-top: 1px solid var(--hairline-light);
}

.site-footer__copyright,
.site-footer__meta p {
  margin: 0;
  font-size: 11px;
  font-weight: 500;
  line-height: 2;
  letter-spacing: 0.12em;
}

.site-footer__meta { text-align: right; }

.site-footer__seal {
  position: absolute;
  right: var(--gutter);
  top: -7px;
  width: 14px;
  height: 14px;
}

/* ============================================================
   MOTION 初期状態（html.js 時のみ。no-JSでは完成状態で静的表示）
   ============================================================ */

.char-mask {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
}

.char { display: inline-block; }

html.js .char { transform: translateY(115%); }

html.js .site-header,
html.js .hero-meta,
html.js .hero-scroll,
html.js .hero-seal { opacity: 0; }

html.js .hero-video { transform: scale(1.1); }

html.js .hero-copy__prefix { opacity: 0; transform: translateY(26px); }
html.js .hero-copy__subtitle { opacity: 0; }
html.js .hero-copy__rule { transform: scaleX(0); transform-origin: 0 50%; }

html.js .film-grain { opacity: 0; }

/* 行の潜在状態: JS時は35%濃度から。モバイルは中央通過、デスクトップはラックフォーカスで100%へ */
html.js .svc-row { --f: 0; }

/* ============================================================
   劇場レイアウト（html.js × デスクトップのみ）
   ============================================================ */

@media (min-width: 769px) {

  /* --- シーン1: sticky 210vh（pin 110vh + ティルトダウン退場 100vh） --- */
  html.js .sc1 { height: 210vh; }
  html.js .sc1__sticky {
    position: sticky;
    top: 0;
    height: 100vh;
    min-height: 0;
  }

  /* --- シーン2〜4: sticky 550vh（pin 450vh + 白飛び明け退場 100vh） --- */
  html.js .sc234 { height: 550vh; }
  html.js .sc234__sticky {
    position: sticky;
    top: 0;
    height: 100vh;
    overflow: hidden;
  }

  /* 最背面: 超大型セリフ数字（55vh・paper 10%・すれ違いはJSがコンテナyを駆動） */
  html.js .sc2-numerals {
    display: block;
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
  }

  html.js .sc2-numerals__n {
    position: absolute;
    left: 0;
    right: 0;
    text-align: center;
    font-family: var(--font-serif);
    font-style: italic;
    font-weight: 500;
    font-size: 55vh;
    line-height: 1;
    letter-spacing: 0.02em;
    color: rgba(250, 248, 245, 0.1);
  }

  html.js .sc2-numerals__n:nth-child(1) { top: calc(50% - 27.5vh); }
  html.js .sc2-numerals__n:nth-child(2) { top: calc(50% - 27.5vh + 78vh); }
  html.js .sc2-numerals__n:nth-child(3) { top: calc(50% - 27.5vh + 156vh); }
  html.js .sc2-numerals__n:nth-child(4) { top: calc(50% - 27.5vh + 234vh); }

  /* 中景: ラックフォーカスの現場スチール（右寄り44vw。--sf でピントが合う） */
  html.js .sc2-stills {
    display: block;
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
  }

  html.js .rack-still {
    --sf: 0;
    position: absolute;
    right: 7vw;
    top: calc(50% - 12.375vw);
    width: 44vw;
    margin: 0;
    opacity: var(--sf);
    transform: scale(calc(1.04 - 0.04 * var(--sf)));
  }

  /* デスクトップJSでは縦積みスチールを使わない（中景レイヤーとレールが担う） */
  html.js .svc-still-inline { display: none; }

  /* 最前面: ラベルと事業4行 */
  html.js .sc2-head {
    position: absolute;
    top: calc(var(--header-height) + 26px);
    left: var(--gutter);
    z-index: 3;
    padding: 0;
  }

  html.js .sc2-rows {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 0 0 var(--gutter);
    width: min(56vw, 780px);
  }

  html.js .sc2-rows li { margin: 0; }

  html.js .svc-row {
    transform: scale(calc(0.98 + 0.04 * var(--f)));
    border-bottom-color: rgba(250, 248, 245, 0.1);
  }

  /* --- シーン3: レールは sticky 内の変換駆動（横スワイプを解除） --- */
  html.js .sc3-head {
    position: absolute;
    top: calc(var(--header-height) + 26px);
    left: var(--gutter);
    z-index: 3;
    padding: 0;
  }

  html.js .rail-wrap {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    overflow: visible;
    scroll-snap-type: none;
    padding: 0;
  }

  html.js .rail {
    gap: 16vw;
    padding: 0 0 0 15vw;
    will-change: transform;
  }

  html.js .rail-item {
    flex: 0 0 70vw;
    max-width: none;
    scroll-snap-align: none;
  }

  /* レール1枚目(04)はシーン2のピント面を兼ねる: 位置/縮尺はJS、結像は --sf */
  html.js .rail-item--first { opacity: var(--sf, 0); }

  html.js .rail-item .still-no { font-size: 22px; left: 20px; bottom: 14px; }

  /* --- シーン4: 露出オーバーの白（単調増加ランプ。opacityはJSが所有） --- */
  html.js .whiteout {
    display: block;
    position: absolute;
    inset: 0;
    z-index: 6;
    background: var(--paper);
    opacity: 0;
    pointer-events: none;
  }

  /* シーン4のドリーイン対象（1枚のみ filter scrub 許可・台本準拠） */
  html.js .rail-item--last img { will-change: transform, filter; }
}

/* ============================================================
   モバイル（台本の各シーン簡略化方針）
   ============================================================ */

@media (max-width: 768px) {
  :root { --header-height: 56px; }

  .site-header {
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 6px;
    height: auto;
    padding-top: 12px;
    padding-bottom: 12px;
  }

  .site-nav { font-size: 11px; gap: 14px; flex-wrap: wrap; }

  .hero__content { max-width: calc(100% - 2 * var(--gutter)); }
  .hero-meta { top: 104px; }

  /* シーン1: pin 110vh→70vhに短縮（ティルトダウン＝退場100vhは維持） */
  html.js .sc1 { height: 170vh; }
  html.js .sc1__sticky {
    position: sticky;
    top: 0;
    height: 100vh;
    min-height: 0;
  }

  /* シーン2: pinなし縦フロー（行は中央通過で濃度上昇・スチール静的・数字非表示） */
  /* シーン3: ネイティブ横スワイプ（基本レイアウトのまま） */
  /* シーン4: 背景 ink→paper のみ（JSが .sc234 の背景色を補間） */
  .sc234 { padding-bottom: 30vh; }

  /* シーン5: 1カラム・視差なし */
  .home-directory__grid { grid-template-columns: 1fr; gap: 0; }
  .dir-card + .dir-card { border-top: 0; }

  .site-footer__top { flex-direction: column; align-items: flex-start; }
  .site-footer__nav { align-items: flex-start; }
  .site-footer__bottom { flex-direction: column; align-items: flex-start; }
  .site-footer__meta { text-align: left; }
}

/* ============================================================
   REDUCED MOTION（JS側で全モーション放棄＋ここで時限アニメも停止）
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
