/* =========================================================================
   ひとひら写真館 — 案件専用の版面・写真・縮退
   動き、言葉、写真を「散らばった時間が一枚に集まる」で統一する。
   ========================================================================= */

:root {
  --hit-night: #0A1116;
  --hit-night-2: #101A1E;
  --hit-paper: #F6F1E8;
  --hit-paper-2: #E9E0D1;
  --hit-ink: #1B1815;
  --hit-amber: #B77846;
  --hit-ivory: #F4EFE6;
  --hit-line: rgba(27, 24, 21, .15);
  --hit-shadow: 0 28px 80px rgba(37, 28, 20, .17);
}

html {
  background: var(--hit-night);
  scroll-behavior: smooth;
}

/* 透明canvasの奥に敷く夜。フラットな黒ではなく、
   上手に青い夜気・下手に琥珀の残光を固定で置く（現像室の空気）。 */
html.has-page-canvas {
  background:
    radial-gradient(120% 85% at 72% 10%, #17262E 0%, rgba(23, 38, 46, 0) 56%),
    radial-gradient(75% 60% at 16% 82%, rgba(183, 120, 70, .16), transparent 68%),
    linear-gradient(180deg, var(--hit-night), #0C151A);
  background-attachment: fixed;
}

body {
  background: var(--hit-night);
  color: var(--hit-ivory);
  font-family: var(--font-ui);
  overflow-x: clip;
}

/* 見出しとキャプションは文節境界でだけ折る。anywhere を許すと
   「始まっていま／す。」のような中割れが起きる（2026-08-06 内田指摘） */
h1, h2, h3, p, figcaption, a, button {
  word-break: auto-phrase;
  text-wrap: pretty;
}
p, a, button { overflow-wrap: anywhere; }
h1, h2, h3, figcaption {
  overflow-wrap: normal;
  line-break: strict;
}

img { color: transparent; }

:focus-visible {
  outline: 2px solid var(--hit-amber);
  outline-offset: 5px;
}

/* ---------- 入口 ---------- */
.has-js .bs-loader {
  overflow: hidden;
  background:
    radial-gradient(86% 70% at 64% 42%, rgba(38, 57, 64, .92), transparent 62%),
    radial-gradient(54% 52% at 24% 76%, rgba(183, 120, 70, .16), transparent 76%),
    var(--hit-night);
}

.has-js .bs-loader::before,
.has-js .bs-loader::after {
  content: "";
  position: absolute;
  width: 11px;
  height: 8px;
  border-radius: 1px;
  background: var(--hit-paper);
  box-shadow:
    8vw -17vh 0 rgba(246, 241, 232, .62),
    19vw 8vh 0 rgba(246, 241, 232, .28),
    -16vw 14vh 0 rgba(183, 120, 70, .46),
    -28vw -9vh 0 rgba(246, 241, 232, .36),
    31vw 21vh 0 rgba(246, 241, 232, .46);
  opacity: .56;
  animation: hit-loader-drift 7s ease-in-out infinite alternate;
}
.has-js .bs-loader::before { left: 34%; top: 38%; transform: rotate(15deg); }
.has-js .bs-loader::after {
  right: 31%; top: 50%; transform: rotate(-21deg);
  animation-delay: -3s;
}
@keyframes hit-loader-drift {
  to { translate: 16px -12px; rotate: 7deg; }
}

.bs-loader__inner { position: relative; z-index: 1; }
.bs-loader__eyebrow {
  margin: 0;
  font-size: clamp(.64rem, .75vw, .76rem);
  letter-spacing: .34em;
  color: rgba(244, 239, 230, .58);
}
.hitohira-loader-mark {
  display: grid;
  justify-items: center;
  font-family: var(--font-display);
  line-height: 1;
  color: var(--hit-ivory);
  filter: drop-shadow(0 18px 40px rgba(0, 0, 0, .32));
}
.hitohira-loader-mark span {
  font-size: clamp(1.05rem, 1.7vw, 1.45rem);
  letter-spacing: .52em;
  padding-left: .52em;
}
.hitohira-loader-mark strong {
  margin-top: .2em;
  font-size: clamp(3.1rem, 8vw, 7.8rem);
  font-weight: 500;
  letter-spacing: .18em;
  padding-left: .18em;
}
.bs-loader__mark {
  color: rgba(244, 239, 230, .72);
  letter-spacing: .22em;
}
.bs-loader__foot { position: relative; z-index: 1; }
.bs-loader__silent {
  font-size: .68rem;
  letter-spacing: .18em;
  color: rgba(244, 239, 230, .48);
}

/* ---------- ヘッダー ---------- */
.bs-header {
  color: var(--hit-ivory);
}
.bs-header__logo--text {
  display: grid;
  line-height: 1;
  letter-spacing: 0;
}
.bs-header__logo--text span {
  font-size: .56em;
  letter-spacing: .32em;
  padding-left: .32em;
}
.bs-header__logo--text strong {
  margin-top: .25em;
  font-weight: 500;
  letter-spacing: .12em;
  padding-left: .12em;
}
/* 章の明暗はDOM側の実測（data-chapter）で切り替える。
   3D側の data-tone は終盤の反転にしか反応せず、白の章で色が置き去りになる。 */
:root[data-chapter="day"] .bs-header { color: var(--hit-ink); }
:root[data-chapter="day"] .bs-header__link { color: rgba(27, 24, 21, .62); }
:root[data-chapter="day"] .bs-header__link:hover { color: var(--hit-ink); }
:root[data-chapter="day"] .bs-header .bs-btn {
  color: var(--hit-ink);
  border-color: rgba(27, 24, 21, .35);
}
:root[data-chapter="day"] .bs-header.is-scrolled {
  background: rgba(246, 241, 232, .78);
}

/* ---------- 3Dが無いときの屋号 ---------- */
.hitohira-static-mark {
  position: fixed;
  inset: 50% clamp(4vw, 8vw, 130px) auto auto;
  translate: 0 -50%;
  width: min(43vw, 640px);
  display: grid;
  justify-items: center;
  color: var(--hit-ivory);
  font-family: var(--font-display);
  line-height: 1;
  opacity: .7;
  filter: drop-shadow(0 22px 48px rgba(0, 0, 0, .32));
  transition: opacity .45s ease;
}
.hitohira-static-mark span {
  font-size: clamp(.9rem, 1.7vw, 1.45rem);
  letter-spacing: .54em;
  padding-left: .54em;
}
.hitohira-static-mark strong {
  margin-top: .28em;
  font-size: clamp(2.5rem, 6.5vw, 6.6rem);
  font-weight: 500;
  letter-spacing: .18em;
  padding-left: .18em;
}
.has-3d .hitohira-static-mark,
.bs-stage.is-webgl .hitohira-static-mark { opacity: 0; }
:root[data-tone="light"] .hitohira-static-mark {
  color: var(--hit-ink);
  opacity: .15;
  filter: none;
}
.has-3d[data-tone="light"] .hitohira-static-mark { opacity: 0; }

.hitohira-nowrap { white-space: nowrap; }

/* 写真を見る邪魔にならない大きさへ。リンク上のラベル機能は残す。 */
.bs-cursor:not(.is-active) {
  width: 22px;
  height: 22px;
  margin: -11px 0 0 -11px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .22),
              0 0 0 8px rgba(128, 128, 128, .10),
              0 3px 12px rgba(0, 0, 0, .22);
}

/* ---------- 暗の章 ---------- */
.hitohira-night {
  position: relative;
  background:
    radial-gradient(54% 52% at 72% 22%, rgba(57, 77, 83, .58), transparent 72%),
    radial-gradient(42% 38% at 22% 68%, rgba(183, 120, 70, .10), transparent 76%),
    linear-gradient(180deg, var(--hit-night), var(--hit-night-2));
}
.has-3d .hitohira-night { background: transparent; }
.hitohira-night::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .11;
  background-image:
    repeating-radial-gradient(circle at 28% 38%, rgba(255,255,255,.3) 0 1px, transparent 1px 4px);
  background-size: 13px 13px;
  mix-blend-mode: soft-light;
}

