.planet-container {

	display: grid;
	position: relative;
	overflow: auto;

	.labels {
		position: absolute;
		pointer-events: none;
	}
	
	.planet {
		width: 100%;
		height: 100%;
		overflow: auto;
		user-select: none;
	}
}.settings {
	border: 1px solid var(--button-outline-color);
	border-radius: 5px;
	padding: initial;
	
	&::backdrop {
		backdrop-filter: blur(2px) brightness(0.5);
	}
	
	.layout {
		display: grid;
		padding: 2rem;
		gap: 1rem;

		h2 {
			margin-block: auto;
		}

		.settingsList {
			display: grid;
			row-gap: 0.25rem;
		}

		.buttons {
			display: flex;
			justify-content: space-between;
		}
	}
}

.settingCheckBox {
	display: flex;
	gap: 0.5rem;
}.keybind {
	position: absolute;
	bottom: 0.4rem;
	justify-self: center;
}.media-button {
	/* outline: 1px solid gold; */
	padding: 0.5rem;
	display: grid;
	cursor: pointer;
	text-align: center;

	&+.media-button {
		border-left: 1px solid var(--button-outline-color);
	}

	svg {
		fill: var(--text-color);
		width: 1rem;
		height: 1rem;
		vertical-align: middle;
	}

	&.active {
		svg {
			fill: var(--media-active);
		}
	}

	&.muted {
		svg {
			fill: var(--media-muted);
		}
	}
}.video-call {
	position: absolute;
	width: 100%;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(90px, 150px));
	align-items: center;
	justify-content: center;
	gap: 1rem;
	overflow: hidden;
	z-index: 1;
	padding: 1rem;

	&.max-video {
		grid-template-columns: repeat(auto-fit, minmax(90px, max-content));
	}

	.video-ui {
		justify-items: center;
		white-space: nowrap;
		text-overflow: ellipsis;
		overflow: hidden;
		position: relative;

		.name {
			text-overflow: ellipsis;
			max-width: inherit;
			overflow: hidden;
			display: block;
			position: absolute;
			top: 0.25rem;
			left: 0.25rem;
			backdrop-filter: brightness(0.5);
			border-radius: 0.5rem;
			padding-inline: 0.5rem;
			font-size: x-small;
		}

		video {
			border-radius: 10px;
			max-width: 100%;
			border: 1px solid #f9ff0000;
		}

		.video-muted {
			backdrop-filter: brightness(0.5) blur(1px) opacity(0.5);
			filter: brightness(0.5) blur(1px) opacity(0.5);
		}

		.buttons {
			position: absolute;
			top: 0.25rem;
			right: 0.25rem;
			display: flex;
			backdrop-filter: brightness(0.5);
			border-radius: 0.5rem;

			.media-button {
				padding: 0.3rem;
				padding-inline: 0.4rem;
				
				svg {
					width: 0.7rem;
					height: 0.7rem;
				}			
			}
		}
	}

	.local {
		transition: all 0.6s;

		video {
			transform: scaleX(-1);
		}
	}

	.alone {
		.name {
			display: none;
		}

		video {
			max-width: 150px;
			transform: scale(0.5) translateY(-50%);
			/* position: fixed;
			top: 0;
			right: 0; */
		}
	}
}/* include border and padding in element width and height */
*,
*::before,
*::before {
	box-sizing: border-box;
}

/* override browser default */
/* use viewport-relative units to cover page fully */
html {
	height: 100svh;
}

body {
	height: 100svh;
	width: 100%;

	padding: 0;
	margin: 0;

	display: grid;
}

:root {
	font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif;
	line-height: 1.5;
	font-weight: 400;

	font-synthesis: none;
	text-rendering: optimizeLegibility;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	-webkit-text-size-adjust: 100%;

	--separator-color: #ffffff50;
	--button-outline-color: #ffffff50;
	--subtext-color: #ffffff50;
	--background-color: #1f0e3c;
	--text-color: rgba(255, 255, 255, 0.87);

	--media-active: #4ae872bf;
	--media-muted: #e84a4abf;

	color-scheme: light dark;
	color: var(--text-color);
	background-color: var(--background-color);
}


.offlineMessage {
	display: grid;
	align-items: center;
	min-height: 100svh;
	justify-content: center;
	touch-action: none;
}

.header {
	display: grid;
	grid-auto-flow: column;
	grid-template-columns: 1fr;
	gap: 1rem;
	/* border-bottom: 1px solid var(--separator-color); */
	align-items: center;
	touch-action: none;
	overflow: hidden;
	/* padding: 0.5rem; */

	.header-left {
		display: flex;
		column-gap: 1rem;
		flex-wrap: wrap;
		align-items: center;
	}

	.logo {
		text-wrap: nowrap;
		touch-action: none;
		position: relative;
		margin: auto;
		margin-inline: 1rem;
	}
}

