/*
  ROCX ランディングページの見た目。

  - 最初の画面は中央寄せ: 見出し → バッジ → 端末 (ホーム画面から始めて、 画面が順に切り替わる)。 締めも同じ形で対にする
  - その間は、 文と画面が左右に入れ替わる帯。 1 帯が 1 画面ぶん
  - ページは普通に流れる (端末の固定はしない)。 端末の枠は動かさず、 うしろに光も付けない
  - 地はずっと黒。 色が変わるのは、 自己ベストでページぜんたいが青くなるときだけ
  - 英語と日本語は HTML に両方あり、 <html lang> に合うほうだけを出す

  大きさは 1 : 1.618 (と、 その平方根 1.272) で決める:
    最初の画面     = 上 38.2% に見出しとバッジ、 下 61.8% に端末がまるごと収まる
    帯の端末の高さ = 画面の高さ / 1.272
    文字の段       = 見出しから 1.272 ずつ下げる
*/

:root {
  --bg: #000;
  --fg: #fff;
  --fg-2: rgba(255, 255, 255, 0.62);
  --fg-3: rgba(255, 255, 255, 0.52);
  --line: rgba(255, 255, 255, 0.1);
  --flood: #0b3a74;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Hiragino Sans", "Hiragino Kaku Gothic ProN",
    "Noto Sans JP", "Yu Gothic UI", "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --spring: cubic-bezier(0.3, 1.45, 0.45, 1);
  --nav-h: 55px;
  --gutter: max(clamp(21px, 5vw, 55px), env(safe-area-inset-left), env(safe-area-inset-right));
  --vh: 100vh;

  /*
    最初の端末: 上 38.2% (見出しとバッジ) の下、 残りの 61.8% に上から下までまるごと収める。
    端末の画面が切り替わるので、 どの画面も全部が見えるように。
  */
  --hero-h: calc(var(--vh) * 0.618 - 34px);
  /*
    最初の見出し: 上 38.2% に、 2 行が余白つきで収まる大きさ (最初の画面は見出しと端末だけ。 バッジは置かない)。
    幅が足りない画面では、 2 行目 (--em2 文字ぶん) が画面の幅の 86% に収まる大きさで止める。
    --em2 と --em3 は、 ページの小さなスクリプトが実際の字の幅を測って入れる (なければこの既定値)。
  */
  --hero-fs: min(var(--vh) * 0.382 / 3.6, 86vw / var(--em2, 10.28), 96px);

  /* 文字の段のもと (言語で変わらないよう、 最初の見出しの幅とは切り離す) */
  --h1: min(var(--vh) * 0.0724, 8.36vw, 83px);

  /* 文字の段 */
  --h2: calc(var(--h1) / 1.272);
  --h3: calc(var(--h1) / 1.618);
  --body: clamp(16px, var(--h1) / 3.33, 21px);
  --small: clamp(14px, var(--h1) / 4.236, 17px);

  /*
    帯の端末と、 帯の中身の幅。
    中身は左から 文の列 (端末の幅の 1.618 倍) + 間 (0.236 倍) + 端末 (1 倍) = 端末の幅の 2.854 倍。
    ナビ、 棚、 横長の 1 枚、 フッターも、 この幅の両端にそろえる。
  */
  --bdev-h: min(clamp(300px, var(--vh) / 1.272, 860px), (100vw - var(--gutter) * 2) / 2.854 / 0.46);
  --bdev-w: calc(var(--bdev-h) * 0.46);
  --gap: calc(var(--bdev-w) * 0.236);
  --W: calc(var(--bdev-w) * 2.854);
}

@supports (height: 100svh) {
  :root { --vh: 100svh; }
}

*, *::before, *::after { box-sizing: border-box; }

html { background: var(--bg); -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: var(--body);
  line-height: 1.618;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  overflow-x: clip;
}

