/* BECKY の家（/ と /en/。2026-10-19 に /next/ から切り替え）の見た目。1 本だけ。
   設計: docs/becky-context/redesign_ninja_house_2026-10-18.md（服の節）。骨は IW（docs/design-skeleton.md）。
   - 地は IW の夜と同じ #050d1a。文字 #f2f0ec、補足 #a09c96。ティール #3cc4d4 は触れるもの（▶・リンク・切り替えの縁）だけ。暖色 #ffb060 は灯籠の中だけ
   - 明朝は最初の一文だけ。ほかは端末の書体（Web フォントは読まない）
   - 角は 28px の 1 種。余白の段は 8 / 24 / 64 / 160
   - 動きは transform と opacity だけ。UI の反応は 300ms 以内。動きを減らす設定の人には動かさない */

:root {
  --bg: #050d1a;
  --lift: #0b1626;
  --ink: #f2f0ec;          /* 地の上 17.6:1 */
  --sub: #a09c96;          /* 地の上 7.2:1 */
  --teal: #3cc4d4;         /* 地の上 9.6:1。触れるものだけ */
  --warm: #ffb060;         /* 灯籠の中だけ */
  --r: 28px;
  --s1: 8px;
  --s2: 24px;
  --s3: 64px;
  --s4: 160px;
  --gutter: 24px;
  --w: 72rem;
  --out: cubic-bezier(0.2, 0.8, 0.2, 1);
  --sans: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic UI", Meiryo, sans-serif;
  --voice: "Noto Serif JP", "Hiragino Mincho ProN", "Yu Mincho", serif;          /* 英語の一文 */
  --sumi: "Yuji Syuku", "Hiragino Mincho ProN", "Yu Mincho", serif;            /* 墨文字: 日本語の一文と部屋の見出しだけ */
  color-scheme: dark;
}
@media (min-width: 900px) {
  :root { --gutter: 64px; }
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bg); color: var(--ink); -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; font: 400 17px/1.75 var(--sans); letter-spacing: 0.01em; }
:lang(ja) p, :lang(ja) h3 { word-break: auto-phrase; } /* 日本語は文節で折り返す（「道具も／作る。」にしない） */
h1, h2, h3, p, ul, figure { margin: 0; padding: 0; }
ul { list-style: none; }
img, video, svg { display: block; max-width: 100%; }
a { color: var(--teal); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 0.25em; }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; border-radius: 6px; }
::selection { background: rgba(60, 196, 212, 0.35); color: #fff; }
button { font: inherit; color: inherit; }

/* ═══ ヘッダー（BECKY の字と言語の切り替えだけ） ═══ */
.bar {
  position: absolute; inset: 0 0 auto 0; z-index: 4;
  display: flex; align-items: center; justify-content: space-between;
  height: 64px; padding: 0 var(--gutter);
}
.mark { display: inline-flex; align-items: center; min-height: 44px; color: var(--ink); }
.mark:hover { text-decoration: none; }
.mark svg { height: 18px; width: auto; fill: currentColor; }
.lang {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 44px; min-height: 44px; padding: 0 12px; margin-right: -12px;
  border: 1px solid transparent; border-radius: 999px;
  color: var(--ink); font-size: 15px; font-weight: 600; letter-spacing: 0.06em; line-height: 1;
  transition: transform 100ms ease-out, border-color 150ms ease-out;
}
.lang:hover { text-decoration: none; border-color: rgba(242, 240, 236, 0.35); }
.lang:active { transform: scale(0.96); }
/* ブラウザの言語がこのページと違う人にだけ、縁をティールに（自動では送らない） */
html[data-lang-hint] .lang { border-color: var(--teal); margin-right: 0; }

/* ═══ 表の間（最初の画面） ═══ */
.stage { position: relative; height: min(100svh, 66.67vw); min-height: 560px; overflow: hidden; isolation: isolate; }
.stage-art { position: absolute; inset: 0; z-index: -1; }
.art, .art img { position: absolute; inset: 0; width: 100%; height: 100%; }
.art img { object-fit: cover; object-position: 70% 25%; }
.art--gone { display: none; }
html[data-vanish] .art--here { display: none; }
html[data-vanish] .art--gone { display: block; }
/* 絵の左の空を少しだけ暗くする（左からの柔らかいグラデーション。板は置かない）。55% で消えるので顔と灯籠にはかからない。下の端は地へ溶かす */
.stage-art::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(5, 13, 26, 0.6) 0%, rgba(5, 13, 26, 0.42) 30%, rgba(5, 13, 26, 0) 55%),
    linear-gradient(to bottom, rgba(5, 13, 26, 0) 74%, var(--bg) 100%);
}
.stage-copy { position: absolute; z-index: 2; left: var(--gutter); top: 26%; max-width: min(54%, 46rem); }
/* 町の灯りの粒が字の後ろに来ても読めるように、字のまわりだけ夜を濃くする（板は置かない） */
.voice, .stage-sub { text-shadow: 0 0 18px rgba(5, 13, 26, 0.85), 0 1px 3px rgba(5, 13, 26, 0.7); }
.voice {
  font-family: var(--voice); font-weight: 700;
  font-size: clamp(2.5rem, 3.4vw + 0.75rem, 5.5rem); line-height: 1.12; letter-spacing: -0.02em;
  color: var(--ink);
}
.voice span { display: block; }
@media (min-aspect-ratio: 1/1) and (min-width: 900px) { .voice span { white-space: nowrap; } } /* 広い画面は 2 行に（英語も「Japanese AI kunoichi.／BECKY.」） */
.stage-sub { margin-top: var(--s2); max-width: 26em; font-size: clamp(17px, 0.3vw + 15.5px, 19px); line-height: 1.7; color: var(--ink); text-wrap: pretty; }