.hitohira-night .bs-beat {
  position: relative;
  z-index: 2;
}
.hitohira-night .bs-beat--short { min-height: 58svh; }
.hitohira-night .bs-beat--ask { min-height: 92svh; }
.hitohira-night .bs-beat__after {
  color: rgba(244, 239, 230, .76);
  font-size: clamp(.95rem, 1.14vw, 1.08rem);
  line-height: 2;
  letter-spacing: .08em;
}
.hitohira-copy-shield {
  position: relative;
  isolation: isolate;
}
/* 大きめの見出しを持つ節は、器の26ch制限を広げて文節割れを防ぐ */
.hitohira-night .bs-beat--left > .hitohira-copy-shield--wide,
.hitohira-night .bs-beat--right > .hitohira-copy-shield--wide {
  max-width: min(560px, 74vw);
}
.hitohira-copy-shield::before,
.hitohira-thesis::before {
  content: "";
  position: absolute;
  inset: -25% -16%;
  z-index: -1;
  background: radial-gradient(closest-side, rgba(5, 10, 14, .82), rgba(5, 10, 14, .28) 64%, transparent);
  filter: blur(10px);
}
.hitohira-line-wide {
  max-width: min(22ch, 68vw) !important;
  font-size: clamp(1.9rem, 4vw, 3.5rem);
}
.hitohira-dom-mark {
  display: grid;
  justify-items: center;
  font-family: var(--font-display);
  line-height: 1;
  color: var(--hit-ivory);
}
.hitohira-dom-mark span {
  font-size: clamp(.9rem, 1.6vw, 1.35rem);
  letter-spacing: .54em;
  padding-left: .54em;
}
.hitohira-dom-mark strong {
  margin-top: .3em;
  font-size: clamp(3rem, 7.2vw, 7.2rem);
  font-weight: 500;
  letter-spacing: .18em;
  padding-left: .18em;
}
/* 3D主役は「一枚の写真」。屋号はこのDOMタイポが唯一の正で、3Dと二重にしない */
.hitohira-dom-mark {
  filter: drop-shadow(0 16px 44px rgba(0, 0, 0, .5));
}
.hitohira-brand-beat { min-height: 96svh; }
.hitohira-brand-shield::before {
  inset: -34% -30%;
}
/* 現像の見せ場。文字は左、右で一枚が色を得る。尺を長めに取る */
.hitohira-night .hitohira-reveal { min-height: 128svh; }
.hitohira-thesis {
  position: relative;
  isolation: isolate;
}
.hitohira-thesis .bs-meta { margin-bottom: 1.5rem; }

