/* 女風クエスト — すべて .jfq の中に閉じ込める（テーマのスタイルと干渉させない） */
.jfq,
.jfq *,
.jfq *::before,
.jfq *::after {
	box-sizing: border-box;
}

.jfq {
	width: 100%;
	max-width: var(--jfq-max, 960px);
	margin: 2em auto;
}

.jfq .jfq-stage {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 9;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	background: #120e14;
	border-radius: 6px;
	box-shadow: 0 6px 24px rgba(18, 14, 20, .28);
	-webkit-user-select: none;
	user-select: none;
	-webkit-touch-callout: none;
	-webkit-tap-highlight-color: transparent;
}

/* aspect-ratio 非対応ブラウザ向け */
@supports not (aspect-ratio: 16 / 9) {
	.jfq .jfq-stage { height: 0; padding-top: 56.25%; }
	.jfq .jfq-stage .jfq-canvas { position: absolute; top: 0; left: 0; }
}

.jfq .jfq-canvas {
	display: block;
	max-width: none !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	outline: none;
	touch-action: none;
}

.jfq .jfq-loading {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1em;
	color: #c9a45e;
	font: 700 15px/1.6 "Shippori Mincho", "Yu Mincho", "Hiragino Mincho ProN", serif;
	letter-spacing: .2em;
	text-align: center;
}

.jfq .jfq-caption {
	margin: .7em 0 0 !important;
	padding: 0 !important;
	font-size: 13px;
	line-height: 1.7;
	color: #6a6158;
}

.jfq-note {
	padding: .8em 1em;
	border-left: 3px solid #c9a45e;
	background: #f6f1e7;
	font-size: 14px;
}

/* 本物の全画面 */
.jfq .jfq-stage:fullscreen {
	width: 100vw;
	height: 100vh;
	aspect-ratio: auto;
	border-radius: 0;
	padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}
.jfq .jfq-stage:-webkit-full-screen {
	width: 100vw;
	height: 100vh;
	border-radius: 0;
}

/* 疑似全画面（iPhone など Fullscreen API が使えない端末） */
.jfq.is-fs .jfq-stage {
	position: fixed;
	top: 0;
	left: 0;
	width: 100vw;
	height: 100vh;
	height: 100dvh;
	aspect-ratio: auto;
	border-radius: 0;
	z-index: 2147483000;
	padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}
html.jfq-lock,
html.jfq-lock body {
	overflow: hidden !important;
}

/* 全画面を縦持ちで開いたときの案内 */
@media (orientation: portrait) {
	.jfq.is-fs .jfq-stage::after,
	.jfq .jfq-stage:fullscreen::after {
		content: "スマホを横向きにすると大きく遊べます";
		position: absolute;
		left: 0;
		right: 0;
		bottom: calc(env(safe-area-inset-bottom) + 28px);
		color: #c9a45e;
		font: 700 14px/1.6 "Shippori Mincho", "Yu Mincho", "Hiragino Mincho ProN", serif;
		letter-spacing: .1em;
		text-align: center;
		pointer-events: none;
	}
}
