/* ==========================================================
   2026-11 公開前の修正（元ファイルは触らず、ここで上書き）
   ========================================================== */

/* --- History上部の空白 ---
   書き順アニメ用に取っていた「とどまる余白」を短くする */
.history-opening::after {
  height: clamp(80px, 18vh, 200px);
  height: clamp(80px, 18svh, 200px);
}
.kakemono[data-scroll-stage] .history[data-history-art="5"] .history-art {
  margin-bottom: clamp(24px, 3vw, 48px);
}
.history-opening { margin-bottom: clamp(24px, 3vw, 48px); }
@media (max-width: 790px) {
  .history-opening::after {
    height: clamp(60px, 14vh, 160px);
    height: clamp(60px, 14svh, 160px);
  }
}

/* --- Messageの動画：標準プレーヤーをやめて簡易操作に --- */
.gallery .message-film-frame.mf-frame { position: relative; }
.gallery .message-film .mf-frame video { cursor: pointer; }
.mf-controls {
  position: absolute;
  right: clamp(8px, .85vw, 12px);
  bottom: 0;
  display: flex;
  gap: 2px;
  padding: 6px;
  opacity: .82;
  transition: opacity .2s;
}
.mf-frame:hover .mf-controls,
.mf-controls:focus-within { opacity: 1; }
.mf-controls button {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgb(18 17 20 / .55);
  color: #e9e4dc;
  cursor: pointer;
  transition: background .18s, color .18s;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}
.mf-controls button:hover { background: rgb(18 17 20 / .8); color: #fff; }
.mf-controls button:focus-visible { outline: 1px solid #f3efe9; outline-offset: 2px; }
.mf-controls svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.mf-controls svg path:first-child { fill: currentColor; stroke: none; }
.mf-frame.is-muted .mf-waves,
.mf-frame:not(.is-muted) .mf-muted { display: none; }
.mf-icon-play { width: 0; height: 0; margin-left: 3px; border-block: 7px solid transparent; border-left: 11px solid currentColor; }
.mf-icon-pause { width: 10px; height: 13px; border-inline: 3.5px solid currentColor; }
.mf-frame.is-playing .mf-icon-play,
.mf-frame:not(.is-playing) .mf-icon-pause { display: none; }

/* --- フッター下の余白 ---
   Contactの枠に「画面の1.3倍の高さ」が指定されていて、フッターの下が空いていたので解除 */
.gallery .fixed-scene.contact > .frame,
.gallery .fixed-scene.contact > .frame { min-block-size: auto; }
.gallery .fixed-scene.contact > .frame { padding-block-end: clamp(28px, 3vw, 44px); }
@media (max-width: 790px) {
  .gallery .fixed-scene.contact > .frame { min-block-size: auto; padding-block-end: 28px; }
}

/* ==========================================================
   アニメーションの仕上げ
   ========================================================== */

/* --- ヒーロー：筆文字ロゴが砂から集まったあとに、KENSHIN と「代表作を見る」を順に出す（初回表示のみ） --- */
@media (prefers-reduced-motion: no-preference) {
  .hero .artist-roman {
    animation: fx-rise .9s cubic-bezier(.2, .7, .2, 1) 2.05s both;
  }
  .hero .hero-action {
    animation: fx-rise .9s cubic-bezier(.2, .7, .2, 1) 2.35s both;
  }
  .hero .hero-video-controls {
    animation: fx-fade 1s ease 2.6s both;
  }
}
@keyframes fx-rise {
  from { opacity: 0; transform: translateY(10px); filter: blur(4px); }
  to { opacity: 1; transform: none; filter: none; }
}
@keyframes fx-fade { from { opacity: 0; } to { opacity: 1; } }

/* --- 見出しの煙：和紙・明るい背景の上では白い煙が浮くので、墨の煙に反転 --- */
#works-title .title-smoke-canvas,
#news-title .title-smoke-canvas,
#career-title .title-smoke-canvas,
#contact-title .title-smoke-canvas {
  filter: invert(1) sepia(.35) saturate(.6);
  mix-blend-mode: multiply;
}