/* ---------- 明の章 ---------- */
.hitohira-day {
  --ink: var(--hit-ink);
  --ink-dim: rgba(27, 24, 21, .68);
  --ink-faint: rgba(27, 24, 21, .48);
  --line: var(--hit-line);
  --bg: var(--hit-paper);
  background: var(--hit-paper);
  color: var(--hit-ink);
  position: relative;
}
.has-3d .hitohira-day {
  background:
    linear-gradient(rgba(246, 241, 232, .955), rgba(246, 241, 232, .955));
}
.hitohira-day::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .18;
  background-image:
    repeating-linear-gradient(91deg, rgba(86, 64, 45, .06) 0 1px, transparent 1px 5px);
  background-size: 9px 9px;
  mix-blend-mode: multiply;
}
.hitohira-section {
  position: relative;
  z-index: 3;
  padding: clamp(110px, 16vh, 220px) 0;
}
.hitohira-section + .hitohira-section {
  border-top: 1px solid var(--hit-line);
}
.hitohira-grid {
  display: grid;
  /* 文字の列は見出し1行（12字）が入る幅を確保する。.78fr だと中割れする */
  grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr);
  gap: clamp(42px, 7vw, 120px);
  align-items: center;
}
.hitohira-philosophy .hitohira-h2 {
  /* 「シャッターを切る前から、」12字が1行に収まる大きさ（中割れ防止） */
  font-size: clamp(1.85rem, 3.05vw, 3.4rem);
}
.hitohira-section-copy { align-self: center; }
.hitohira-h2 {
  margin: clamp(18px, 2.8vh, 30px) 0 clamp(30px, 5vh, 58px);
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.2vw, 4.3rem);
  font-weight: 400;
  letter-spacing: .025em;
  line-height: 1.43;
}
.hitohira-body {
  width: min(38rem, 100%);
  font-size: clamp(.98rem, 1.12vw, 1.08rem);
  line-height: 2;
  letter-spacing: .035em;
  color: rgba(27, 24, 21, .78);
}
.hitohira-body p { margin: 0 0 1.45em; }
.hitohira-body p:last-child { margin-bottom: 0; }
.hitohira-body strong {
  color: var(--hit-ink);
  font-weight: 500;
}

/* 大きな一枚のまわりに、別の日の小さなプリントが重なって置いてある。
   同じ画像の切り抜きを使うと「拡大した継ぎはぎ」に見える（2026-08-06 内田指摘）。
   必ず別の写真を丸ごと1枚のプリントとして、フチから大きくはみ出させる。 */
.hitohira-photo {
  position: relative;
  margin: 0;
}
.hitohira-photo::before,
.hitohira-photo::after {
  content: "";
  position: absolute;
  z-index: 2;
  background-size: cover;
  background-position: center;
  border: 9px solid var(--hit-paper);
  border-bottom-width: 13px;      /* 下フチをわずかに広く＝写真プリントの顔 */
  box-shadow: 0 18px 44px rgba(31, 23, 17, .22);
  pointer-events: none;
}
.hitohira-photo::before {
  background-image: url("../img/shichigosan.jpg");
  background-position: 60% 42%;   /* 主役の子が版面の中央に来る切り取り */
  width: clamp(130px, 15vw, 200px);
  aspect-ratio: 4 / 5;
  left: clamp(-76px, -6.5vw, -40px);
  top: clamp(-68px, -6vw, -34px);
  rotate: -5deg;
}
.hitohira-photo::after {
  background-image: url("../img/coming-of-age.jpg");
  width: clamp(110px, 12vw, 170px);
  aspect-ratio: 5 / 6;
  right: clamp(-70px, -6vw, -36px);
  bottom: clamp(46px, 8vw, 120px);
  rotate: 4deg;
}
.hitohira-photo__frame {
  position: relative;
  overflow: hidden;
  box-shadow: var(--hit-shadow);
}
.hitohira-photo img,
.hitohira-story__photo img,
.hitohira-family-photo img {
  display: block;
  width: 100%;
  height: auto;
}
.hitohira-photo__glint {
  position: absolute;
  inset: -20% auto -20% -38%;
  width: 28%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.28), transparent);
  transform: skewX(-12deg);
  animation: hit-photo-glint 9s ease-in-out infinite;
}
@keyframes hit-photo-glint {
  0%, 20% { translate: 0 0; opacity: 0; }
  34% { opacity: 1; }
  56%, 100% { translate: 520% 0; opacity: 0; }
}
/* キャプションは飾らない。背景や帯を敷かず、写真の下・中央に素のテキストだけ */
.hitohira-photo figcaption,
.hitohira-story__photo figcaption,
.hitohira-family-photo figcaption {
  margin-top: 1.15rem;
  text-align: center;
  font-family: var(--font-display);
  font-size: clamp(.82rem, .96vw, .95rem);
  letter-spacing: .08em;
  color: rgba(27, 24, 21, .6);
}

