/* style.css: how Little Sucker looks. Plain and roomy: one column, big buttons, and colours that follow the light or dark setting of whoever is looking. */

:root {
	color-scheme: light dark;
	--page: #fbf8f1;
	--ink: #1d1b18;
	--soft-ink: #4f4a42;
	--panel: #efe9db;
	--edge: #b9ae98;
	--button: #23423a;
	--button-ink: #ffffff;
	--focus: #b3541e;
	--link: #1f4f8f;
}

@media (prefers-color-scheme: dark) {
	:root {
		--page: #191816;
		--ink: #f1ede4;
		--soft-ink: #c2bbad;
		--panel: #262421;
		--edge: #5a544a;
		--button: #6cc7a8;
		--button-ink: #10211c;
		--focus: #ffb37a;
		--link: #9cc4ff;
	}
}

* {
	box-sizing: border-box;
}

body {
	margin: 0;
	background: var(--page);
	color: var(--ink);
	font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	font-size: 1.125rem;
	line-height: 1.5;
}

.site-header,
.site-footer,
main {
	max-width: 44rem;
	margin: 0 auto;
	padding: 0 1rem;
}

.site-header {
	padding-top: 0.75rem;
}

.game-title {
	margin: 0;
	font-weight: 700;
	color: var(--soft-ink);
}

.site-footer {
	margin-top: 2rem;
	padding-bottom: 2rem;
	color: var(--soft-ink);
	font-size: 1rem;
}

h1 {
	font-size: 1.9rem;
	line-height: 1.2;
	margin: 0.75rem 0;
}

h2 {
	font-size: 1.35rem;
	margin: 1.5rem 0 0.5rem;
}

h3 {
	font-size: 1.15rem;
	margin: 1rem 0 0.25rem;
}

a {
	color: var(--link);
}

/* Something that is focused must be easy to see, whatever it is. */
:focus-visible {
	outline: 0.2rem solid var(--focus);
	outline-offset: 0.15rem;
}

h1:focus,
h1:focus-visible {
	outline: none;
}

button {
	font: inherit;
	font-weight: 600;
	color: var(--button-ink);
	background: var(--button);
	border: 0;
	border-radius: 0.5rem;
	padding: 0.75rem 1rem;
	min-height: 3rem;
	cursor: pointer;
}

.button-column {
	display: flex;
	flex-direction: column;
	gap: 0.6rem;
	max-width: 24rem;
	margin: 1rem 0;
}

.button-row {
	display: flex;
	flex-wrap: wrap;
	gap: 0.6rem;
	margin: 1rem 0;
}

fieldset {
	border: 1px solid var(--edge);
	border-radius: 0.5rem;
	margin: 1.25rem 0;
	padding: 0.5rem 1rem 1rem;
}

legend {
	font-weight: 700;
	padding: 0 0.35rem;
}

.choice {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	margin: 0.5rem 0;
}

.choice input {
	width: 1.4rem;
	height: 1.4rem;
	flex: none;
}

.field {
	margin: 0.9rem 0;
}

.field label {
	display: block;
	font-weight: 600;
}

.field select,
.field input[type="range"] {
	font: inherit;
	width: 100%;
	max-width: 24rem;
	min-height: 2.5rem;
}

.help-text {
	margin: 0.25rem 0 0;
	color: var(--soft-ink);
	font-size: 1rem;
}

/* The play area: the picture of the floor, for anyone watching. */
.deck {
	background: #14130f;
	border: 2px solid var(--edge);
	border-radius: 0.5rem;
	padding: 0.5rem;
	margin: 1rem 0 0.5rem;
}

.map {
	display: block;
	width: 100%;
	height: auto;
}

.said-line {
	min-height: 3.2rem;
	margin: 0.5rem 0;
	padding: 0.5rem 0.75rem;
	background: var(--panel);
	border-left: 0.3rem solid var(--edge);
	border-radius: 0.25rem;
}

.status-text {
	margin: 0.5rem 0;
	color: var(--soft-ink);
}

.hold-panel {
	margin: 1rem 0;
	padding: 0.25rem 1rem 0.5rem;
	background: var(--panel);
	border: 2px solid var(--focus);
	border-radius: 0.5rem;
}

.hold-panel h2 {
	margin-top: 0.75rem;
}

/* The five rolling buttons, laid out like a compass. */
.pad {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	grid-template-areas:
		". north ."
		"west stop east"
		". south .";
	gap: 0.6rem;
	max-width: 26rem;
	margin: 1rem 0;
}

.pad-north {
	grid-area: north;
}

.pad-west {
	grid-area: west;
}

.pad-stop {
	grid-area: stop;
}

.pad-east {
	grid-area: east;
}

.pad-south {
	grid-area: south;
}

.upgrade {
	margin: 0.75rem 0;
	padding: 0.25rem 1rem 0.75rem;
	background: var(--panel);
	border-radius: 0.5rem;
}

.upgrade p {
	margin: 0.35rem 0;
}

.sound-buttons {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	max-width: 30rem;
	padding: 0;
	margin: 0.5rem 0;
	list-style: none;
}

.sound-buttons button {
	width: 100%;
	text-align: left;
}

table {
	border-collapse: collapse;
	width: 100%;
	margin: 0.75rem 0;
}

th,
td {
	text-align: left;
	vertical-align: top;
	padding: 0.4rem 0.6rem;
	border-bottom: 1px solid var(--edge);
}

thead th {
	border-bottom-width: 2px;
}

/* On the page for screen readers, off it for eyes. */
.visually-hidden {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

[hidden] {
	display: none !important;
}

/* With nothing said yet, the box keeps its space, so nothing jumps, but shows no empty grey bar. */
.said-line:empty {
	background: transparent;
	border-left-color: transparent;
}
