* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
	font-family: sans-serif;
}

html {
	background: var(--desktopBGColor);
	font-size: 16px;
	height: 100%;
	overscroll-behavior: none;
	overflow: hidden;
	
	--desktopIconSize: 3rem;
	--desktopBGColor: #008080;
	--desktopBGColorTransparent: #00808088;
	--itemBGColor: #c0c0c0;
	--selectedColor: #000080;
	--selectedColorTransparent: #00008088;
	--selectedColorText: #fff;
	--textColor: #000;
}

body {
	background: url("../images/background.jpg");
	background-size: cover;
	background-repeat: no-repeat;
	background-position: 50% 50%;
	height: 100%;
    display: grid;
    grid-template-rows: 1fr auto;
	user-select: none;
	touch-action: none;
}

a {
	text-decoration: none;
	color: var(--textColor);
}

img {
    image-rendering: pixelated;
}

desktop {
    display: flex;
    flex-wrap: wrap;
    flex-direction: column;
    max-height: 100cqh;
    align-content: flex-start;
    justify-content: flex-start;
    container: desktop / size;
    padding: 0.5rem;
    gap: 1rem;
	align-items: center;
	position: relative;
	grid-row: 1 / 2;
    grid-column: 1 / 2;
}

desktop-icon {
    width: min-content;
    display: block;
    text-align: center;
    color: var(--selectedColorText);
}

desktop-icon .icon {
	display: inline-block;
    width: var(--desktopIconSize);
    height: var(--desktopIconSize);
	pointer-events: none;
}

desktop-icon span {
    background: var(--desktopBGColor);
    padding: 0.125rem;
    display: block;
	border: 1px solid transparent;
	pointer-events: none;
}


input.selectIcon {
	appearance: none;
	opacity: 0;
	width: 0px;
	height: 0px;
	position: absolute;
}

input[type=text] {
	outline: none;
	border: none; 
}

.input_text {
	display: inline-block;
	position: relative;
	background: #fff;
	border-top: 1px solid #000;
	border-left: 1px solid #000;
	border-right: 1px solid #dfdfdf;
	border-bottom: 1px solid #dfdfdf;
	padding-inline: 0.125rem;
	cursor: text;
}

.input_text::before,
.input_text::after,
.input_checkbox::before,
.input_checkbox::after {
	content: '';
	position: absolute;
	z-index: -1;
}

.input_text::before,
.input_checkbox::before {
	border-top: 1px solid #808080;
	border-left: 1px solid #808080;
	inset: -1px;
	left: -2px;
	top: -2px;
}

.input_text::after,
.input_checkbox::after {
	border-right: 1px solid #fff;
	border-bottom: 1px solid #fff;
	right: -2px;
	bottom: -2px;
	inset: -2px;
}


.input_checkbox {
	display: inline-block;
	position: relative;
	background: #fff;
	border-top: 1px solid #000;
	border-left: 1px solid #000;
	border-right: 1px solid #dfdfdf;
	border-bottom: 1px solid #dfdfdf;
	height: 0.8rem;
    width: 0.8rem;
}

.input_checkbox:has(input:checked) span.checkmark {
    height: 0.4rem;
    width: 0.6rem;
    position: absolute;
    display: block;
    border-left: 2px solid #000;
    border-bottom: 2px solid #000;
    rotate: -45deg;
    transform-origin: 100% 100%;
    top: -0.2rem;
    left: 0.1rem;
}

.input_checkbox + .input_textlabel {
	border: 1px dotted transparent;
	/* padding-inline: 0.25rem; */
	margin-inline: 0.25rem;
	transition: 10ms 50ms border;
}

/* .input_checkbox:focus-within + .input_textlabel { */
.input_checkbox:focus-within + .input_textlabel {
	border: 1px dotted #000;
}

.input_checkbox input {
	position: absolute;
	opacity: 0;
	width: 0px;
	height: 0px;
}

desktop-icon:has(input.selectIcon:checked) img,
desktop-icon[data-focus="1"] img {
	filter: brightness(0.5);
}

