:root {
  overflow: hidden;
  background: black;
}

html {
	overflow: hidden;
	background: black;
}

body {
	width: 100vw;
	height: 100vh;
	background-color: black;
	overflow: hidden;
	font-family: "Roboto Slab";
	color: white;
	margin: 0;
	position: relative;
	
	/* --color-accent: orange; */
	/* --color-bg: #504d57; */
	/* --color-border: #3c3a40; */
	/* --color-dark: #2c2b2e; */
	/* --color-darker: #1B1A1C; */
	/* --color-bright: #575361; */

	/* --color-accent: orange; */
	/* --color-bg: #2C2C2E; */
	/* --color-border: #1C1C1E; */
	/* --color-dark: #0C0C0E; */
	/* --color-darker: #000000; */
	/* --color-bright: #3B3B3F; */

	--color-accent: orange;
	--color-bg: #34495E;
	--color-border: #2C3E50;
	--color-dark: #1F3040;
	--color-darker: #162536;
	--color-bright: #7F8C8D;
	--color-subtle: #bbb;
	color: white;
}

body.lightMode {
	--color-bg: white;
	--color-border: #F0E1D8;
	--color-dark: #B1B09C;
	--color-darker: #8C7B5B;
	--color-bright: #D8E3B4;
	--color-subtle: #865;
	color: black;
}

#graphCanvas {
	position: absolute;
	height: 100%;
	width: 100%;
	top: 0;
	left: 0;
	touch-action: none;
	/* cursor: grab; */
}

#sideBar {
	position: absolute;
	height: 100%;
	width: 500px;
	max-width: 80vw;
	top: 0;
	right: 0;
	background: var(--color-bg);
	transition: transform 0.5s ease-out;
	filter: drop-shadow(0 0 10px black);
	z-index: 1;
	transform: translateX(calc(100% + 6px));
}

.mobile #sideBar {
	transform: translateY(calc(100% + 6px));
}

.lightMode #sideBar {
	filter: none;
}

#sideBarBorder {
	position: absolute;
	top: 0;
	right: 100%;
	height: 100%;
	width: 6px;
	background: var(--color-border);
	cursor: col-resize;
}

#sideBarButton {
	position: absolute;
	top: 1em;
	left: 0;
	transform: translateX(calc(-100% - 6px));
	background: var(--color-border);
	border-radius: 0.5em 0 0 0.5em;
 	height: 2em;
	width: 2.5em;
	display: flex;
	justify-content: center;
	align-items: center;
	cursor: pointer;
	filter: drop-shadow(0 0.35em 0 var(--color-dark));
	transition: translate 0.15s linear, filter 0.15s linear;
	z-index: 1;
}

.mobile #sideBarButton {
	top: unset;
	right: 0;
	left: unset;
	bottom: calc(100% + 1em);
	transform: none;
}

#sideBarButton:hover {
	color: var(--color-accent);
	translate: 0 0.15em;
	filter: drop-shadow(0 0.2em 0 var(--color-dark));
}

#sideBarButton:active {
	color: var(--color-accent);
	translate: 0 0.25em;
	filter: drop-shadow(0 0.1em 0 var(--color-dark));
}

#sideBarButton span {
	transition: transform 0.5s ease-out;
}

.mobile #sideBarButton span {
	rotate: 90deg;
}

#sideBarContent {
	position: absolute;
	width: 100%;
	height: 100%;
	top: 0;
	left: 0;
	overflow-x: hidden;
	overflow-y: scroll;
}

#sideBar h2 {
	font-family: "Playfair Display SC";
	font-variant-ligatures: no-common-ligatures;
	font-size: 2em;
	text-align: center;
}

#infoNames {
	width: calc(100% - 4em);
	margin: 2em;
}

#infoName, #infoOtherNames {
	margin: 0;
}

