@charset "UTF-8";

/* =========================================================
   灰音窯
   外部ライブラリ・Webフォントなし。素のCSSのみ。

   ブランド色・空のグラデーション・ステージの高さは project.json が正本。
   下の @sync ブロックは sync_config.py の生成物なので手で書き換えないこと。
   ========================================================= */

/* @sync:project:begin */
/* ここは project.json から sync_config.py が生成します。手で書き換えないこと */
:root {
  --night: #0a0705;
  --accent: #d86a1e;
  --cream: #ebe4d6;
  --night-rgb: 10, 7, 5;
  --accent-rgb: 216, 106, 30;
  --cream-rgb: 235, 228, 214;
}

.sky__dawn {
  background: linear-gradient(180deg,
      #140503 0%, #3d0f04 38%, #8a2d0a 68%, #d86a1e 88%, #f5a544 100%);
  opacity: clamp(0, calc((var(--p) - 0.26) / 0.12), 1);
}

.sky__morning {
  background: linear-gradient(180deg,
      #f0dcb8 0%, #ece3d2 45%, #ebe4d6 70%, #ebe4d6 100%);
  opacity: clamp(0, calc((var(--p) - 0.8) / 0.16), 1);
}

.scroll-stage[data-sequence="kiln"] { --stage-h: 400vh; }
.scroll-stage[data-sequence="rokuro"] { --stage-h: 290vh; }
/* @sync:project:end */

:root {
  --ink: #232a15;
  --ink-soft: #5d6a4a;
  --line: rgba(40, 44, 30, .28);
  --paper: #efe7d8;
  /* 文字を読ませるための暗幕。ブランドの夜色とは別に、常に暗いこと自体が仕事 */
  --scrim-rgb: 6, 9, 22;

  --serif: "Yu Mincho", "Hiragino Mincho ProN", serif;
  --sans: "Yu Gothic", "Hiragino Kaku Gothic ProN", "BIZ UDPGothic", sans-serif;

  /* ビューポート高さ（svh対応ならsvh） */
  --vh: 100vh;
  /* sticky区間の高さの倍率（狭い画面では短くする） */
  --stage-scale: 1;
  /* canvasの中心位置 */
  --stage-x: 50%;
  --stage-y: 40%;
  /* 章テキスト切替用の目印の高さ */
  --cue-h: 40vh;
  --header-h: 3.2rem;

  /* ブロックとブロックのあいだの余白。ここだけで縦の間合いを決める。
     rem を主にして vh は控えめに効かせる（vh 主体だと縦長の端末で余白ばかりが
     伸び、読む量は同じなのに指のスクロール量だけが増えるため）。
     文字まわり（行間・字送り）はここでは触らない＝読みやすさの根は削らない */
  /* セクションの上下。H3どうしの間（--gap-item の倍）より明らかに広くないと、
     どこまでが一つの話か読めなくなるので、ここだけは余裕を残す */
  --gap-section: clamp(3.8rem, 10vh, 5.8rem);
  --gap-block:   clamp(2.2rem, 5.2vh, 3.2rem); /* セクションの中の大きな区切り */
  --gap-item:    clamp(1.5rem, 3.6vh, 2.1rem); /* H3の並び・図版・見出しと本文 */
  --gap-text:    clamp(1rem, 2.4vh, 1.4rem);   /* 見出しと、その直下の本文 */
}

/* dvhでなくsvh（安定値）: iOS Safariのツールバー開閉でstickyが上下に揺れないように。
   ツールバー収納時の下すき間は fixed の .sky が埋める */
@supports (height: 100svh) {
  :root { --vh: 100svh; }
}

/* ---------- 土台 ---------- */

*, *::before, *::after { box-sizing: border-box; }

html {
  font-feature-settings: "palt";
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--night);
  color: var(--cream);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 2;
  line-break: strict;
  overflow-wrap: break-word;
  overflow-x: clip;
}

/* 文節の途中で改行させたくない塊。狭い画面ではこの境目でだけ折れるので、
   1文字だけ次の行に落ちない。日本語の折返しはブラウザ任せだと語の途中で
   切れるため、切ってよい場所をこちらから教える
   （word-break: auto-phrase 未対応の端末でも確実に効く） */
.phrase { display: inline-block; }

h1, h2, .copy {
  word-break: auto-phrase;
  text-wrap: balance;
}

img, svg { max-width: 100%; }
img { height: auto; border: 0; }

::selection { background: rgba(var(--accent-rgb), .3); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* 明るい地の上ではリングのコントラストが足りないため濃い色にする */
.section :focus-visible,
.footer :focus-visible {
  outline-color: var(--ink);
}

/* ---------- 読み込みプログレス ---------- */

.loader {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  height: 3px;
  background: rgba(var(--cream-rgb), .10);
  transition: opacity .7s ease .25s, visibility 0s linear 1.2s;
}

.loader__bar {
  height: 100%;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform .3s ease-out;
}

.loader.is-done {
  opacity: 0;
  visibility: hidden;   /* フェード後はアクセシビリティツリーからも消す */
  pointer-events: none;
}

/* 第1段のプリロードが済むまでスクロールを止める */
html.is-loading,
html.is-loading body {
  overflow: hidden;
  overscroll-behavior: none;
}

/* ---------- 空（夜 → 炎 → 冷まし → 朝／ろくろの間だけ工房の薄暗がり） ----------
   .sky__dawn と .sky__morning のグラデーションは @sync ブロックが持つ（正本は
   project.json の brand）。ここから下は、この窯元だけの層と、山なりの重ね方。
   @sync ブロックより後に書いてあるので、同じ詳細度なら後勝ちで効く。

   重ね順は炎 → 冷ましの深紫 → 朝 → 工房。
   炎と冷ましは「出て消える」山なり（rise × fall の掛け算）、朝だけは出たら残る。
   工房は連番②（ろくろ）の進捗 --p-rokuro で出入りする＝物語の中の回想。 */

.sky {
  --p: 0;
  /* 各ステージが自分の進捗を書く（main.js）。書かれる前は 0 のまま */
  --p-kiln: 0;
  --p-rokuro: 0;
  position: fixed;
  inset: 0;
  z-index: -2;
  background: var(--night);
}

.sky__layer {
  position: absolute;
  inset: 0;
}

/* 炎: .26 で立ち上がり、.68 から引いて .80 で消える（窯が冷めていく） */
.sky__dawn {
  opacity: calc(
      clamp(0, calc((var(--p) - .26) / .12), 1) *
      clamp(0, calc((.80 - var(--p)) / .12), 1));
}

/* 冷ましの深紫: 炎が引くのと入れ替わりに現れ、朝が来ると消える */
.sky__cool {
  background: linear-gradient(180deg,
      #08040c 0%, #1a1030 55%, #33204a 100%);
  opacity: calc(
      clamp(0, calc((var(--p) - .58) / .14), 1) *
      clamp(0, calc((.96 - var(--p)) / .10), 1));
}

/* 工房の薄暗がり: ろくろの区間だけ、朝の上へ土間の暗さを被せる（明→暗→明） */
.sky__workshop {
  background: linear-gradient(180deg,
      #241610 0%, #40291a 60%, #5e3d22 100%);
  opacity: calc(
      clamp(0, calc((var(--p-rokuro) - .03) / .17), 1) *
      clamp(0, calc((.95 - var(--p-rokuro)) / .17), 1) * .9);
}

/* ---------- 連番ステージ（sticky区間） ---------- */

.scroll-stage {
  position: relative;
  height: calc(var(--stage-h, 500vh) * var(--stage-scale));
}

.stage-sticky {
  --p: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  height: var(--vh);
  overflow: hidden;
}

/* canvas背後の後光。Blenderで焼かずCSSで出す（透過フレームを汚さないため） */
.halo {
  position: absolute;
  left: var(--stage-x);
  top: var(--stage-y);
  width: min(150vmin, 1240px);
  height: min(150vmin, 1240px);
  background: radial-gradient(circle closest-side,
      rgba(var(--accent-rgb), .55) 0%,
      rgba(var(--accent-rgb), .20) 46%,
      rgba(var(--accent-rgb), 0) 72%);
  transform: translate(-50%, -50%) scale(calc(.7 + var(--p) * .5));
  opacity: clamp(.10, calc(.10 + var(--p) * 1.15), 1);
  will-change: transform, opacity;
  pointer-events: none;
}

/* 後光は2種類。窯焚きは「炎の照り」で、焚きどきに強く、冷めると引く（山なり）。
   ろくろは「土間の灯り」で、終始ひかえめ。どちらもCSSで出す（フレームに焼かない） */

#stage-kiln .halo {
  opacity: calc(
      clamp(.10, calc(.10 + var(--p) * 1.4), 1) *
      clamp(0, calc((1 - var(--p)) / .24), 1));
}

#stage-rokuro .halo {
  width: min(112vmin, 900px);
  height: min(112vmin, 900px);
  background: radial-gradient(circle closest-side,
      rgba(var(--accent-rgb), .30) 0%,
      rgba(var(--accent-rgb), .12) 44%,
      rgba(var(--accent-rgb), 0) 72%);
  transform: translate(-50%, -50%) scale(calc(.86 + var(--p) * .18));
  opacity: calc(
      clamp(0, calc(var(--p) / .16), 1) *
      clamp(0, calc((1.06 - var(--p)) / .22), 1) * .8);
}

.canvas-wrap {
  position: absolute;
  left: var(--stage-x);
  top: var(--stage-y);
  width: min(84vw, 460px);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
}

.stage-canvas {
  display: block;
  width: 100%;
  height: 100%;
}

/* JSが動く環境では静止画は出さない */
.stage-still { display: none; }

/* 連番ステージの直後のセクションは、上の余白を持たせない（sticky区間と地続きに見せる） */
.scroll-stage + .section { padding-top: 0; }

/* ただし本文の途中に挟まるろくろのあとは、本文に戻る間を取る（地続きにしない）。
   演出から文章へ、視線を切り替えてもらうための余白。
   暗い演出から明るい地への色替わり自体が区切りになるので、間は控えめでよい */
#stage-rokuro + .section { padding-top: clamp(2.8rem, 7vh, 4.4rem); }

.scroll-stage--inset { margin: var(--gap-section) 0; }

/* ---------- 章テキスト ---------- */

.stage-copy {
  position: absolute;
  inset: 0;
  padding: 0 7vw;
  pointer-events: none;
}

/* 下からのスクリム（モバイルで文字を読ませる） */
.stage-copy::before {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 62%;
  background: linear-gradient(180deg, rgba(var(--scrim-rgb), 0), rgba(var(--scrim-rgb), .62));
  opacity: clamp(0, calc((.82 - var(--p)) / .1), 1);
}

.stage-copy > * {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0 7vw 14vh;
  margin: 0;
  text-shadow: 0 1px 34px rgba(var(--scrim-rgb), .55);
}

.hero {
  opacity: clamp(0, calc((.155 - var(--p)) / .055), 1);
  transform: translateY(calc(var(--p) * -70px));
}

.hero__logo {
  margin: 0 0 clamp(1.4rem, 4vh, 2.4rem);
  font-family: var(--serif);
  font-size: clamp(1rem, 3.4vw, 1.45rem);
  font-weight: 400;
  letter-spacing: .3em;
}

.logo-en {
  font-family: var(--serif);
  letter-spacing: .42em;
  font-size: 1.08em;
}

.hero__copy {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2rem, 7.6vw, 3.5rem);
  letter-spacing: .14em;
  line-height: 1.85;
}

.hero__sub {
  margin: clamp(1.4rem, 4vh, 2.2rem) 0 0;
  font-size: clamp(.82rem, 2.6vw, 1rem);
  letter-spacing: .16em;
  line-height: 2.3;
  color: rgba(var(--cream-rgb), .78);
}

.chapter-text {
  opacity: 0;
  transform: translateY(2rem);
  transition: opacity .95s ease, transform .95s ease;
}

.chapter-text.visible {
  opacity: 1;
  transform: none;
}

.chapter-lead {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(1.35rem, 5.4vw, 2.4rem);
  letter-spacing: .18em;
  line-height: 2.1;
}

.chapter-title {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.3rem, 5vw, 2.1rem);
  letter-spacing: .16em;
  line-height: 2;
}

