* {
	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;
}

[space] {
	width: 100%;
	height: 100%;
	position: absolute;
	pointer-events: none;
	user-select: none;
}

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

[space="background"] {
	z-index: 1;
	opacity: 0;
}

[space="background"] img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

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

[space="window"] { z-index: 3; }

[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);
	padding-bottom: 8px;
	border-radius: 8px;
}

[launcher]:hover {
	background: rgba(255, 255, 255, 10%);
	
}

[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;
}

[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;
	gap: 4px;
}

[window].resizing iframe,
[window].moving 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;
}

[window].opening,
[window].closing {
	opacity: 0;
	pointer-events: none;
}

[window].minimise {
	opacity: 0;
	pointer-events: none;
}

[window].maximise {
	top: 0 !important;
	left: 0 !important;
	
	width: 100% !important;
	height: 100% !important;

	max-width: 100%;
	max-height: 100%;

	border: none;
	border-radius: 0;
}

[dock]::before {
	content: "";
	inset: 0;
	background: var(--background-surface);
	opacity: 75%;
	position: absolute;
}

[dock] {
	position: absolute;
	z-index: 20;
	bottom: 24px;
	width: 12.5svw;
	height: 32px;
	max-width: 90svw;
	border-radius: 8px;
	overflow: hidden;
	color: var(--text-primary);
	font-size: small;
	display: flex;
	flex-flow: row nowrap;
	padding: 0px 8px;
	justify-content: center;
	align-items: center;
	gap: 4px;
	user-select: none;
}

[dock] [open] {
	flex: 1;
	height: 100%;
	padding: 2px 0;
	display: flex;
	flex-flow: row nowrap;
	overflow: auto hidden;
	justify-content: flex-start;
	align-items: flex-start;
	gap: 4px;
}

[dock] [time] {
	display: flex;
	flex-flow: column nowrap;
	justify-content: center;
	align-items: center;
}

[dock] [icon] {
	aspect-ratio: 1;
	max-height: 100%;
	cursor: pointer;
}