/* NEW convenience geometry only. Source windows keep their640x480 uniform stage. */
body.original-ui-v6.lk-viewport-v8 {
	grid-template-rows: var(--lk-v8-top) minmax(0, 1fr) var(--lk-v8-bottom);
}
body.original-ui-v6.lk-viewport-v8[data-lk-screen-mode-v8="fullscreen"] footer,
body.original-ui-v6.lk-viewport-v8[data-lk-screen-mode-v8="essentials"] footer {
	display: none;
}
/* Essentials keeps the existing44px controls reachable as an overlay. Control
   visibility belongs to the presentation module, not this geometry adapter. */
body.original-ui-v6.lk-viewport-v8[data-lk-screen-mode-v8="essentials"]
	.topbar {
	position: fixed;
	top: env(safe-area-inset-top, 0px);
	left: 0;
	right: 0;
	width: 100%;
	height: 44px;
	grid-row: auto;
	background: transparent;
	pointer-events: none;
}
body.original-ui-v6.lk-viewport-v8[data-lk-screen-mode-v8="essentials"]
	.topbar
	> * {
	pointer-events: auto;
}
body.original-ui-v6.lk-viewport-v8 .game-shell[data-lk-viewport-v8="wide"],
body.original-ui-v6.lk-viewport-v8
	.game-shell.classic[data-lk-viewport-v8="wide"],
body.original-ui-v6.lk-viewport-v8.lk-fullscreen
	.game-shell.classic[data-lk-viewport-v8="wide"] {
	position: relative;
	inset: auto;
	align-self: start;
	justify-self: start;
	width: var(--lk-v8-width) !important;
	height: var(--lk-v8-height) !important;
	min-width: 0;
	min-height: 0;
	max-width: none;
	max-height: none;
	aspect-ratio: auto;
	margin: 0 0 0 var(--lk-v8-safe-left) !important;
	padding: 0 !important;
}
body.original-ui-v6.lk-viewport-v8
	.game-shell[data-lk-viewport-v8="wide"]
	.viewport {
	inset: 0 !important;
	width: 100%;
	height: 100% !important;
	aspect-ratio: auto;
	min-height: 0 !important;
}
body.original-ui-v6.lk-viewport-v8
	.game-shell.classic.native-ui-v4[data-lk-viewport-v8="wide"]
	.bottom-panel {
	inset: auto !important;
	left: var(--lk-v8-hud-x) !important;
	top: var(--lk-v8-hud-y) !important;
	width: var(--lk-v8-hud-width) !important;
	height: var(--lk-v8-hud-height) !important;
	aspect-ratio: 640 / 120;
}
/* Move each original window together with its real controls. The full-width
   modal layer stays in place so its backdrop/input blocking keeps both edges. */
body.original-ui-v6.lk-viewport-v8
	.game-shell[data-lk-viewport-v8="wide"]
	.native-window-layer-v6
	.native-window-v6 {
	transform: translateX(var(--lk-v8-native-offset-x, 0px));
}