desktop-icon:has(input.selectIcon:checked) span,
desktop-icon[data-focus="1"] span {
	background: var(--selectedColor);
}

desktop-icon[data-focus="1"] span {
	border: 1px dotted #fff;
}

desktop .dragline {
    border: 1px dashed #fff;
    position: absolute;
}




contextmenu {
	display: none;
    position: absolute;
	top: 0px;
	left: 0px;
	border-top: 1px solid #dfdfdf;
	border-left: 1px solid #dfdfdf;
	border-right: 1px solid #000;
	border-bottom: 1px solid #000;
	z-index: 100;
}

contextmenu-content {
    display: block;
	position: relative;
    background: var(--itemBGColor);
	border-top: 1px solid #fff;
	border-left: 1px solid #fff;
	border-right: 1px solid #808080;
	border-bottom: 1px solid #808080;
}

contextmenu-item {
    display: block;
    padding: 0.25rem 1.5rem;
}

contextmenu-item.default {
	font-weight: 700;
}

contextmenu-item:hover {
	background: var(--selectedColor);
	color: var(--selectedColorText);
}




windows {
    position: relative;
    inset: 0px;
    overflow: hidden;
    pointer-events: none;
	grid-row: 1 / 2;
    grid-column: 1 / 2;
}

window {
	display: block;
    position: absolute;
    top: 100px;
    left: 100px;
	pointer-events: auto;
}

window-content {
	display: block;
	position: relative;
	isolation: isolate;
    background: var(--itemBGColor);
	border-top: 1px solid #dfdfdf;
	border-left: 1px solid #dfdfdf;
	border-right: 1px solid #808080;
	border-bottom: 1px solid #808080;
}

window-content::before,
window-content::after {
	content: '';
	position: absolute;
	z-index: -1;
}

window-content::before {
	border-top: 1px solid #fff;
	border-left: 1px solid #fff;
	inset: -1px;
	left: -2px;
	top: -2px;
}

window-content::after {
	border-right: 1px solid #000;
	border-bottom: 1px solid #000;
	right: -2px;
	bottom: -2px;
	inset: -2px;
}

window-titlebar {
    display: grid;
    grid-template-columns: auto 1fr auto;
	background: linear-gradient(90deg, var(--desktopBGColor), var(--desktopBGColorTransparent));
	color: var(--selectedColorText);
	padding: 0.25rem 0.25rem 0.25rem 0.5rem;
	gap: 1rem;
}

window[data-focus="1"] window-titlebar {
	background: linear-gradient(90deg, var(--selectedColor), var(--selectedColorTransparent));
}

window-titlebar .icon {
	display: inline-block;
    width: 1rem;
    height: 1rem;
}

window-titlebar window-title,
window-titlebar .icon {
	pointer-events: none;
}

window-controls {
	display: flex;
	gap: 0.25rem;
}

window-titlebar .button {
	width: 1rem;
}

window-main {
	display: block;
	padding: 1rem;
}



window[data-state="minimized"] {
    opacity: 0;
	pointer-events: none;
	display: none;
}

window[data-state="maximized"] {
    inset: 0px;
}


window[data-state="maximized"] window-content {
    height: 100%;
}

window[data-state="maximized"] .fa-window-maximize::before {
	content: "\f2d2";
}


footer {
	background: var(--itemBGColor);
	border-top: 1px solid #fff;
	box-shadow: 0px -1px 1px #dfdfdf;
	padding: 0.25rem;
	display: grid;
	grid-template-columns: auto 1fr auto;
	position: relative;
}

footer start-button,
.button {
	display: inline-grid;
	align-items: center;
	position: relative;
	border-top: 1px solid #dfdfdf;
	border-left: 1px solid #dfdfdf;
	border-right: 1px solid #808080;
	border-bottom: 1px solid #808080;
	isolation: isolate;
	background: var(--itemBGColor);
	color: #000;
	font-weight: 600;
	font-size: 0.75rem;
	line-height: 0.75rem;
	text-align: center;
}

.button {
	text-align: center;
}