::selection { background: #0a84ff; color: #fff; }

h1, h2, h3, p, ul { margin: 0; padding: 0; }
ul { list-style: none; }
img, video, svg, canvas { display: block; }
a { color: inherit; }

/* 言語: いまの言語でないほうは出さない */
html:not([lang="ja"]) [data-l="ja"],
html[lang="ja"] [data-l="en"] { display: none !important; }

/* 読み上げだけに渡す文字 */
.vh {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* 句の途中で折り返さない (見出しと日本語の本文は、 句ごとに区切ってある) */
.ph { display: inline-block; }

/* img や video に display を付けているので、 hidden が効くように */
[hidden] { display: none !important; }

.defs { position: absolute; }

a:focus-visible,
[role="button"]:focus-visible,
.shelf:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 5px;
  border-radius: 13px;
}

.skip {
  position: fixed;
  left: var(--gutter);
  top: 13px;
  z-index: 20;
  padding: 8px 13px;
  border-radius: 13px;
  background: #fff;
  color: #000;
  font-size: 14px;
  text-decoration: none;
  transform: translateY(-89px);
}

.skip:focus { transform: none; }

/* ───────── 自己ベストの青 ───────── */

/* ページぜんたいの面。 中身はこの上に乗る。 録画が青くなるのに合わせて、 端末のところから丸く広がる */
.flood {
  position: fixed;
  inset: 0;
  z-index: 0;
  background: var(--flood);
  opacity: 0;
  clip-path: circle(0 at 50% 50%);
  pointer-events: none;
}

html.is-blue-full,
html.is-blue-full body { background-color: var(--flood); }

main, .footer { position: relative; z-index: 1; }

/* 横にはみ出したものがページを横に広げないように */
main { overflow-x: clip; }

@supports not (overflow: clip) {
  main { overflow: hidden; }
}

/* ───────── ナビ ───────── */

/* 最初の画面では出さない (見出しとバッジが真ん中にあるので)。 流れたら出る */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 10;
  height: calc(var(--nav-h) + env(safe-area-inset-top));
  padding: env(safe-area-inset-top) var(--gutter) 0;
  background: rgba(0, 0, 0, 0.8);
  -webkit-backdrop-filter: saturate(1.6) blur(21px);
  backdrop-filter: saturate(1.6) blur(21px);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity 0.3s ease, transform 0.4s var(--ease), visibility 0s 0.4s, background-color 0.3s ease;
}

.nav.is-on {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity 0.3s ease, transform 0.4s var(--ease), visibility 0s, background-color 0.3s ease;
}

