* {
	margin: 0;
	padding: 0;
	position: relative;
	box-sizing: border-box;
	font-family: system-ui, -apple-system;
}

html,
body {
	width: 100svw;
	height: 100svh;
	background: black;
	overflow: hidden;
}

body {
	display: flex;
	justify-content: center;
	align-items: center;
}

body > * {
	position: absolute;
	pointer-events: none;
	user-select: none;
}

.space {
	width: 100%;
	height: 100%;
}

.space > *:not(img) {
	pointer-events: all;
}

[background] {
	z-index: 1;
}

[background] img {
	width: 100%;
	height: 100%;
}

[launchers].space {
	padding: 8px;
	z-index: 2;
	display: flex;
	justify-content: flex-start;
	align-items: flex-start;
	flex-flow: column wrap;
	gap: 4px;
}

[launcher] {
	width: 96px;
	display: block;
	cursor: pointer;
	overflow: hidden;
	display: flex;
	justify-content: space-evenly;
	flex-flow: column nowrap;
	align-items: center;
	color: var(--text-primary);
}

[launcher]:hover {
	background: rgba(255, 255, 255, 10%);
	border-radius: 8px;
}

[launcher] img {
	max-width: 100%;
	padding: 8px;
	aspect-ratio: 1;
	border-radius: 16px;
	overflow: hidden;
}

[launcher] p {
	max-width: 100%;
	text-overflow: ellipsis;
	text-align: center;
}

[windows].space {
	z-index: 3;
}

[window] {
	position: absolute;
	z-index: 4;
	min-width: 12.5svw;
	min-height: 12.5svh;
	max-width: 95svw;
	max-height: 95svh;
	width: 37.5svw;
	height: 37.5svh;
	background: var(--background-window);
	border-radius: 8px;
	border: solid 4px var(--border-subtle);
	padding: 4px;
	display: flex;
	justify-content: center;
	align-items: center;
	flex-flow: column nowrap;
}

[window].moving iframe,
[window].resizing iframe {
	pointer-events: none;
}

[window].resizing.bottom { cursor: s-resize; }
[window].resizing.top { cursor: n-resize; }

[window].resizing.left { cursor: w-resize; }
[window].resizing.right { cursor: e-resize; }

[window].resizing.top.left { cursor: nw-resize; }
[window].resizing.bottom.left { cursor: sw-resize; }

[window].resizing.top.right { cursor: ne-resize; }
[window].resizing.bottom.right { cursor: se-resize; }

[window] [titlebar] {
	width: 100%;
	height: 2svh;
	border: none;
}

[window] [content] {
	width: 100%;
	flex: 1;
	border: none;
}