.button .fa-xmark {
	font-size: 1rem;
}

.button:active {
	border-top: 1px solid #808080;
    border-left: 1px solid #808080;
    border-right: 1px solid #dfdfdf;
    border-bottom: 1px solid #dfdfdf;
}

.button:active::before {
	border-top: 1px solid #000;
	border-left: 1px solid #000;
}

.button:active::after {
	border-right: 1px solid #fff;
	border-bottom: 1px solid #fff;
}

.button:active i {
	margin-top: 1px;
	margin-bottom: -1px;
}

footer start-button {
	display: grid;
    grid-template-columns: auto auto;
    align-items: center;
    gap: 0.5rem;
	padding: 0.25rem 0.5rem;
	font-size: 1rem;
	line-height: 1rem;
}

footer start-button::before,
footer start-button::after,
footer startmenu::before,
footer startmenu::after,
.button::before,
.button::after {
	content: '';
	position: absolute;
	z-index: -1;
}

footer start-button::before,
footer startmenu::before,
.button::before {
	border-top: 1px solid #fff;
	border-left: 1px solid #fff;
	inset: -1px;
	left: -2px;
	top: -2px;
}

footer start-button::after,
footer startmenu::after,
.button::after {
	border-right: 1px solid #000;
	border-bottom: 1px solid #000;
	right: -2px;
	bottom: -2px;
	inset: -2px;
}

footer start-button span {
	font-weight: 600;
}

footer start-button img {
	display: block;
}

footer start-button input {
	appearance: none;
	opacity: 0;
	width: 0px;
	height: 0px;
	position: absolute;
}

footer start-button:has(input:checked) {
	border-top: 1px solid #808080;
	border-left: 1px solid #808080;
	border-right: 1px solid #dfdfdf;
	border-bottom: 1px solid #dfdfdf;
	padding: calc(0.25rem + 2px) calc(0.5rem - 1px) calc(0.25rem - 2px) calc(0.5rem + 1px);
}

footer start-button:has(input:checked)::before {
	border-top: 1px solid #000;
	border-left: 1px solid #000;
}

footer start-button:has(input:checked)::after {
	border-right: 1px solid #fff;
	border-bottom: 1px solid #fff;
}

footer startmenu {
	display: none;
    position: absolute;
    /* width: 203px; */
    /* height: 200px; */
    background: var(--itemBGColor);
	border-top: 1px solid #dfdfdf;
	border-left: 1px solid #dfdfdf;
	border-right: 1px solid #808080;
	border-bottom: 1px solid #808080;
    top: 2px;
    left: 0.25rem;
    translate: 0px -100%;
	isolation: isolate;
}

footer:has(start-button input:checked) startmenu {
	display: grid;
    grid-template-columns: auto 1fr;
}

startmenu-side {
	background: var(--selectedColor);
	color: var(--selectedColorText);
	height: 100%;
	width: 2rem;
    display: flex;
	justify-content: center;
	padding-bottom: 0.25rem;
}

startmenu-side span {
	rotate: 180deg;
    bottom: 0px;
    position: relative;
    display: block;
    writing-mode: vertical-lr;
	font-weight: 900;
	padding: 0.25rem;
}

startmenu-divider {
    border-top: 1px solid #808080;
    border-bottom: 1px solid #fff;
    display: block;
}

startmenu-item,
startmenu-subitem {
	position: relative;
	display: block;
}

startmenu-item a,
startmenu-subitem a {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 2rem 0.5rem 0.5rem;
	position: relative;
}

startmenu-item:hover > a,
startmenu-subitem:hover > a{
	background: var(--selectedColor);
	cursor: pointer;
}

startmenu-item:hover > a span,
startmenu-subitem:hover > a span {
	color: var(--selectedColorText);
}

startmenu-item > a[data-disabled="true"],
startmenu-subitem > a[data-disabled="true"],
startmenu-item:hover > a[data-disabled="true"],
startmenu-subitem:hover > a[data-disabled="true"] {
	opacity: 0.5;
	cursor: default;
    background: var(--itemBGColor);
}

