.hero {
    --film: #140819;
    --reel-height: clamp(420px, 45vw, 520px);
    --fh: calc(var(--reel-height) * 0.38);                                  /* コマの高さ */
    --pf: calc(var(--reel-height) * 0.044);                                 /* パーフォレーション帯 */
    --gap: calc(var(--reel-height) * 0.015);
    --fw: max(calc(var(--fh) * 16 / 9), 16vw);
    --cell: calc(var(--fw) + var(--gap));
    position: relative;
    width: 100%;
    height: var(--reel-height);
    overflow: hidden;
    isolation: isolate;
    /* フィルムの隙間と穴から覗く夕焼け */
    background: linear-gradient(100deg, #ffb86e 0%, #ff7a70 26%, #ef4f93 50%, #8a3fb8 76%, #34155f 100%);
    color: #fff4e6;
    font-family: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Yu Gothic", "Noto Sans JP", "Noto Sans CJK JP", system-ui, sans-serif;
  }


  /* ── フィルムストリップ ───────────────────────── */
  .reel {
    position: absolute; inset: 0;
    display: flex; flex-direction: column; justify-content: center;
    gap: calc(var(--reel-height) * 0.03);
    transform: rotate(-4deg) scale(1.1);
  }
  .strip { position: relative; flex: none; height: calc(var(--fh) + var(--pf) * 2); }
  .strip::before {               /* 帯の落ち影 */
    content: ""; position: absolute; top: 0; bottom: 0; left: -30vw; right: -30vw;
    box-shadow: 0 calc(var(--reel-height) * 0.016) calc(var(--reel-height) * 0.04) rgba(40, 8, 50, .45);
    pointer-events: none;
  }
  .strip--c { display: none; }

  .track {
    position: absolute; top: 0; left: calc(var(--cell) * -1.5);
    width: calc(var(--cell) * 12); height: 100%;
    display: flex; gap: var(--gap);
    padding: var(--pf) 0;
    background: linear-gradient(var(--film), var(--film)) 0 50% / 100% calc(100% - var(--pf) * 2 + 2px) no-repeat;
    will-change: transform;
  }
  .strip--a .track { animation: run 32s linear infinite; }
  .strip--b .track { animation: run 42s linear infinite reverse; }
  .strip--c .track { animation: run 37s linear -12s infinite; }
  @keyframes run {
    from { transform: translate3d(0, 0, 0); }
    to   { transform: translate3d(calc(var(--cell) * -3), 0, 0); }
  }

  .frame { position: relative; flex: 0 0 var(--fw); min-width: 0; height: var(--fh); margin: 0; }
  .frame picture, .frame img { display: block; width: 100%; height: 100%; }
  .frame img { object-fit: cover; border-radius: 2px; }
  /* コマごとの穴あき帯（穴は透過して夕焼けが見える） */
  .frame::before, .frame::after {
    content: ""; position: absolute;
    left: calc(var(--gap) * -.5); width: calc(var(--cell) + 1px); height: var(--pf);
    background:
      linear-gradient(var(--film), var(--film)) 0 0 / 100% 27% no-repeat,
      linear-gradient(var(--film), var(--film)) 0 100% / 100% 27% no-repeat,
      linear-gradient(90deg, var(--film) 0 30%, transparent 30% 70%, var(--film) 70% 100%) 0 50% / 10% 52% repeat-x;
  }
  .frame::before { bottom: 100%; }
  .frame::after { top: 100%; }

  /* ── 光漏れ ───────────────────────── */
  .leak {
    position: absolute; top: -10%; bottom: -10%; left: 0; width: 200%;
    pointer-events: none; mix-blend-mode: screen;
    background: linear-gradient(100deg,
      rgba(255, 150, 80, 0) 0%, rgba(255, 150, 80, 0) 30%,
      rgba(255, 150, 80, .34) 42%, rgba(255, 84, 140, .22) 52%,
      rgba(255, 84, 140, 0) 66%, rgba(255, 84, 140, 0) 100%) 0 0 / 50% 100% repeat-x;
    will-change: transform;
    animation: leak 16s linear -5s infinite;
  }
  @keyframes leak {
    from { transform: translate3d(-50%, 0, 0); }
    to   { transform: translate3d(0, 0, 0); }
  }

  .shade {
    position: absolute; inset: 0; pointer-events: none;
    background:
      linear-gradient(90deg, rgba(11,13,20,.97), rgba(11,13,20,.90) 22%, rgba(11,13,20,.43) 49%, transparent 78%);
  }
  .grain {
    position: absolute; inset: 0; display: block; width: 100%; height: 100%;
    opacity: .15; mix-blend-mode: overlay;
  }

  .frame video { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 2px; }

  .panel {
    position: absolute;
    inset: 0;
    display: grid;
    align-items: center;
    padding: 18px 8.5vw;
    pointer-events: none;
  }
  .title {
    margin: 0;
    color: #f3ebdd;
    font: 500 1rem/1 "Hiragino Mincho ProN", "Yu Mincho", YuMincho, "Noto Serif JP", serif;
    writing-mode: horizontal-tb;
  }
  .title-name {
    display: block;
    font: 400 clamp(4rem, 10.5vw, 9.5rem)/1 Baskerville, "Times New Roman", serif;
    letter-spacing: -.05em;
    white-space: nowrap;
  }
  .title-name .roman { margin-inline-start: -.04em; }
  .title-sub {
    display: block;
    font-size: clamp(18px, 1.85vw, 28px);
    line-height: 1.55;
    letter-spacing: .12em;
    white-space: nowrap;
  }
  .title-sub::before {
    display: block;
    content: "";
    width: clamp(32px, 4vw, 64px);
    height: 1px;
    margin-block: clamp(14px, 1.9vw, 24px) 10px;
    background: #c8ac80;
  }

  /* ── スマホ：コマを小さくして3段に ───────────────────────── */
  @media (max-width: 639px) {
    .hero {
      --reel-height: clamp(310px, 96vw, 420px);
      --fh: calc(var(--reel-height) * 0.255);
      --pf: calc(var(--reel-height) * 0.032);
      --gap: calc(var(--reel-height) * 0.012);
    }
    .strip--a .track { animation-duration: 24s; }
    .strip--b .track { animation-duration: 30s; }
    .strip--c .track { animation-duration: 27s; }
    .reel { gap: calc(var(--reel-height) * 0.022); transform: rotate(-4deg) scale(1.06); }
    .strip--c { display: block; }
    .shade { background: linear-gradient(0deg, rgba(11,13,20,.97), rgba(11,13,20,.84) 33%, rgba(11,13,20,.28) 61%, transparent 85%); }
    .panel { align-items: end; padding: 20px 7vw 8vw; }
    .title-name { font-size: clamp(62px, 19vw, 92px); }
    .title-sub { font-size: clamp(17px, 5.4vw, 24px); line-height: 1.35; }
    .title-sub::before { margin-block: 10px 8px; }
    .title-sub span { display: block; }
  }
  @media (prefers-reduced-motion: reduce) {
    .track, .leak { animation-play-state: paused !important; }
  }
