:root {
	--bg: #121212;
	--fg: #e0e0e0;
	--border: #333;
	--accent: #444;
	
	--text: #dcdcdc;
	--selection-bg: #007aff59;
	--nav-bg: #252525;
	--content-bg: #1e1e1e;
	
	--bg1: #2d2d2d;
	--bg2: #252525;
	--bg3: #1e1e1e;
	--text1: #FAFAFA;
	--text2: #dcdcdc;
	
	--sidebar-width: 20dvw;
	
	--sidebar-bg: #252525;
	--scrollbar-thumb: #444;
	--scrollbar-track: transparent;
	
	--input-bg: #3c3c3c;
	--border: #333;
	--text: #dcdcdc;
	--base-fs: 16px;
}
::-webkit-scrollbar {
	width: 8px;
}
::-webkit-scrollbar-track {
	background: var(--scrollbar-track);
}
::-webkit-scrollbar-thumb {
	background: var(--scrollbar-thumb);
	border-radius: 10px;
	border: 2px solid var(--bg);
}
::-webkit-scrollbar-thumb {
	border-color: var(--sidebar-bg);
}
* {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
	font-size: inherit;
	user-select: none;
}
a {
	all: unset;
}
[href] {
	cursor: pointer;
}
p {
	margin: 0;
}
[data-theme="dark"] {
	--bg: #ffffff;
	--fg: #1a1a1a;
	--border: rgba(0, 0, 0, 0.08);
}
body {
	margin: 0;
	display: flex;
	flex-direction: column;
	min-height: 100dvh;
}
header, footer {
	position: relative;
	padding: 10px;
	display: flex;
	align-items: center;
	place-content: start;
	background: var(--bg1);
}
header > div {
	flex: 1;
}
header > div > div {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(2.5rem, max-content));
	grid-template-rows: 2.5rem;
	grid-auto-rows: 0;
	justify-content: center;
	column-gap: 8px;
	overflow: hidden;
}
header > .full > :not(.hide) {
	grid-auto-rows: min-content;
	padding: 10px;
	overflow-y: auto;
	z-index: 1;
	overscroll-behavior: contain;
	position: fixed;
	inset: calc(2.5rem + 20px) 0 0 0;
	gap: 8px;
	background: var(--bg3);
}
header button {
	color: var(--text);
	width: 40px;
	height: 40px;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	background: transparent;
	border: 1px solid transparent;
	border-radius: 6px;
	transition: color 0.2s;
}
header button:hover:not(:disabled) {
	background: var(--accent);
}
header button:disabled {
	opacity: .2;
	cursor: default;
}
header button > svg {
	width: 1.5rem;
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
}
header > div:not(.full) > div:not(.hide) > :not(button) {
	display: none;
}
header > .full > div:not(.hide) > :not(button) {
	grid-column: 1 / -1;
}
input {
	width: 100%;
	background: var(--input-bg);
	border: 1px solid var(--border);
	color: var(--text);
	padding: 8px;
	border-radius: 4px;
	font-size: var(--base-fs);
	outline: none;
	user-select: text;
	-webkit-user-select: text;
}
header span {
	width: 2px;
	height: 18px;
	background: var(--text2);
	margin: 0 8px;
	opacity: .2;
}
header + div {
	flex: 1;
	display: grid;
	grid-template-columns: var(--sidebar-width) 1fr;
	overflow: hidden;
}
header + div > * {
	display: flex;
	flex-flow: column;
	background: var(--bg3);
}
header + div > aside {
	position: relative;
	border-inline-end: 5px solid var(--border);
}
header + div > aside::after {
	content: '';
	position: absolute;
	top: 0;
	right: -5px;
	bottom: 0;
	width: 5px;
	cursor: ew-resize;
}
html:has(.isResizing) * {
	cursor: ew-resize !important;
}
.isResizing > div > aside {
	border-inline-end-color: var(--text2);
}
main {
	padding-top: max(2vh, 2vw, env(safe-area-inset-top));
	padding-bottom: max(2vh, 2vw, env(safe-area-inset-bottom));
	padding-left: max(2vh, 2vw, env(safe-area-inset-left));
	padding-right: max(2vh, 2vw, env(safe-area-inset-right));
}
main, dialog {
	font-family: Roboto, Segoe UI, San Francisco;
	font-size: clamp(16px, 1vw + 1rem, 1.5rem);
	line-height: 2;
	color: var(--text2);
}
main, dialog > :first-child {
	text-align: center;
}
main > * {
	font-weight: 400;
}
main > a, main > h1 {
	color: var(--text1);
	font-weight: 700;
}
dialog button {
	padding: 10px 20px;
	background: var(--bg1);
	color: var(--text1);
	border: none;
	border-radius: .5rem;
	cursor: pointer;
	transition: filter 0.2s ease, transform 0.1s ease;
}
dialog button:active {
	transform: scale(0.98);
}
dialog button:hover, dialog button:active {
	filter: brightness(1.1);
}
dialog button:focus-visible {
	outline: 3px solid var(--text1);
	outline-offset: 2px;
}
noscript {
	position: fixed;
	inset: 0;
	display: grid;
	place-items: center;
	background: var(--bg3);
	color: var(--text1);
	font-weight: 700;
}
::backdrop {
	background: rgb(0 0 0 / 25%);
	backdrop-filter: blur(9px);
}
dialog {
	margin: auto;
	padding: 0;
	width: 80vi;
	border: none;
	background: var(--bg3);
	color: var(--text2);
	border-radius: .5rem;
	box-shadow: rgba(50 50 93 / .25) 0 4px 8px 0, rgba(0 0 0 / .3) 0 8px 20px 0;
	animation: horizontal-shaking .15s 3 ease-in-out;
}
dialog > :first-child {
	background: var(--bg1);
}
dialog[open] {
	display: grid;
	gap: 15px;
}
dialog > * {
	margin: 0;
	padding: 0 15px;
}
dialog > :first-child {
	padding: 5px 0;
}
dialog > :last-child {
	padding-bottom: 15px;
}
@keyframes horizontal-shaking {
	0% {
		transform: translateX(0);
	}
	25% {
		transform: translateX(5px);
	}
	50% {
		transform: translateX(-5px);
	}
	75% {
		transform: translateX(5px);
	}
	100% {
		transform: translateX(0);
	}
}
.hide {
	display: none;
}