startmenu-item:hover > a[data-disabled="true"] span,
startmenu-subitem:hover > a[data-disabled="true"] span {
	color: var(--textColor);
}

startmenu-item img {
    height: 2rem;
}

startmenu-item startmenu-subitem img {
    height: 1rem;
}

startmenu-item span {
    white-space: nowrap;
}

startmenu-subitems {
    position: absolute;
	right: -100vw;
    bottom: 0px;
    background: var(--itemBGColor);
    border-top: 1px solid #fff;
    border-left: 1px solid #fff;
    border-right: 1px solid #000;
    border-bottom: 1px solid #000;
	z-index: 2;
	transition: right 0.01s 0.1s;
}

startmenu-item:hover > startmenu-subitems {
	/* display: block; */
	right: calc(3rem - (100vw - 100%));
}

@media (min-width: 500px) {
	startmenu-subitems {
		display: none;
		transition: none;
		left: calc(100% - 0.25rem);
		right: auto;
	}
	startmenu-item:hover > startmenu-subitems {
		display: block;
		right: auto;
	}
}

startmenu-item:has(startmenu-subitems) > a::after {
	position: absolute;
	right: 0.5rem;
	content: "\f0da";
	font-family: 'Font Awesome 6 Pro';
	font-weight: 900;
}

startmenu-item:has(startmenu-subitems):hover > a::after {
	color: var(--selectedColorText);
}

startmenu-subitem {
    border-left: 1px solid #dfdfdf;
    border-right: 1px solid #808080;
	display: block;
}

startmenu-subitem:first-child {
    border-top: 1px solid #dfdfdf;
}

startmenu-subitem:last-child {
    border-bottom: 1px solid #808080;
}


footer launched-items {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	padding-inline: 1rem;
}

footer launched-item {
	padding: 0.25rem 0.5rem;
	border-top: 1px solid #dfdfdf;
	border-left: 1px solid #dfdfdf;
	border-right: 1px solid #808080;
	border-bottom: 1px solid #808080;
	position: relative;
	isolation: isolate;
	background: var(--itemBGColor);
    display: block;
}

footer launched-item::before,
footer launched-item::after {
	content: '';
	position: absolute;
	display: block;
}

footer launched-item::before {
	width: calc(100% + 2px);
	height: calc(100% + 2px);
	border-top: 1px solid #fff;
	border-left: 1px solid #fff;
	z-index: -1;
	top: -2px;
	left: -2px;
}

footer launched-item::after {
	width: calc(100% + 3px);
	height: calc(100% + 3px);
	border-right: 1px solid #000;
	border-bottom: 1px solid #000;
	z-index: -1;
	top: -2px;
	left: -2px;
}

footer launched-item span {
	pointer-events: none;
    display: none;
}

footer launched-item img {
	pointer-events: none;
    height: 1rem;
}

@media (min-width: 500px) {
	footer launched-item {
		display: grid;
		grid-template-columns: auto 1fr;
		gap: 0.5rem;
	}
	footer launched-item span {
		display: block;
	}
}

footer launched-item[data-active="true"] {
	border-top: 1px solid #808080;
	border-left: 1px solid #808080;
	border-right: 1px solid #dfdfdf;
	border-bottom: 1px solid #dfdfdf;
	background: #dedede;
	padding: calc(0.25rem + 2px) 0.5rem calc(0.25rem - 2px) 0.5rem;
}

footer launched-item:not([data-active="true"]) {
	cursor: pointer;
}

footer launched-item[data-active="true"]::before {
	border-top: 1px solid #000;
	border-left: 1px solid #000;
}

footer launched-item[data-active="true"]::after {
	border-right: 1px solid #fff;
	border-bottom: 1px solid #fff;
}

footer tray {
	display: flex;
	align-items: center;
	gap: 0.25rem;
	padding: 0.25rem 0.5rem;
	border-top: 1px solid #808080;
	border-left: 1px solid #808080;
	border-right: 1px solid #fff;
	border-bottom: 1px solid #fff;
}

footer tray year {
	padding-inline: 0.5rem;
}