#generalInfo h2 {
	margin: 0 1em;
	margin-top: 1.75em;
	position: relative;
	filter: drop-shadow(0 0.02em 0 var(--color-dark))
			drop-shadow(0 0.02em 0 var(--color-dark))
			drop-shadow(0 0.02em 0 var(--color-dark))
			drop-shadow(0 0 0.2em rgba(0, 0, 0, 0.3));
}

.lightMode #generalInfo h2 {
	filter: none;
}

#generalInfo h2 span {
	filter: drop-shadow(0 0.02em 0 var(--color-dark))
			drop-shadow(0 0.02em 0 var(--color-dark))
			drop-shadow(0 0.02em 0 var(--color-dark))
			drop-shadow(0 0.02em 0 var(--color-dark))
			drop-shadow(0 0.02em 0 var(--color-dark));
}

#generalInfo h2:after {
	content: "";
	position: absolute;
	background-image: url("../img/weight.webp");
	height: 100%;
	width: 100%;
	left: 50%;
	top: 0;
	transform: translateX(-50%) scale(1.75) translateY(-0.15em);
	background-size: contain;
	background-repeat: no-repeat;
	background-position: center;
	z-index: -20;
	
	filter: drop-shadow(0 0.02em 0 var(--color-dark))
			drop-shadow(0 0.02em 0 var(--color-dark))
			drop-shadow(0 0.02em 0 var(--color-dark))
			drop-shadow(0 0.02em 0 var(--color-dark))
			drop-shadow(0 0.02em 0 var(--color-dark));
}

.lightMode #generalInfo h2:after {
	filter: brightness(1.6)
			saturate(0)
			drop-shadow(0 0.02em 0 var(--color-dark))
			drop-shadow(0 0.02em 0 var(--color-dark))
			drop-shadow(0 0.02em 0 var(--color-dark))
			drop-shadow(0 0.02em 0 var(--color-dark))
			drop-shadow(0 0.02em 0 var(--color-dark));
}

#infoName, .accent {
	color: var(--color-accent);
}

#source {
	text-align: center;
	font-style: italic;
	margin-top: 1em;
	margin-bottom: 2.25em;
	position: relative;
	z-index: 20;
}

#sudokuRestart {
	display: none;
}

a {
	color: white;
	text-decoration: none;
}

a:hover {
	color: var(--color-accent);
	text-decoration: underline;
}

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

.accent a:hover {
	color: white;
	text-decoration: underline;
}

.lightMode .accent a:hover {
	color: var(--color-accent);
}

.smallDropdown {
	width: 100%;
	background: var(--color-border);
}

.smallDropdown {
	margin-bottom: 1.5em;
	padding-top: 0.5em;
	padding-bottom: 0.5em;
}

.smallDropdown > p {
	width: 100%;
	text-align: center;
	font-weight: bold;
	margin: 0;
	position: relative;
	z-index: 10;
}

.dropdown {
	position: relative;
	cursor: pointer;
}

.dropdownButton {
	position: absolute;
	width: 1.3em;
	height: 1.3em;
	top: calc(100% - 0.65em);
	left: 50%;
	transform: translateX(-50%);
	background: var(--color-border);
	border-radius: 100%;
	font-size: 1.5em;
	font-weight: bold;
	display: flex;
	align-items: center;
	justify-content: center;
}

.dropdown:hover:not(:has(.dropdownContainer:hover)) .dropdownButton span {
	color: var(--color-accent);
}

.dropdownContainer {
	background: var(--color-dark);
	overflow: hidden;
	cursor: auto;
	transition: height 1.75s ease;
}

.dropdownContainer > p {
	width: calc(100% - 2em);
	margin-right: 1em;
	margin-left: 1em;
}

.dropdownEntries, .dropdownMainButtons {
	padding: 0.2em;
	display: flex;
	flex-wrap: wrap;
}

.dropdownMainButtons {
	justify-content: center;
	border-bottom: 1px solid var(--color-border);
}