/* ---------- 三つの写真 ---------- */
.hitohira-section-head {
  width: min(900px, 100%);
  margin: 0 0 clamp(80px, 14vh, 170px);
}
/* 章の入口は夜のバンドに戻し、「散らばっては集まる」3D（hitohira-drift.js）を敷く */
.hitohira-portraits { padding-top: 0; }
.hitohira-portraits__band {
  position: relative;
  overflow: hidden;
  display: grid;
  align-items: center;
  min-height: 52svh;
  margin-bottom: clamp(80px, 14vh, 170px);
  padding: clamp(90px, 13vh, 160px) 0;
  color: var(--hit-ivory);
  background:
    radial-gradient(110% 80% at 72% 6%, #17262E 0%, rgba(23, 38, 46, 0) 58%),
    radial-gradient(70% 55% at 16% 92%, rgba(183, 120, 70, .16), transparent 68%),
    linear-gradient(180deg, var(--hit-night), #0C151A);
}
.hitohira-portraits__band .hp-hero__canvas {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.hitohira-portraits__band .hp-hero__canvas canvas {
  width: 100% !important;
  height: 100% !important;
}
.hitohira-portraits__band-inner {
  position: relative;
  z-index: 1;
}
.hitohira-portraits__band .hitohira-section-head { margin: 0; }
.hitohira-portraits__band .bs-meta { color: rgba(244, 239, 230, .55); }
.hitohira-portraits__band .hitohira-h2 {
  text-shadow: 0 10px 40px rgba(0, 0, 0, .55);
}
.hitohira-story {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  align-items: center;
  gap: var(--gutter);
  margin-bottom: clamp(120px, 19vh, 240px);
}
.hitohira-story:last-child { margin-bottom: 0; }
.hitohira-story__copy {
  position: relative;
  z-index: 2;
  padding: clamp(26px, 3.4vw, 48px);
  background: rgba(246, 241, 232, .88);
  box-shadow: 0 1px 0 var(--hit-line);
  backdrop-filter: blur(8px);
}
.hitohira-story__copy h3 {
  margin: 1.05rem 0 1.3rem;
  font-family: var(--font-display);
  font-size: clamp(1.65rem, 3.1vw, 3.2rem);
  font-weight: 400;
  line-height: 1.52;
  letter-spacing: .02em;
}
.hitohira-story__copy > p:not(.bs-meta):not(.hitohira-micro) {
  margin: 0;
  line-height: 2;
  color: rgba(27, 24, 21, .72);
}
.hitohira-micro {
  margin: 1.6rem 0 0;
  padding-top: 1.15rem;
  border-top: 1px solid var(--hit-line);
  font-family: var(--font-display);
  letter-spacing: .06em;
}
.hitohira-story__photo {
  margin: 0;
}
/* 影は写真（ズーム枠）にだけ落とす。figure全体に掛けると
   キャプションの背後まで「帯」のように見える（2026-08-06 内田指摘） */
.hitohira-zoom {
  box-shadow: var(--hit-shadow);
}
.hitohira-zoom img {
  display: block;
  width: 100%;
  height: auto;
}
.hitohira-story--image-right .hitohira-story__copy {
  grid-column: 1 / span 5;
  margin-right: -8vw;
}
.hitohira-story--image-right .hitohira-story__photo {
  grid-column: 6 / -1;
}
.hitohira-story--image-left .hitohira-story__copy {
  grid-column: 8 / -1;
  grid-row: 1;
  margin-left: -8vw;
}
.hitohira-story--image-left .hitohira-story__photo {
  grid-column: 1 / span 8;
  grid-row: 1;
}
.hitohira-story--family {
  display: block;
}
.hitohira-story--family .hitohira-story__copy {
  width: min(670px, 88%);
  margin: 0 0 -7vw auto;
}
.hitohira-family-photo {
  margin: 0;
}
.hitohira-family-photo img {
  aspect-ratio: 3 / 2;
  object-fit: cover;
  object-position: center;
}

/* ---------- 撮り方 ---------- */
.hitohira-approach {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(54% 56% at 78% 30%, rgba(183, 120, 70, .12), transparent 76%),
    rgba(237, 228, 215, .78);
}
/* 待つカメラマンの背景。右へ寄せ、文字の側と下の三箇条は紙色へ溶かす */
.hitohira-approach__bg {
  position: absolute;
  inset: 0 0 0 auto;
  width: min(64%, 920px);
  background-image: url("../img/photographer.jpg");
  background-size: cover;
  background-position: 72% 28%;
  opacity: .55;
  pointer-events: none;
}
.hitohira-approach__bg::after {
  content: "";
  position: absolute;
  inset: -2% 0;
  background:
    linear-gradient(90deg, rgba(237, 228, 215, 1) 0%, rgba(237, 228, 215, .55) 30%, rgba(237, 228, 215, 0) 68%),
    linear-gradient(180deg, rgba(237, 228, 215, .35) 0%, transparent 26%, transparent 52%, rgba(237, 228, 215, .96) 86%);
}
.hitohira-approach .bs-container {
  position: relative;
  z-index: 1;
}
.hitohira-approach__intro {
  width: min(840px, 100%);
}
.hitohira-approach__lead {
  width: min(660px, 100%);
  margin: 0;
  line-height: 2;
  color: rgba(27, 24, 21, .7);
}
.hitohira-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: clamp(70px, 11vh, 130px);
  border-top: 1px solid var(--hit-line);
  border-bottom: 1px solid var(--hit-line);
}
.hitohira-steps article {
  min-height: 300px;
  padding: clamp(28px, 3.5vw, 50px);
  border-right: 1px solid var(--hit-line);
}
.hitohira-steps article:last-child { border-right: 0; }
.hitohira-steps span {
  display: inline-grid;
  place-items: center;
  width: 2rem;
  aspect-ratio: 1;
  border: 1px solid var(--hit-amber);
  color: var(--hit-amber);
  font-size: .74rem;
}
.hitohira-steps h3 {
  margin: clamp(34px, 5vh, 58px) 0 1.1rem;
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 2vw, 1.9rem);
  font-weight: 400;
}
.hitohira-steps p {
  margin: 0;
  line-height: 1.9;
  color: rgba(27, 24, 21, .68);
}

/* ---------- メッセージ・FAQ ---------- */
/* 「思い出だけではありません」の証拠写真。文章のあとに大きく置く */
.hitohira-message__photo {
  width: min(1080px, 100%);
  margin: clamp(80px, 12vh, 150px) auto 0;
}
.hitohira-message__photo figcaption {
  margin-top: 1.15rem;
  text-align: center;
  font-family: var(--font-display);
  font-size: clamp(.82rem, .96vw, .95rem);
  letter-spacing: .08em;
  color: rgba(27, 24, 21, .6);
}
.hitohira-message__grid {
  display: grid;
  grid-template-columns: minmax(0, .88fr) minmax(0, 1.12fr);
  gap: clamp(50px, 10vw, 160px);
  align-items: start;
}
.hitohira-message__body {
  padding-top: clamp(58px, 9vh, 110px);
  font-size: clamp(1rem, 1.2vw, 1.12rem);
  line-height: 2.1;
  color: rgba(27, 24, 21, .72);
}
.hitohira-message__body p { margin: 0 0 1.5em; }
.hitohira-message__body strong {
  display: block;
  margin-top: clamp(38px, 6vh, 72px);
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.8vw, 2.6rem);
  font-weight: 400;
  color: var(--hit-ink);
}
.bs-faq {
  background: rgba(246, 241, 232, .86);
}
.bs-faq__trigger { color: var(--hit-ink); }
.bs-faq__body p { color: rgba(27, 24, 21, .7); }
.bs-faq__body { visibility: hidden; opacity: 0; }
.bs-faq__item.is-open .bs-faq__body { visibility: visible; opacity: 1; }

