html, body {
	height: 100%;
	margin: 0;
}

*, *::before, *::after {
	box-sizing: border-box;
}

body {
	font-family: sans-serif;
	display: flex;
	flex-direction: column;
	min-height: 100vh;
	min-height: 100dvh;
}

#app {
	display: flex;
	flex-direction: column;
	flex: 1;
	min-height: 0;
	width: 100%;
}

.gs-header, .gs-footer {
	padding: 0.5rem 1rem;
	background: #222;
	color: #eee;
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 1rem;
	align-items: center;
	font-size: 0.85rem;
	flex-shrink: 0;
}

.gs-header-warning {
	color: #ffcc66;
}

.gs-header a, .gs-footer a {
	color: #6cf;
}

.gs-body {
	flex: 1;
	min-height: 0;
	overflow-y: auto;
	padding: 1rem;
	display: flex;
	flex-direction: column;
}

.gs-menu {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	width: 100%;
	max-width: 20rem;
}

.gs-menu button, .gs-menu select {
	width: 100%;
	padding: 0.5rem 1rem;
	font-size: 1rem;
}

.gs-field {
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
	margin-bottom: 1rem;
}

.gs-toggle-row {
	display: flex;
	gap: 0.5rem;
}

.gs-toggle-row button.gs-active {
	font-weight: bold;
	text-decoration: underline;
}

.gs-game-view {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	flex: 1;
	min-height: 0;
}

.gs-game-toolbar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem;
}

.gs-game-toolbar button.gs-active {
	font-weight: bold;
	background: #444;
	color: #fff;
}

.gs-game-date {
	margin-left: auto;
	font-variant-numeric: tabular-nums;
}

.gs-completion-banner {
	padding: 0.5rem 1rem;
	background: #663;
	color: #fff;
	font-weight: bold;
}

.gs-game-content {
	flex: 1;
	min-height: 10rem;
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}

.gs-actions-log {
	display: flex;
	flex-direction: column;
	gap: 0.15rem;
	max-height: 12rem;
	overflow-y: auto;
	padding: 0.5rem;
	background: #1a1a1a;
	border-radius: 4px;
	font-size: 0.85rem;
}

.log-entry {
	color: #ddd;
	animation: gs-log-fade-in 0.25s ease-in;
}

@keyframes gs-log-fade-in {
	from { opacity: 0; }
	to { opacity: 1; }
}

.gs-terminal {
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
	flex-shrink: 0;
}

.gs-terminal-help {
	color: #888;
	font-size: 0.8rem;
}

.gs-terminal-output {
	display: flex;
	flex-direction: column;
	gap: 0.1rem;
	max-height: 10rem;
	overflow-y: auto;
	padding: 0.5rem;
	background: #111;
	border-radius: 4px;
	font-family: monospace;
	font-size: 0.85rem;
}

.gs-terminal-ok {
	color: #ddd;
}

.gs-terminal-error {
	color: #f66;
}

.gs-terminal-input {
	font-family: monospace;
	padding: 0.4rem;
	background: #1a1a1a;
	color: #eee;
	border: 1px solid #444;
	border-radius: 4px;
}

.gs-modal-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.5);
	display: flex;
	align-items: center;
	justify-content: center;
}

.gs-modal-panel {
	background: #fff;
	color: #111;
	padding: 1.5rem;
	border-radius: 6px;
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	min-width: 16rem;
	max-width: 90vw;
}

.gs-save-message {
	font-size: 0.9rem;
}