.chapter-body {
  margin: clamp(1.4rem, 3.4vh, 2.2rem) 0 0;
  max-width: 30em;
  font-size: clamp(.84rem, 2.5vw, 1rem);
  letter-spacing: .08em;
  line-height: 2.35;
  color: rgba(var(--cream-rgb), .82);
}

/* 章テキストの表示切替に使う目印（見えない。sync_config.py が生成する） */
.cue {
  position: absolute;
  left: 0;
  width: 1px;
  height: var(--cue-h);
  top: calc(var(--at) * (100% - var(--vh)) + (var(--vh) - var(--cue-h)) / 2);
  opacity: 0;
  pointer-events: none;
}

/* ---------- スクロール誘導 ---------- */

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: clamp(2.2rem, 6vh, 3.4rem);
  width: min(90vw, 32em);
  transform: translateX(-50%);
  margin: 0;
  font-size: clamp(.82rem, 2.4vw, .95rem);
  letter-spacing: .2em;
  line-height: 2;
  text-align: center;
  color: rgba(var(--cream-rgb), .96);
  text-shadow: 0 2px 20px rgba(var(--scrim-rgb), .8);
  /* 物語が始まるまでは、ゆっくり明滅して気づいてもらう */
  opacity: clamp(0, calc((.115 - var(--p)) / .045), 1);
  animation: cue-breathe 3.4s ease-in-out infinite;
  pointer-events: none;
}