.dropdownEntry {
	background: var(--color-border);
	border-radius: 0.25em;
	padding: 0 0.2em;
	margin: 0.2em;
	cursor: pointer;
}

.dropdownEntry:hover {
	background: var(--color-bright);
}

.dropdownMainButtons .dropdownEntry {
	padding: 0.5em;
}

.dropdownEntryState span {
	color: red;
	width: 1em;
	display: inline-block;
	text-align: center;
}

.dropdownEntry[data-active="true"] .dropdownEntryState span {
	color: lime;
}

.generalInfoWrapper {
	width: calc(100% - 24px);
	background: var(--color-border);
	padding: 12px 12px;
	margin-bottom: 3em;
	position: relative;
}

.generalInfoWrapper, .shadow {
	border-bottom: 0.35em solid var(--color-dark);
	filter: drop-shadow(0 0.2em 0.2em rgba(0, 0, 0, 0.4));
}

.generalInfoWrapper::after {
	content: "";
	position: absolute;
	left: 1px;
	top: 6px;
	width: calc(100% - 6px);
	height: calc(100% - 12px);
	outline: 1px solid var(--color-dark);
	pointer-events: none;
}

.generalInfoWrapperDecoration {
	position: absolute;
	width: 1em;
	height: 1em;
	content: "";
	border: 1px solid var(--color-dark);
	pointer-events: none;
	border-radius: 0.3em;
}

.generalInfoWrapperDecoration.topRight {
	top: 9px;
	right: 9px;
	border-bottom: none;
	border-left: none;
}

.generalInfoWrapperDecoration.topLeft {
	top: 9px;
	left: 4px;
	border-bottom: none;
	border-right: none;
}

.generalInfoWrapperDecoration.bottomRight {
	bottom: 9px;
	right: 9px;
	border-top: none;
	border-left: none;
}

.generalInfoWrapperDecoration.bottomLeft {
	bottom: 9px;
	left: 4px;
	border-top: none;
	border-right: none;
}

#converterMain.generalInfoWrapper {
	margin-bottom: 0;
}

.generalInfoWrapper h3, #unitAmount {
	width: 100%;
	text-align: center;
	font-size: 1.5em;
	font-variant-caps: small-caps;
	position: relative;
	filter: drop-shadow(0 0.06em 0 var(--color-dark))
			drop-shadow(0 0.06em 0 var(--color-dark));
}

.lightMode .generalInfoWrapper h3,
.lightMode #unitAmount {
	filter: none;
}

#unitAmount {
	margin-top: 0.35em;
	margin-bottom: 0.35em;
	font-weight: bold;
}

#showSystemsWrapper h3, #showContextsWrapper h3, #showQuantitiesWrapper h3 {
	margin-bottom: 0;
}

#devTitle {
	margin-bottom: 0;
}

label:hover {
	color: var(--color-accent);
}

#connectionMethods > div:not(.generalInfoWrapperDecoration) {
	width: calc(100% - 2em);
	margin: 1em;
}

.generalInfoWrapper input {
	margin-right: 0.5em;
}

.generalInfoWrapper label, .generalInfoWrapper input {
	cursor: pointer;
	accent-color: var(--color-accent);
}

#showSystems, #showContexts, #showQuantities {
	width: calc(100% - 1.2em - 6px);
	padding-top: 1em;
	padding-bottom: 1em;
}

#showSystems, .childSystems, #showContexts, #showQuantities {
	background: rgba(0, 0, 0, 0.1);
	border-radius: 1em;
	padding-left: 1em;
	padding-right: 0.2em;
}

.systemInputWrapper, .contextWrapper, .quantityWrapper {
	padding: 0.25em 0;
}

.systemInputWrapper {
	display: flex;
	flex-wrap: wrap;
}

#showContexts, #showQuantities {
	display: flex;
	flex-wrap: wrap;
}

.contextWrapper, .quantityWrapper {
	width: 50%;
}