.user {
	overflow: hidden;
	display: flex;
	column-gap: 1rem;

	.name {
		overflow: hidden;
		text-overflow: ellipsis;
		padding-inline-start: 1rem;
	}
}

.user-view {
	display: grid;
	grid-template-rows: 1fr min-content;
	grid-auto-flow: row;
}

.server-stats {
	touch-action: none;
	font-size: small;
	display: flex;
	column-gap: 1rem;
	flex-wrap: wrap;
	justify-content: center;
	align-items: center;

	h2 {
		margin-block: 0;
	}

	.userCount {
		text-wrap: nowrap;
	}
}

.toolbar {
	padding: 1rem;
	/* border-top: 1px solid var(--separator-color); */
	bottom: 0;
	position: absolute;
	width: 100%;

	display: flex;
	flex-direction: row;
	flex-wrap: wrap;

	column-gap: 2rem;
	row-gap: 0.5rem;
	justify-content: center;
	align-items: center;
	touch-action: none;

	container-type: inline-size;
	container-name: toolbar;

	input[type="text"] {
		touch-action: none;
		font-size: 16px;
		background-color: transparent;
		border-style: none;
		border-radius: 5px;
		padding: 0.5rem;
		text-align: center;
		flex-grow: 1;
	}

	.public-info {
		flex-grow: 1;
		display: flex;
		align-items: center;
		gap: 1rem;
	}

	.buttons {
		display: flex;
		/* display: grid; */
		gap: 0.5rem;

		/* @container toolbar (width < 400px) {
				display: flex;
			} */
	}

}

.centered-content {
	display: grid;
	place-content: center;
}

.planet {
	canvas {
		width: 100%;
		height: 100%;
	}
}

.congraph {
	overflow: hidden;
}

.avatar {
	text-wrap: nowrap;
	overflow: hidden;
	display: grid;
	grid-auto-flow: column;
	align-items: stretch;
	user-select: none;

	& * {
		align-content: center;
	}

	&.button {
		cursor: pointer;
		border: 1px solid var(--button-outline-color);
		border-radius: 5px;

		.name {
			position: relative;
			font-weight: bold;
			padding-inline: 1rem;
			border-right: 1px solid var(--button-outline-color);
		}

		img {
			max-width: 2.5rem;
		}
	}

	&.list-item {
		padding-inline: 1rem;
		filter: opacity(0.5) blur(0.7px);

		&.online {
			filter: opacity(1)
		}

		.avatar-color {
			width: 1rem;
			height: 1rem;
			border-radius: 25%;
			border: 0.5px solid;
		}

		.avatar-image {
			width: 1.4rem;
			height: 1.4rem;
			border-radius: 25%;
		}
	}
}

