/**
 * Flash/H5 入口壳：选择层、视口、compat iframe、embed chrome。
 * 无 Flash 内嵌 UI 的 .pkt-fmd-* 组件样式在 picatown-flash-missing-dialog.css（须在同页于本文件之后或至少一并加载）。
 * 背景图：可设 --picatown-runtime-bg-img；默认 CDN res/bg.png。
 */
#runtimePlayViewport {
	margin: 0 auto;
	width: 950px;
	height: 562px;
	position: relative;
	z-index: 10;
	overflow: hidden;
	box-sizing: border-box;
}

#panelH5 .canvas-wrapper {
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
	width: 100%;
	height: 100%;
	min-height: 562px;
	display: flex;
	flex-direction: column;
	align-items: stretch;
	justify-content: flex-start;
}

#panelH5 #picatown-h5-compat-iframe {
	display: block;
	width: 950px;
	height: 540px;
	flex-shrink: 0;
	max-width: 100%;
	border: 0;
	margin: 0;
	padding: 0;
	background: #222230;
	box-sizing: border-box;
	vertical-align: top;
}

#panelH5 .h5-compat-bottom {
	display: block;
	width: 950px;
	height: 22px;
	flex-shrink: 0;
	max-width: 100%;
	margin: 0;
	padding: 0;
	border: 0;
	object-fit: fill;
	object-position: center bottom;
	pointer-events: none;
	image-rendering: -moz-crisp-edges;
	image-rendering: -webkit-optimize-contrast;
	image-rendering: pixelated;
	image-rendering: crisp-edges;
	-ms-interpolation-mode: nearest-neighbor;
}

#panelH5 #content {
	width: 950px;
	height: 562px;
	max-width: 100%;
	background: #222230;
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

#panelH5 canvas {
	image-rendering: -moz-crisp-edges;
	image-rendering: -webkit-optimize-contrast;
	image-rendering: pixelated;
	image-rendering: crisp-edges;
	-ms-interpolation-mode: nearest-neighbor;
}

#runtimePickStage {
	display: none;
	position: absolute;
	left: 0;
	top: 0;
	right: 0;
	bottom: 0;
	z-index: 20;
	box-sizing: border-box;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	background: #1a1a24 var(--picatown-runtime-bg-img, url(https://h5.tooqing.com/static/res/bg.png)) center center / cover no-repeat;
	image-rendering: -moz-crisp-edges;
	image-rendering: -webkit-optimize-contrast;
	image-rendering: pixelated;
	image-rendering: crisp-edges;
	-ms-interpolation-mode: nearest-neighbor;
}

#runtimePickStage img {
	image-rendering: -moz-crisp-edges;
	image-rendering: -webkit-optimize-contrast;
	image-rendering: pixelated;
	image-rendering: crisp-edges;
	-ms-interpolation-mode: nearest-neighbor;
}

#runtimePickStage.runtime-pick-visible {
	display: flex;
}

/* 无 Flash：隐藏双按钮与记忆勾选，显示内嵌「弹窗风」提示与「前往H5」 */
#runtimePickStage.runtime-pick-no-flash .runtime-pick-row,
#runtimePickStage.runtime-pick-no-flash .runtime-pick-toggle-hit {
	display: none !important;
}

.runtime-no-flash-ui {
	display: none;
	flex: 1;
	width: 100%;
	min-height: 0;
	align-items: center;
	justify-content: center;
	flex-direction: column;
	box-sizing: border-box;
}

#runtimePickStage.runtime-pick-no-flash .runtime-no-flash-ui {
	display: flex;
}

/* pkt-fmd-* 见 picatown-flash-missing-dialog.css；此处仅保留 runtime-no-flash--plain 布局覆盖 */

/* 无弹窗底图（如 pktgame index_v3）：纵向居中，文案与「前往H5」水平居中 */
#runtimeNoFlashPanel.runtime-no-flash--plain .pkt-fmd-stage {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 28px;
	padding: 24px 16px;
	box-sizing: border-box;
}

#runtimePlayViewport #panelFlash,
#runtimePlayViewport #panelH5 {
	position: relative;
	z-index: 1;
	width: 100%;
	height: 100%;
	min-height: 562px;
	margin: 0;
	box-sizing: border-box;
}

.runtime-pick-row {
	display: flex;
	flex-direction: row;
	align-items: center;
	justify-content: center;
	flex-wrap: wrap;
	gap: 160px;
	margin-top: 60px;
	padding: 12px 16px;
	box-sizing: border-box;
}

.runtime-choice-btn {
	position: relative;
	display: inline-block;
	padding: 0;
	margin: 0;
	border: none;
	background: transparent;
	cursor: pointer;
	line-height: 0;
	vertical-align: middle;
}

.runtime-pick-btn .runtime-choice-base {
	display: block;
	max-width: 400px;
	width: auto;
	height: auto;
}

.runtime-choice-btn .runtime-choice-over {
	position: absolute;
	left: 0;
	top: 0;
	width: 100%;
	height: 100%;
	object-fit: fill;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.12s ease;
}

.runtime-choice-btn:hover .runtime-choice-over,
.runtime-choice-btn:focus .runtime-choice-over {
	opacity: 1;
}

.runtime-choice-btn:focus {
	outline: 2px solid rgba(255, 255, 255, 0.6);
	outline-offset: 4px;
}

.runtime-pick-toggle-hit {
	position: absolute;
	left: 50%;
	bottom: 124px;
	transform: translateX(-50%);
	padding: 0;
	margin: 0;
	border: none;
	background: transparent;
	cursor: pointer;
	line-height: 0;
}

.runtime-pick-toggle-hit img {
	display: block;
	max-height: 40px;
	width: auto;
	height: auto;
	pointer-events: none;
}

.visually-hidden-runtime {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* 内嵌宿主背景 / 透明（URL 参数与 postMessage，见 picatown-shell-runtime.js） */
html.pkt-embed-chrome-custom {
	--pkt-chrome-bg: #222230;
}

html.pkt-embed-chrome-custom #panelH5,
html.pkt-embed-chrome-custom #panelH5 #picatown-h5-compat-iframe {
	background: var(--pkt-chrome-bg) !important;
}

html.pkt-embed-chrome-transparent,
html.pkt-embed-chrome-transparent body {
	background: transparent !important;
}

html.pkt-embed-chrome-transparent #runtimePlayViewport.game,
html.pkt-embed-chrome-transparent #runtimePlayViewport #panelH5 {
	background: transparent !important;
}

html.pkt-embed-chrome-transparent #panelH5 #picatown-h5-compat-iframe {
	background: transparent !important;
}

html.pkt-embed-chrome-transparent #panelH5 .canvas-wrapper {
	background: transparent !important;
	box-shadow: none !important;
}

html.pkt-embed-chrome-transparent #panelH5 .h5-compat-bottom {
	opacity: 0;
}
