html {
	font-family: "Helvetica Neue", "Helvetica", "Arial", sans-serif;
	font-size: 1.3em;
	max-width: 40rem;
	padding: 2rem 2rem 0;
	margin: auto;
	line-height: 1.5rem;
}

html,
body {
	background: #ffffff;
}

@media (prefers-color-scheme: dark) {
	html.dark,
	html.dark dialog,
	html.dark .word-result,
	html.dark .brand::after,
	html.dark .emoji {
		filter: invert(1);
	}
}

button {
	font-size: 20px;
	font-weight: 700;
	padding: 10px;
	border: none;
	border-radius: 5px;
	cursor: pointer;
}

button.letter-button {
	width: 50px;
	height: 50px;
	margin: 5px;
	background: #efe9e6;
	color: #000000;
}

button.letter-button.selected {
	background: #5a534e;
	color: #ffffff;
}

button.black {
	height: 40px;
	padding: 0 30px;
	background: #000000;
	color: #ffffff;
	border: 3px solid #000000;
	border-radius: 40px;
}

button.black:active {
	background: #ffffff;
	color: #000000;
}

button.white {
	height: 40px;
	padding: 0 30px;
	background: #ffffff;
	color: #000000;
	border: 3px solid #000000;
	border-radius: 40px;
}

button.white:active {
	background: #000000;
	color: #ffffff;
}

button.header-icon {
	padding: 2px;
	margin-right: 10px;
	width: 24px;
	height: 24px;
	background: #efe9e6;
	line-height: 20px;
}

.jumb-share,
.archive-intro {
	text-align: center;
}

time {
	margin-right: 10px;
}

.header-subs {
	display: flex;
	justify-content: center;
	align-items: center;
}

dialog {
	position: absolute;
	top: 20px;
	background: #efe9e6;
	border-radius: 5px;
	padding: 20px;
	max-width: clamp(16rem, 50vw, 40rem);
}

dialog h2 {
	position: relative;
	margin: 0;
}

dialog::backdrop {
	backdrop-filter: blur(2px);
}

dialog ul {
	width: 80%;
	list-style-type: none;
	padding: 0;
}

dialog ul li {
	position: relative;
}

dialog ul li span:not(.emoji) {
	position: absolute;
	top: 10px;
	left: 30px;
	font-size: 2.5rem;
}

dialog#statsDialog p {
	margin: 10px 0;
}

dialog#settingsDialog p {
	display: flex;
	justify-content: space-between;
	align-items: center;
	font-weight: bold;
}

dialog#settingsDialog p select {
	width: 120px;
	height: 2em;
	border: 3px solid #000000;
	border-radius: 5px;
	font-weight: bold;
}

table {
	width: 100%;
	margin-bottom: 10px;
	text-align: center;
}

table,
th,
td {
	border: 1px solid #000000;
	border-collapse: collapse;
}

table thead {
	background: rgba(0, 0, 0, 0.1);
}

#statsDialog table td {
	width: 50%;
	padding: 10px;
}

details {
	padding-bottom: 20px;
}

details summary {
	cursor: pointer;
}

details summary > * {
	display: inline;
}

details summary strong {
	padding-left: 15px;
}

details p {
	text-align: center;
}

header {
	display: flex;
	justify-content: space-between;
	align-items: flex-end;
	padding-bottom: 10px;
	border-bottom: 1px solid #000000;
}

header.archive {
	align-items: center;
}

header h1 {
	position: relative;
	margin: 0;
	line-height: 40px;
}

.brand {
	position: relative;
}

.brand::after {
	position: absolute;
	top: 0;
	right: -10px;
	display: block;
	content: "";
	background-image: url("./assets/gem.png");
	background-size: contain;
	width: 15px;
	height: 15px;
	animation: rotate 20s linear infinite;
}

span.brand::after {
	right: -8px;
	width: 12px;
	height: 12px;
}

button span.brand::after {
	right: -8px;
	width: 8px;
	height: 8px;
}

footer span.brand::after {
	top: 1px;
	right: -3px;
	width: 5px;
	height: 5px;
}

.mb2 {
	margin-bottom: 2px;
}

header div {
	text-align: center;
}

header .header-chunk {
	width: 160px;
}

header .end {
	display: flex;
	align-items: center;
	justify-content: flex-end;
}

header .today-theme {
	flex-grow: 1;
}

header .today-theme strong {
	height: 40px;
}

header .today-theme p {
	margin: 0;
}

header div:first-child {
	text-align: left;
}

.mobile-theme {
	display: none;
	text-align: center;
}

.hidden-start {
	visibility: hidden;
}

#splash {
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	padding: 20px;
	background: #efe9e6;
	height: calc(100vh - 10rem);
	text-align: center;
}

#splash h2,
#splash h3 {
	margin: 0;
}

#splash h2 {
	margin-bottom: 10px;
}

#splash h3 {
	margin-bottom: 20px;
	font-weight: 400;
}

#splash a {
	color: black;
}

#container {
	display: none;
	margin-top: 10px;
}

