/* 製品ページのスマートフォンの枠（4 製品で共用。2026-11-14 一憲さんの決定）。
   各製品の stylesheets/main.css の後に読む。枠の画像は tools/make_phone_frames.mjs が作る（同じフォルダーの frame-iphone.png・frame-android.png）。

   - #iphone           = iPhone 風の枠（銀・Dynamic Island）。後ろに、まっすぐ置く。中は iOS 版のアプリの画面。
   - #android・#iphone2 = Android 風の枠（黒・円形のカメラ穴）。前に、-4° 傾けて置く。中は Android 版のアプリの画面。
     （#iphone2 は明るく大きくの 2 台目の名前。今は Android 風の枠で表示する）
   - 枠は画面の上に重ねる（::after）。窓の角丸・Dynamic Island・カメラの穴は枠の画像が覆う。
   - 寸法: 枠の画像 488×976 を 244×488 で表示（2 倍の精細）。画面の窓は (14, 10) から 216×468（比 0.4615 ≒ 9:19.5）。
   - 中の写真は object-fit: contain。窓と同じ比（0.46 前後）の写真は窓の全体に表示され、古い 9:16 の写真は上下に黒い帯が表示されて、切れずに全体が見える。 */

#iphone, #android, #iphone2 {
	position: absolute;
	width: 244px;
	height: 488px;
	padding: 0;
	background: none;
	z-index: 1;
}

#iphone {
	top: -215px;
	left: 125px;
	-webkit-transform: none;
	transform: none;
}

#android, #iphone2 {
	top: 60px;
	left: 20px;
	-webkit-transform-origin: 50% 100%;
	transform-origin: 50% 100%;
	-webkit-transform: rotate(-4deg);
	transform: rotate(-4deg);
}

#iphone:hover, #android:hover, #iphone2:hover {
	z-index: 2;
}

#iphone::after, #android::after, #iphone2::after {
	content: "";
	position: absolute;
	left: 0;
	top: 0;
	width: 244px;
	height: 488px;
	background: url(frame-android.png?v=20261115a) no-repeat 0 0 / 244px 488px;
	pointer-events: none;
}

#iphone::after {
	background-image: url(frame-iphone.png?v=20261115a);
}

#iphone .img, #android .img, #iphone2 .img {
	position: absolute;
	left: 14px;
	top: 10px;
	width: 216px;
	height: 468px;
	overflow: hidden;
	background: #000;
	border-radius: 30px;
}

#iphone .img img, #android .img img, #iphone2 .img img {
	display: block;
	width: 216px;
	height: 468px;
	margin: 0;
	object-fit: contain;
	object-position: 50% 50%;
}

/* 本文の画面の写真にも iPhone 風の枠を付ける（一憲さん 2026-11-14「他のページやマニュアルのスクリーンキャプチャも、すべてこれ（新しい枠）に」）。
   対象: a.link.wide（色のめがね・眼の年齢シミュレータの概要、色のシミュレータのホーム・概要）と a.link.portrait3（4 製品のマニュアル）。
   どれも iOS 版のアプリの全画面（540×1173）。横向きの写真（明るく大きくの .wide2・.landscape2）は下の「横向き」の規則。
   - 囲みは枠の比（244:488）のまま、幅 214（並べて縮む所 .shots では、その幅）に合わせて縮める。窓の位置と大きさは枠の画像に対する % で決める
     （窓 (14, 10) 216×468 → 左 5.738%・上 2.049%・幅 88.525%・高さ 95.902%。角丸 30 px → 幅の 13.89%・高さの 6.41%）。
   - 押すと元の写真が開くのは今のまま（a の href）。「open image」の文字は font-size 0 で隠す。 */
a.link.wide, a.link.portrait3 {
	width: 214px;
	height: auto;
	aspect-ratio: 244 / 488;
	padding: 0;
	box-sizing: border-box;
	font-size: 0;
	line-height: 0;
}

a.link.wide img, a.link.portrait3 img {
	position: absolute;
	left: 5.738%;
	top: 2.049%;
	width: 88.525%;
	height: 95.902%;
	object-fit: contain;
	border-radius: 13.89% / 6.41%;
	background: #000;
}

a.link.wide::after, a.link.portrait3::after {
	content: "";
	position: absolute;
	left: 0;
	top: 0;
	width: 100%;
	height: 100%;
	background: url(frame-iphone.png?v=20261115a) no-repeat 0 0 / 100% 100%;
	pointer-events: none;
}

/* 横向きの画面の写真に、同じ iPhone 風の枠を左に 90° 倒して付ける（一憲さん 2026-11-15「横向きはそれで」。hq plans/site_phone_frames_2026-11-14.md §9-1）。
   対象: 明るく大きくの a.link.wide2（ホームのスクリーンイメージ 7 枚、マニュアルの斜め上から補正の前後）と a.link.landscape2（マニュアルの先頭）。
   中は iOS 版のアプリの横向きの全画面（1173×540）。Dynamic Island は左に来る。
   枠の画像は frame-iphone-land.png（976×488。tools/make_phone_frames.mjs が縦の iPhone 風の枠を左に倒して作る）。
   Dynamic Island だけは、実機の iPhone 18 Pro の横向きの画面の写しから測った位置と大きさ（窓の横の 1.62〜5.80 %・縦の 38.3〜61.7 %）にしてある。
   - 囲みは比 488:244（2:1）。幅は今のまま（.wide2 は 214、.landscape2 は 400。並べて縮む所 .shots では、その幅）。
   - 窓は縦の (14, 10) 216×468 を倒した (10, 14) 468×216 → 左 2.049%・上 5.738%・幅 95.902%・高さ 88.525%。角丸 30 px → 幅の 6.41%・高さの 13.89%。
   - 枠は ::after で囲みの全体に重ねる。 */
a.link.wide2, a.link.landscape2 {
	height: auto;
	max-width: 100%;
	aspect-ratio: 488 / 244;
	padding: 0;
	box-sizing: border-box;
	font-size: 0;
	line-height: 0;
	background: none;
}

a.link.wide2 { width: 214px; }
a.link.landscape2 { width: 400px; }

a.link.wide2 img, a.link.landscape2 img {
	position: absolute;
	left: 2.049%;
	top: 5.738%;
	width: 95.902%;
	height: 88.525%;
	object-fit: contain;
	border-radius: 6.41% / 13.89%;
	background: #000;
}

a.link.wide2::after, a.link.landscape2::after {
	content: "";
	position: absolute;
	left: 0;
	top: 0;
	width: 100%;
	height: 100%;
	background: url(frame-iphone-land.png?v=20261115a) no-repeat 0 0 / 100% 100%;
	pointer-events: none;
}