.childSystems {
	position: relative;
}

.childSystems:after {
	content: "";
	position: absolute;
	height: calc(100% - 0.125em);
	width: 0.1em;
	bottom: 0.625em;
	left: 0.625em;
	background: white;
	border-radius: 0.05em;
}

#showSystemsWrapper input {
	z-index: 20;
	position: relative;
}

.systemDropwdownButton {
	width: 0.8em;
	height: 0.8em;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	border: 0.1em solid var(--color-subtle);
	cursor: pointer;
	margin-left: 0.4em;
	transform: translateY(0.25em);
}

.systemDropwdownButton span {
	transform: translateY(-0.075em);
	color: var(--color-subtle);
}

.systemDropwdownButton:hover {
	border-color: white;
}

.systemDropwdownButton:hover span {
	color: white;
}

.rangeWrapper {
	width: min(20em, 100%);
	margin: 0 calc((100% - min(20em, 100%)) / 2);
}

input[type="range"] {
	width: 100%;
	margin: 2px;
}

.sliderLabel {
	display: flex;
	justify-content: space-between;
	padding: 0 0.3em;
}

#sudokuTab .sliderLabel {
	padding-left: 0.6em;
}

.sliderLabel > span {
	flex: 1;
	text-align: center;
}

.sliderLabel > span:first-of-type {
	flex: 0.5;
	text-align: left;
}

.sliderLabel > span:last-of-type {
	flex: 0.5;
	text-align: right;
}

#displayOptions h4, #sudokuTab h4 {
	text-align: center;
	font-weight: normal;
	margin-bottom: 0.5em;
}

.displayOptionsCheckbox {
	display: flex;
	justify-content: center;
	margin: 1.5em 1em;
}

#searchBar {
	position: absolute;
	top: 0;
	left: 0;
	margin: 0.5em;
}

input[type="text"] {
	font-family: "Roboto Slab";
	color: white;
	border: gray 1px solid;
	border-radius: 0.25em;
	background: rgba(0, 0, 0, 0.5);
	accent-color: var(--color-accent);
}

.lightMode input[type="text"] {
	color: black;
	background: rgba(0, 0, 0, 0.1);
}

#converterFromNumber {
	font-family: "Roboto Slab";
	font-family: "Libertinus Math";
	font-size: 1em;
	width: fit-content;
	color: white;
	border: none;
	border-radius: 0.25em;
	background: rgba(0, 0, 0, 0);
	accent-color: var(--color-accent);
}

.lightMode #converterFromNumber {
	color: black;
}

#converterFromNumber:empty::before {
	content: attr(data-placeholder);
	color: var(--color-subtle);
	pointer-events: none;
}

#converterFromNumber:hover:empty::before {
	color: var(--color-accent);
}

#converterFromNumber, #converterToNumber {
	word-break: break-all;
}

.outline {
	filter: drop-shadow(0 0.05em 0 black)
			drop-shadow(0.05em 0 0 black)
			drop-shadow(0 -0.05em 0 black)
			drop-shadow(-0.05em 0 0 black);
}

.lightMode .outline {
	filter: none;
}

.subtle, .subtle a {
	color: var(--color-subtle);
	font-weight: normal;
}

#mobileBottomPadding {
	display: none;
}

:root .mobile, .mobile input {
	font-size: 40px;
}

.mobile #sideBar {
	width: 100vw;
	max-width: unset;
	height: 50vh;
	bottom: 0;
	left: 0;
	top: unset;
	transition: unset;
	border-top: 6px solid var(--color-border);
}

.mobile #mobileBottomPadding {
	display: block;
	width: 100%;
	height: 380px;
}

#infoSystemWrapper, #infoContextsWrapper {
	width: calc(100% - 2em);
	padding: 0.5em 1em;
}

#infoSystemWrapper {
	background: var(--color-accent);
}

#infoContextsWrapper {
	background: var(--color-border);
}