/* 横でも幅の狭い画面（iPad の横など）: 絵の右を少し切って、座っている私を右へ寄せる（左の字が PC と脚にかからないように） */
@media (min-aspect-ratio: 1/1) and (max-width: 1199px) {
  .stage { height: 100svh; max-height: 900px; }
  .art img { object-position: 0% 25%; }
  .stage-copy { top: 24%; max-width: 34vw; }
  .voice { font-size: clamp(2.25rem, 3.2vw + 0.75rem, 3.5rem); }
  .stage-sub { font-size: 16px; }
  /* 字が町の灯りの上まで下りてくるので、左の空をもう少しだけ暗く（55% で消えるのは同じ） */
  .stage-art::after {
    background:
      linear-gradient(90deg, rgba(5, 13, 26, 0.68) 0%, rgba(5, 13, 26, 0.5) 30%, rgba(5, 13, 26, 0) 55%),
      linear-gradient(to bottom, rgba(5, 13, 26, 0) 74%, var(--bg) 100%);
  }
  /* 右上は私の頭になるので、灯籠は月と私のあいだの空に吊る。吹き出しは左へ伸ばす */
  .lantern { right: auto; left: 50%; width: 56px; }
  .stage-art .bunshin { left: 60%; right: 2%; top: 16%; }
  .lantern-line { right: -16px; }
}

/* ▶ 最新の曲を聴く（塗りのボタンはページでこれだけ）。押すと .96 に沈み、120ms で戻る */
.play {
  display: inline-flex; align-items: center; gap: 12px; margin-top: var(--s2);
  min-height: 52px; padding: 0 26px 0 20px; border-radius: 999px;
  background: var(--teal); color: var(--bg);
  font-size: 17px; font-weight: 700; line-height: 1.3; letter-spacing: 0.01em;
  transition: transform 120ms var(--out);
  -webkit-tap-highlight-color: transparent;
}
.play:hover { text-decoration: none; }
.play:active { transform: scale(0.96); transition-duration: 60ms; }
.play-icon { flex: none; width: 20px; height: 20px; fill: currentColor; }
.play-text { display: inline-flex; flex-wrap: wrap; column-gap: 0.7em; }
.play-title { font-weight: 500; }
.i-pause { display: none; }
[aria-pressed="true"] .i-play { display: none; }
[aria-pressed="true"] .i-pause { display: inline; }

