@font-face {
	font-family: 'Chillax';
	src: url('Chillax-Variable.woff2') format('woff2'),
		url('Chillax-Variable.woff') format('woff'),
		url('Chillax-Variable.ttf') format('truetype');
	font-weight: 200 700;
	font-display: swap;
	font-style: normal;
}


:root {
	--background-colour: hsl(250, 88%, 77%);
	--header-background-colour: #FFFFFF80;

	--main-colour: black;
	--info-colour: #202020;

	--bold-weight: 500;

	--post-text-colour: black;
	--post-background-sl: 25%, 75%;

	--post-info-colour: #444444;
	--post-background-hue: 210;
	--post-icon-colour: grey;

	--post-footer-font-size: 1.125rem;

	font-family: "Chillax", system-ui, sans-serif;
	color-scheme: light;
}

:root.dark {
	--main-colour: white;
	--info-colour: #BDBDBD;
	--background-colour: hsl(250, 25%, 12.5%);
	--header-background-colour: #80808080;

	--post-text-colour: #F0F0F0;
	--post-info-colour: #BBBBBB;
	--post-background-sl: 12.5%, 25%;

	--post-liked-background-colour: #404040;

	color-scheme: dark;
}

:root.evil {
	--main-colour: yellow;
	--info-colour: yellow;
	--background-colour: red;
	--header-background-colour: red;

	--post-text-colour: yellow;
	--post-info-colour: yellow;
	--post-background-sl: 100%, 50%;

	color-scheme: light;

	text-transform: uppercase;
	font-style: oblique -20deg;
	text-decoration: cyan wavy underline;
	font-weight: 800;
	--bold-weight: 800;
	text-shadow: 0.2em 0.2em 0 lime;
	font-family: "Comic Sans", "Comic Sans Ms", "Chalkboard", "ChalkboardSE-Regular", sans-serif;
	filter: blur(1px);
	transform: rotate(-1deg);
}

:root.evil img {
	transform: scale(-0.8, 0.8) skew(-20deg, -15deg);
	filter: saturate(100) invert();
}

:root.darkest {
	--background-colour: black;
	--header-background-colour: black;
	--main-colour: black;
	--info-colour: black;
	--post-text-colour: black;
	--post-background-sl: 0%, 0%;
	--post-info-colour: black;
	--post-icon-colour: black;
	color-scheme: dark;
	accent-color: black;
}

:root.darkest textarea,
:root.darkest input,
:root.darkest button {
	color: black;
	background-color: black;
	border: black;
}

@media (max-width: 399px) {
	:root {
		font-size: 15px;
		--post-footer-font-size: 1rem;
	}
}


body {
	margin: 0;
	background-color: var(--background-colour);
	display: flex;
	flex-direction: column;
	min-height: 100vh;
	min-height: 100svh;
}

.site_header {
	background-color: var(--header-background-colour);
	line-height: 1;
	color: var(--main-colour);
	box-shadow: 0 -0.5rem 0.5rem 1rem #00000080;
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.site_header img {
	display: block;
	padding: 0.5rem;
	box-sizing: border-box;
	height: 5.25rem;
	width: auto;
}

h1 {
	margin: 0;
	font-size: 3rem;
	font-weight: 400;
}

h1 a {
	text-decoration: none;
}

.site_header p {
	font-style: italic;
	font-size: 1.25rem;
	margin: 0.5rem 1.5rem;
	color: var(--info-colour);
}


main {
	padding-inline: 1rem;
	flex-grow: 1;
}

#colour_scheme_control {
	color: var(--info-colour);
	text-align: right;
	margin-top: 1rem;
	position: absolute;
	right: 1rem;
}

.post {
	background-color: hsl(var(--post-background-hue), var(--post-background-sl));
	padding: 1rem;
	border-radius: 1rem;
	color: var(--post-text-colour);
	margin: 4rem auto;
	overflow: hidden;
	transition: opacity 1s;
	min-width: min-content;
}

#post {
	box-shadow: 0.75em 0.5em 1em #00000080;
	max-width: 75ch;
}

#post header {
	display: flex;
	align-items: center;
}

.post_icon {
	text-align: center;
	font-size: 2rem;
	line-height: 1;
	text-wrap: nowrap;
	min-height: 1em;
	padding: 0.25em;
	background-color: var(--post-icon-colour);
	border-radius: 100em;
}

#post_icon {
	display: inline-block;
	min-width: 1em;
}