#infoSystemWrapper p, #infoContextsWrapper p {
	text-align: center;
	margin: 0;
}

#infoOtherNames {
	margin-top: 0;
	font-style: italic;
	text-align: center;
}

#info > p {
	padding: 0 1em;
	width: calc(100% - 2em);
}

#infoTriviaWrapper {
	border: 3px solid var(--color-dark);
	border-radius: 1rem;
	margin: 0 1em;
	margin-bottom: 1em;
	width: calc(100% - 2em);
	overflow: hidden;
}

#infoTriviaWrapper > h3 {
	text-align: center;
	color: var(--color-accent);
	background: var(--color-border);
	border-bottom: 3px solid var(--color-dark);
}

#infoTriviaWrapper > h3, #infoTriviaWrapper > p {
	margin: 0;
	padding: 1rem;
	width: calc(100% - 2rem);
}

.buttons {
	width: calc(100% - 2em);
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 1em;
	padding: 1em;
}

.button {
	border-radius: 0.4em;
	overflow: hidden;
	cursor: pointer;
	background: var(--color-dark);
	border: 0.1em solid var(--color-dark);
}

.button div {
	border-radius: 0.25em;
	background: var(--color-bg);
	padding: 0.5em;
	transition: transform 0.3s ease;
	position: relative;
}

.button.dark div {
	background: var(--color-border);
}

.button:hover div {
	transform: translate(-0.2em, 0.2em);
}

.button:active div {
	transform: translate(-0.5em, 0.5em);
}

.button div::after {
	content: "";
	position: absolute;
	left: 2px;
	top: 2px;
	width: calc(100% - 6px);
	height: calc(100% - 6px);
	border: 1px solid var(--color-border);
	border-radius: 0.35em;
	pointer-events: none;
}

.button.dark div::after {
	border: 1px solid var(--color-dark);
}

.unitSymbol span.supAndSub {
  display: inline-flex;
  flex-direction: column;
  vertical-align: bottom;
  font-size: 0.8333em;
  vertical-align: middle;
  baseline-shift: 0.065em;
}

.unitSymbol span.supAndSub:has(sub:first-child) {
	flex-direction: column-reverse;
}

.supAndSub sup,
.supAndSub sub {
  font-size: inherit;
  line-height: 0.85;
  text-align: start;
}

.squareRoot {
	position: relative;
	padding-left: 0.8em;
	margin-top: 0.2em;
	margin-right: 0.2em;
	display: inline-block;
}

.squareRootLeft, .squareRootTop {
	background-size: 100% 100%;
	background-repeat: no-repeat;
	position: absolute;
}

.squareRootLeft {
	height: 100%;
	width: 0.8em;
	left: 0;
	top: 0;
	background-image: url("../img/square_root_left.webp");
}

.squareRootTop {
	height: 0.05em;
	width: calc(100% - 0.75em);
	right: 0;
	top: 0;
	background-image: url("../img/square_root_top.webp");
}

#infoConversionFormulas {
	display: inline-flex;
	flex-direction: column;
}

.overbar {
	display: inline-block;
	position: relative;
	margin-top: 0.2em;
}

.overbarBar {
	background: white;
	width: calc(100%);
	box-shadow: 0 0 0 0.03em white;
	position: absolute;
	left: 0;
	bottom: 100%;
}

.unitSymbol {
	font-family: "Libertinus Math";
	font-size: 1.2em;
	background: rgba(0, 0, 0, 0.2);
	border-radius: 0.25em;
	padding: 0 0.25em;
	display: inline-block;
	margin-bottom: 0.25em;
}

.lightMode .unitSymbol {
	background: rgba(0, 0, 0, 0.1);
}

/* .unitSymbol span { */
	/* display: inline-block; */
/* } */

.unitSymbol img {
	height: 1em;
	display: inline-block;
	transform: translateY(0.2em);
}