@keyframes cue-breathe {
  0%, 100% { filter: brightness(1); }
  50%      { filter: brightness(1.35); }
}

.scroll-cue__arrow {
  display: block;
  width: 12px;
  height: 12px;
  margin: 1.2em auto 0;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  animation: cue-fall 2.6s ease-in-out infinite;
}

@keyframes cue-fall {
  0%   { transform: translateY(-5px) rotate(45deg); opacity: 0; }
  35%  { opacity: 1; }
  100% { transform: translateY(9px) rotate(45deg); opacity: 0; }
}

/* 1画面ぶんスクロールしたら通過する目印（見えない） */
.skip-anchor {
  position: absolute;
  left: 0;
  top: var(--vh);
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.skip-story {
  position: fixed;
  right: clamp(1rem, 4vw, 2.2rem);
  bottom: clamp(1rem, 4vh, 2.2rem);
  z-index: 41;
  display: flex;
  align-items: center;
  gap: .6em;
  padding: .75em 1.4em;
  font-size: .72rem;
  letter-spacing: .16em;
  line-height: 1;
  color: var(--cream);
  text-decoration: none;
  background: rgba(var(--night-rgb), .58);
  border: 1px solid rgba(var(--cream-rgb), .32);
  border-radius: 999px;
  opacity: 0;
  visibility: hidden;
  transition: opacity .45s ease, visibility 0s linear .45s,
              background-color .3s ease;
}

.skip-story[hidden] { display: none; }

.skip-story.is-on {
  opacity: 1;
  visibility: visible;
  transition: opacity .45s ease, background-color .3s ease;
}

.skip-story:hover { background: rgba(var(--night-rgb), .8); }

/* ヒーローが透明になったあと、見えないリンクを押せてしまわないように */
.stage-sticky.is-past-hero .hero { visibility: hidden; }

/* ---------- 通常フローのセクション ---------- */

.section {
  position: relative;
  background: var(--cream);
  color: var(--ink);
  padding: var(--gap-section) 0;
}

/* 背景が切り替わる連なりでは、前のセクションの下余白が章の切れ目になる。
   上下で二重に空けない */
.section + .section { padding-top: 0; }

/* 逆に背景が同じまま続くところは、余白だけが切れ目なので少し足す。
   ここを 0 のままにすると、どこまでが一つの話か読めなくなる */
.section:not(.section--paper) + .section:not(.section--paper),
.section--paper + .section--paper { padding-top: var(--gap-block); }

.section--paper { background: var(--paper); }

.wrap {
  width: min(1080px, 86vw);
  margin: 0 auto;
}

/* 先頭の要素の上余白はセクションの padding と重なるだけなので落とす */
.wrap > :first-child { margin-top: 0; }

.wrap--narrow { width: min(680px, 86vw); }

.section__title {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.45rem, 5vw, 2.4rem);
  letter-spacing: .16em;
  line-height: 2;
}

.section__body {
  margin: var(--gap-item) 0 0;
  max-width: 34em;
  font-size: clamp(.9rem, 2.4vw, 1rem);
  letter-spacing: .07em;
  line-height: 2.12;
}

/* 本文が続くところは、見出しからの間より狭くして、ひとつづきの話に見せる。
   詰めすぎると段落が団子になるので、切れ目が読めるだけの間は残す */
.section__body + .section__body,
.page-head__lead + .page-head__lead { margin-top: var(--gap-text); }

.signature {
  margin: var(--gap-item) 0 0;
  max-width: 34em;
  text-align: right;
  font-family: var(--serif);
  font-size: .84em;
  letter-spacing: .22em;
  line-height: 2;
  color: var(--ink-soft);
}