#post_name {
	font-size: 1.25rem;
	font-weight: var(--bold-weight);
	margin-inline: 1rem;
	min-height: 1em;
	flex-grow: 1;
	word-break: break-word;
}


#post_body {
	font-size: 1.5rem;
	line-height: 1.25;
	min-height: 2.5em;
	margin-block: 0.75em;
	word-break: break-word;
}

#post footer {
	color: var(--post-info-colour);
	font-size: var(--post-footer-font-size);
	display: flex;
	justify-content: space-between;
	align-items: end;
	column-gap: 1rem;
}

#post_liked_button {
	appearance: none;
	color: inherit;
	border: 0;
	padding: 0;
	background: 0;
	text-align: right;
	cursor: pointer;
}


.post_liked_icon {
	display: inline;
	height: 1em;
	fill: transparent;
}

#post_liked_button.liked .post_liked_icon {
	fill: currentColor;
}




input,
button,
textarea,
select {
	font: inherit;
	font-size: 1em;
	box-sizing: border-box;
	margin: 0;
}



#new_post {
	display: flex;
	flex-direction: column;
	max-width: 60ch;
}

#new_post h2 {
	margin: 0;
	font-size: 1.5rem;
	margin-bottom: 1em;
	font-weight: var(--bold-weight);
}

#new_post label {
	display: flex;
	align-items: center;
	justify-content: stretch;
	gap: 0.5rem;
	margin-bottom: 1rem;
}

#new_post div.icon_name_entry {
	display: flex;
	column-gap: 1rem;
	flex-wrap: wrap;
}

#new_post .icon_name_entry label {
	position: relative;
}

#new_post .icon_name_entry label[for="new_post_name"] {
	flex-grow: 1;
}

#new_post .icon_name_entry output {
	position: absolute;
	right: 0;
	top: 100%;
	opacity: 0;
	transition: opacity 1s;
}

#new_post label input {
	flex-grow: 1;
	width: 4em;
	min-height: 2em;
}

#new_post #new_post_icon {
	text-align: center;
	width: 2.5em;
	padding: 0;
	align-self: stretch;
}

#new_post_body {
	min-height: 2em;
	resize: vertical;
	width: 100%;
}

#new_post output {
	text-align: right;
	color: var(--post-info-colour);
	pointer-events: none;
	user-select: none;
	-webkit-user-select: none;
	min-height: 2rem;
}

#new_post input:has(+output.invalid),
#new_post textarea:has(+output.invalid) {
	accent-color: red;
}

#new_post output.invalid {
	color: red;
}

#new_post button {
	font-size: 2rem;
}

#new_post button:enabled {
	cursor: pointer;
}


a {
	color: var(--main-colour);
}



body>footer {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	text-align: center;
	gap: 0.5rem 3rem;
	background-color: var(--header-background-colour);
	padding: 1rem;
	color: var(--info-colour);
	box-shadow: 0 0.5rem 1rem inset #00000080;
}

kbd {
	display: inline-block;
	font-family: monospace;
}

kbd kbd,
.pressable {
	border: 1px solid;
	padding: 0.1em 0.2em;
	background-color: var(--header-background-colour);
	border-radius: 0.5em;
	margin-inline: 0.2em;
	box-shadow: 0.125em 0.25em 0.25em #00000080;
	color: var(--main-colour);
	cursor: pointer;
	user-select: none;
	-webkit-user-select: none;
}

kbd kbd:active,
.pressable:active {
	transform: translate(0.0625em, 0.125em);
	box-shadow: none;
}

dialog {
	border: 0;
	background-color: hsl(210, var(--post-background-sl));
	padding: 1rem;
	box-sizing: border-box;
	box-shadow: 0.75em 0.5em 1em #00000080;
	border-radius: 1rem;
	color: var(--post-text-colour);
	text-align: center;
}

dialog h2 {
	font-family: inherit;
	font-size: 2em;
	font-weight: 500;
	margin: 0;
}

dialog p {
	font-size: 1.5rem;
}

dialog form {
	display: grid;
	gap: 1rem;
	grid-template-columns: 1fr 1fr;
}

dialog button {
	font-size: 2rem;
	cursor: pointer;
}

::backdrop {
	background: #00000080;
	backdrop-filter: blur(2px);
}

:root.evil ::backdrop {
	backdrop-filter: none;
}

:root.evil dialog {
	transform: rotate(1deg);
	filter: blur(1px);
}

:root.darkest dialog button {
	color: white;
}