/* ---------- フィナーレ ---------- */
.hitohira-finale {
  min-height: 212svh;
  position: relative;
  z-index: 4;
  background: var(--hit-night);
  color: var(--hit-ivory);
}
.has-3d .hitohira-finale { background: rgba(10, 17, 22, .34); }
.hitohira-finale__gather {
  min-height: 100svh;
  position: relative;
  display: grid;
  place-items: center;
  align-content: center;
  gap: clamp(36px, 7vh, 72px);
  overflow: hidden;
  background:
    radial-gradient(52% 58% at 50% 48%, rgba(40, 58, 65, .24), transparent 76%),
    rgba(5, 10, 14, .18);
}
.hitohira-finale__gather-mark {
  display: grid;
  justify-items: center;
  font-family: var(--font-display);
  line-height: 1;
  color: var(--hit-ivory);
  transition: opacity .35s ease;
}
.hitohira-finale__gather-mark span {
  font-size: clamp(.9rem, 1.6vw, 1.35rem);
  letter-spacing: .54em;
  padding-left: .54em;
}
.hitohira-finale__gather-mark strong {
  margin-top: .3em;
  font-size: clamp(3rem, 7.2vw, 7.2rem);
  font-weight: 500;
  letter-spacing: .18em;
  padding-left: .18em;
}
.hitohira-finale__gather-mark {
  filter: drop-shadow(0 16px 44px rgba(0, 0, 0, .55));
}
.hitohira-finale__gather > p {
  position: absolute;
  inset: clamp(58px, 10vh, 98px) var(--pad) auto;
  margin: 0;
  text-align: center;
  font-family: var(--font-display);
  font-size: clamp(1rem, 1.55vw, 1.3rem);
  letter-spacing: .08em;
  color: rgba(244, 239, 230, .62);
}
.hitohira-finale__panel {
  min-height: 112svh;
  position: relative;
  display: grid;
  align-items: center;
  overflow: hidden;
}
.hitohira-finale__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: .9;
}
.has-3d .hitohira-finale__image { opacity: .68; }
.hitohira-finale__veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(5, 10, 14, .96) 0%, rgba(5, 10, 14, .78) 38%, rgba(5, 10, 14, .12) 72%),
    linear-gradient(0deg, rgba(5, 10, 14, .66), transparent 48%);
}
.hitohira-finale__content {
  position: relative;
  z-index: 2;
  /* .bs-container のパディングが内側に効くので、その分を見込んで広く取る。
     1行目「散らばった今日を、」9字がひと息で入る幅（実測888px＋余裕） */
  width: min(1060px, 94vw);
  margin-left: 0;
  padding-top: clamp(120px, 18vh, 190px);
  padding-bottom: clamp(120px, 18vh, 190px);
}
.hitohira-finale__content h2 {
  margin: clamp(20px, 3vh, 34px) 0 clamp(26px, 4vh, 50px);
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 6.2vw, 6.5rem);
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: .02em;
}
.hitohira-finale__content > p:not(.bs-meta) {
  margin: 0;
  max-width: 42rem;
  font-size: clamp(.96rem, 1.15vw, 1.1rem);
  line-height: 2;
  color: rgba(244, 239, 230, .78);
}
.hitohira-finale__button {
  margin-top: clamp(34px, 5vh, 58px);
  background: var(--hit-paper);
  border-color: var(--hit-paper);
  color: var(--hit-ink);
}
.hitohira-finale__content small {
  display: block;
  margin-top: 1rem;
  font-size: .72rem;
  letter-spacing: .08em;
  color: rgba(244, 239, 230, .55);
}