.figure { margin: var(--gap-block) 0 0; }

/* 画像が無いときはこの枠のグラデーションがそのままプレースホルダになる */
.figure__frame {
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: linear-gradient(180deg, #1a1008 0%, #6d2f11 42%,
                              #b9702c 70%, #3f5230 100%);
}

.figure__frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  color: var(--cream);
  font-size: .8rem;
  letter-spacing: .1em;
}

/* WCAG 2.2.2: 動き続けるものには停止手段を付ける（main.js が生成する） */
.figure__toggle {
  margin: .9em 0 0;
  font: inherit;
  font-size: .74rem;
  letter-spacing: .16em;
  color: var(--ink-soft);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: .5em 1.7em;
  cursor: pointer;
  transition: border-color .3s ease, color .3s ease;
}

.figure__toggle:hover {
  border-color: var(--ink);
  color: var(--ink);
}

.figure__caption {
  margin: 1.1em 0 0;
  font-size: .76rem;
  letter-spacing: .2em;
  line-height: 2;
  color: var(--ink-soft);
}

.cta { margin: var(--gap-block) 0 0; }

.cta__button {
  display: inline-block;
  padding: 1.1em 2.8em;
  font-size: .88rem;
  letter-spacing: .18em;
  line-height: 1;
  color: var(--cream);
  text-decoration: none;
  background: var(--ink);
  border-radius: 999px;
  transition: opacity .3s ease;
}

.cta__button:hover { opacity: .84; }

/* ---------- H3の並び（工程・景色） ---------- */

.crafts { margin: var(--gap-block) 0 0; }

/* H3が15個あるので、ここの余白は総丈への効きがいちばん大きい。
   上に罫が入るぶん、間合いは詰めても切れ目は読める */
.craft {
  max-width: 34em;
  padding-top: var(--gap-item);
  border-top: 1px solid var(--line);
}

.craft + .craft { margin-top: var(--gap-item); }

.craft__title {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.1rem, 3.6vw, 1.5rem);
  letter-spacing: .14em;
  line-height: 2;
}

.craft__body {
  margin: var(--gap-text) 0 0;
  font-size: clamp(.88rem, 2.4vw, .98rem);
  letter-spacing: .07em;
  line-height: 2.12;
}

/* 景色の3つは図版つき。狭い画面では縦、広い画面では横に3つ並べる */
.crafts--figures .craft {
  max-width: none;
  border-top: 0;
  padding-top: 0;
}

.crafts--figures .craft + .craft { margin-top: var(--gap-block); }

@media (min-width: 769px) {
  .crafts--figures {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: clamp(1.6rem, 3vw, 2.8rem);
  }

  .crafts--figures .craft + .craft { margin-top: 0; }
}

/* ---------- 景色の図版（光が横切る） ----------
   時間で動かさず、スクロールに合わせて光が渡る（view() のスクロールタイムライン）。
   対応していないブラウザでは何も動かない静止画になる。ひとりでに動くものを
   作らないので、停止手段（WCAG 2.2.2）を足す必要がない */

.keshiki { margin: 0; }

