#movie-wrapper {
  min-height: 100vh;
  min-width: 100vw;
  padding: 0;
}

#movie-wrapper .frame {
  position: relative !important;
  padding-bottom: 56.25% !important;
  height: 0 !important;
  min-height: 100vh;
  min-width: 100vw;
}

#movie-wrapper .frame iframe {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  min-width: 100% !important;
  min-height: 100% !important;
  width: auto !important;
  height: auto !important;
}

/*
  トップのオープニング（2026-12-04）
  文字と星は、JS を待たずに画面に描かれた瞬間から動き出す。
  終わりの切り替え（._c2 のフェード、._c1 の白い画面）は inline.css の transition のまま。
*/
@keyframes fs-opening-text {
  from {
    opacity: 0;
    translate: 0 16px;
  }
  to {
    opacity: 1;
    translate: 0 0;
  }
}

@keyframes fs-opening-star {
  from {
    opacity: 0;
    translate: 30px 30px;
  }
  to {
    opacity: 1;
    translate: 0 0;
  }
}

._c1 ._c240,
._c1 ._c241 {
  animation: fs-opening-text 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}

._c1 ._c241 {
  animation-delay: 0.1s;
}

._c1 ._c5,
._c1 ._c6,
._c1 ._c7,
._c1 ._c8,
._c1 ._c9 {
  animation: fs-opening-star 0.9s cubic-bezier(0.22, 1, 0.36, 1) both;
}

._c1 ._c5 { animation-delay: 0.25s; }
._c1 ._c6 { animation-delay: 0.33s; }
._c1 ._c7 { animation-delay: 0.41s; }
._c1 ._c8 { animation-delay: 0.49s; }
._c1 ._c9 { animation-delay: 0.57s; }

/* T-1 ここから：オープニング（コピー → 5色の星が1つずつ開く → 一呼吸 → 星がロゴの星へまとまる） */
/*
  流れ（初回・PC/SP 共通。2026-12-04 に利用者の指示で全体を1.5倍に伸ばした）：
  コピーがその場でさっと出る 0〜0.45秒
  → 星が1つずつ開く 0.45〜2.55秒
  → 一呼吸 2.55〜3.15秒
  → 星がロゴの星へ飛ぶ 3.15〜4.2秒（飛びながら透明になる）。同時にコピーがその場で消える 3.15〜3.75秒
  → ロゴが白い画面の上に出る 3.675秒 → 星が消えた直後から、白い画面が移動なしでフェードアウト 4.0〜4.75秒
  2回目以降（index.html の head で html に data-fs-opening="short" を付ける）は同じ順序で約1.7秒に縮める。
  星の飛び先（--t1-x / --t1-y / --t1-s）は index.html のロゴ直後のスクリプトで計る。
*/
:root {
  --t1-copy: 0.45s;
  --t1-star-at: 0.45s;
  --t1-open: 1.2s;
  --t1-step: 0.225s;
  --t1-fly-at: 3.15s;
  --t1-fly: 1.05s;
  --t1-copy-out: 0.6s;
  --t1-logo-at: 3.675s;
  --t1-logo: 0.6s;
  --t1-out-at: 4s;
  --t1-out: 0.75s;
  --t1-end: 4.75s;
}

:root[data-fs-opening="short"] {
  --t1-copy: 0.2s;
  --t1-star-at: 0.15s;
  --t1-open: 0.45s;
  --t1-step: 0.06s;
  --t1-fly-at: 1s;
  --t1-fly: 0.45s;
  --t1-copy-out: 0.3s;
  --t1-logo-at: 1.2s;
  --t1-logo: 0.4s;
  --t1-out-at: 1.35s;
  --t1-out: 0.35s;
  --t1-end: 1.7s;
}

@keyframes t1-star-open {
  from {
    opacity: 0;
    translate: 0 0;
    scale: 0;
    rotate: -144deg;
  }
  70% {
    opacity: 1;
    scale: 1.15;
  }
  to {
    opacity: 1;
    translate: 0 0;
    scale: 1;
    rotate: 0deg;
  }
}

@keyframes t1-star-fly {
  from {
    opacity: 1;
    translate: 0 0;
    scale: 1;
    rotate: 0deg;
  }
  35% {
    opacity: 1;
  }
  to {
    opacity: 0;
    translate: var(--t1-x, 0px) var(--t1-y, 0px);
    scale: var(--t1-s, 1);
    rotate: 360deg;
  }
}

@keyframes t1-logo-in {
  from {
    opacity: 0;
    scale: 1.15;
  }
  to {
    opacity: 1;
    scale: 1;
  }
}

@keyframes t1-logo-front {
  from,
  to {
    z-index: 6;
  }
}

@keyframes t1-copy-in {
  from {
    opacity: 0;
    translate: 0 0;
  }
  to {
    opacity: 1;
    translate: 0 0;
  }
}

@keyframes t1-copy-out {
  from {
    opacity: 1;
    translate: 0 0;
  }
  to {
    opacity: 0;
    translate: 0 0;
  }
}

/* 白い画面：移動なしで透明になって消える。消えたあとはクリックを邪魔しないよう visibility も hidden にする */
@keyframes t1-out {
  from {
    opacity: 1;
    scale: 1 1;
    visibility: visible;
  }
  to {
    opacity: 0;
    scale: 1 1;
    visibility: hidden;
  }
}

._c1 ._c5,
._c1 ._c6,
._c1 ._c7,
._c1 ._c8,
._c1 ._c9 {
  transition: none;
  animation:
    t1-star-open var(--t1-open) cubic-bezier(0.22, 1, 0.36, 1) calc(var(--t1-star-at) + var(--t1-d, 0s)) both,
    t1-star-fly var(--t1-fly) cubic-bezier(0.4, 0, 0.2, 1) var(--t1-fly-at) forwards;
}

._c1 ._c5 { --t1-d: 0s; }
._c1 ._c6 { --t1-d: var(--t1-step); }
._c1 ._c7 { --t1-d: calc(var(--t1-step) * 2); }
._c1 ._c8 { --t1-d: calc(var(--t1-step) * 3); }
._c1 ._c9 { --t1-d: calc(var(--t1-step) * 4); }

/* コピー：移動なしで、出るのも消えるのも透明度だけ */
._c1 ._c240,
._c1 ._c241 {
  transition: none;
  animation:
    t1-copy-in var(--t1-copy) cubic-bezier(0.4, 0, 0.2, 1) 0s both,
    t1-copy-out var(--t1-copy-out) cubic-bezier(0.4, 0, 0.2, 1) var(--t1-fly-at) forwards;
}

._c2 {
  transition: none;
  opacity: 1;
}

._c1 {
  transition: none;
  animation: t1-out var(--t1-out) cubic-bezier(0.4, 0, 0.2, 1) var(--t1-out-at) both;
}

._c44 {
  animation: t1-logo-front var(--t1-end) linear;
}

._c44 ._c78 {
  transform-origin: 10.25% 50%;
  animation: t1-logo-in var(--t1-logo) cubic-bezier(0.22, 1, 0.36, 1) var(--t1-logo-at) both;
}
/* T-1 ここまで */