/* ---------- フッター ---------- */
.hitohira-footer {
  position: relative;
  z-index: 5;
  padding: clamp(80px, 12vh, 150px) 0 clamp(36px, 5vh, 58px);
  background: #070D11;
  color: var(--hit-ivory);
}
.hitohira-footer__mark {
  display: grid;
  justify-items: start;
  width: max-content;
  font-family: var(--font-display);
  line-height: 1;
}
.hitohira-footer__mark span {
  font-size: .82rem;
  letter-spacing: .44em;
  padding-left: .44em;
}
.hitohira-footer__mark strong {
  margin-top: .34em;
  font-size: clamp(2.4rem, 5vw, 5.2rem);
  font-weight: 500;
  letter-spacing: .16em;
  padding-left: .16em;
}
.hitohira-footer__notice {
  width: min(760px, 100%);
  margin: clamp(50px, 8vh, 90px) 0;
  font-size: clamp(.83rem, .96vw, .94rem);
  line-height: 2;
  color: rgba(244, 239, 230, .66);
}
.hitohira-footer__notice strong {
  color: var(--hit-ivory);
  font-weight: 500;
}
.hitohira-footer__bottom {
  padding-top: 1.4rem;
  border-top: 1px solid rgba(244, 239, 230, .15);
  display: flex;
  justify-content: space-between;
  gap: 1.4rem;
  font-size: .64rem;
  letter-spacing: .16em;
  color: rgba(244, 239, 230, .43);
}

/* ---------- 3本線メニュー ----------
   どの地色の上でも読めるよう、夜色のチップに載せる（章の色に依存させない） */
.hitohira-burger {
  position: fixed;
  top: clamp(14px, 2vw, 26px);
  right: clamp(14px, 2vw, 26px);
  z-index: 260;
  display: grid;
  place-content: center;
  gap: 5px;
  width: 52px;
  height: 52px;
  border-radius: 999px;
  background: rgba(10, 17, 22, .58);
  backdrop-filter: blur(8px);
  box-shadow: 0 8px 26px rgba(0, 0, 0, .28);
  cursor: pointer;
}
.hitohira-burger span {
  display: block;
  width: 20px;
  height: 1.5px;
  background: var(--hit-ivory);
  transition: transform .35s var(--ease), opacity .35s var(--ease);
}
.is-menu-open .hitohira-burger span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.is-menu-open .hitohira-burger span:nth-child(2) { opacity: 0; }
.is-menu-open .hitohira-burger span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