span.division {
	display: inline-flex;
	flex-direction: column;
	align-items: center;
	vertical-align: middle;
	baseline-shift: 0.075em;
	margin: 0 0.05em;
	gap: 0.1em;
}

.division > span {
	width: fit-content;
	display: inline-block;
}

.division > div {
	background: white;
	width: 100%;
	box-shadow: 0 0 0 0.04em white;
}

#loading {
	position: absolute;
	width: 100%;
	height: 100%;
	top: 0;
	left: 0;
	pointer-events: none;
	z-index: 200;
	filter: drop-shadow(5px 5px 0px rgba(0, 0, 0, 1));
}

.lightMode #loading {
	filter: drop-shadow(5px 5px 0px rgba(0, 0, 0, 0.35));
}

#loading img {
	position: absolute;
	width: 7em;
	aspect-ratio: 1/1;
	left: calc(50% - 3.5em);
	top: calc(50% - 3.5em);
	animation: rotate linear 1s infinite;
}

.lightMode #loading img {
	filter: saturate(0);
}

@keyframes rotate {
	0% { transform: rotate(0deg); }
	100% { transform: rotate(360deg); }
}

#fps {
	position: absolute;
	bottom: 1em;
	left: 1em;
	z-index: 100;
	display: none;
}

.parenthesis {
	position: relative;
	padding: 0 0.475em;
	margin: 0.1em 0;
	display: inline-block;
}

.parenthesisOpen, .parenthesisClose {
	position: absolute;
	top: 0;
	height: 100%;
	width: 0.35em;
	display: inline-block;
	background-size: 100% 100%;
	background-repeat: no-repeat;
	position: absolute;
}

.lightMode .parenthesisOpen,
.lightMode .parenthesisClose,
.lightMode .division > div,
.lightMode .squareRootLeft,
.lightMode .squareRootTop,
.lightMode .image {
	filter: invert(1);
}

.parenthesisOpen {
	left: 0;
	background-image: url("../img/parenthesis_open.webp");
	margin-left: 0.1em;
}

.parenthesisClose {
	right: 0;
	background-image: url("../img/parenthesis_close.webp");
	margin-right: 0.1em;
}

#tabs {
	width: 100%;
	display: flex;
	justify-content: center;
	gap: 1em;
	margin-bottom: 2em;
	flex-wrap: wrap;
}

#tabs .button {
	cursor: pointer;
	font-variant-caps: small-caps;
}

#tabs .button.enabled {
	text-decoration: underline;
	color: var(--color-accent);
}

#converterTab {
	width: 100%;
	display: flex;
	flex-direction: column;
	align-content: center;
	text-align: center;
}

.unitDropdown {
	position: relative;
	display: inline;
}

.unitDropdown > div {
	position: absolute;
	top: calc(100% + 0.65em);
	left: 50%;
	transform: translateX(-50%);
	display: none;
	background: var(--color-dark);
	padding: 0.5em;
	border-radius: 0.5em;
	filter: drop-shadow(4px 4px 4px rgba(0, 0, 0, 0.3));
	z-index: 75;
}

.lightMode .unitDropdown > div {
	background: var(--color-border);
}

.unitDropdown > div > div {
	max-height: 15em;
	overflow-y: scroll;
}

.unitDropdown > div > div p {
	text-align: start;
	margin: 0;
	border-bottom: 1px solid var(--color-border);
}

.lightMode .unitDropdown > div > div p {
	border-bottom: 1px solid var(--color-dark);
}


.unitDropdown > div > div p:first-child {
	margin-top: 0.25em;
}

.unitDropdown > div > div p:not(.disabled) {
	cursor: pointer;
}

.unitDropdown > div > div p:last-of-type {
	border-bottom: none;
}

.unitDropdown > div > div p:not(.disabled):hover {
	color: var(--color-accent) !important;
}

