@import url(tui.css);
@import url(layout.css);
@import url(skin.css);


:root {
	line-height: 1.2;
}

body {
	margin: 0;
	background-color: #000;
	color: gray;
}

#intro {
	align-self: start;
	section {
		&:not([hidden]) { display: flex; }
		flex-direction: column;
		align-items: center;
		gap: 1lh;

	}

	font-size: 16px;
	max-width: 800px;

	pre {
		margin: 0;
	}

	blockquote { margin: 0; }

	p { margin: 0.5lh 0; }

	h1 {
		color: var(--fg);
		margin-bottom: 0;
	}

	input {
		text-transform: uppercase;
		text-align: center;
		width: 8ch;
	}
}

#game {
	background-color: var(--bg);
	color: var(--fg);

	#heading {
		font-weight: bold;
		display: flex;
		align-items: center;
		justify-content: center;
	}

	#map {
		&:not([hidden]) { display: flex; }
		align-items: center;
		justify-content: center;
	}

	#main, #log {
		--border-width: 2px;
		border-top: var(--border-width) solid var(--highlight);
		border-bottom: var(--border-width) solid var(--highlight);
	}

	#log {
		padding: 0.5lh 1ch;
		border-left: var(--border-width) solid var(--highlight);
		display: flex;
		flex-direction: column;
		gap: 0.5lh;

		p { margin: 0; }
	}

	#saloon, #hotel, #store, #action, #help {
		&:not([hidden]) { display: flex; }
		align-items: start;
		flex-direction: column;
		gap: 0.5lh;
		padding: 0.5lh 1ch;

		menu { align-self: stretch; }
	}

	rl-display {
		font-family: inherit;
		--tile-height: 1rem;
		--tile-width: 0.75rem;

		&::part(train) { font-weight: bold; }
	}

	#status {
		display: flex;
		justify-content: space-between;
		padding: 0.5lh 1ch;

		.col {
			display: flex;
			flex-direction: column;
		}

		.col > *::before { color: var(--label); }

		.status::before { content: "Status: "; }
		.money::before { content: "Money: "; margin-right: 1ch; }
		.party::before { content: "Party members: "; }
		.hp::before { content: "Health: "; }

		.party, .hp { text-align: right; }
	}

	p {
		margin: 0;
	}

	a {
		color: #eee;
	}

	.gold {
		&::before {
			content: "$";
			color: var(--gold);
		}
	}
}

@media (max-width: 999px), (max-height: 599px) {
	body {
		> * { display: none !important; }
		&::before {
			padding: 1lh 2ch;
			content: "Sorry, this game is designed for devices with at least 1000⨯600 resolution.";
			font-size: 150%;
		}
	}
}