.working-word {
	padding: 20px;
	text-align: center;
}

.working-word span {
	position: relative;
	height: 25px;
}

.working-word #initial {
	display: inline-block;
}

.working-word #workingWord::after {
	position: absolute;
	top: 0;
	right: -2px;
	display: block;
	content: "";
	width: 100%;
	height: 100%;
	border-right: 2px solid #efe9e6;
	animation: 1s blink infinite;
	box-sizing: border-box;
}

.grid {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	max-width: 500px;
	margin: 0 auto;
}

.submission {
	padding: 20px 20px 0;
	text-align: center;
}

.submission button {
	margin: 5px;
}

.word-result,
#guesses {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	list-style-type: none;
	width: 100%;
	padding: 0;
}

.word-result li,
#guesses li {
	display: flex;
	justify-content: center;
	align-items: center;
	flex-direction: column;
	height: 60px;
	border-radius: 5px;
	margin: 0 2px 5px;
}

#guesses li {
	color: #000000;
	padding: 0 20px;
	font-weight: 500;
}

.word-result li {
	width: 200px;
	color: #ffffff;
}

.word-result .word-0 {
	background: #d62828;
}

.word-result .word-1 {
	background: #f77f00;
}

.word-result .word-2 {
	background: #38b000;
}

.word-result .word-3 {
	background: #02486e;
}

.word-result.assist li {
	text-align: center;
	height: 75px;
	line-height: 1.2em;
}

.word-result.assist .word-0::after {
	content: "•";
}

.word-result.assist .word-1::after {
	content: "••";
}

.word-result.assist .word-2::after {
	content: "•••";
}

.word-result.assist .word-3::after {
	content: "••••";
}

.color-0 {
	color: #d62828;
}

.color-1 {
	color: #f77f00;
}

.color-2 {
	color: #38b000;
}

.color-3 {
	color: #02486e;
}

.color-3:hover {
	color: #38b000;
}

.message {
	font-weight: 600;
	text-align: center;
}

#message {
	white-space: pre-line;
}

.hidden {
	display: none;
}

.uppercase,
.uppercase button {
	text-transform: uppercase;
}

.shake {
	position: relative;
	animation: shakeLeftRight 0.2s linear infinite;
}

footer {
	text-align: center;
	padding: 20px;
	font-size: 0.75rem;
	line-height: 1rem;
	color: gray;
}

footer a {
	color: gray;
}

@keyframes blink {
	from {
		opacity: 0;
	}
	to {
		opacity: 1;
	}
}

@keyframes rotate {
	0%,
	100% {
		transform: rotate(0deg);
	}
	25% {
		transform: rotate(90deg);
	}
	50% {
		transform: rotate(180deg);
	}
	75% {
		transform: rotate(270deg);
	}
}

@keyframes shakeLeftRight {
	0%,
	100% {
		transform: translateX(0);
	}
	25% {
		transform: translateX(-5px);
	}
	50% {
		transform: translateX(0);
	}
	75% {
		transform: translateX(5px);
	}
}

@media (max-width: 600px) {
	html {
		padding: 1rem 1rem 0;
	}
	header .today-theme {
		display: none;
	}
	.mobile-theme {
		display: block;
	}
	button.letter-button {
		margin: 2px;
	}
	.working-word {
		padding: 0 20px 20px;
	}
	.word-result li {
		width: 160px;
	}
}

#archivecontainer {
	margin-top: 10px;
}

#archivecontainer details summary {
	font-weight: 700;
}

form:not([method="dialog"]) {
	padding: 20px;
	background: #efe9e6;
	border-radius: 20px;
}

form fieldset {
	margin: 0 0 10px;
	padding: 0;
	border: 0;
}

form fieldset legend {
	padding-inline-start: 0;
}

form p {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: center;
	margin-top: 0;
}

input {
	font-size: 20px;
	font-weight: 700;
	padding: 10px 15px;
	margin-bottom: 10px;
	border: 3px solid #000000;
	border-radius: 40px;
}

input[type="email"] {
	margin: 0;
}

input:invalid {
	border-color: #ff0000;
}

input[type="text"],
input[type="email"],
input[type="url"] {
	width: 100%;
}

input[type="radio"] {
	opacity: 0;
	position: absolute;
	width: 0;
}

input[type="radio"] + label {
	display: inline-block;
	position: relative;
	padding-left: 30px;
	cursor: pointer;
	line-height: 1.5;
}

input[type="radio"] + label:before {
	content: "";
	position: absolute;
	left: 0;
	top: 50%;
	transform: translateY(-50%);
	width: 16px;
	height: 16px;
	border: 2px solid #000000;
	border-radius: 50%;
	background-color: #ffffff;
}

input[type="radio"]:checked + label:after {
	content: "";
	position: absolute;
	left: 5px;
	top: 50%;
	transform: translateY(-50%);
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background-color: #000000;
}

hr {
	margin: 20px 0;
	border: 0;
	border-top: 3px solid #000000;
}