/* ═══ からくり ② 灯籠（右上に紐で吊る。触ると 4° 揺れて戻る） ═══ */
.lantern { position: absolute; z-index: 3; top: 0; right: calc(var(--gutter) + 52px); width: 64px; }
.lantern-body {
  position: relative; display: block; width: 100%; padding: 0; border: 0; background: none; cursor: pointer;
  transform-origin: 50% 0; -webkit-tap-highlight-color: transparent;
}
.lantern-body:focus-visible { outline-offset: 6px; border-radius: 20px; }
.lantern-img { width: 100%; height: auto; }
.lantern-img--on { position: absolute; inset: 0; opacity: 0; transition: opacity 300ms ease-out; }
.lantern-glow {
  position: absolute; left: 50%; top: 62%; width: 360px; height: 360px; margin: -180px 0 0 -180px;
  border-radius: 50%; pointer-events: none;
  background: radial-gradient(closest-side, rgba(255, 176, 96, 0.34), rgba(255, 176, 96, 0.1) 48%, rgba(255, 176, 96, 0));
  opacity: 0; transition: opacity 300ms ease-out;
}
.lantern.is-lit .lantern-img--on, .lantern.is-lit .lantern-glow { opacity: 1; }
.lantern-body.is-swing { animation: lantern-swing 320ms cubic-bezier(0.3, 0.7, 0.4, 1); }
@keyframes lantern-swing {
  0% { transform: rotate(0deg); }
  30% { transform: rotate(4deg); }
  66% { transform: rotate(-1.4deg); }
  100% { transform: rotate(0deg); }
}
.lantern-line {
  /* 横の画面: 吹き出しの右の端を画面の右の余白にそろえ、幅を 19em までにする（左へ伸ばすと顔にかかる） */
  position: absolute; top: calc(100% + 8px); right: calc(24px - var(--gutter) - 52px);
  width: max-content; max-width: min(19em, calc(100vw - 2 * var(--gutter)));
  padding: 8px 16px; border-radius: 16px;
  background: rgba(5, 13, 26, 0.88); color: var(--ink);
  font-size: 16px; line-height: 1.6;
  opacity: 0; transform: translateY(-4px); pointer-events: none;
  transition: opacity 200ms ease-out, transform 200ms var(--out);
}
.lantern-line:empty { display: none; }
.lantern-line.is-shown { opacity: 1; transform: none; }

/* ═══ からくり 障子の門（最初の数秒の儀式） ═══
   障子紙は光を通すので半透明。紙ごしに下の絵（私）が影として透ける。桟は細い線、縁は細い木の枠、引手は丸いくぼみ。
   読み込んで約 300ms 後に左右へ 700ms でスッと開く（行き過ぎない ease-out、transform だけ）。開き終わると見えなくなり、触れなくなる。
   html[data-gate] は head の script が付ける（1 回の訪問で 1 回、動きを減らす設定の人には付けない）。すりガラスは使わない */
.gate { display: none; }
html[data-gate] .gate { display: block; position: fixed; inset: 0; z-index: 50; overflow: hidden; pointer-events: none; }
.gate-door {
  position: absolute; top: 0; bottom: 0; width: 50%;
  border: 5px solid #3b2a1d; /* 木の枠 */
  background:
    repeating-linear-gradient(90deg, transparent 0 calc(25% - 2.5px), rgba(96, 70, 46, 0.9) calc(25% - 2.5px) 25%),
    repeating-linear-gradient(180deg, transparent 0 calc(11.11% - 2.5px), rgba(96, 70, 46, 0.9) calc(11.11% - 2.5px) 11.11%),
    rgba(236, 232, 223, 0.86); /* 障子紙（桟は細い木の色） */
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
  will-change: transform;
}
.gate-door--l { left: 0; animation: gate-l 700ms cubic-bezier(0.22, 0.61, 0.36, 1) 300ms both; }
.gate-door--r { right: 0; animation: gate-r 700ms cubic-bezier(0.22, 0.61, 0.36, 1) 300ms both; }
@keyframes gate-l { from { transform: translateX(0); } to { transform: translateX(-100%); visibility: hidden; } }
@keyframes gate-r { from { transform: translateX(0); } to { transform: translateX(100%); visibility: hidden; } }
/* 引手（丸いくぼみ）。左の戸は右の端、右の戸は左の端、高さの真ん中 */
.gate-pull {
  position: absolute; top: 50%; width: 22px; height: 22px; margin-top: -11px; border-radius: 50%;
  background: radial-gradient(circle at 50% 55%, rgba(40, 28, 18, 0.55) 0 45%, rgba(40, 28, 18, 0.2) 46% 62%, transparent 64%);
  box-shadow: 0 0 0 2px rgba(59, 42, 29, 0.9);
}
.gate-door--l .gate-pull { right: 18px; }
.gate-door--r .gate-pull { left: 18px; }

/* ═══ からくり 分身（ページに 1 つだけの、機能に要らない細部） ═══
   最初の画面の私（体のあたり）の上に見えないボタン。押すと残像 3 つを残して消え（誰もいない屋根へ cross-fade）、1.4 秒後に戻る */
