:root {
	color-scheme: light;
	--roe2-bg: #eef2df;
	--roe2-panel: #fffbea;
	--roe2-ink: #172112;
	--roe2-soft: #5d6b53;
	--roe2-border: #27361d;
	--roe2-accent: #536f2c;
	--roe2-shadow: rgba(23, 33, 18, .18);
}

* {
	box-sizing: border-box;
}

html,
body {
	width: 100%;
	height: 100%;
	margin: 0;
	overflow: hidden;
	background: radial-gradient(circle at 30% 10%, #fffde9, var(--roe2-bg) 58%, #dbe2c5);
	color: var(--roe2-ink);
	font-family: Verdana, Geneva, sans-serif;
}

.roe2-shell {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(250px, 320px);
	gap: 12px;
	width: 100vw;
	height: 100vh;
	padding: 12px;
}

.roe2-stage-card,
.roe2-sidebar {
	min-width: 0;
	min-height: 0;
}

.roe2-stage-card,
.roe2-panel {
	border: 2px solid var(--roe2-border);
	background: linear-gradient(180deg, rgba(255,255,255,.72), rgba(255,251,234,.92));
	box-shadow: 0 12px 32px var(--roe2-shadow);
}

.roe2-stage-card {
	display: grid;
	grid-template-rows: auto minmax(0, 1fr);
	padding: 10px;
}

.roe2-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 0 0 10px;
}

.roe2-header h1 {
	margin: 0;
	font-size: clamp(18px, 2vw, 28px);
	letter-spacing: .02em;
}

.roe2-header p,
.roe2-help {
	margin: 4px 0 0;
	color: var(--roe2-soft);
	font-size: 12px;
	line-height: 1.45;
}

.roe2-ge-panel {
	display: grid;
	grid-template-columns: auto minmax(120px, 1fr);
	align-items: center;
	gap: 5px 8px;
	min-width: 260px;
	font-size: 12px;
}

.roe2-ge-panel span {
	grid-column: 1 / -1;
	color: var(--roe2-soft);
	text-align: right;
}

.roe2-ge-panel select,
.roe2-buttons button {
	border: 1px solid var(--roe2-border);
	background: #fffef3;
	color: var(--roe2-ink);
	font: inherit;
}

.roe2-canvas-wrap {
	display: grid;
	place-items: center;
	min-height: 0;
	background: #11180e;
	border: 2px inset #536f2c;
	overflow: hidden;
}

#roe2-canvas {
	display: block;
	max-width: 100%;
	max-height: 100%;
	image-rendering: pixelated;
	image-rendering: crisp-edges;
	background: #10160d;
}

#roe2-canvas.roe2-hide-native-cursor {
	cursor: none;
}

.roe2-sidebar {
	display: grid;
	grid-template-rows: auto auto minmax(0, 1fr);
	gap: 12px;
	overflow: hidden;
}

.roe2-panel {
	padding: 12px;
	overflow: auto;
}

.roe2-panel h2 {
	margin: 0 0 10px;
	font-size: 16px;
}

.roe2-status-grid {
	display: grid;
	grid-template-columns: auto 1fr;
	gap: 6px 10px;
	font-size: 13px;
}

.roe2-status-grid dt {
	color: var(--roe2-soft);
}

.roe2-status-grid dd {
	margin: 0;
	font-weight: 700;
	text-align: right;
}

.roe2-buttons {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 8px;
}

.roe2-buttons button {
	padding: 9px 8px;
	border-radius: 0;
	cursor: pointer;
}

.roe2-buttons button:hover,
.roe2-buttons button:focus-visible {
	background: #e6efca;
	outline: 2px solid var(--roe2-accent);
	outline-offset: 1px;
}

.roe2-log-panel {
	min-height: 0;
}

.roe2-log {
	display: flex;
	flex-direction: column-reverse;
	gap: 7px;
	padding: 0;
	margin: 0;
	list-style: none;
	font-family: Consolas, Monaco, monospace;
	font-size: 12px;
	line-height: 1.35;
}

.roe2-log li {
	padding: 7px;
	background: rgba(255,255,255,.58);
	border-left: 3px solid var(--roe2-accent);
}

@media (max-width: 860px) {
	.roe2-shell {
		grid-template-columns: 1fr;
		grid-template-rows: minmax(0, 1fr) minmax(220px, 38vh);
	}

	.roe2-header {
		align-items: flex-start;
		flex-direction: column;
	}

	.roe2-ge-panel {
		width: 100%;
	}

	.roe2-sidebar {
		grid-template-columns: 1fr 1fr;
		grid-template-rows: auto minmax(0, 1fr);
	}

	.roe2-log-panel {
		grid-column: 1 / -1;
	}
}
