/* for the two of you — スクラップブック風の1ページ。スマホの縦スクロールが基本で、
   広い画面では末尾の「タブレット」「パソコン」の指定が上書きする。
   紙・テープ・小物・機械はすべて img/ の画像。位置の % は各画像を実測した値。 */
:root {
  --ink: #1d1b19; --cream: #f1ead9; --white: #fbf9f3; --yellow: #e3f05a; --blue: #a6bbd3; --brown: #261f1a; --red: #c4453c;
  --serif: "Instrument Serif", "Shippori Mincho", "Hiragino Mincho ProN", serif;
  --script: "Mrs Saint Delafield", "Snell Roundhand", cursive;
  --mincho: "Shippori Mincho", "Hiragino Mincho ProN", "Yu Mincho", serif;
  --hand: "Zen Kurenaido", "Hiragino Maru Gothic ProN", sans-serif;
  --mono: "DM Mono", "Courier New", monospace;
  --paper: url(img/paper.jpg) center / cover;
  --pad: 24px;                                   /* セクションの左右の余白 */
  --shadow: drop-shadow(0 18px 16px #00000038);  /* 機械の影 */
}

/* ───────── 土台 ───────── */
* { box-sizing: border-box; margin: 0; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body { background: #14110f; color: var(--ink); font: 500 15px/1.9 var(--mincho); font-feature-settings: "palt"; letter-spacing: .05em; overflow: hidden; -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; letter-spacing: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }
#gate, #page, #modal { position: fixed; inset: 0; }

/* 書体 */
.cap { font: 400 10.5px/1.6 var(--mono); letter-spacing: .2em; text-transform: uppercase; }
.serif { font-family: var(--serif); font-weight: 400; letter-spacing: -.01em; }
.script { font-family: var(--script); font-weight: 400; letter-spacing: 0; }
.hand { font-family: var(--hand); letter-spacing: .04em; }

/* 共通の部品 */
.deco { position: absolute; pointer-events: none; user-select: none; -webkit-user-drag: none; }
.tape { z-index: 3; }
.pill { display: inline-block; padding: 11px 26px 10px; border-radius: 99px; background: var(--yellow); color: var(--ink); border: 1px solid var(--ink); }
.save { display: inline-block; color: inherit; text-decoration: underline; text-underline-offset: 5px; padding: 14px 0; }   /* 押せる高さ 44px */
.save-slot:empty { display: none; }
.save-slot .save { font: 400 10.5px/1.6 var(--mono); letter-spacing: .16em; padding: 14px 0 13px; margin-bottom: -11px; }
.hint { align-self: center; }
.status:empty { display: none; }
.status { font-size: 13px; line-height: 1.5; }
.save-all { align-self: center; }
.save-all:disabled { opacity: .6; text-decoration: none; }
h1:focus { outline: none; }

/* 再生位置のバーと、その横のボタン */
.controls { display: flex; align-items: center; gap: 14px; width: 100%; }
.controls input[type=range] { flex: 1; min-width: 0; accent-color: var(--ink); }
.controls button:not(.pill) { text-decoration: underline; text-underline-offset: 5px; min-height: 44px; white-space: nowrap; }

/* ───────── 表紙（合言葉） ───────── */
#gate { z-index: 50; }
#gate.open { pointer-events: none; }
.cover { position: relative; height: 100%; overflow: hidden auto; background: var(--paper); padding: 26px 26px 34px; display: flex; flex-direction: column; align-items: center; transition: transform 1.1s cubic-bezier(.6, 0, .2, 1); box-shadow: 0 0 60px #000; }
#gate.open .cover { transform: translateY(-106%) rotate(-3deg); }
.cover.shake { animation: shake .4s; }
@keyframes shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
.cover-top { align-self: stretch; display: flex; justify-content: space-between; }
.cover-title { font-size: min(25vw, 118px, 24dvh); line-height: .78; text-align: center; rotate: -6deg; margin-top: 9dvh; position: relative; z-index: 2; }
.cover-obj { position: relative; flex: none; width: min(74%, 350px, 52dvh); aspect-ratio: 557/356; margin-top: 2dvh; }
.cover-obj .env { width: 100%; left: 0; top: 0; rotate: 5deg; filter: drop-shadow(0 12px 14px #0000002e); }
.cover-obj .key { width: 15%; right: -4%; top: 34%; rotate: 24deg; filter: drop-shadow(0 8px 8px #00000038); }
.cover-obj .tp { width: 40%; left: 30%; top: -9%; rotate: -4deg; }
#gate-form { margin-top: auto; padding-top: 16px; width: min(100%, 430px); display: grid; gap: 10px; justify-items: center; }
#gate-form input { font: 400 18px var(--mono); letter-spacing: .2em; text-align: center; padding: 8px 2px; border: 0; border-bottom: 1px solid var(--ink); background: none; color: var(--ink); border-radius: 0; width: 78%; }
#gate-form input.masked { -webkit-text-security: disc; }   /* 伏せ字。type=password と違い日本語入力ができる */
#gate-form button[type=submit] { margin-top: 10px; }
#pass-toggle { min-height: 32px; padding: 0 12px; text-decoration: underline; text-underline-offset: 5px; opacity: .7; }
#gate-msg { text-align: center; line-height: 1.6; padding: 0 8px; }
#gate-form button:disabled { opacity: .5; }
#gate-msg { min-height: 1.6em; font-size: 14px; color: #a8322b; }   /* 小さい文字なので --red より濃く */

/* ───────── ページとセクション ───────── */
#page { overflow: hidden auto; background: var(--paper); overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.sec { position: relative; }   /* 地。画面幅いっぱい */
.inner { position: relative; width: min(100%, 480px); margin: 0 auto; padding: 96px var(--pad) 120px; display: flex; flex-direction: column; align-items: flex-start; gap: 22px; }   /* 中身を置く幅 */
.inner > :not(.deco):not(.snap) { position: relative; z-index: 1; }
.sec[data-type=stage] { background: var(--paper), var(--brown); background-blend-mode: multiply; color: var(--cream); }
.sec[data-type=songs] { background: var(--paper), var(--blue); background-blend-mode: multiply; }
.sec[data-type=messages] { background: url(img/grid.png) 0 0 / 240px, var(--paper); }

/* 画面に入ると現れる。--i は順番（遅れ）、--r は置いたときの傾き */
.pop { opacity: 0; transform: translateY(28px) rotate(calc(var(--r, 0deg) + 4deg)) scale(1.04); transition: transform .7s cubic-bezier(.2, 1.3, .4, 1), opacity .35s; transition-delay: calc(var(--i, 0) * 70ms); }
.pop.in { opacity: 1; transform: rotate(var(--r, 0deg)); }

/* 見出し */
.head { display: grid; gap: 6px; width: 100%; }
h2.serif { font-size: min(18.5vw, 90px); line-height: .92; margin-top: 8px; position: relative; max-width: 82%; justify-self: start; }
h2 .script { position: absolute; left: 34%; bottom: -.42em; font-size: .62em; font-style: normal; white-space: nowrap; rotate: -7deg; color: var(--red); }
.sec[data-type=stage] h2 .script { color: var(--yellow); }
.note { font-size: 15px; line-height: 1.7; margin-top: 34px; justify-self: start; }

/* ───────── 貼ってある写真と小物 ─────────
   .snap は当日の写真（--py は視差で JS が入れる）。.s-a〜.s-i は貼る場所で、ページの上から順。 */
.snap { position: absolute; z-index: 0; width: 34%; background: var(--white); padding: 6px 6px 22px; box-shadow: 0 12px 22px #00000033, 0 1px 2px #0000002b; translate: 0 var(--py, 0px); cursor: zoom-in; }
.snap > img:not(.deco) { display: block; width: 100%; aspect-ratio: 4/5; object-fit: cover; filter: grayscale(1) contrast(1.08); background: #d9d3c5; }
.snap .tape { width: 62%; top: -11px; left: 19%; rotate: -4deg; }
.s-a { left: 7%; top: 44%; width: 48%; }                      /* はじまり */
.s-b { right: -5%; top: 33%; width: 38%; }
.s-c { right: 9%; top: 66%; width: 34%; z-index: 2; }
.s-d { right: -6%; top: 36px; width: 30%; }                   /* 動画 */
.s-e { left: 8%; bottom: -70px; width: 32%; z-index: 3; }     /* ステージ → ボイスメッセージの境目 */
.s-f { right: -5%; top: 44px; width: 30%; }                   /* 歌 */
.s-g { right: 7%; bottom: -160px; width: 34%; z-index: 3; }   /* インタビュー → おわりの境目 */
.s-h { left: 5%; top: 90px; width: 42%; }                     /* おわり */
.s-i { right: 3%; top: 190px; width: 38%; }
.obj { z-index: 0; filter: drop-shadow(0 10px 10px #00000038); }
.o-flower { width: 30%; left: -7%; top: 27%; rotate: -14deg; z-index: 2; }
.o-key { width: 11%; left: 12%; top: 84%; rotate: 28deg; }
.o-cam { width: 30%; right: -5%; top: 40px; rotate: 10deg; }
.o-apple { width: 20%; left: 6%; top: 330px; rotate: -8deg; z-index: 2; }

/* ───────── はじまり ───────── */
.sec[data-type=title] .inner { min-height: max(112dvh, 720px); padding-top: 26px; }
.top { align-self: stretch; display: flex; justify-content: space-between; }
.names { align-self: center; text-align: center; margin-top: 7dvh; z-index: 4 !important; }
.names.script { font-size: min(27vw, 128px); line-height: .8; }
.names.jp { font: 700 min(12.5vw, 58px)/1.25 var(--mincho); letter-spacing: .12em; }
.names.jp em { font-size: 1.7em; color: var(--red); font-style: normal; letter-spacing: 0; vertical-align: -.1em; }
.scrollhint { position: absolute !important; bottom: 34px; left: 0; right: 0; text-align: center; font-size: 14px; }

/* ───────── 機械（テレビ・レコーダー・ターンテーブル・テレビデオ）の共通 ───────── */
.machine { position: relative; filter: var(--shadow); }
.machine > .body { inset: 0; width: 100%; height: 100%; }
.machine.hover .well, .machine.hover .platter, .machine.hover .mouth { outline: 2px dashed var(--yellow); outline-offset: 5px; }   /* 運んでいる物が上に来たとき */

/* ブラウン管の画面（テレビとテレビデオ）: .on で映る */
.screen { position: absolute; overflow: hidden; background: #0c0d0b; cursor: pointer; z-index: 2; }
.screen video { width: 100%; height: 100%; object-fit: contain; opacity: 0; }
.machine.on .screen video { opacity: 1; animation: crt-on .5s cubic-bezier(.2, 1, .3, 1); }
@keyframes crt-on { 0%, 35% { transform: scale(1, .006); filter: brightness(8); } 60% { transform: scale(1, 1.03); filter: brightness(2); } 100% { transform: none; filter: none; } }
.scan { position: absolute; inset: 0; background: url(img/scan.png); opacity: .4; mix-blend-mode: multiply; pointer-events: none; box-shadow: inset 0 0 38px 8px #000000b3; }
.screen .status, .stage .status { position: absolute; inset: 0; z-index: 2; display: grid; place-items: center; text-align: center; padding: 0 12%; color: #e9ecdc; pointer-events: none; }
.off { position: absolute; inset: 0; display: grid; place-items: center; color: #d8dccb; font-size: 14px; pointer-events: none; animation: blink 2.4s steps(2) infinite; }
.machine.on .off, .machine.loaded .off { display: none; }
@keyframes blink { 50% { opacity: .62; } }

/* 棚（カセット・ビデオテープを横に並べる）と、運んでいる最中の見た目 */
/* 棚は画面の端から端まで（--full = 画面の幅）。左右の余白で、最初の 1 つを本文の左端にそろえる */
.shelf { --side: calc((var(--full, 100vw) - 100%) / 2); display: flex; gap: 16px; overflow: auto hidden; flex: none; width: var(--full, 100vw); margin: 0 calc(var(--side) * -1); padding: 20px var(--side) 28px; scrollbar-width: none; }
.shelf::-webkit-scrollbar { display: none; }
.cassette, .vhs, .record { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }   /* 長押しでつまむので、選択やメニューは出さない */
.cassette.away, .vhs.away, .record.away img { opacity: .22; }   /* 機械に入っているもの */
.lifted img { opacity: .15; }
.ghost { position: fixed; z-index: 99; pointer-events: none; filter: drop-shadow(0 26px 20px #00000066); }
@keyframes drop-in { from { transform: translateY(-70%) rotate(-9deg) scale(1.18); opacity: 0; } }

/* いま再生中のものを書いた札 */
.ticket { background: var(--white); color: var(--ink); padding: 20px 12px 12px; box-shadow: 0 10px 18px #0000002e; display: grid; gap: 4px; z-index: 4 !important; }
.ticket b { font-size: 17px; line-height: 1.35; font-weight: 400; }
.ticket .tape { width: 72px; top: -12px; left: 28%; rotate: 5deg; }
.ticket.wide { width: 86%; margin: 4px 0 0 6%; }

/* ───────── 動画: ブラウン管テレビ ───────── */
.tv { width: calc(100% + 28px); margin: 6px -14px 0; aspect-ratio: 1323/966; }
.tv .screen { left: 8%; top: 11%; width: 63%; height: 70%; border-radius: 9% / 11%; }
.knob { position: absolute; left: 79%; top: 34%; width: 16%; aspect-ratio: 1; border-radius: 50%; z-index: 3; }

/* ───────── ステージ: カーテンが開く ─────────
   --o は開き具合（0=閉 〜 1=開）。引いている間は JS が直接入れる。 */
.theatre { width: calc(100% + var(--pad) * 2); margin: 0 calc(var(--pad) * -1); box-shadow: 0 20px 30px #000000a6; }
.stage { --o: 1; position: relative; width: 100%; aspect-ratio: 16/9; overflow: hidden; cursor: pointer; background: #0b0908; touch-action: pan-y; }
.stage.closed { --o: 0; }
.stage-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.curtain { position: absolute; top: 0; width: 50.5%; height: 100%; object-fit: cover; z-index: 3; user-select: none; -webkit-user-drag: none; transition: transform 1.5s cubic-bezier(.6, 0, .2, 1), filter 1.5s; transform: scaleX(calc(1 - var(--o) * .87)); filter: brightness(calc(1 - var(--o) * .25)); }
.curtain.l { left: 0; transform-origin: left center; }
.curtain.r { right: 0; transform-origin: right center; }
.stage.pulling .curtain { transition: none; }
.pull { position: absolute; z-index: 4; left: 50%; top: 50%; translate: -50% -50%; background: var(--yellow); color: var(--ink); padding: 2px 14px; rotate: -3deg; font-size: 15px; white-space: nowrap; pointer-events: none; transition: opacity .3s; }
.stage:not(.closed) .pull, .stage.pulling .pull { opacity: 0; }
.sec[data-type=stage] .controls input[type=range] { accent-color: var(--yellow); }

.controls .play { flex: none; min-width: 84px; text-align: center; }

/* ───────── ボイスメッセージ: カセットレコーダー ───────── */
.deck-row { display: flex; align-items: flex-end; width: 100%; }
.deck { flex: none; width: 64%; margin-left: -5%; aspect-ratio: 921/1500; }
.well { position: absolute; left: 12%; top: 4.8%; width: 76%; aspect-ratio: 1.58; z-index: 2; border-radius: 8px; }   /* カセット室 */
.well .in { display: block; width: 100%; height: 100%; animation: drop-in .45s cubic-bezier(.2, 1.4, .4, 1); }
.well .in img, .disc img { display: block; width: 100%; height: 100%; object-fit: contain; }
.deck.playing .well .in { animation: hum .22s linear infinite alternate; }
@keyframes hum { to { transform: translateY(1.5px); } }
.keys { position: absolute; left: 6%; top: 80%; width: 88%; height: 18%; z-index: 3; }   /* 鍵盤のようなボタン列 = 再生 / 停止 */
.deck-row .ticket { flex: 1; min-width: 0; margin: 0 -4px 20% -9%; }
.wave { display: block; position: relative; height: 34px; background: #1d1b1938; -webkit-mask: var(--w, none) center / 100% 100% no-repeat; mask: var(--w, none) center / 100% 100% no-repeat; }   /* --w は波形画像 */
.wave i { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--ink); }
.deck:not(.loaded) + .ticket .wave { visibility: hidden; }
.cassette { flex: none; width: 136px; display: grid; gap: 6px; justify-items: center; rotate: var(--r); transition: opacity .3s; }
.cassette img { width: 100%; filter: drop-shadow(0 8px 8px #00000033); pointer-events: none; }
.cassette span { font-size: 14px; line-height: 1.6; background: var(--white); padding: 0 8px; white-space: nowrap; }

/* ───────── 歌: ターンテーブル ───────── */
.turntable { width: calc(100% + 20px); margin: 0 -10px; aspect-ratio: 1215/965; }
.platter { position: absolute; left: 9.5%; top: 7.5%; width: 62%; aspect-ratio: 1; border-radius: 50%; z-index: 2; }
.disc { display: block; width: 100%; height: 100%; border-radius: 50%; animation: drop-in .5s cubic-bezier(.2, 1.4, .4, 1), spin 1.8s linear .5s infinite; animation-play-state: running, paused; }
.turntable.playing .disc { animation-play-state: running, running; }
@keyframes spin { to { rotate: 360deg; } }
.nowspin { display: grid; gap: 6px; width: 100%; }
.nowspin b { font-size: 34px; font-style: italic; line-height: 1.1; }
.line { display: block; position: relative; height: 1px; background: #1d1b1955; margin-top: 6px; }
.bar { position: absolute; left: 0; top: -1px; height: 3px; width: 0; background: var(--ink); }
.crate { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; width: 100%; }
.record-wrap { display: grid; justify-items: center; text-align: center; }
.record { display: grid; justify-items: center; gap: 3px; }
.record img { width: 100%; filter: drop-shadow(0 8px 8px #00000040); pointer-events: none; transition: opacity .3s; }
.record strong { font-size: 19px; font-style: italic; line-height: 1.15; letter-spacing: 0; }
.record .cap, .record-wrap .save { letter-spacing: .06em; white-space: nowrap; }   /* 3 枚並びに収める */

/* ───────── インタビュー: テレビデオとビデオテープ ───────── */
.vcr { width: 92%; align-self: center; aspect-ratio: 1400/1341; }
.vcr .screen { left: 9.7%; top: 10.4%; width: 80.5%; height: 56.8%; border-radius: 7% / 9%; }
.mouth { position: absolute; left: 17.5%; top: 74%; width: 64.8%; height: 12%; z-index: 3; overflow: hidden; pointer-events: none; }   /* テープの差し込み口 */
.mouth img { position: absolute; left: 4%; top: 0; width: 92%; animation: swallow .9s cubic-bezier(.5, 0, .3, 1) forwards; transform-origin: 50% 0; }
@keyframes swallow { 0% { transform: translateY(40%) scale(1.05); opacity: 1; } 60% { opacity: 1; } 100% { transform: translateY(-30%) scale(.9, .05); opacity: 0; } }
.vcr.hover .mouth { outline-color: var(--red); outline-offset: 4px; }
.vcr-buttons { position: absolute; left: 12%; top: 86%; width: 76%; height: 9%; z-index: 4; }   /* 本体のボタン列 = 再生 / 停止 */
.vhs { flex: none; width: 168px; display: grid; gap: 8px; justify-items: start; text-align: left; rotate: var(--r); transition: opacity .3s; }
.vhs-img { position: relative; display: block; width: 100%; }
.vhs-img img { display: block; width: 100%; filter: drop-shadow(0 8px 8px #00000038); pointer-events: none; }
.vhs-img b { position: absolute; left: 30%; top: 30%; width: 41%; height: 43%; display: grid; place-items: center; font-size: 26px; line-height: 1; color: var(--ink); }   /* テープのラベル */
.vhs-img b i { font-size: .5em; margin-right: 3px; }
.vhs > .hand { font-size: 13.5px; line-height: 1.55; padding: 0 4px; }

/* ───────── おわり ───────── */
.sec[data-type=ending] .inner { padding-top: 430px; padding-bottom: calc(80px + env(safe-area-inset-bottom)); }
.fin { align-self: center; font-size: min(30vw, 140px); line-height: .8; text-align: center; }
.endtext { align-self: center; text-align: center; line-height: 2.4; margin-top: 30px; }
.colophon { align-self: stretch; display: grid; grid-template-columns: auto 1fr; gap: 6px 18px; border-top: 1px solid var(--ink); padding-top: 18px; margin-top: 50px; font-size: 12px; }
.colophon dt { font: 400 10px/2.2 var(--mono); letter-spacing: .2em; }

/* ───────── 写真を大きく見る ───────── */
#modal { z-index: 60; display: flex; align-items: flex-end; justify-content: center; background: #14110fd9; opacity: 0; transition: opacity .2s; }
#modal.show { opacity: 1; }
.modal-card { position: relative; width: 100%; max-height: 90dvh; overflow: auto; background: var(--paper); padding: 54px 22px calc(26px + env(safe-area-inset-bottom)); transform: translateY(100%); transition: transform .35s cubic-bezier(.2, 1, .3, 1); }
#modal.show .modal-card { transform: none; }
.close { position: absolute; top: 4px; right: 14px; min-height: 48px; }
.modal-photo { display: grid; gap: 14px; justify-items: start; }
.modal-photo img { width: 100%; max-height: 62dvh; object-fit: contain; border: 9px solid var(--white); box-shadow: 0 12px 24px #00000038; }

/* ───────── タブレット（縦）: スマホの組みをそのまま大きく ───────── */
@media (min-width: 720px) and (max-width: 999px) and (min-height: 600px) {
  .inner { zoom: 1.3; --full: calc(100vw / 1.3); }
  .sec[data-type=title] .inner { min-height: max(84dvh, 720px); }   /* 拡大される分、高さの指定は小さく */
}
@media (min-width: 720px) {
  #modal { align-items: center; }
  .modal-card { width: min(92%, 620px); padding-bottom: 30px; transform: translateY(40px); }
}

/* ───────── パソコン・タブレット（横）: 見出しと機械を左右に並べる ───────── */
@media (min-width: 1000px) {
  :root { --pad: 0px; }
  .inner { width: min(100% - 112px, 1120px); padding: 130px 0 150px; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); column-gap: 72px; row-gap: 24px; align-items: start; }
  .inner > * { grid-column: 1 / -1; }
  h2.serif { font-size: clamp(74px, 7.4vw, 104px); }
  .note { font-size: 17px; }
  .if-scroll { display: none; }
  .hint { justify-self: center; }
  .shelf { flex-wrap: wrap; justify-content: center; gap: 26px 18px; overflow: visible; width: 100%; margin: 0; padding: 14px 0 20px; }   /* 棚は折り返して全部見せる */
  .save-all { justify-self: center; }

  /* はじまり */
  .sec[data-type=title] .inner { display: flex; min-height: max(108dvh, 820px); padding-top: 34px; }
  .names { margin-top: 15dvh; }
  .names.script { font-size: min(17vw, 230px); }
  .names.jp { font-size: min(8vw, 104px); }
  .s-a { left: 3%; top: 50%; width: 250px; }
  .s-b { right: 2%; top: 44%; width: 210px; }
  .s-c { right: 24%; top: 66%; width: 190px; }
  .o-flower { width: 210px; left: -4%; top: 16%; }
  .o-key { width: 76px; left: 34%; top: 80%; }

  /* 動画: 見出しが左、テレビが右 */
  .sec[data-type=movie] .head { grid-column: 1; grid-row: 1 / span 3; align-self: center; }
  .sec[data-type=movie] .tv, .sec[data-type=movie] .controls, .sec[data-type=movie] .inner > p { grid-column: 2; }
  .tv { width: 100%; margin: 0; }
  .s-d { right: auto; left: 3%; top: 24px; width: 150px; }

  /* ステージ: 見出しを横に組み、幕は画面の高さに収まる大きさで中央に */
  .sec[data-type=stage] h2 { max-width: none; }
  .sec[data-type=stage] .head { grid-template-columns: minmax(0, auto) 1fr; column-gap: 64px; align-items: end; }
  .sec[data-type=stage] .head .cap { grid-column: 1 / -1; }
  .theatre, .sec[data-type=stage] .controls, .sec[data-type=stage] .inner > p { width: min(100%, max(560px, (100dvh - 250px) * 16 / 9)); justify-self: center; }
  .theatre { margin: 14px 0 0; }
  .o-cam { width: 190px; right: -3%; top: 50px; }
  .s-e { left: 3%; bottom: -80px; width: 190px; }

  /* ボイスメッセージ: 見出しが左、レコーダーが右、カセットは下に広げる */
  .sec[data-type=messages] .head { grid-column: 1; }
  .deck-row { grid-column: 2; justify-content: center; }
  .deck { width: min(56%, 330px); margin-left: 0; }
  .deck-row .ticket { flex: 0 1 250px; margin: 0 0 18% -6%; }

  /* 歌: ターンテーブルが左、見出しとレコードが右 */
  .sec[data-type=songs] .inner { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); }
  .sec[data-type=songs] .inner > :not(.deco):not(.snap) { grid-column: 2; }
  .sec[data-type=songs] .inner > .turntable:not(.deco):not(.snap) { grid-column: 1; grid-row: 1 / span 4; align-self: center; width: 100%; margin: 0; }
  .sec[data-type=songs] .head { grid-row: 1; }
  .nowspin { grid-row: 2; }
  .sec[data-type=songs] .hint { grid-row: 3; justify-self: start; }
  .crate { grid-row: 4; }
  .s-f { right: auto; left: -4%; top: 24px; width: 150px; }

  /* インタビュー: テレビデオが左、見出しと札が右、テープは下に広げる */
  .sec[data-type=interviews] .inner { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); }
  .vcr { grid-column: 1; grid-row: 1 / span 3; width: 100%; align-self: center; }
  .sec[data-type=interviews] .head, .ticket.wide, .sec[data-type=interviews] .controls { grid-column: 2; }
  .ticket.wide { width: 100%; margin: 10px 0 0; }
  .vhs { width: 142px; }
  .s-g { right: 3%; bottom: -150px; width: 200px; }

  /* おわり */
  .sec[data-type=ending] .inner { display: flex; align-items: center; padding-top: 340px; }
  .fin { font-size: 150px; }
  .colophon { align-self: center; width: min(100%, 520px); }
  .s-h { left: 3%; top: 70px; width: 210px; }
  .s-i { right: 4%; top: 110px; width: 200px; }
  .o-apple { width: 100px; left: 27%; top: 200px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before { transition-duration: .01s !important; transition-delay: 0s !important; animation: none !important; }
}