.bunshin {
  position: absolute; z-index: 2; left: 56%; right: 8%; top: 18%; bottom: 8%;
  padding: 0; border: 0; background: transparent; cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.bunshin:focus-visible { outline: 2px solid var(--teal); outline-offset: -8px; border-radius: var(--r); }
html[data-vanish] .bunshin { display: none; }
.art--gone.is-bunshin { display: block; opacity: 0; }
.art.is-fading { transition: opacity 300ms ease-out; }
.bunshin-ghost { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; z-index: 1; }

/* ═══ 縦の画面（スマホ）: 絵が上、一文と ▶ が下。灯籠は左上の軒（絵の左上の建物）から吊る ═══ */
@media (max-aspect-ratio: 1/1) {
  .bar { position: relative; height: 56px; background: var(--bg); }
  .stage { height: auto; min-height: 0; overflow: visible; }
  .stage-art { position: relative; z-index: 0; height: min(125vw, calc(100svh - 56px - 300px)); min-height: 340px; overflow: hidden; }
  .art img { object-position: 50% 16%; }
  .stage-art::after { background: linear-gradient(to bottom, rgba(5, 13, 26, 0) 66%, var(--bg) 100%); }
  .stage-copy { position: relative; left: auto; top: auto; max-width: none; margin-top: -40px; padding: 0 var(--gutter); }
  .lantern { top: 0; left: 36px; right: auto; width: 48px; }
  .stage-art .bunshin { left: 24%; right: 4%; top: 8%; bottom: 10%; }
  .lantern-glow { width: 260px; height: 260px; margin: -130px 0 0 -130px; }
  .lantern-line { left: -20px; right: auto; max-width: 8.5em; } /* 縦の画面は顔のすぐ左なので、吹き出しは細く縦に（顔にかけない） */
  .play { gap: 10px; padding: 0 20px 0 16px; font-size: 16px; }
  .play-text { column-gap: 0.6em; }
}

/* ═══ 部屋 ═══ */
.room { max-width: calc(var(--w) + 2 * var(--gutter)); margin: 0 auto; padding: var(--s4) var(--gutter) 0; }
.room-h { margin-bottom: var(--s2); font-size: clamp(28px, 1vw + 22px, 36px); font-weight: 700; line-height: 1.25; letter-spacing: -0.01em; }
/* 墨文字（Yuji Syuku は 400 の 1 種。太らせない） */
:lang(ja) .voice, :lang(ja) .room-h { font-family: var(--sumi); font-weight: 400; font-synthesis: none; letter-spacing: 0.02em; }
:lang(ja) .room-h { font-size: clamp(30px, 1.2vw + 23px, 40px); }
.room-lead { max-width: 34em; margin-bottom: var(--s3); color: var(--sub); text-wrap: pretty; }
@media (max-width: 899px) {
  .room { padding-top: var(--s3); }
  .room-lead { margin-bottom: var(--s2); }
}

/* ── 曲: 横のカードの棚（IW のトップの Services の棚と同じ作り）。カードは同じ大きさ、上に正方形のジャケット、下に曲名・一行・▶（まだの曲は日付）
   棚は全幅で横にスクロール。左は中身の左にそろえ、右は画面の端まで。広い画面では、送れる向きにだけ矢印が出る ── */
.room-full { padding-top: var(--s4); }
.room--head { padding-top: 0; }
.shelf-wrap { position: relative; --shelf-pad: max(var(--gutter), calc((100% - var(--w)) / 2)); }
.song-shelf {
  display: flex; gap: var(--s2);
  overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-width: none;
  scroll-padding-inline: var(--shelf-pad);
  padding: 4px var(--shelf-pad) 8px; margin: -4px 0 -8px;
}
.song-shelf::-webkit-scrollbar { display: none; }
.song-card-item { flex: 0 0 min(82vw, 360px); scroll-snap-align: start; display: flex; }
.song-card { flex: 1; min-width: 0; display: flex; flex-direction: column; border-radius: var(--r); overflow: hidden; background: var(--lift); }
.song-card-jacket { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; background: var(--lift); }
.song-card-body { display: flex; flex-direction: column; flex: 1; padding: var(--s2); }
.song-title { font-size: 22px; font-weight: 700; line-height: 1.35; letter-spacing: -0.005em; }
.song-line { margin-top: 4px; color: var(--sub); }
.song-acts { display: flex; flex-wrap: wrap; align-items: center; column-gap: var(--s2); row-gap: var(--s1); margin-top: auto; padding-top: var(--s2); }
.song-acts a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; }
.song-date { display: inline-flex; align-items: center; min-height: 52px; color: var(--sub); font-weight: 600; font-variant-numeric: tabular-nums; }
.song-play {
  display: inline-grid; place-items: center; width: 52px; height: 52px; padding: 0; flex: none;
  border: 1.5px solid var(--teal); border-radius: 50%; background: transparent; color: var(--teal); cursor: pointer;
  transition: transform 120ms var(--out); -webkit-tap-highlight-color: transparent;
}
.song-play:active { transform: scale(0.96); transition-duration: 60ms; }
.song-play svg { width: 20px; height: 20px; fill: currentColor; }
.shelf-arrow { display: none; }
@media (min-width: 900px) {
  .shelf-arrow {
    position: absolute; top: calc(min(82vw, 360px) / 2); z-index: 2;
    display: grid; place-items: center; width: 44px; height: 44px; margin-top: -22px; padding: 0;
    background: var(--lift); color: var(--teal); border: 0; border-radius: 50%; cursor: pointer;
    box-shadow: 0 0 0 1px rgba(242, 240, 236, 0.14), 0 4px 16px rgba(0, 0, 0, 0.4);
    transition: transform 100ms ease-out;
  }
  .shelf-arrow[hidden] { display: none; }
  .shelf-arrow:active { transform: scale(0.94); }
  .shelf-arrow--prev { left: max(12px, calc(var(--shelf-pad) - 22px)); }
  .shelf-arrow--next { right: 12px; }
}
@media (max-width: 899px) {
  .room-full { padding-top: var(--s3); }
}

