/* ══ v17r3: ホームモーション ── scroll-driven animations（道の演出なし・扉と表紙のみ） ══
   方針: 完成状態がデフォルト。@supports(animation-timeline:view()) の中でだけ動きを重ねる。
   reduced-motion では全停止。Firefox安定版(未対応)では v16 の静的完成形がそのまま出る。 */

/* 通過した駅: ひと呼吸の波紋 */
@media (prefers-reduced-motion:no-preference){
  .goro-arc__item.is-passed::after{animation:v17DotPop .55s var(--ease)}
}
@keyframes v17DotPop{
  0%{box-shadow:0 0 0 0 rgba(11,125,163,.35)}
  70%{box-shadow:0 0 0 9px rgba(11,125,163,0)}
  100%{box-shadow:0 0 0 0 rgba(11,125,163,0)}
}

/* ── アンカー移動はなめらかに ── */
@media (prefers-reduced-motion:no-preference){
  html{scroll-behavior:smooth}
}

/* ── 表紙: 登場（@starting-style）・呼吸・見送り ── */
@media (prefers-reduced-motion:no-preference){
  .cover__art,.cover__title,.cover__tag,.cover__enter{
    transition:opacity .8s var(--ease),translate .8s var(--ease)}
  .cover__title{transition-delay:.1s}
  .cover__tag{transition-delay:.2s}
  .cover__enter{transition-delay:.32s}
  @starting-style{
    .cover__art,.cover__title,.cover__tag,.cover__enter{opacity:0;translate:0 16px}
  }
  .cover__art{animation:v17Float 7s ease-in-out infinite}
}
@keyframes v17Float{
  0%,100%{transform:translateY(0)}
  50%{transform:translateY(-8px)}
}
@supports (animation-timeline: view()){
  @media (prefers-reduced-motion:no-preference){
    .cover__inner{animation:v17CoverExit linear both;
      animation-timeline:view();animation-range:exit 15% exit 95%}
  }
}
@keyframes v17CoverExit{
  to{opacity:.2;transform:translateY(-26px) scale(.985)}
}

/* ── スクロールに連動して、扉がひらく（scrub・巻き戻し可） ── */
.goro-arc__title{--v17-ls:.08em}
@media (max-width:680px){.goro-arc__title{--v17-ls:.06em}}
@supports (animation-timeline: view()){
  @media (prefers-reduced-motion:no-preference){

    /* v16までの一括フェード入場は無効化（scrubに一本化）。JSのinline delayも殺す */
    .goro-arc:not(.goro-arc--shown) .goro-arc__item,
    .goro-arc.goro-arc--shown .goro-arc__item{
      opacity:1;transform:none;transition:none;transition-delay:0s!important}

    .goro-arc__head .goro-arc__label{animation:v17Fade linear both;
      animation-timeline:view();animation-range:entry 0% entry 45%}
    .goro-arc__head .goro-arc__h{animation:v17Rise linear both;
      animation-timeline:view();animation-range:entry 0% entry 55%}
    .goro-arc__head .goro-arc__lead{animation:v17Rise linear both;
      animation-timeline:view();animation-range:entry 5% entry 65%}

    .goro-arc__item .goro-arc__img{animation:v17Img linear both;
      animation-timeline:view();animation-range:entry 5% entry 55%}
    .goro-arc__idx{animation:v17Rise linear both;
      animation-timeline:view();animation-range:entry 10% entry 55%}
    .goro-arc__title{animation:v17Door linear both;
      animation-timeline:view();animation-range:entry 14% entry 62%}
    .goro-arc__line{animation:v17Rise linear both;
      animation-timeline:view();animation-range:entry 20% entry 72%}
    .goro-arc__item .goro-arc__zone{animation:v17Fade linear both;
      animation-timeline:view();animation-range:entry 26% entry 82%}
    .goro-arc__item .goro-arc__day2{animation:v17Fade linear both;
      animation-timeline:view();animation-range:entry 30% entry 88%}

    /* はじめに: 約束の行が順にあらわれる */
    .intro-note__inner > *{animation:v17Rise linear both;animation-timeline:view()}
    .intro-note__inner > :nth-child(1){animation-range:entry 0% entry 50%}
    .intro-note__inner > :nth-child(2){animation-range:entry 6% entry 56%}
    .intro-note__inner > :nth-child(3){animation-range:entry 12% entry 62%}
    .intro-note__inner > :nth-child(4){animation-range:entry 18% entry 68%}
    .intro-note__inner > :nth-child(5){animation-range:entry 24% entry 74%}
    .intro-note__inner > :nth-child(6){animation-range:entry 30% entry 80%}
    .intro-note__inner > :nth-child(7){animation-range:entry 36% entry 86%}

    /* 枕元の棚と結び */
    .goro-arc__bed{animation:v17Fade linear both;
      animation-timeline:view();animation-range:entry 0% entry 60%}
    .goro-arc__foot{animation:v17Fade linear both;
      animation-timeline:view();animation-range:entry 0% entry 70%}
  }
}
@keyframes v17Img{
  from{opacity:0;transform:translateY(30px) scale(.94)}
  to{opacity:1;transform:translateY(0) scale(1)}
}
@keyframes v17Door{
  from{opacity:0;transform:translateY(16px);letter-spacing:.2em}
  to{opacity:1;transform:translateY(0);letter-spacing:var(--v17-ls,.08em)}
}
@keyframes v17Rise{
  from{opacity:0;transform:translateY(14px)}
  to{opacity:1;transform:translateY(0)}
}
@keyframes v17Fade{
  from{opacity:0}
  to{opacity:1}
}

/* ── ホバーの気配（色のみ・要素は動かさない: カーソル境界の振動防止） ── */
@media (hover:hover){
  .intro-note__more,.goro-arc__day2 .d2__a,.goro-arc__bed-row .bed__a{
    transition:color .16s var(--ease),border-color .16s var(--ease)}
}