.room-button {
	color: white;
	font-size: x-large;
	border: 1px solid;
	border-radius: 5px;
	padding-inline: 1rem;
	font-family: monospace;
	font-weight: bold;
	cursor: pointer;
	background: transparent;
	text-wrap: nowrap;
	touch-action: none;
	text-decoration: none;
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.color-picker {
	border-radius: 50%;
	border: 1px solid white;
	position: relative;
	overflow: hidden;

	.color-input {
		-webkit-appearance: none;
		-moz-appearance: none;
		appearance: none;
		background-color: transparent;
		width: 2rem;
		height: 1rem;
		border: none;
		cursor: pointer;

		&::-webkit-color-swatch-wrapper {
			position: absolute;
			padding: 0;
			top: 0;
			left: 0;
		}

		&::-webkit-color-swatch {
			border: none;
		}

		&::-moz-color-swatch {
			border: none;
		}
	}
}.welcome {
	border: 1px solid var(--button-outline-color);
	border-radius: 5px;
	padding: initial;

	&::backdrop {
		backdrop-filter: blur(2px) brightness(0.5);
	}

	& svg {
		fill: var(--text-color);
		width: 2rem;
		min-width: 2rem;
		vertical-align: middle;
	}


	.layout {
		display: grid;
		padding: 2rem;
		gap: 1rem;

		h1 {
			margin-block: auto;
		}

		.welcome-options {
			display: flex;
			flex-wrap: wrap;
			justify-content: space-evenly;
			gap: 1rem;
			row-gap: 2rem;
			margin-block-start: 2rem;

			.welcome-option {
				display: grid;
				gap: 0.75rem;
			}
		}
	}

	.instruction {
		display: flex;
		gap: 1.5rem;
	}

	.slider-container {
		display: inline-flex;
		height: 1.2em;
		overflow: hidden;

		.slider {
			position: relative;
			animation: slide-vertically infinite 8s 0s;
			animation-timing-function: cubic-bezier(1, 0, 0.5, 1);
			list-style: none;
			padding: 0;
			margin: 0;
			padding-inline: 0.3em;
			line-height: 1.2em;
			margin-top: 0.2em;
		}
	}

}

@keyframes slide-vertically {
	0% {
		bottom: 0;
	}

	33.3% {
		bottom: 1.2em;
	}

	66.6% {
		bottom: 2.4em;
	}

	100% {
		bottom: 3.6em;
	}
}.figment-menu-container {
	position: absolute;
	border-radius: 7px;
	overflow: hidden;
	outline: 1px solid var(--button-outline-color)
}

.figment-menu {
	font-family: system-ui;
	font-size: medium;
	line-height: normal;
	cursor: default;
	max-height: inherit;
	max-width: 50svw;
	margin: 0;
	padding-block: 0.5em;
	padding-inline: 0.25em;
	max-height: 10em;
	overflow-y: auto;
	color-scheme: auto;
	backdrop-filter: blur(10px) contrast(0.5);
}

.menu-item {
	display: flex;
	justify-content: space-between;
	padding: 2px;
	gap: 1rem;
	padding-inline: 0.5rem;


	&:hover {
		outline: 2px solid var(--button-outline-color);
		outline-offset: -2px;
		border-radius: 6px;
	}

	&:hover>.submenu {
		opacity: 1;
		visibility: visible;
		animation: slideIn 200ms ease-out;
	}

	&>.submenu {
		opacity: 0;
		visibility: hidden;
		position: fixed;
		max-width: 30svw;
	}

	&.has-submenu::after {
		pointer-events: none;
		content: "";
		position: relative;
		height: 0;
		right: 0;
		transform: translateY(50%);
		border: 5px solid transparent;
		border-left-color: #000000;
		transition: right 200ms ease-out;
	}

	&.has-submenu:hover::after {
		right: -5px;
	}

	&.is-dom-element:hover {
		outline: 1px dashed #ff000091;
		outline-width: 2px;
		outline-offset: -2px;
		border-radius: 4px;
	}
}


div.submenu-hover-target {
	display: block;
	position: fixed;
	clip-path: polygon(0% 0%, 100% 0%, 100% 100%);
	/* background-color: rgba(0, 0, 0, 0.156); */

	&.left {
		clip-path: polygon(0% 100%, 0% 0%, 100% 0%);
		margin-left: -0.5rem;
	}
}

.menu-separator {
	display: block;
	margin: 7px 5px;
	padding: initial;
	height: 1px;
	border-bottom: 1px solid #b3b3b3;
	background-color: #aaa;
}

.menu-text {
	cursor: pointer;
	min-width: fit-content;
	overflow: hidden;
	text-wrap: nowrap;
	text-overflow: ellipsis;
	flex-grow: 1;
}
.menu-subtext {
	cursor: pointer;
	flex-grow: 1;
	text-align: end;
	font-size: smaller;
	align-self: center;
	text-wrap: nowrap;
	text-overflow: ellipsis;
	overflow: hidden;
}

.menu-subtext :hover {
}
.menu-item:hover .menu-image {
	visibility: visible;
}

.menu-image {
	visibility: hidden;
	pointer-events: none;
	border: 1px solid darkgray;
	position: fixed;
	top: -33px;
	left: -15px;
	object-fit: contain;
	width: calc(100% + 30px);
	border-radius: 5px;
	box-shadow: 1px 1px 5px #1f1f1f2b;
	backdrop-filter: blur(5px) saturate(0.5) brightness(0.95);
	padding: 4px;
}

.menu-item-grid-prefix {
	grid-area: prefix;
}

.menu-item-grid-expando {
	grid-area: expando;
}
.collapsible-content {
	max-height: 0px;
	overflow: hidden;
	transition: max-height .5s ease-out;
	color: #282828;
}

.collapsible-content .content-inner {
	display: flex;
	flex-direction: column;
	overflow: hidden;
	text-overflow: ellipsis;
	background: #dbdbdb;
	border-bottom: 1px solid darkgray;
	cursor: initial;
	padding: 3px;
	padding-left: 10px;
	margin-top: 3px;
	margin-bottom: 5px;
	-webkit-box-shadow: inset 0px 5px 10px -7px rgb(0 0 0 / 75%);
	-moz-box-shadow: inset 0px 5px 10px -7px rgba(0, 0, 0, 0.75);
	box-shadow: inset 0px 5px 10px -7px rgb(0 0 0 / 75%);
	/* transition: max-height .25s ease-in-out; */
}