/* ページが青いあいだは、 ナビの地をなくす (ぼかしも切る。 残すと、 そこだけ色が濃く出て帯に見える) */
.is-blue .nav {
  background: rgba(11, 58, 116, 0);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.nav-in {
  width: min(var(--W), 100%);
  height: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo { display: block; padding: 13px 0; }
.nav-logo svg { height: 16px; width: auto; fill: var(--fg); overflow: visible; }
.nav-get img { height: 34px; width: auto; }

/* ───────── 端末 ───────── */

/* 枠。 大きさは置き場所ごとに --dev-h で決める */
.device {
  position: relative;
  flex: none;
  height: var(--dev-h);
  aspect-ratio: 1206 / 2622;
  padding: calc(var(--dev-h) * 0.007);
  border-radius: 17.4% / 8%;
  background: #19191b;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.09);
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.screen {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 15.6% / 7.2%;
  overflow: hidden;
  background: #0a0a0a;
  /* 録画の角が丸く切れたままになるように */
  isolation: isolate;
  transform: translateZ(0);
}

.screen img,
.screen video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 録画の端末は、 押すと止まる / 続きを流す */
.device[role="button"] { cursor: pointer; -webkit-tap-highlight-color: transparent; }

/* 自動では流れないとき (動きを減らす設定、 自動再生を断られたとき) は、 押せば流れる印を出す */
.device.needs-tap::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 23.6%;
  aspect-ratio: 1;
  translate: -50% -50%;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.62)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' d='M8.5 5.6v12.8a1 1 0 0 0 1.5.86l10.6-6.4a1 1 0 0 0 0-1.72L10 4.74a1 1 0 0 0-1.5.86z'/%3E%3C/svg%3E")
    54% 50% / 44% no-repeat;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
  pointer-events: none;
}

/* ───────── 1. 最初の画面 ───────── */

/* 上 38.2% に見出しとバッジ、 その下 61.8% に端末がまるごと収まる */
.hero {
  --dev-h: var(--hero-h);
  position: relative;
  padding: 0 var(--gutter);
  text-align: center;
}

/* 流すと、 見出しは少し先に上がりながら消える */
.hero-copy,
.final-copy {
  position: relative;
  z-index: 1;
  height: calc(var(--vh) * 0.382);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  /* 締めの見出し → バッジ の間隔 */
  gap: calc(var(--hero-fs) * 0.382);
  padding-top: env(safe-area-inset-top);
}

.hero-copy {
  opacity: calc(1 - var(--hs, 0) * 1.3);
  transform: translateY(calc(var(--hs, 0) * -34px));
}

.catch,
.final-title {
  font-size: var(--hero-fs);
  font-weight: 800;
  line-height: 1.272;
  letter-spacing: -0.01em;
  font-feature-settings: "palt";
  white-space: nowrap;
}

.catch .ln { display: block; }
.catch .w { display: inline-block; }

/*
  見出しの中の「ROCX」はロゴそのもの。 1 文字ずつ押せる。
  高さ 0.729 文字ぶん = 幅が、 下の端末に映っているロゴの 1.618 倍くらい。
*/
.catch .logo {
  display: inline-block;
  height: 0.729em;
  width: auto;
  aspect-ratio: 823 / 183;
  margin-right: 0.08em;
  vertical-align: -0.03em;
  fill: currentColor;
  overflow: visible;
}

.ltr {
  transform-box: fill-box;
  transform-origin: 50% 100%;
  cursor: pointer;
}

/* Apple 公式のバッジ。 動かさず、 色も変えない */
.badge {
  display: inline-block;
  flex: none;
  border-radius: 13px;
  -webkit-tap-highlight-color: transparent;
}

.badge img {
  height: clamp(44px, var(--h1) / 1.272, 60px);
  width: auto;
  user-select: none;
  -webkit-user-drag: none;
}

.hero-device,
.final-device {
  position: relative;
  display: flex;
  justify-content: center;
}

.hero-device { padding-bottom: 34px; }

/*
  最初の画面の端末は、 ホーム画面から始めて、 記録画面 → 休憩 → グラフ → 連続記録と順に切り替わる
  (何のアプリかが最初の画面でわかるように)。 端末は動かさず、 中の画面だけを重ねて入れ替える。
  画面は言語ごとに 1 組 (.cyc) ずつある。
  2 つの画面が透けて重ならないよう、 前の画面が消えきってから次の画面を出す。
*/
/* 帯の端末 (記録画面 → 休憩、 完了 → 振り返り) も同じ入れ替え方 */
.screen .cyc { position: absolute; inset: 0; }

.screen [data-cycle] {
  opacity: 0;
  transition: opacity 0.2s ease;
}

.screen [data-cycle].is-on {
  opacity: 1;
  transition: opacity 0.35s ease 0.2s;
}

/*
  入場。
  ふつうは、 ロゴが 1 文字ずつ弾んで出て、 つづきの文字、 バッジ、 端末の順。
  .fly が付いたとき (上の小さなスクリプトが位置を測れたとき) は、 ロゴは端末の中のロゴに重なって現れ、
  そこから見出しの位置へ飛んでくる。
*/
@keyframes pop {
  from { opacity: 0; transform: translateY(34%) scale(0.4); }
  55% { opacity: 1; }
  to { opacity: 1; transform: none; }
}

@keyframes wipe {
  from { clip-path: inset(0 0 100% 0); transform: translateY(0.34em); }
  to { clip-path: inset(-0.21em -0.13em); transform: none; }
}

@keyframes from-below {
  from { opacity: 0; transform: translateY(21px); }
  to { opacity: 1; transform: none; }
}

@keyframes fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* 飛び立つ前に、 いちど沈む */
@keyframes lift {
  0% { transform: translate(var(--dx), var(--dy)) scale(var(--s)); }
  16% { transform: translate(var(--dx), var(--dy)) scale(calc(var(--s) * 1.1), calc(var(--s) * 0.84)); }
  100% { transform: none; }
}

.catch .ltr { animation: pop 0.7s var(--spring) calc(0.15s + var(--i) * 0.07s) both; }
.catch .w { animation: wipe 0.9s var(--ease) calc(0.5s + var(--i, 0) * 0.09s) both; }
.hero .device { animation: fade 0.8s ease 0.3s both; }

/* 端末はすぐ出す。 ロゴは 0.4 秒で飛び立ち、 1.6 秒ごろにはぜんぶ出そろう */
.hero.fly .catch .ltr { animation: none; }
.hero.fly .catch .logo { animation: lift 0.85s cubic-bezier(0.2, 0.8, 0.2, 1) 0.4s both, fade 0.35s ease both; }
.hero.fly .device { animation: fade 0.35s ease both; }
.hero.fly .catch .w { animation-duration: 0.7s; animation-delay: calc(0.85s + var(--i, 0) * 0.09s); }

/* ───────── 2. 帯 ───────── */

/*
  1 帯が 1 画面ぶん。 文の列 1.618 : 端末 1 で、 帯ごとに左右を入れ替える (.band--flip)。
  文のかたまりは、 どちらの帯でも端末から遠い側の端にそろえる (左の帯なら左端、 入れ替えた帯なら右端)。
*/
.band {
  --dev-h: var(--bdev-h);
  position: relative;
  min-height: var(--vh);
  display: grid;
  align-items: center;
  /* 上はナビのぶんを空ける (端末が、 ナビより下の空きの真ん中に来る) */
  padding: var(--nav-h) var(--gutter) 0;
}

.band-in {
  width: var(--W);
  max-width: 100%;
  margin: 0 auto;
  display: grid;
  grid-template-columns: calc(var(--bdev-w) * 1.618) var(--bdev-w);
  column-gap: var(--gap);
  align-items: center;
}

.band-ui { position: relative; display: flex; justify-content: center; }

.band--flip .band-in { grid-template-columns: var(--bdev-w) calc(var(--bdev-w) * 1.618); }
.band--flip .band-ui { order: -1; }
.band--flip .band-text { justify-self: end; }

/*
  端末は動かさない。 枠は平らな絵なので、 傾けたり寄せたりすると安っぽく見える。
  流れてきたときに、 その場で濃くなるだけ (--e: 0 → 1)。 動くのは中の画面。
*/
.tilt {
  position: relative;
  opacity: calc(var(--e, 1) * 1.6);
}

/* 幅は見出しの 9.4 文字ぶん (いちばん長い句が 9 文字)。 流すと少しだけ遅れて動く */
.band-text {
  width: calc(var(--h2) * 9.4);
  max-width: 100%;
  transform: translateY(calc((0.5 - var(--c, 0.5)) * 55px));
}

/* 英語の見出しは 1 行が少し長い (いちばん長い行で 9.5 文字ぶん)。 列いっぱいまで使う */
html:not([lang="ja"]) .band-text { width: calc(var(--h2) * 10.3); }

.band h2,
.more-title {
  font-size: var(--h2);
  font-weight: 700;
  line-height: 1.272;
  letter-spacing: -0.01em;
  font-feature-settings: "palt";
}

/* 帯の見出しは句ごとに 1 行 */
.band h2 .ph { display: block; width: fit-content; }

/* 本文は行の長さをならす (最後の行に 1 句だけ残らないように) */
.band p, .shot p, .wide p { line-break: strict; text-wrap: balance; }

.band p {
  margin-top: calc(var(--h2) * 0.618);
  color: var(--fg-2);
  transition: color 0.3s ease;
}

/* ページが青いあいだ: 本文を明るくし、 端末の枠も青に溶かす (数字だけがページに浮く) */
.is-blue .band p { color: rgba(255, 255, 255, 0.86); }
.is-blue [data-pb] .device { background: var(--flood); box-shadow: none; }

/* ───────── 続けるための工夫 ───────── */

/* ここから先の帯の前置き。 帯の見出しと同じ大きさで、 真ん中に置く */
.keep {
  padding: 144px var(--gutter) 0;
  text-align: center;
}

.keep-title {
  font-size: var(--h2);
  font-weight: 700;
  line-height: 1.272;
  letter-spacing: -0.01em;
  font-feature-settings: "palt";
}

.keep-title .ph { display: block; width: fit-content; margin-inline: auto; }

/* ───────── 3. ほかにもできること ───────── */

.more {
  padding: 144px var(--gutter) 0;
  text-align: center;
}

/* 4 枚が、 帯と同じ幅の両端にそろう */
.shelf {
  --dev-w: calc((var(--W) - 63px) / 4);
  --dev-h: calc(var(--dev-w) / 0.46);
  width: var(--W);
  max-width: 100%;
  margin: 55px auto 0;
  display: grid;
  grid-template-columns: repeat(4, var(--dev-w));
  justify-content: space-between;
  row-gap: 55px;
  text-align: left;
}

.shot h3 {
  margin-top: 21px;
  /* 列の幅に 9 文字が入る大きさ */
  font-size: calc(var(--dev-w) / 9.6);
  font-weight: 700;
  line-height: 1.382;
  font-feature-settings: "palt";
}

.shot h3 .ph { display: block; }

.shot p { margin-top: 8px; color: var(--fg-2); font-size: var(--small); }

/* 横長の 1 枚 (iPhone Duo)。 帯と同じ幅の真ん中に置く */
.wide {
  width: var(--W);
  max-width: 100%;
  margin: 144px auto 0;
  text-align: center;
  opacity: calc(var(--e, 1) * 1.6);
}

.wide img { width: 76.4%; height: auto; margin: 0 auto; }

.wide h3 {
  margin-top: 34px;
  font-size: var(--h3);
  font-weight: 700;
  line-height: 1.272;
  letter-spacing: -0.01em;
  font-feature-settings: "palt";
}

.wide p { margin: calc(var(--h3) * 0.382) auto 0; color: var(--fg-2); }

/* ───────── 4. 締め ───────── */

/* 最初の画面と同じ形。 上 38.2% に見出しとバッジ、 その下に端末 */
.final {
  --dev-h: var(--hero-h);
  position: relative;
  margin-top: 144px;
  padding: 0 var(--gutter);
  text-align: center;
}

.final-device { padding-bottom: 89px; }

.final-copy { gap: calc(var(--h1) * 0.236); }
.final-title .ph { display: block; }
.final-facts { color: var(--fg-3); font-size: var(--small); }

/* ───────── フッター ───────── */

.footer {
  background: var(--bg);
  border-top: 1px solid var(--line);
  padding: 34px var(--gutter) calc(34px + env(safe-area-inset-bottom));
  color: var(--fg-3);
  font-size: 13px;
}

.footer-in {
  width: min(var(--W), 100%);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 21px 34px;
  align-items: center;
  justify-content: space-between;
}

.legal-links { display: flex; flex-wrap: wrap; gap: 8px 21px; }
.footer a { color: inherit; text-decoration: none; transition: color 0.2s ease; }
.footer a:hover { color: var(--fg); }

/* 言語の切り替え */
.lang {
  display: flex;
  padding: 3px;
  border-radius: 999px;
  background: #101012;
  box-shadow: inset 0 0 0 0.5px var(--line);
}

.lang button {
  min-width: 76px;
  height: 38px;
  padding: 0 13px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  color: var(--fg-3);
  cursor: pointer;
  transition: color 0.25s ease, background-color 0.25s ease;
}

.lang button[aria-pressed="true"] { background: rgba(255, 255, 255, 0.14); color: #fff; }
.lang button:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* ───────── 入ってくるときの動き ───────── */

.js .rv {
  opacity: 0;
  transform: translateY(21px);
  transition: opacity 0.7s ease, transform 0.9s var(--ease);
  transition-delay: calc(var(--d, 0) * 90ms);
}

.js .rv.is-in { opacity: 1; transform: none; }

/* 端末は位置を動かさず、 その場で濃くなるだけ */
.js .device.rv,
.js .shot.rv { transform: none; }

/* 見出しは句ごとに下からめくれて出る */
.js .rvh .ph {
  clip-path: inset(0 0 100% 0);
  transform: translateY(0.34em);
  transition: clip-path 0.9s var(--ease), transform 0.9s var(--ease);
}

.js .rvh .ph:nth-child(2) { transition-delay: 90ms; }
.js .rvh .ph:nth-child(3) { transition-delay: 180ms; }
.js .rvh .ph:nth-child(4) { transition-delay: 270ms; }

.js .rvh.is-in .ph { clip-path: inset(-0.21em -0.13em); transform: none; }

/* ───────── 縦に積む (スマホ、 縦向きのタブレット) ───────── */

@media (max-width: 559px), (max-width: 1100px) and (orientation: portrait) {
  :root {
    /* 見出しは 3 行。 背の低い画面では、 上 38.2% に入る高さまで */
    --h1: clamp(26px, min(78.6vw / var(--em3, 6.561), (var(--vh) * 0.382 - 110px) / 3.8), 76px);
    /*
      最初の見出しは 3 行。 いちばん長い行 (--em3 文字ぶん) が画面の幅の 88% になる大きさ。
      背の低い画面では、 上 38.2% に入る高さまで。 帯の見出しの大きさ (--h1) とは切り離す
    */
    --hero-fs: clamp(26px, min(88vw / var(--em3, 6.561), (var(--vh) * 0.382 - 40px) / 3.5), 80px);
    /* 最初の端末の幅 = 見出しのいちばん長い行の幅 */
    --hero-w: calc(var(--hero-fs) * var(--em3, 6.561));
    /* ただし最初の画面の下 61.8% にまるごと収まる高さまで */
    --hero-h: min(var(--hero-w) / 0.46, var(--vh) * 0.618 - 21px);
    /* 帯の端末: 幅は画面の 61.8% まで。 見出しと端末が 1 画面に収まる高さまで */
    --bdev-w: min(61.8vw, 340px, (var(--vh) - var(--nav-h) - var(--h2) * 2.6 - 89px) * 0.46);
    --bdev-h: calc(var(--bdev-w) / 0.46);
    --W: 100%;
    /* スマホの文字は大きめに、 少し濃く (片手で持って、 腕を伸ばしても読めるように) */
    --body: clamp(17px, 4.2vw, 19px);
    --small: clamp(16px, 3.72vw, 17px);
    --fg-2: rgba(255, 255, 255, 0.72);
    --fg-3: rgba(255, 255, 255, 0.62);
  }

  .hero-copy,
  .final-copy {
    justify-content: flex-end;
    gap: clamp(13px, 2.6vh, 21px);
    padding-bottom: calc(clamp(13px, 2.6vh, 21px) * 1.618);
    padding-top: calc(env(safe-area-inset-top) + 13px);
  }

  .catch { line-height: 1.14; }
  .catch .ln-b .w { display: block; }

  .badge img { height: clamp(44px, 12vw, 52px); }

  /* 帯: 見出し → 端末 → 本文。 どれも真ん中にそろえる */
  .band {
    min-height: 0;
    padding: calc(var(--nav-h) + 21px) var(--gutter) 55px;
    text-align: center;
  }

  .band-in,
  .band--flip .band-in { grid-template-columns: minmax(0, 1fr); }

  .band-text { display: contents; }
  .band h2 { order: 1; }
  .band h2 .ph { margin-inline: auto; }
  .band .band-ui { order: 2; margin-top: 34px; }
  /* 本文は幅いっぱいに組む (行を短く切りそろえると、 1 行の文字が少なくなって読みにくい) */
  .band p { order: 3; max-width: 30em; margin: 34px auto 0; line-height: 1.55; text-wrap: wrap; }
  .keep { padding-top: 89px; }
  .shot p, .wide p { line-height: 1.55; text-wrap: wrap; }

  .more { padding-top: 89px; }

  /* 棚は横に送る */
  .shelf {
    --dev-w: min(61.8vw, 340px);
    display: flex;
    gap: 21px;
    width: auto;
    max-width: none;
    margin: 34px calc(var(--gutter) * -1) 0;
    padding: 0 calc((100vw - var(--dev-w)) / 2) 13px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }

  .shelf::-webkit-scrollbar { display: none; }
  .shot { flex: none; width: var(--dev-w); scroll-snap-align: center; }
  .shot h3 { font-size: clamp(19px, 2.6vw, 24px); }

  .wide { margin-top: 89px; }
  .wide img { width: 100%; }
  .wide h3 { font-size: clamp(21px, 5.6vw, 34px); }

  .final { margin-top: 89px; }

  /* 締めの見出しは 2 行。 長いほうの行 (10 文字) が幅に入る大きさ */
  .final-title { font-size: min(var(--h1), (100vw - var(--gutter) * 2) / 10.3); }

  .footer-in { flex-direction: column; align-items: flex-start; }
}

/* 縦向きのタブレット: 棚は 2 × 2 */
@media (min-width: 700px) and (max-width: 1100px) and (orientation: portrait) {
  .shelf {
    --dev-w: min(38.2vw, 320px);
    display: grid;
    grid-template-columns: repeat(2, var(--dev-w));
    justify-content: center;
    gap: 55px 34px;
    margin: 55px auto 0;
    padding: 0;
    overflow: visible;
  }
}

/* 横向きのスマホ (背がとても低い): 棚の 4 枚は並べると小さすぎるので、 横に送る */
@media (max-height: 520px) and (orientation: landscape) {
  .shelf {
    --dev-w: 160px;
    display: flex;
    gap: 21px;
    width: auto;
    max-width: none;
    margin: 34px calc(var(--gutter) * -1) 0;
    padding: 0 var(--gutter) 13px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .shelf::-webkit-scrollbar { display: none; }
  .shot { flex: none; width: var(--dev-w); }
  .shot h3 { font-size: 16px; }
}

/* ───────── 動きを減らす設定、 JavaScript なし ───────── */

/* 自己ベストの帯は、 はじめから青くしておく (録画は青い 1 コマのまま) */
html:not(.js) [data-pb] { background: var(--flood); }
html:not(.js) [data-pb] p { color: rgba(255, 255, 255, 0.86); }

@media (prefers-reduced-motion: reduce) {
  .catch .ltr, .catch .w, .catch .logo, .hero .device { animation: none !important; }
  .hero-copy { opacity: 1; transform: none; }
  .tilt, .wide, .band-text { transform: none; opacity: 1; }
  .js .rv, .js .rvh .ph { opacity: 1; transform: none; clip-path: none; transition: none; }
  [data-pb] { background: var(--flood); }
  [data-pb] p { color: rgba(255, 255, 255, 0.86); }
  [data-pb] .device { background: var(--flood); box-shadow: none; }
}