.hitohira-menu {
  position: fixed;
  inset: 0;
  z-index: 250;
  display: grid;
  justify-items: end;
  background: rgba(5, 10, 14, .55);
  opacity: 0;
  visibility: hidden;
  transition: opacity .45s var(--ease), visibility .45s;
}
.is-menu-open .hitohira-menu {
  opacity: 1;
  visibility: visible;
}
.hitohira-menu__panel {
  position: relative;
  width: min(440px, 92vw);
  height: 100%;
  padding: clamp(90px, 16vh, 150px) clamp(30px, 4vw, 56px) clamp(30px, 6vh, 60px);
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(90% 60% at 80% 8%, rgba(23, 38, 46, .9), transparent 70%),
    radial-gradient(70% 50% at 15% 90%, rgba(183, 120, 70, .14), transparent 70%),
    #0A1116;
  box-shadow: -30px 0 80px rgba(0, 0, 0, .35);
  transform: translateX(24px);
  transition: transform .45s var(--ease);
}
.is-menu-open .hitohira-menu__panel { transform: none; }
.hitohira-menu ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: clamp(18px, 3.4vh, 30px);
}
.hitohira-menu ul a {
  display: grid;
  gap: .35em;
  color: var(--hit-ivory);
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 1.7vw, 1.55rem);
  letter-spacing: .06em;
  transition: color .3s var(--ease);
}
.hitohira-menu ul a span {
  font-family: var(--font-ui);
  font-size: .62rem;
  letter-spacing: .3em;
  color: rgba(244, 239, 230, .45);
}
.hitohira-menu ul a:hover { color: var(--hit-amber); }
.hitohira-menu__privacy {
  margin-top: auto;
  padding-top: 2rem;
  font-size: .8rem;
  letter-spacing: .1em;
  color: rgba(244, 239, 230, .55);
}
.hitohira-menu__privacy:hover { color: var(--hit-ivory); }
html.is-menu-open,
html.is-menu-open body { overflow: clip; }

/* ---------- フッターメニュー ---------- */
.hitohira-footer__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2.2rem;
  margin: clamp(44px, 7vh, 80px) 0 clamp(36px, 6vh, 64px);
}
.hitohira-footer__nav a {
  font-size: clamp(.85rem, .98vw, .95rem);
  letter-spacing: .08em;
  color: rgba(244, 239, 230, .78);
  transition: color .3s var(--ease);
}
.hitohira-footer__nav a:hover { color: var(--hit-amber); }

/* ---------- サウンドボックス（ラジカセ） ----------
   brand.css の .bs-sound（EQバー型）を、生成したラジカセ画像のボタンに差し替える。
   クリックで静かなピアノがON/OFF（自動再生なし・配線は bs-core.js のまま）。 */
.bs-sound.hitohira-radio {
  position: fixed;
  right: clamp(14px, 2vw, 32px);
  bottom: clamp(14px, 2.6vh, 32px);
  z-index: 110;
  display: block;
  width: clamp(96px, 9.5vw, 150px);
  height: auto;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  filter: drop-shadow(0 16px 26px rgba(0, 0, 0, .5));
  transition: transform .4s var(--ease), filter .4s var(--ease);
}
.bs-sound.hitohira-radio:hover { transform: translateY(-3px); }
/* brand.css の EQ バー（span を棒にする指定）を打ち消す */
.bs-sound.hitohira-radio span {
  width: auto;
  height: auto;
  background: none;
  animation: none !important;
}
.bs-sound.hitohira-radio img {
  display: block;
  width: 100%;
  height: auto;
}
.bs-sound.hitohira-radio.is-on img {
  animation: hit-radio-sway 2.6s ease-in-out infinite;
  transform-origin: 50% 88%;
}
@keyframes hit-radio-sway {
  0%, 100% { rotate: -1.1deg; }
  50% { rotate: 1.1deg; }
}
.hitohira-radio__hint {
  position: absolute;
  left: 50%;
  top: -1.9em;
  translate: -50%;
  font-size: .68rem;
  letter-spacing: .16em;
  white-space: nowrap;
  color: rgba(244, 239, 230, .82);
  text-shadow: 0 2px 10px rgba(0, 0, 0, .5);
}
.hitohira-radio__hint--on { display: none; }
.bs-sound.hitohira-radio.is-on .hitohira-radio__hint--off { display: none; }
.bs-sound.hitohira-radio.is-on .hitohira-radio__hint--on { display: block; }
:root[data-chapter="day"] .hitohira-radio__hint {
  color: rgba(27, 24, 21, .66);
  text-shadow: none;
}
/* 再生中だけ、スピーカーから音符がのぼる */
.hitohira-radio__notes {
  position: absolute;
  left: 12%;
  top: 8%;
  pointer-events: none;
  opacity: 0;
  color: var(--hit-amber);
  font-size: .95rem;
}
.bs-sound.hitohira-radio.is-on .hitohira-radio__notes { opacity: 1; }
.hitohira-radio__notes i {
  position: absolute;
  font-style: normal;
  opacity: 0;
  animation: hit-note-rise 3.6s linear infinite;
}
.hitohira-radio__notes i:nth-child(2) { left: 1.1em; animation-delay: 1.2s; }
.hitohira-radio__notes i:nth-child(3) { left: .4em; animation-delay: 2.4s; }
@keyframes hit-note-rise {
  0% { translate: 0 0; opacity: 0; }
  12% { opacity: .9; }
  100% { translate: .5em -2.6em; opacity: 0; }
}
/* 入口の幕の間と、JSが死んでいる（クリックが効かない）ときは出さない。
   固定ページは hitohira-radio.js が has-radio を立てて配線する */
.is-locked .bs-sound.hitohira-radio { display: none; }
html:not(.has-js):not(.has-radio) .bs-sound.hitohira-radio { display: none; }
@media (prefers-reduced-motion: reduce) {
  .bs-sound.hitohira-radio.is-on img,
  .hitohira-radio__notes i { animation: none !important; }
}