/* ── 屋根: 額が 1 つ。押す（か「次」）と壁が回って次の絵（どんでん返し）。額の下に「1 / 3」。「私は」の 3 行はその横 ── */
.roof { display: grid; gap: var(--s2); }
.roof-frame {
  display: block; width: 100%; padding: 0; border: 0; background: none; cursor: pointer;
  border-radius: var(--r); transform-origin: 50% 50%; -webkit-tap-highlight-color: transparent;
}
.roof-frame:focus-visible { outline-offset: 6px; border-radius: var(--r); }
.roof-big img { display: block; width: 100%; height: auto; border-radius: var(--r); background: var(--lift); }
.roof-meta { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); margin-top: var(--s1); }
.roof-count { color: var(--sub); font-size: 16px; font-variant-numeric: tabular-nums; letter-spacing: 0.04em; }
.roof-next {
  display: inline-flex; align-items: center; gap: 4px; min-height: 44px; padding: 0 4px 0 12px; margin-right: -4px;
  border: 0; background: none; color: var(--teal); font-weight: 600; cursor: pointer; transition: transform 100ms ease-out;
}
.roof-next svg { width: 16px; height: 16px; }
.roof-next:active { transform: scale(0.96); }
.roof-meta[hidden] { display: none; }
.roof-me { display: grid; gap: 4px; font-size: clamp(19px, 0.7vw + 16px, 26px); line-height: 1.7; }
@media (min-width: 900px) {
  /* 曲の部屋（物が左）と向きを替えて、ここは絵が右・3 行が左 */
  .roof { grid-template-columns: minmax(0, 1fr) auto; column-gap: var(--s3); align-items: end; }
  .roof-frame { width: auto; }
  .roof-big img { width: auto; height: min(80vh, 960px); max-width: 100%; object-fit: cover; }
  .roof-me { order: -1; padding-bottom: calc(var(--s2) + 44px + var(--s1)); }
}

