/* Earth Family 共通の「画面の動き」（見た目と動きのみ。ef-motion.js とセット） */

/* 虹の航路線：読んだ位置を上端の虹の線で示す */
.efx-route{position:fixed;top:0;left:0;right:0;z-index:2147483000;height:3px;pointer-events:none;background:linear-gradient(90deg,#F26B5B 0%,#F7A24B 20%,#F7C948 40%,#8CCF7E 60%,#56BCEB 80%,#8E7CC3 100%);transform-origin:0 50%;transform:scaleX(0);will-change:transform;opacity:.95}
/* 対応ブラウザ：スクロールに合わせて、ブラウザ自身が線を伸ばす（スクリプト不要で、いちばん軽い） */
@supports (animation-timeline:scroll()){
  html.efx-route-css .efx-route{animation:efx-route-grow linear both;animation-timeline:scroll(root block)}
}
@keyframes efx-route-grow{from{transform:scaleX(0)}to{transform:scaleX(1)}}

/* ふわっと現れる表示（スクリプトが動いた時だけ隠す。動かなければ最初から全部見える） */
html.efx-on [data-efx]{transition:opacity .8s cubic-bezier(.2,.75,.25,1) var(--efx-delay,0ms),transform .8s cubic-bezier(.2,.75,.25,1) var(--efx-delay,0ms)}
html.efx-on [data-efx=""]{opacity:0;transform:translate3d(0,18px,0)}

/* 「旅の想い」ページ：スマホで数px横に揺れるのを止める（元からあったはみ出しの修正。見た目は同じ） */
:root:has(.river) body{overflow-x:clip}

/* ページの切り替えをなめらかに（対応ブラウザのみ。同じサイト内の移動） */
@media (prefers-reduced-motion:no-preference){
  @view-transition{navigation:auto}
  ::view-transition-old(root){animation:efx-vt-out .22s ease both}
  ::view-transition-new(root){animation:efx-vt-in .38s cubic-bezier(.2,.75,.25,1) both}
}
@keyframes efx-vt-out{to{opacity:0}}
@keyframes efx-vt-in{from{opacity:0;transform:translateY(10px)}}

@media (prefers-reduced-motion:reduce){
  .efx-route{transition:none}
  html.efx-on [data-efx]{opacity:1!important;transform:none!important;transition:none!important}
}
@media print{
  .efx-route{display:none}
  html.efx-on [data-efx]{opacity:1!important;transform:none!important}
}