.keshiki__frame {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 3px;
  background: linear-gradient(180deg, #1a1008 0%, #6d2f11 46%, #3f5230 100%);
}

.keshiki__frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.keshiki__sweep {
  position: absolute;
  inset: 0;
  background: linear-gradient(104deg,
      rgba(255, 244, 220, 0) 36%,
      rgba(255, 238, 202, .46) 50%,
      rgba(255, 244, 220, 0) 64%);
  transform: translateX(-120%);
  opacity: 0;
  pointer-events: none;
}

@supports (animation-timeline: view()) {
  .keshiki__sweep {
    animation: keshiki-sweep linear both;
    animation-timeline: view();
    animation-range: entry 12% cover 68%;
  }
}

@keyframes keshiki-sweep {
  0%   { transform: translateX(-120%); opacity: 0; }
  22%  { opacity: 1; }
  78%  { opacity: 1; }
  100% { transform: translateX(120%); opacity: 0; }
}

.crafts--figures .craft__title { margin-top: var(--gap-text); }

/* ---------- 灰がガラスになる化学 ----------
   K・Ca・O が窯の上昇気流に乗って昇り、器の表面の Si と出会って
   緑のガラス滴になって流れ落ちる。粒の位置は chem.js が transform で動かし、
   色と大きさはここで決める。JSが動かないときは静止図解に落ちる */

.chem {
  --vidro: #2f6b45;
  margin: var(--gap-block) 0 0;
}

.chem__stage {
  display: none;                 /* chem.js が is-live を付けたときだけ出す */
  position: relative;
  height: clamp(240px, 40vh, 360px);
  overflow: hidden;
  border-radius: 4px;
  background: linear-gradient(180deg, #120a06 0%, #241009 58%, #3b1b0b 100%);
}

.chem.is-live .chem__stage { display: block; }
.chem.is-live .chem__still { display: none; }

/* 器の表面。ここで灰と珪酸が出会う */
.chem__surface {
  position: absolute;
  left: 8%;
  right: 8%;
  top: 36%;
  height: 1px;
  background: linear-gradient(90deg,
      rgba(var(--cream-rgb), 0),
      rgba(var(--cream-rgb), .30) 24%,
      rgba(var(--cream-rgb), .30) 76%,
      rgba(var(--cream-rgb), 0));
}

.chem__p {
  position: absolute;
  left: 0;
  top: 0;
  opacity: 0;
  font-size: clamp(.72rem, 2.2vw, .86rem);
  letter-spacing: .04em;
  line-height: 1;
  white-space: nowrap;
  will-change: transform, opacity;
  pointer-events: none;
}

.chem__p--flux { color: #f2ad5c; }        /* 赤松の灰（融剤） */
.chem__p--si   { color: #ded2bb; }        /* 器の表面の珪酸 */
.chem__p--fe   { color: #c05f3c; }        /* わずかな鉄 */

.chem__p--glass {
  width: 11px;
  height: 13px;
  border-radius: 50% 50% 46% 46% / 62% 62% 38% 38%;
  background: radial-gradient(circle at 36% 30%, #7cb98d 0%, var(--vidro) 62%,
                              #1e4a2f 100%);
  box-shadow: 0 0 8px rgba(47, 107, 69, .55);
}

/* 静止図解（既定。JSが動けば chem.js が引っこめる） */
.chem__still { margin: 0; }

.chem-svg {
  display: block;
  width: 100%;
  height: auto;
  font-family: var(--sans);
}

.chem-svg__chip { stroke-width: 1; }
.chem-svg__chip--flux   { fill: rgba(var(--accent-rgb), .16); stroke: rgba(var(--accent-rgb), .55); }
.chem-svg__chip--silica { fill: rgba(93, 106, 74, .12);       stroke: rgba(93, 106, 74, .5); }

.chem-svg__symbol {
  fill: var(--ink);
  font-size: 21px;
  letter-spacing: .04em;
  text-anchor: middle;
}

.chem-svg__op {
  fill: var(--ink-soft);
  font-size: 20px;
  text-anchor: middle;
}

.chem-svg__label {
  fill: var(--ink-soft);
  font-size: 13px;
  letter-spacing: .08em;
  text-anchor: middle;
}

.chem-svg__label--iron { fill: #a2542f; }

.chem-svg__arrow line { stroke: var(--ink-soft); stroke-width: 1.4; }
.chem-svg__arrow path { fill: var(--ink-soft); }

.chem-svg__drop { fill: #2f6b45; }
.chem-svg__iron { fill: #a2542f; }

.chem__captions {
  margin: var(--gap-item) 0 0;
  padding: 0;
  list-style: none;
}

.chem__caption {
  margin: 0 0 .7em;
  font-family: var(--serif);
  font-size: clamp(.88rem, 2.6vw, 1.02rem);
  letter-spacing: .1em;
  line-height: 2.1;
  color: var(--ink);
}

.chem__caption:last-child { margin-bottom: 0; }

/* JSが動くときだけ、順に現れる。動かないときは3行とも最初から出したまま */
.chem.is-live .chem__caption {
  opacity: 0;
  transform: translateY(.7em);
  transition: opacity .9s ease, transform .9s ease;
}

.chem.is-live .chem__caption.is-shown {
  opacity: 1;
  transform: none;
}

/* ---------- 結び ---------- */

.section--closing { text-align: center; }

.closing__copy {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(1.5rem, 6vw, 2.6rem);
  letter-spacing: .18em;
  line-height: 2;
}

.section--closing .figure { margin-top: var(--gap-block); }

/* ---------- 語の小事典（器と景色） ---------- */

.terms {
  margin: var(--gap-block) 0 0;
  padding: 0;
}

.terms__word {
  margin: 0;
  padding-top: var(--gap-item);
  border-top: 1px solid var(--line);
  font-family: var(--serif);
  font-size: clamp(1rem, 3.2vw, 1.24rem);
  letter-spacing: .16em;
  line-height: 2;
}

.terms__desc {
  margin: .6em 0 var(--gap-item);
  max-width: 34em;
  font-size: clamp(.86rem, 2.4vw, .96rem);
  letter-spacing: .07em;
  line-height: 2.12;
}

.terms__desc:last-child { margin-bottom: 0; }

/* ---------- お問い合わせ ---------- */

.form { margin: var(--gap-block) 0 0; }

.field { margin: 0 0 var(--gap-item); }

.field__label {
  display: block;
  margin-bottom: .8em;
  font-size: .78rem;
  letter-spacing: .2em;
  color: var(--ink-soft);
}

.field__input {
  display: block;
  width: 100%;
  font: inherit;
  font-size: 1rem;
  line-height: 1.9;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  padding: .6em .2em;
  transition: border-color .3s ease;
}

.field__input--area { resize: vertical; }

/* select も下線様式に揃え、右端の三角は自前で描く（画像もフォントも足さない） */
.field__input--select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 1.8em;
  cursor: pointer;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--ink-soft) 50%),
    linear-gradient(135deg, var(--ink-soft) 50%, transparent 50%);
  background-position: right 0.75em top 1.15em, right 0.44em top 1.15em;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

.field__input:focus { border-bottom-color: var(--accent); }

.form__actions {
  margin: var(--gap-block) 0 0;
  text-align: center;
}

.button {
  font: inherit;
  font-size: .92rem;
  letter-spacing: .24em;
  color: var(--cream);
  background: var(--ink);
  border: 0;
  border-radius: 999px;
  padding: 1.15em 3.2em 1.15em 3.44em;
  cursor: pointer;
  transition: opacity .3s ease;
}

.button:hover { opacity: .84; }

.form__note {
  margin: 1.8em 0 0;
  text-align: center;
  font-size: .82rem;
  letter-spacing: .08em;
  color: var(--ink-soft);
}

.form__note.is-hidden { visibility: hidden; }

/* ---------- 窯へ（自作の概略図） ---------- */

.address {
  margin: var(--gap-item) 0 0;
  font-family: var(--serif);
  font-size: clamp(1rem, 2.8vw, 1.2rem);
  letter-spacing: .14em;
  line-height: 2.2;
}

.kilnmap { margin: var(--gap-block) 0 0; }

.kilnmap__svg {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 6px;
  background: #e9e4d7;
  font-family: var(--sans);
}

.kilnmap__hill  { fill: #dbdcc4; }
.kilnmap__grove { fill: #c9d2b2; }
.kilnmap__river { fill: none; stroke: #a9c6c2; stroke-width: 7; stroke-linecap: round; }

.kilnmap__road-casing {
  fill: none;
  stroke: #d6cfbe;
  stroke-width: 13;
  stroke-linecap: round;
}

.kilnmap__road {
  fill: none;
  stroke: #fbf8f0;
  stroke-width: 8;
  stroke-linecap: round;
}

.kilnmap__lane {
  fill: none;
  stroke: #fbf8f0;
  stroke-width: 5;
  stroke-linecap: round;
  stroke-dasharray: 11 7;
}

.kilnmap__label {
  fill: #6b6754;
  font-size: 15px;
  letter-spacing: .12em;
}

.kilnmap__label--area { fill: #86816b; font-size: 17px; }

.kilnmap__pin-body { fill: var(--accent); }
.kilnmap__pin-core { fill: #fff; }
.kilnmap__pin-shadow { fill: rgba(35, 30, 20, .18); }

.kilnmap__pin-label {
  fill: var(--ink);
  font-size: 17px;
  letter-spacing: .14em;
}

.kilnmap__note {
  margin: 1.2em 0 0;
  font-size: .74rem;
  letter-spacing: .1em;
  line-height: 2;
  color: var(--ink-soft);
}

/* ---------- 共通ヘッダー ---------- */

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 40;
  background: var(--cream);
  color: var(--ink);
  border-bottom: 1px solid var(--line);
  transition: background-color .5s ease, color .5s ease, border-color .5s ease;
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1em;
  width: min(1080px, 92vw);
  height: var(--header-h);
  margin: 0 auto;
}

.site-header__logo {
  font-family: var(--serif);
  font-size: clamp(.84rem, 3vw, 1rem);
  letter-spacing: .24em;
  line-height: 1;
  color: inherit;
  text-decoration: none;
  white-space: nowrap;
}

/* モバイルでも横並び（ハンバーガーにしない） */
.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(.85em, 3.2vw, 2.4em);
}

.site-nav__link {
  font-size: clamp(.63rem, 2.5vw, .78rem);
  letter-spacing: .1em;
  line-height: 1;
  color: inherit;
  text-decoration: none;
  white-space: nowrap;
  opacity: .78;
  /* 下線の有無で高さが変わらないよう、全リンクに同じ余白と透明な線を敷く */
  padding-bottom: .35em;
  border-bottom: 1px solid transparent;
  transition: opacity .3s ease;
}

.site-nav__link:hover { opacity: 1; }

.site-nav__link[aria-current="page"] {
  opacity: 1;
  border-bottom-color: currentColor;
}

/* 320px級でも1行に収める */
@media (max-width: 400px) {
  .site-header__inner { width: 94vw; }
  .site-header__logo { font-size: .74rem; letter-spacing: .1em; }
  .site-header__logo .logo-en { letter-spacing: .16em; }
  .site-nav { gap: .9em; }
  .site-nav__link { font-size: .62rem; letter-spacing: .03em; }
}

/* トップの暗いヒーロー上だけ透明。空が明るくなったら不透明へ切り替える */
.site-header--overlay {
  background: transparent;
  color: var(--cream);
  border-bottom-color: transparent;
}

.site-header--overlay:not(.scrolled) {
  text-shadow: 0 1px 22px rgba(var(--scrim-rgb), .55);
}

.site-header--overlay.scrolled {
  background: var(--cream);
  color: var(--ink);
  border-bottom-color: var(--line);
}

.site-header:not(.site-header--overlay) :focus-visible,
.site-header--overlay.scrolled :focus-visible {
  outline-color: var(--ink);
}

/* ---------- 下層ページの土台 ---------- */

.page {
  min-height: 100vh;
  padding-top: var(--header-h);
  background: var(--cream);
  color: var(--ink);
}

.page-head {
  padding: clamp(2.4rem, 6vh, 3.6rem) 0 var(--gap-block);
  background: var(--cream);
  color: var(--ink);
}

.page-head + .section { padding-top: 0; }

.page-head__title {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.7rem, 6.4vw, 3rem);
  letter-spacing: .16em;
  line-height: 1.95;
}

.page-head__lead {
  margin: var(--gap-item) 0 0;
  max-width: 34em;
  font-size: clamp(.9rem, 2.4vw, 1rem);
  letter-spacing: .07em;
  line-height: 2.12;
}

/* ---------- フッター ---------- */

.footer {
  background: var(--paper);
  color: var(--ink-soft);
  padding: var(--gap-block) 7vw var(--gap-item);
  text-align: center;
  border-top: 1px solid var(--line);
}

.footer__nav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: clamp(1em, 4vw, 2.4em);
  margin: 0 0 var(--gap-item);
}

.footer__link {
  font-size: .74rem;
  letter-spacing: .14em;
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.footer__link:hover { border-bottom-color: var(--line); }

.footer__mark {
  margin: 0;
  font-family: var(--serif);
  font-size: 1rem;
  letter-spacing: .26em;
  color: var(--ink);
}

.footer__note {
  margin: 1.3em 0 0;
  font-size: .72rem;
  letter-spacing: .1em;
  line-height: 2;
}

/* ---------- タブレット以上 ---------- */

@media (min-width: 769px) {
  :root {
    --stage-y: 50%;
    --header-h: 4rem;
  }

  .canvas-wrap { width: min(70vmin, 680px); }

  /* 空が明るくなる終盤、テキストカラムの背面だけ暗い帯を立ち上げて
     明るい地×明るい文字のコントラスト崩れを防ぐ */
  .stage-copy::before {
    inset: 0 auto 0 0;
    width: min(46vw, 560px);
    height: 100%;
    background: linear-gradient(90deg, rgba(var(--scrim-rgb), .55), rgba(var(--scrim-rgb), 0));
    opacity: clamp(0, calc((var(--p) - .55) / .18), 1);
  }

  .stage-copy {
    inset: 0 auto 0 0;
    width: min(38ch, 42vw);
    padding: 0;
  }

  .stage-copy > * {
    justify-content: center;
    padding: 0 0 0 8vw;
  }

  /* PCでも画面中央下に置く（右隅だと最初の一手として気づかれない） */
  .scroll-cue {
    left: 50%;
    right: auto;
    bottom: 6vh;
    width: auto;
    max-width: 40vw;
    transform: translateX(-50%);
    text-align: center;
  }
}

/* ---------- デスクトップ（主役をやや右へ） ---------- */

@media (min-width: 1100px) {
  :root { --stage-x: 62%; }

  .canvas-wrap { width: min(74vmin, 760px); }
}

/* ---------- モバイル（縦を短く） ----------
   ブレークポイントは設計判断なので sync_config.py は書き換えない。
   project.json の mobileMaxShortSide と食い違ったら check 系が知らせる */

@media (max-width: 768px) {
  :root { --stage-scale: .78; }
}

/* =========================================================
   静止画フォールバック
   (a) JS無効 = html に .js が付かない
   (b) prefers-reduced-motion: reduce / ?reduced=1
   ========================================================= */

:is(html:not(.js), html.is-reduced) .loader { display: none; }
:is(html:not(.js), html.is-reduced) .canvas-wrap { display: none; }
:is(html:not(.js), html.is-reduced) .cue { display: none; }
:is(html:not(.js), html.is-reduced) .scroll-cue { display: none; }
:is(html:not(.js), html.is-reduced) .halo { display: none; }

:is(html:not(.js), html.is-reduced) .sky { --p: .42; }

/* 化学の演出は、動かさずに静止図解で見せる（キャプションは3行とも出す） */
:is(html:not(.js), html.is-reduced) .chem.is-live .chem__stage { display: none; }
:is(html:not(.js), html.is-reduced) .chem.is-live .chem__still { display: block; }

:is(html:not(.js), html.is-reduced) .chem.is-live .chem__caption {
  opacity: 1;
  transform: none;
}

:is(html:not(.js), html.is-reduced) .scroll-stage { height: auto; }

:is(html:not(.js), html.is-reduced) .stage-sticky {
  position: static;
  height: auto;
  overflow: visible;
  padding: var(--gap-section) 7vw calc(var(--gap-section) * 1.2);
}

:is(html:not(.js), html.is-reduced) .stage-still {
  display: block;
  width: min(72vmin, 520px);
  margin: 0 auto var(--gap-block);
}

:is(html:not(.js), html.is-reduced) .stage-copy {
  position: static;
  inset: auto;
  width: min(38em, 100%);
  margin: 0 auto;
  padding: 0;
  /* 重ね置きをやめて普通の文章に戻るので、選択もリンクも効くようにする
     （演出中は canvas の邪魔をしないよう none のまま） */
  pointer-events: auto;
}

:is(html:not(.js), html.is-reduced) .stage-copy::before { display: none; }

:is(html:not(.js), html.is-reduced) .stage-copy > * {
  position: static;
  display: block;
  padding: 0;
  margin: 0 0 calc(var(--gap-section) * 1.1);
  opacity: 1;
  transform: none;
}

:is(html:not(.js), html.is-reduced) .stage-copy > *:last-child {
  margin-bottom: 0;
}

/* ---------- 「動きを減らす」設定の人が、自分で演出を開ける導線 ----------
   静止画レイアウトのときだけ出す。押すと is-reduced が外れるので、
   表示を保つために .is-on を別に持たせて、隅の小さなボタンへ逃がす。
   main.js が生成するので、JS無効の人に押せない死にボタンは残らない。 */

/* ボタンが入るときは、絵との距離を詰める。離れていると
   「この絵の話をしている」ことが読み取れない */
:is(html:not(.js), html.is-reduced) .stage-sticky.has-optin .stage-still {
  margin-bottom: clamp(1rem, 3vh, 1.8rem);
}

.motion-optin-wrap {
  display: none;
  margin: 0 0 var(--gap-block);
  text-align: center;
}

:is(html:not(.js), html.is-reduced) .motion-optin-wrap,
.motion-optin-wrap.is-on { display: block; }

/* 演出中は本体が fixed で抜けるので、場所を取らせない */
.motion-optin-wrap.is-on { margin: 0; }

.motion-optin__note {
  display: block;
  margin: 0 auto 1em;
  max-width: 26em;
  font-size: .78rem;
  letter-spacing: .08em;
  line-height: 2;
  color: rgba(var(--cream-rgb), .72);
}

/* 句の切れ目は共通の .phrase に任せる（main.js が作る） */

.motion-optin-wrap.is-on .motion-optin__note { display: none; }

.motion-optin {
  font: inherit;
  font-size: .78rem;
  letter-spacing: .16em;
  line-height: 1;
  color: var(--cream);
  background: rgba(var(--night-rgb), .55);
  border: 1px solid rgba(var(--cream-rgb), .38);
  border-radius: 999px;
  padding: 1em 2.1em;
  cursor: pointer;
  transition: background-color .3s ease, border-color .3s ease;
}

.motion-optin:hover {
  background: rgba(var(--night-rgb), .82);
  border-color: rgba(var(--cream-rgb), .7);
}

/* 演出中は物語の邪魔をしない隅へ。右下の「物語をとばす」と左右で対になる */
.motion-optin.is-on {
  position: fixed;
  left: clamp(1rem, 4vw, 2.2rem);
  bottom: clamp(1rem, 4vh, 2.2rem);
  z-index: 41;
  font-size: .72rem;
  padding: .75em 1.4em;
}

/* JSが動かない環境では送信ボタンを出さず、注記を常時表示する
   （actionの無いformはGET送信になり、入力内容がURLに載ってしまうため） */
html:not(.js) .button { display: none; }
html:not(.js) .form__note { visibility: visible; }

/* ---------- 動きを減らす設定 ---------- */

@media (prefers-reduced-motion: reduce) {
  .scroll-cue { animation: none; }

  /* スクロールに従う光でも、この設定の人には出さない */
  .keshiki__sweep { animation: none; opacity: 0; }

  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- スクロール誘導のPC/スマホ出し分け ---------- */

/* 既定（PC・マウス環境）: 「下へスクロール」＋下向き矢印 */
.scroll-cue__label--sp { display: none; }
.scroll-cue__swipe { display: none; }

/* タッチ端末: 「上へスワイプ」＋指の動きを模したインジケーター */
@media (hover: none) and (pointer: coarse) {
  .scroll-cue__label--pc { display: none; }
  .scroll-cue__label--sp { display: inline; }
  .scroll-cue__arrow { display: none; }

  /* 指のインジケーターがある分、誘導ブロックはPCの矢印より背が高い。
     そのままだとヒーローの副題に重なるので、誘導は下へ寄せ、
     ヒーローの足元は広げて、両側から場所をつくる */
  .scroll-cue { bottom: clamp(1.4rem, 3.5vh, 2.4rem); }
  .hero { padding-bottom: 17vh; }

  .scroll-cue__swipe {
    display: block;
    width: 24px;
    height: 40px;
    margin: .7em auto 0;
    border: 1.5px solid rgba(var(--cream-rgb), .6);
    border-radius: 13px;
    position: relative;
  }

  .scroll-cue__dot {
    position: absolute;
    left: 50%;
    width: 6px;
    height: 6px;
    margin-left: -3px;
    border-radius: 50%;
    background: currentColor;
    animation: swipe-up 2.2s ease-in-out infinite;
  }
}

/* 背の低い端末（iPhone SE級）では、絵・ヒーロー文・誘導を縦に並べる
   予算がそもそも足りない。指のインジケーターは省いて文言だけ残し、
   そのぶんヒーローの足元は広げずに済ませる（文言だけで用は足りる） */
@media (hover: none) and (pointer: coarse) and (max-height: 700px) {
  .scroll-cue__swipe { display: none; }
  .scroll-cue { bottom: 1rem; }
  .hero { padding-bottom: 14vh; }
  /* ヒーローの中を詰める。flex-end なので下端は動かず、絵側の余裕だけ増える */
  .hero__sub { margin-top: 1rem; }
}

@keyframes swipe-up {
  0%   { top: 26px; opacity: 0; }
  20%  { opacity: 1; }
  55%  { top: 7px;  opacity: 1; }
  80%  { top: 7px;  opacity: 0; }
  100% { top: 26px; opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .scroll-cue__dot { animation: none; top: 12px; }
}

/* =========================================================
   スマホの読み密度（ユーザー指摘: 指が疲れて離脱する）
   ------------------------------------------------------
   実測（375x812）で縦 17,745px = 21.9画面あった。内訳は
     連番ステージ 5,826px / 本文まわり 11,701px。
   効くのは次の3つで、上から順に効果が大きい:
     (1) ステージの尺  (2) 本文の行間 2.40 → 1.95  (3) ブロック間の余白
   文字まわり（字送り・段落内の行間）は読みやすさの根なので下げ過ぎない。
   ※ --stage-h は @sync ブロックが生成するので、ここでは上書きだけする
     （project.json の stageHeightVh は PC 用の値のまま残す）
   ========================================================= */
@media (max-width: 768px) {
  /* (1) 指の運動量に一番効く。120コマを 2.6画面、72コマを 1.9画面で見せる */
  /* 章テキストが1つずつ出る下限の尺（判定窓 = 帯325px + 目印の20%）。
     これ以上短くすると3つの章が同時に出て文字が重なる */
  .scroll-stage[data-sequence="kiln"] { --stage-h: 330vh; }
  .scroll-stage[data-sequence="rokuro"] { --stage-h: 300vh; }
  /* 目印を薄くして判定窓を狭める（章が同時に出るのを防ぐ） */
  .scroll-stage { --cue-h: 28vh; }

  /* 章の位置もスマホ用に広げる。ステージが短いぶん、目印を離さないと
     判定窓（帯 + 目印の20%）が重なって章が2つ同時に出てしまう。
     HTMLの --at はインラインなので、ここだけ !important で上書きする */
  .cue[data-chapter="ch-yami"]    { --at: .18 !important; }
  .cue[data-chapter="ch-hai"]     { --at: .50 !important; }
  .cue[data-chapter="ch-keshiki"] { --at: .82 !important; }
  .cue[data-chapter="rk-tsuchi"]  { --at: .16 !important; }
  .cue[data-chapter="rk-kezuri"]  { --at: .52 !important; }
  .cue[data-chapter="rk-takusu"]  { --at: .88 !important; }

  /* (2) 行間。2.40 は縦長画面では間延びして見える */
  .section__body,
  .craft__body,
  .page-head__lead { line-height: 1.95; }
  .section__body + .section__body,
  .craft__body + .craft__body { margin-top: 1.15em; }

  /* (3) ブロックとブロックのあいだ */
  .section { padding: clamp(2.4rem, 5.4vh, 3.4rem) 0; }
  .section__title { line-height: 1.7; }
  .craft__title { line-height: 1.75; }
  .crafts { margin-top: clamp(1.5rem, 3.4vh, 2.2rem); }
  .craft { padding-top: clamp(1.1rem, 2.4vh, 1.6rem); }
  .craft + .craft { margin-top: clamp(1.1rem, 2.4vh, 1.6rem); }
  .figure { margin-top: clamp(1.4rem, 3vh, 2rem); }
  .figure__caption { margin-top: .7em; }
  .page-head { padding-top: clamp(4.5rem, 12vh, 6rem); padding-bottom: clamp(2rem, 5vh, 3rem); }
}