/* ── からくり: KokoCheck の端末を大きく（実機の画面が動く。IW のトップのヒーローくらい）、Vibe-Guard と Doctor は小さく 2 つ ── */
.tools { display: grid; gap: var(--s3); }
.tool { display: grid; grid-template-columns: 128px minmax(0, 1fr); gap: var(--s2); align-items: center; }
.tool-shot { display: block; }
.tool-shot img, .tool-shot video { width: 100%; height: auto; border-radius: 20px; background: var(--lift); }
.tool-name { font-size: 20px; font-weight: 700; line-height: 1.35; }
.tool-name a { color: var(--teal); }
.tool-line { margin-top: 4px; color: var(--sub); }
.tool-more a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; }
.tool--main { grid-template-columns: minmax(0, 1fr); }
.tool--main .tool-shot { width: min(100%, 300px); }
.tool--main .tool-shot video { aspect-ratio: 480 / 1039; border-radius: 36px; }
.tool--main .tool-name { font-size: clamp(28px, 1.6vw + 20px, 44px); letter-spacing: -0.01em; }
.tool--main .tool-line { margin-top: var(--s1); font-size: clamp(18px, 0.3vw + 16px, 20px); }
@media (min-width: 900px) {
  .tools { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: var(--s3); row-gap: var(--s3); }
  .tool { grid-template-columns: 200px minmax(0, 1fr); }
  .tool.tool--main { grid-column: 1 / -1; grid-template-columns: clamp(300px, 24vw, 340px) minmax(0, 1fr); column-gap: var(--s3); align-items: end; }
  .tool--main .tool-shot { width: 100%; }
}

/* ── 棚: 物は自分の形のまま、下の線にそろえて置く ── */
.shelf {
  display: flex; gap: var(--s3); align-items: flex-start;
  overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-width: none;
  scroll-padding-inline: var(--gutter); margin-inline: calc(-1 * var(--gutter)); padding: 0 var(--gutter) 4px;
}
.shelf::-webkit-scrollbar { display: none; }
.shelf-item { flex: 0 0 auto; scroll-snap-align: start; display: flex; flex-direction: column; }
.shelf-thing { display: flex; align-items: flex-end; height: 300px; }
.shelf-thing img { width: auto; max-height: 100%; }
.shelf-item--book img { height: 300px; border-radius: 6px; box-shadow: 0 0 0 1px rgba(242, 240, 236, 0.14); } /* 黒い表紙が地に溶けないよう、本の縁だけ */
.shelf-item--wear img { height: 300px; }
.shelf-item--stamp img { height: 200px; }
.shelf-name { display: inline-flex; align-items: center; min-height: 44px; margin-top: var(--s2); font-size: 18px; font-weight: 700; }
.shelf-line { max-width: 16em; color: var(--sub); }
@media (max-width: 899px) {
  .shelf { gap: var(--s2); }
  .shelf-thing { height: 220px; }
  .shelf-item--book img, .shelf-item--wear img { height: 220px; }
  .shelf-item--stamp img { height: 150px; }
}

/* ═══ 足元 ═══ */
.foot { max-width: calc(var(--w) + 2 * var(--gutter)); margin: 0 auto; padding: var(--s4) var(--gutter) var(--s3); }
.foot-links { display: flex; flex-wrap: wrap; column-gap: var(--s2); margin-bottom: var(--s2); }
.foot-links a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; }
.foot-line { color: var(--sub); }
@media (max-width: 899px) {
  .foot { padding-top: var(--s3); }
}

/* ═══ からくり ① どんでん返し（言語の切り替えの時だけ壁が回る。ほかの遷移は head の script が飛ばす） ═══
   旧ページ 0 → -90° を 140ms、新ページ 90° → 0° を 160ms（少し行き過ぎて戻る）。合計 300ms。非対応のブラウザは普通に移る */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: wall-out 140ms cubic-bezier(0.5, 0, 0.9, 0.6) both; }
::view-transition-new(root) { animation: wall-in 160ms cubic-bezier(0.2, 0.7, 0.3, 1) 140ms both; }
@keyframes wall-out {
  from { transform: perspective(1800px) rotateY(0deg); }
  to { transform: perspective(1800px) rotateY(-90deg); }
}
@keyframes wall-in {
  0% { transform: perspective(1800px) rotateY(90deg); }
  78% { transform: perspective(1800px) rotateY(-4deg); }
  100% { transform: perspective(1800px) rotateY(0deg); }
}
@keyframes vt-fade-out { to { opacity: 0; } }
@keyframes vt-fade-in { from { opacity: 0; } }

/* ═══ 動きを減らす設定 ═══ */
@media (prefers-reduced-motion: reduce) {
  ::view-transition-old(root) { animation: vt-fade-out 120ms ease-out both; }
  ::view-transition-new(root) { animation: vt-fade-in 120ms ease-out both; }
  .lantern-body.is-swing { animation: none; }
  .play, .song-play, .shelf-arrow, .lang, .roof-next, .lantern-img--on, .lantern-glow, .lantern-line, .art.is-fading { transition: none; }
  .play:active, .song-play:active, .lang:active, .roof-next:active { transform: none; }
  html[data-gate] .gate { display: none; }
}
