@charset 'UTF-8';

/*
 * 作品一覧・作品詳細の動画プレーヤー（YouTube アプリの操作を再現する）の CSS
 * 動きは assets/js/player.js で 1 コマずつ位置を決めているので、CSS の transition は使わない
 * 重なり順：ヘッダー・メニュー（z-index 9 まで）< 詳細のシート（10）< Close（11）< 動画（12）< 画面いっぱいの全画面（13）
 */

/* 詳細を開いている間は、下の一覧をスクロールさせない。
 * 右端のスクロールバー用の余白（PC）も、詳細の背景と同じく白く塗る */
html.watch-open { overflow: hidden; background: rgba(255, 255, 255, var(--watch-bg, 1)); }

/* 詳細（watch）のシート：一覧の上に重ね、中身は自分でスクロールする。ヘッダーやメニューより上 */
/* 閉じるときはシートを動かさず、白い背景（--watch-bg）・下の一覧に掛けるぼかし（--watch-blur）・文字（--watch-content）をそれぞれ薄くする（assets/js/player.js の setSheet） */
#watch-sheet { position: fixed; inset: 0; z-index: 10; background: rgba(255, 255, 255, var(--watch-bg, 1)); -webkit-backdrop-filter: blur(var(--watch-blur, 0px)); backdrop-filter: blur(var(--watch-blur, 0px)); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; visibility: hidden; -webkit-overflow-scrolling: touch; }
/* シートの中のスクロールバーは出さない（スクロールはできる） */
#watch-sheet::-webkit-scrollbar { display: none; }
#watch-sheet.is-open { visibility: visible; }
	.watch-sheet-content { opacity: var(--watch-content, 1); }
	.watch-sheet-slot { display: none; }
	.watch-sheet-content .text_wrap { float: none; width: 50%; margin-left: 50%; padding: 10.9375vw 6.25vw 6.25vw 0; box-sizing: border-box; }

@media screen and (max-width: 940px) {
	/* スマホ：上に固定した動画の下から本文が始まる（本文は動画の下をくぐってスクロールする） */
	.watch-sheet-slot { display: block; height: 56.25vw; }
	.watch-sheet-content .text_wrap { width: 100%; margin: 0; padding: 6vw 10vw 10vw; }
}

/* PC：詳細を開いている間は、ヘッダー（ロゴ・Menu）の代わりに右上に Close を出す（シートの上、動画の下）。
 * 一覧へは Close で戻るので、動画の左上の下矢印は出さない */
/* 文字の色と描き方は Menu と同じ（assets/css/site.css） */
#watch-close { position: fixed; top: 1vw; right: 1vw; z-index: 11; display: none; padding: 0; border: 0; background: none; color: #fff; font: inherit; cursor: pointer; mix-blend-mode: difference; }
@media screen and (min-width: 941px) {
	#watch-sheet.is-open ~ #watch-close { display: block; }
	.watch-c-min { display: none; }
}

/* PC：一覧のサムネイルにマウスを乗せたときの動画。サムネイルの枠全体を覆い、動き出すまでは透明（下のサムネイルが見える） */
.watch-preview { position: absolute; inset: 0; z-index: 1; overflow: hidden; container-type: size; pointer-events: none; opacity: 0; }
.watch-preview.is-playing { opacity: 1; }
	.watch-preview > div { position: absolute; inset: 0; }
	.watch-preview iframe { position: absolute; top: 50%; left: 50%; width: max(100cqw, 177.78cqh); height: max(100cqh, 56.25cqw); transform: translate(-50%, -50%); border: 0; }

/* 動画プレーヤー：位置と大きさは JS で決める。中の動画は枠の中に全体を収める */
#watch-player { position: fixed; z-index: 12; display: none; overflow: hidden; background: #000; container-type: size; touch-action: none; -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent; }
#watch-player.is-active { display: block; }
	.watch-media, .watch-media > div { position: absolute; inset: 0; }
	.watch-media iframe { position: absolute; top: 50%; left: 50%; width: min(100cqw, 177.78cqh); height: min(100cqh, 56.25cqw); transform: translate(-50%, -50%); border: 0; pointer-events: none; }
	/* 動画が動き出すまではサムネイルを出しておく */
	.watch-poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; }
	#watch-player.is-playing .watch-poster { display: none; }
	/* 指の動きを受け取る面（動画の上に重ねる） */
	.watch-touch { position: absolute; inset: 0; }