.unitDropdown > div:before {
	content: "";
	background: var(--color-dark);
	width: 1em;
	height: 1em;
	position: absolute;
	transform: translateX(-50%) rotate(45deg);
	top: -0.5em;
	left: 50%;
	z-index: -10;
}

.lightMode .unitDropdown > div:before {
	background: var(--color-border);
}

.unitDropdown > span {
	cursor: pointer;
}

.unitDropdown > span:hover,
.sudokuCell:hover .unitDropdown:not(:has(> div:hover)) > span,
.unitDropdown > span:hover span,
.sudokuCell:hover .unitDropdown:not(:has(> div:hover)) > span span,
#converterFromNumber:hover {
	color: var(--color-accent) !important;
}

#converterMain {
	width: calc(100% - 2em);
	background: var(--color-border);
	padding: 1em;
	padding-top: 0.5em;
	z-index: 12;
}

#bg {
	position: absolute;
	width: 100%;
	height: 100%;
	top: 0;
	left: 0;
	background: black;
}

.lightMode #bg {
	background: var(--color-bg);
}

#bg img {
	position: absolute;
	width: 100%;
	height: 100%;
	top: 0;
	left: 0;
	object-fit: cover;
	filter: brightness(0.45) blur(3px);
}

.lightMode #bg img {
	display: none;
}

#mazeTab h3, #mazeTab p, #sudokuTab h3, #sudokuTab p {
	margin: 1em;
	width: calc(100% - 2em);
	text-align: center;
}

#mazeUI {
	position: absolute;
	height: 100%;
	width: 100%;
	z-index: 105;
	pointer-events: none;
	filter: drop-shadow(0 0 10px black);
	display: none;
}

.lightMode #mazeUI {
	filter: none;
}

#mazeUIObjective, #mazeUISteps {
	position: absolute;
	left: 50%;
	transform: translateX(-50%);
	padding: 0.5em;
	border-radius: 1em;
	background: var(--color-border);
	text-align: center;
}

#mazeUIObjective {
	top: 0.5em;
}

#mazeUISteps {
	bottom: 0.5em;
}

#mazeUI .unitSymbol, #sudokuUI .unitSymbol {
	margin: 0;
}

#mazeEndScreen h2 {
	margin: 1em;
	font-size: 2em;
	width: calc(100% - 2em);
	text-align: center
}

#mazeEndScreen p {
	width: calc(100% - 2em);
}

#mazeHeader {
	text-align: center;
	width: calc(100% - 2em);
	padding: 0.5em 1em;
	background: var(--color-border);
}

#sudokuUI {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	display: none;
}

#sudokuBg {
	position: absolute;
	width: 100%;
	height: 100%;
	top: 0;
	left: 0;
	background-color: var(--color-bg);
}

.lightMode #sudokuBg {
	background: var(--color-bg);
	filter: brightness(0.85);
}

#sudokuBg img {
	position: absolute;
	width: 100%;
	height: 100%;
	top: 0;
	left: 0;
	object-fit: cover;
	object-position: center left;
	filter: brightness(0.65) blur(3px);
	transform: scale(1.05);
}

.lightMode #sudokuBg img {
	display: none;
}

#sudokuQuit {
	position: absolute;
	top: 1em;
	left: 1em;
	z-index: 1;
}

#sudokuSolve {
	position: absolute;
	bottom: 1em;
	left: 1em;
	z-index: 1;
}

#sudokuGrid {
	display: flex;
	flex-direction: column;
	flex-wrap: no-wrap;
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	max-height: 90%;
	max-width: calc(90% - 5em);
	border-radius: 1em;
	z-index: 1;
	filter: drop-shadow(0 0 10px black);
}

.lightMode #sudokuGrid {
	filter: none;
}

.mobile #sudokuGrid {
	left: unset;
	right: 0.5em;
	transform: translate(0, -50%);
}

.sudokuLine {
	display: flex;
	flex-wrap: no-wrap;
	flex: 1 1 0;
	min-height: 0;
}

