html, body {
	margin: 0;
	padding: 0;
}

.root {
	display: flex;
	flex-wrap: wrap;
	max-width: 100%;
	align-items: center;
	margin: 1em;
}

.dice {
	width: 100px;
	height: 100px;
	display: block;
}

.counters {
	display: flex;
	flex-direction: horizontal;
	/* border: 1px dotted; */
}

.lifecounter {
	margin-left: 0.5em;
	margin-right: 0.5em;
	text-width: 100%;
	min-width: 25%;

	/* needed when players have really long names */
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: end;
}

.lifename {
	text-align: center;
	padding-bottom: 0.5em;
}


.lifecounter-sub {
	width: 100px;
	height: 100px;
	/* background-color: blue; */
	border: 1px solid black;
	position: relative;
}

.lifecounter-sub > * {
	width: 100%;
}

.life-btn {
	position: absolute;
	border: none;
	background: none;
	z-index: 1;
}

.life-btn:focus {
	/* TODO The blue border is set via some other attribute */
	border: none;
}

.btn-up {
	height: 50%;
	top: 0;
}

.btn-down {
	height: 50%;
	top: 50%;
}

.life-count {
	position: absolute;
	text-height: 12pt;
	top: calc(50% - (12pt / 2));
	/* left: 40%; */
	text-align: center;
}

.arrow {
	border: solid;
	border-width: 0 3px 3px 0;
	display: inline-block;
	padding: 10px;
}

.btn-up > .arrow {
	border-color: lightgreen;
	transform: rotate(-135deg);
}

.btn-down > .arrow {
	border-color: red;
	transform: rotate(45deg);
}

form input {
	margin: 5px;
}

nav {
	width: 100%;
	height: 3em;
	background-color: #242424;
	margin-bottom: 1em;
	color: white;
	font-family: sans;

	display: flex;
	justify-content: space-between;
}

nav ul {
	display: flex;
	height: 100%;
	align-items: center;
	margin: 0;
}


nav li {
	display: flex;
	align-items: center;
	height: 100%;
}

nav a {
	color: inherit;
	height: 100%;
	display: flex;
	align-items: center;
	text-decoration: none;
	padding-left: 1em;
	padding-right: 1em;
}

nav a:hover {
	color: black;
	background-color: rgb(250, 241, 223);
}

main {
	display: flex;
	justify-content: space-around;
	flex-wrap: wrap;
}

.stored-games button {
	margin-left: 1em;
}

.error {
	display: block;
	border: 2px solid red;
	background-color: pink;
	padding: 2em;
}

.popup {
	--width: 20em;
	display: block;
	position: fixed;
	z-index: 1;
	top: 2em;
	width: var(--width);
	left: calc(50% - var(--width) / 2);
	border: 2px solid grey;
	background-color: rgb(250, 241, 223);
	color: black;
	box-shadow: 1ex 1ex 1em;
}

.popup .form {
	display: flex;
	justify-content: end;
}

.popup h1 {
	margin: 1em;
}

.popup p {
	margin: 1ex;
}

.popup .form button {
	margin: 1ex;
}

.popup[data-invisible] {
	display: none;
}

button, input[type=submit] {
	border-radius: 1ex;
	padding: 1ex;
}

button.yes {
	background-color: deepskyblue;
}