/* 操作 UI（タップで表示、再生中は 3 秒で隠れる） */
.watch-controls { position: absolute; inset: 0; pointer-events: none; opacity: 0; background: rgba(0, 0, 0, .4); }
#watch-player.show-controls .watch-controls { opacity: 1; }
#watch-player.show-controls .watch-controls button, #watch-player.show-controls .watch-seek { pointer-events: auto; }
#watch-player.is-mini .watch-controls, #watch-player.no-video .watch-controls { display: none; }
	.watch-controls button { padding: 0; border: 0; background: none; color: #fff; cursor: pointer; -webkit-tap-highlight-color: transparent; }
	/* 指が触れるのは常にボタン本体にする（中のアイコンには触れさせない） */
	.watch-controls svg { display: block; width: 100%; height: 100%; fill: currentColor; pointer-events: none; }
	/* ボタンは押しやすいよう 44〜48px 四方（見た目のアイコンはそのまま） */
	.watch-c-min { position: absolute; top: 0; left: 0; width: 48px; height: 48px; padding: 6px; box-sizing: border-box; }
	.watch-c-mute { position: absolute; top: 0; right: 0; width: 48px; height: 48px; padding: 12px; box-sizing: border-box; }
	.watch-c-play { position: absolute; top: 50%; left: 50%; width: 64px; height: 64px; padding: 4px; box-sizing: border-box; transform: translate(-50%, -50%); }
	.watch-c-bar { position: absolute; left: 12px; right: 0; bottom: 0; display: flex; align-items: center; gap: 10px; color: #fff; font-size: 12px; line-height: 1; font-family: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif; }
		.watch-c-time { white-space: nowrap; font-variant-numeric: tabular-nums; }
		.watch-c-fs { flex: none; width: 44px; height: 44px; padding: 10px; box-sizing: border-box; }
	/* シークバー：指でつかんで動かせる */
	.watch-seek { position: relative; flex: 1; height: 28px; touch-action: none; cursor: pointer; }
		.watch-seek-track, .watch-seek-fill { position: absolute; left: 0; top: 50%; height: 3px; margin-top: -1.5px; }
		.watch-seek-track { right: 0; background: rgba(255, 255, 255, .35); }
		.watch-seek-fill { width: 0; background: #fff; }
		.watch-seek-knob { position: absolute; top: 50%; left: 0; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; background: #fff; }
		.watch-seek.is-scrubbing .watch-seek-knob { transform: scale(1.4); }

/* ダブルタップで 10 秒送り・戻しの表示 */
.watch-ripple { position: absolute; top: 0; bottom: 0; width: 38%; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 13px; font-family: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif; background: rgba(255, 255, 255, .12); opacity: 0; pointer-events: none; }
.watch-ripple.is-left { left: 0; border-radius: 0 50% 50% 0 / 0 50% 50% 0; }
.watch-ripple.is-right { right: 0; border-radius: 50% 0 0 50% / 50% 0 0 50%; }
.watch-ripple.is-show { opacity: 1; }

/* ミニプレーヤー：右下に浮かぶ小さい動画の左上に矢印（目印）、右上に ×。現れ方は JS が --watch-mini で決める */
.watch-m-expand, .watch-m-close { position: absolute; top: 0; display: none; color: #fff; opacity: var(--watch-mini, 0); filter: drop-shadow(0 0 3px rgba(0, 0, 0, .6)); }
	.watch-m-expand { left: 0; width: 32px; height: 32px; padding: 6px; box-sizing: border-box; pointer-events: none; }
	.watch-m-close { right: 0; width: 44px; height: 44px; padding: 10px; box-sizing: border-box; border: 0; background: none; cursor: pointer; -webkit-tap-highlight-color: transparent; }
	.watch-m-expand svg, .watch-m-close svg { display: block; width: 100%; height: 100%; fill: currentColor; pointer-events: none; }
#watch-player.is-mini .watch-m-expand, #watch-player.is-mini .watch-m-close { display: block; }
/* 角を丸めたときに中の動画もきちんと切り抜く（iPhone） */
#watch-player { isolation: isolate; -webkit-mask-image: -webkit-radial-gradient(white, black); }

/* 全画面：Android・PC は端末の全画面、iPhone は画面いっぱいに広げる */
#watch-player:fullscreen, #watch-player.is-pseudo-fs { inset: 0 !important; left: 0 !important; top: 0 !important; width: 100% !important; height: 100% !important; }
#watch-player.is-pseudo-fs { z-index: 13; }