.sudokuCell {
	background-color: var(--color-bg);
	border-top: 0.4em solid var(--color-border);
	border-left: 0.4em solid var(--color-border);
	flex: 1 1 0;
	min-width: 0;
	display: flex;
	justify-content: center;
	align-items: center;
	text-align: center;
	padding: 0.5em;
	word-wrap: anywhere;
	position: relative;
}

.sudokuCell:last-child {
	border-right: 0.4em solid var(--color-border);
}

.sudokuLine:last-child .sudokuCell {
	border-bottom: 0.4em solid var(--color-border);
}

.sudokuCell:has(.unitDropdown) {
	cursor: pointer;
}

.sudokuCell.correct:after {
	border: 2px solid green;
}

.sudokuCell.incorrect:after {
	border: 2px dashed red;
}

.sudokuLine:first-child .sudokuCell,
.sudokuCell:first-child {
	background: var(--color-border);
	cursor: help;
	overflow-y: scroll;
	transform: translate(-0.4em, -0.4em);
	filter: drop-shadow(0.4em 0.4em 0 var(--color-darker));
	border-top: 0.4em solid var(--color-dark);
	border-left: 0.4em solid var(--color-dark);
}

.sudokuLine:first-child .sudokuCell {
	border-bottom: 0.4em solid var(--color-dark);
}

.sudokuCell:first-child {
	border-right: 0.4em solid var(--color-dark);
}

.sudokuLine:first-child .sudokuCell:last-child {
	border-right: 0.4em solid var(--color-dark);
}

.sudokuLine:last-child .sudokuCell:first-child {
	border-bottom: 0.4em solid var(--color-dark);
}

.sudokuLine:first-child .sudokuCell:first-child {
	background: var(--color-dark);
	cursor: unset;
	border-radius: 1em 0 0 0;
}

.sudokuLine:first-child .sudokuCell:last-child {
	border-radius: 0 1em 0 0;
}

.sudokuLine:last-child .sudokuCell:last-child {
	border-radius: 0 0 1em 0;
}

.sudokuLine:last-child .sudokuCell:first-child {
	border-radius: 0 0 0 1em;
}

#sudokuEndScreen p {
	text-align: center;
}

.sudokuCell:after {
	content: "";
	position: absolute;
	top: 0.3em;
	bottom: 0.3em;
	left: 0.3em;
	right: 0.3em;
	border: 1px solid var(--color-border);
	pointer-events: none;
	border-radius: 0.3em;
}

.sudokuLine:first-child .sudokuCell:after,
.sudokuCell:first-child:after {
	border: 1px solid var(--color-dark);
}

@keyframes fall {
  0% { transform: translate(1%, 0.25%); }
  1% { transform: translate(-0.5%, 1.3%); }
  2% { transform: translate(1.2%, -0.7%); }
  3% { transform: translate(1%, 0.2%); }
  4% { transform: translate(-1%, 1.5%); }
  5% { transform: translate(1.3%, -0.7%); }
  6% { transform: translate(-1.3%, -1.8%); }
  7% { transform: translate(1%, 1.5%); }
  8% { transform: translate(-0.2%, 1.3%); }
  10% { transform: scale(1); rotate: 0deg; filter: opacity(1); }
  50% { rotate: 10deg; }
  100% { transform: scale(0); rotate: 40deg; filter: opacity(0); }
}

@keyframes fadeIn {
  0% { filter: brightness(0); }
  100% { filter: brightness(0.1); }
}

#quoi {
	display: none;
	position: absolute;
	background: black;
	width: 100%;
	height: 100%;
	top: 0;
	left: 0;
	object-fit: cover;
	z-index: 666666;
}

#logo {
	width: calc(100% - 2em);
	margin: 0 1em;
	filter: drop-shadow(0 5px 0 var(--color-dark));
	image-rendering: pixelated;
}