/* タッチ幅では常駐CTAを使うため、PC向けの追従カーソルは重ねない。 */
@media (max-width: 980px) {
  body.has-cursor .bs-cursor { display: none !important; }
  body.has-cursor,
  body.has-cursor * { cursor: auto; }
  body.has-cursor a,
  body.has-cursor button { cursor: pointer; }
  body.has-cursor input,
  body.has-cursor textarea,
  body.has-cursor select { cursor: text; }
}

/* ---------- モバイル ---------- */
@media (max-width: 980px) {
  /* 常駐CTA（dock）が下端を使うので、ラジカセはその上へ退避して小さく */
  .bs-sound.hitohira-radio {
    width: 84px;
    right: 12px;
    bottom: calc(96px + env(safe-area-inset-bottom, 0px));
  }
  .hitohira-radio__hint { font-size: .6rem; }
  /* dock＋ラジカセのぶん、フッターの最終行が隠れない席を空ける */
  .hitohira-footer {
    padding-bottom: calc(180px + env(safe-area-inset-bottom, 0px));
  }
}
@media (max-width: 900px) {
  .bs-header__nav .bs-header__link { display: none; }
  .bs-header__nav { display: flex; }
  .bs-header .bs-btn { padding-inline: 1rem; }
  .hitohira-static-mark {
    inset: 38% auto auto 50%;
    translate: -50% -50%;
    width: 88vw;
    opacity: .42;
  }
  .hitohira-night .bs-beat--short { min-height: 66svh; }
  .hitohira-night .bs-beat--right {
    place-items: center start;
    text-align: left;
  }
  .hitohira-grid,
  .hitohira-message__grid {
    grid-template-columns: 1fr;
  }
  .hitohira-grid { gap: clamp(70px, 11vh, 110px); }
  .hitohira-photo { margin-inline: 7vw 2vw; }
  .hitohira-photo::before { left: -7vw; }
  .hitohira-story {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
  }
  .hitohira-story--image-right .hitohira-story__copy,
  .hitohira-story--image-right .hitohira-story__photo,
  .hitohira-story--image-left .hitohira-story__copy,
  .hitohira-story--image-left .hitohira-story__photo {
    grid-column: 1;
    grid-row: auto;
    margin: 0;
  }
  .hitohira-story__copy {
    width: 92%;
    margin: -5vw 0 0 auto !important;
    order: 2;
  }
  .hitohira-story__photo { order: 1; }
  .hitohira-story--family .hitohira-story__copy {
    width: 92%;
    margin-bottom: -4vw !important;
  }
  .hitohira-steps {
    grid-template-columns: 1fr;
  }
  .hitohira-steps article {
    min-height: 0;
    border-right: 0;
    border-bottom: 1px solid var(--hit-line);
  }
  .hitohira-steps article:last-child { border-bottom: 0; }
  .hitohira-message__body { padding-top: 0; }
  .hitohira-finale__image { object-position: 66% center; }
  .hitohira-finale__veil {
    background:
      linear-gradient(180deg, rgba(5,10,14,.96) 0%, rgba(5,10,14,.78) 56%, rgba(5,10,14,.5) 100%);
  }
  .hitohira-finale__content {
    align-self: start;
    padding-top: 16svh;
  }
  .hitohira-footer__bottom {
    flex-direction: column;
  }
}

@media (max-width: 560px) {
  .bs-header { padding-inline: 18px; }
  .bs-header__logo--text strong { font-size: .92rem; }
  .bs-header .bs-btn { font-size: .7rem; }
  .bs-beat { padding-inline: 22px; }
  .bs-beat--left > *,
  .bs-beat--right > * { max-width: 86vw; }
  .hitohira-dom-mark strong { font-size: clamp(2.7rem, 15vw, 4.6rem); }
  .hitohira-h2 br,
  .hitohira-story__copy h3 br { display: none; }
  .hitohira-section { padding-block: clamp(90px, 13vh, 140px); }
  .hitohira-photo::after { display: none; }
  .hitohira-story { margin-bottom: clamp(90px, 14vh, 150px); }
  .hitohira-story__copy { padding: 26px 22px; }
  .hitohira-family-photo img {
    aspect-ratio: auto;
    object-fit: contain;
    object-position: center;
  }
  .hitohira-finale__content h2 {
    /* 狭幅は「散らばった／今日を、／一枚に。」の3行積みで受ける（文節割れ） */
    font-size: clamp(2.3rem, 11vw, 4.6rem);
  }
  .hitohira-finale__content > p:not(.bs-meta) br { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
  .hitohira-static-mark { opacity: .64; }
  .hitohira-photo__glint { display: none; }
}

/* WebGL非対応時だけ家族写真を代役に。通常の3Dでは重複取得しない。 */
html.no-3d .bs-stage{background:linear-gradient(rgba(12,15,16,.72),rgba(12,15,16,.86)),url('../img/family-portrait.jpg') center/cover no-repeat;}
