@font-face {
	font-family: 'Jersey 15';
	src: url('../../assets/fonts/Jersey15-Regular.ttf') format('truetype');
	font-display: swap;
}

@font-face {
	font-family: 'Jacquard 24';
	src: url('../../assets/fonts/Jacquard24-Regular.ttf') format('truetype');
	font-display: swap;
}

* {
	box-sizing: border-box;
	user-select: none;
}

html,
body {
	margin: 0;
	padding: 0;
	width: 100%;
	height: 100%;
	overflow: hidden;
	background:
		radial-gradient(circle at top, rgba(122, 92, 55, 0.35), transparent 40%),
		linear-gradient(180deg, #302015 0%, #1a120d 100%);
	color: #f4ead6;
	font-family: 'Jersey 15', sans-serif;
}

:root {
	--hud-diagonal-cut: 12px;
	--hud-frame-shape: polygon(
		var(--hud-diagonal-cut) 0,
		calc(100% - var(--hud-diagonal-cut)) 0,
		100% var(--hud-diagonal-cut),
		100% calc(100% - var(--hud-diagonal-cut)),
		calc(100% - var(--hud-diagonal-cut)) 100%,
		var(--hud-diagonal-cut) 100%,
		0 calc(100% - var(--hud-diagonal-cut)),
		0 var(--hud-diagonal-cut)
	);
	--hud-radius: 10px;
	--hud-panel-bg: rgba(24, 53, 66, 0.68);
	--hud-panel-bg-strong: rgba(14, 31, 40, 0.82);
	--hud-panel-sheen: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01));
	--hud-border: rgba(208, 233, 236, 0.14);
	--hud-border-strong: rgba(221, 241, 242, 0.24);
	--hud-shadow: 0 18px 32px rgba(0, 0, 0, 0.22);
	--hud-highlight: rgba(255, 255, 255, 0.04);
	--hud-text: #edf6f3;
	--hud-muted-text: rgba(226, 239, 237, 0.72);
	--hud-accent-text: #cfe8de;
	--hud-button-bg: rgba(123, 165, 173, 0.22);
	--hud-button-bg-hover: rgba(147, 194, 201, 0.32);
	--hud-button-bg-active: rgba(207, 230, 227, 0.42);
	--hud-button-border: rgba(208, 233, 236, 0.14);
	--hud-button-border-strong: rgba(221, 241, 242, 0.24);
	--hud-button-shadow: none;
	--hud-button-shadow-pressed: none;
	--hud-button-selected-bg: rgba(207, 230, 227, 0.42);
	--hud-slot-bg: rgba(125, 169, 175, 0.2);
	--hud-slot-bg-hover: rgba(147, 194, 201, 0.28);
	--hud-slot-bg-active: rgba(171, 211, 214, 0.34);
	--hud-slot-selected-bg: rgba(206, 228, 218, 0.26);
	--hud-slot-unavailable-bg: rgba(78, 103, 115, 0.2);
	--hud-input-bg: rgba(8, 18, 24, 0.58);
	--hud-overlay: rgba(4, 10, 14, 0.5);
	--toolbar-scale: 1.25;
}

body.menu-open #ui-layer > *:not(#menu-root):not(#startup-error-root) {
	opacity: 0 !important;
	pointer-events: none !important;
	transition: opacity 0.18s ease;
}

button,
input,
select,
textarea {
	font: inherit;
}

#game-container {
	width: 100%;
	height: 100%;
	display: block;
}

#game-container canvas {
	display: block;
	image-rendering: optimizequality;
	/* Add vendor prefixes for wider compatibility */
	image-rendering: -webkit-optimize-contrast;
}

#ui-layer {
	position: absolute;
	inset: 0;
	pointer-events: none;
	font-family: 'Trebuchet MS', Verdana, sans-serif;
}

#build-panel-root {
	position: absolute;
	left: 50%;
	bottom: 82px;
	width: min(980px, calc(100vw - 24px));
	transform: translateX(-50%) translateY(12px);
	opacity: 0;
	pointer-events: none;
	transition:
		opacity 0.18s ease,
		transform 0.18s ease;
	z-index: 225;
}

#build-panel-root.visible {
	opacity: 1;
	pointer-events: auto;
	transform: translateX(-50%) translateY(0);
}

.build-panel-shell {
	display: flex;
	flex-direction: column;
	gap: 14px;
	padding: 16px;
	border: 1px solid var(--hud-border-strong);
	border-radius: 18px;
	background:
		linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.01)),
		rgba(8, 19, 26, 0.9);
	box-shadow: 0 24px 56px rgba(0, 0, 0, 0.3);
	backdrop-filter: blur(14px);
	color: var(--hud-text);
}

.build-panel-header {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 12px;
}

.build-panel-title-wrap {
	display: flex;
	flex-direction: column;
	gap: 4px;
	min-width: 0;
}

.build-panel-kicker {
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--hud-muted-text);
}

.build-panel-header h2 {
	margin: 0;
	font-size: clamp(24px, 3vw, 30px);
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--hud-text);
}

.build-panel-active-selection,
.build-toolbar-selection {
	display: inline-flex;
	align-items: center;
	padding: 5px 9px 4px;
	border: 1px solid rgba(255, 220, 163, 0.26);
	border-radius: 999px;
	background: rgba(232, 154, 55, 0.16);
	color: #ffe3be;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	white-space: nowrap;
}

.build-panel-active-selection[hidden],
.build-toolbar-selection[hidden] {
	display: none !important;
}

.build-panel-tab-list {
	display: inline-flex;
	flex-wrap: wrap;
	gap: 8px;
}

.build-panel-filters {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 14px;
}

.build-panel-filters[hidden] {
	display: none !important;
}

.build-panel-filter-group {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
}

.build-panel-filter-label {
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--hud-muted-text);
}

.build-panel-tab-button,
.build-panel-filter-button,
.toolbar-build-toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 7px;
	padding: 8px 12px;
	border: 1px solid var(--hud-button-border);
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.05);
	color: var(--hud-text);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	cursor: pointer;
	transition:
		background 0.18s ease,
		border-color 0.18s ease,
		transform 0.18s ease,
		box-shadow 0.18s ease;
}

.build-panel-tab-button:hover,
.build-panel-tab-button:focus-visible,
.build-panel-filter-button:hover,
.build-panel-filter-button:focus-visible,
.toolbar-build-toggle:hover,
.toolbar-build-toggle:focus-visible {
	outline: none;
	background: rgba(255, 255, 255, 0.1);
	border-color: var(--hud-button-border-strong);
	transform: translateY(-1px);
}

.build-panel-tab-button.active {
	background: rgba(197, 227, 223, 0.18);
	border-color: rgba(221, 241, 242, 0.36);
	color: #f6fffc;
}

.build-panel-filter-button {
	padding: 6px 10px;
	font-size: 10px;
}

.build-panel-filter-button.active {
	background: rgba(255, 214, 134, 0.2);
	border-color: rgba(255, 233, 189, 0.34);
	color: #fff3d6;
}

.toolbar-build-toggle.is-cancel {
	background: rgba(146, 33, 41, 0.32);
	border-color: rgba(255, 182, 190, 0.28);
	color: #ffe6e9;
	box-shadow: 0 8px 18px rgba(117, 21, 30, 0.18);
}

.toolbar-build-toggle.is-cancel:hover,
.toolbar-build-toggle.is-cancel:focus-visible {
	background: rgba(166, 40, 49, 0.42);
	border-color: rgba(255, 205, 211, 0.36);
}

.toolbar-build-toggle-icon {
	width: 16px;
	height: 16px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 999px;
	border: 1px solid currentColor;
	font-size: 10px;
	line-height: 1;
}

.toolbar-build-cluster {
	display: flex;
	align-items: center;
	gap: 8px;
	min-width: 0;
}

.build-panel-scroll {
	max-height: min(48vh, 460px);
	overflow-y: auto;
	padding-right: 4px;
	scrollbar-width: thin;
	scrollbar-color: rgba(231, 239, 237, 0.28) transparent;
}

.build-recipe-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 12px;
}

.build-recipe-card {
	display: flex;
	flex-direction: column;
	gap: 12px;
	min-height: 196px;
	padding: 14px;
	border: 1px solid rgba(223, 240, 242, 0.12);
	border-radius: 16px;
	background:
		linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.01)),
		rgba(18, 40, 50, 0.62);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
	color: inherit;
	text-align: left;
	transition:
		transform 0.18s ease,
		border-color 0.18s ease,
		background 0.18s ease,
		box-shadow 0.18s ease;
	appearance: none;
	cursor: pointer;
}

.build-recipe-card:hover,
.build-recipe-card:focus-visible {
	outline: none;
	transform: translateY(-2px);
	border-color: rgba(221, 241, 242, 0.26);
	background:
		linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.02)),
		rgba(21, 48, 59, 0.72);
}

.build-recipe-card.active {
	border-color: rgba(255, 214, 134, 0.44);
	box-shadow:
		0 14px 28px rgba(197, 127, 37, 0.12),
		inset 0 0 0 1px rgba(255, 232, 184, 0.12);
}

.build-recipe-card.locked {
	cursor: default;
	opacity: 0.72;
	border-style: dashed;
	background:
		linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01)),
		rgba(31, 36, 41, 0.68);
}

.build-recipe-card.locked:hover,
.build-recipe-card.locked:focus-visible {
	transform: none;
	border-color: rgba(223, 240, 242, 0.12);
}

.build-recipe-card-header {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 10px;
}

.build-recipe-kicker {
	margin: 0 0 4px;
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--hud-muted-text);
}

.build-recipe-card h3 {
	margin: 0;
	font-size: 18px;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	color: var(--hud-text);
}

.build-recipe-meta-row {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.build-recipe-meta-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 4px 8px 3px;
	border-radius: 999px;
	border: 1px solid rgba(214, 228, 234, 0.16);
	background: rgba(255, 255, 255, 0.04);
	color: rgba(239, 248, 246, 0.82);
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	white-space: nowrap;
}

.build-recipe-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 4px 8px 3px;
	border-radius: 999px;
	background: rgba(118, 184, 157, 0.16);
	border: 1px solid rgba(183, 236, 214, 0.18);
	color: #d9f8ea;
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	white-space: nowrap;
}

.build-recipe-badge.locked {
	background: rgba(109, 99, 81, 0.18);
	border-color: rgba(191, 181, 158, 0.18);
	color: #d7cbb8;
}

.build-recipe-description,
.build-recipe-hint {
	margin: 0;
	font-size: 13px;
	line-height: 1.35;
	color: var(--hud-muted-text);
}

.build-recipe-hint {
	color: #e6d6b8;
	margin-top: auto;
}

.build-recipe-cost-row {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-top: auto;
}

.build-panel-empty-state {
	grid-column: 1 / -1;
	padding: 18px;
	border: 1px dashed rgba(223, 240, 242, 0.16);
	border-radius: 16px;
	background: rgba(18, 40, 50, 0.38);
	color: rgba(231, 241, 239, 0.78);
	font-size: 13px;
	letter-spacing: 0.03em;
	text-align: center;
}

.build-recipe-cost-token {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 4px 7px 3px;
	border-radius: 999px;
	border: 1px solid rgba(221, 241, 242, 0.14);
	background: rgba(255, 255, 255, 0.04);
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--hud-accent-text);
}

.build-recipe-cost-token.is-empty {
	color: var(--hud-muted-text);
	font-weight: 600;
}

.build-recipe-cost-label {
	color: var(--hud-muted-text);
}

.build-recipe-cost-value {
	color: var(--hud-text);
}

#chat-log-panel {
	position: absolute;
	left: 12px;
	bottom: 92px;
	width: min(360px, calc(100vw - 24px));
	height: min(280px, calc(100vh - 170px));
	display: none;
	flex-direction: column;
	gap: 10px;
	padding: 12px 12px 10px;
	border: 1px solid var(--hud-border);
	border-radius: 14px;
	background:
		linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01)),
		rgba(10, 21, 29, 0.56);
	box-shadow: var(--hud-shadow);
	backdrop-filter: blur(10px);
	color: var(--hud-text);
	z-index: 190;
	overflow: hidden;
	transition:
		opacity 0.18s ease,
		transform 0.18s ease;
	opacity: 0;
	transform: translateY(8px);
}

#chat-log-panel.visible {
	display: flex;
	opacity: 1;
	transform: translateY(0);
}

.chat-log-header {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 12px;
	min-width: 0;
}

.chat-log-title-wrap {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.chat-log-kicker {
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--hud-muted-text);
}

#chat-log-panel h2 {
	margin: 0;
	font-size: 20px;
	line-height: 1;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--hud-text);
}

.chat-log-filters {
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-end;
	gap: 6px;
	min-width: 0;
}

.chat-log-filter-button,
.toolbar-faction-toggle,
.toolbar-chat-toggle,
.debug-event-button,
.debug-event-toggle,
.debug-event-stop-all {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	padding: 7px 10px;
	border: 1px solid var(--hud-button-border);
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.05);
	color: var(--hud-text);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	cursor: pointer;
	transition:
		background 0.18s ease,
		border-color 0.18s ease,
		transform 0.18s ease,
		opacity 0.18s ease;
}

.chat-log-filter-button:hover,
.chat-log-filter-button:focus-visible,
.toolbar-faction-toggle:hover,
.toolbar-faction-toggle:focus-visible,
.toolbar-chat-toggle:hover,
.toolbar-chat-toggle:focus-visible,
.debug-event-button:hover,
.debug-event-button:focus-visible,
.debug-event-toggle:hover,
.debug-event-toggle:focus-visible,
.debug-event-stop-all:hover,
.debug-event-stop-all:focus-visible {
	outline: none;
	background: rgba(255, 255, 255, 0.1);
	border-color: var(--hud-button-border-strong);
	transform: translateY(-1px);
}

.chat-log-filter-button.active,
.toolbar-faction-toggle[aria-pressed='true'],
.toolbar-chat-toggle[aria-pressed='true'],
.debug-event-button.active,
.debug-event-toggle[aria-pressed='true'] {
	background: rgba(197, 227, 223, 0.18);
	border-color: rgba(221, 241, 242, 0.36);
	color: #f6fffc;
}

.toolbar-faction-toggle:disabled {
	cursor: default;
	opacity: 0.48;
	transform: none;
}

.debug-event-button.not-implemented {
	opacity: 0.68;
	border-style: dashed;
	color: var(--hud-muted-text);
}

.debug-event-button.active {
	background: rgba(102, 183, 214, 0.22);
	border-color: rgba(165, 221, 243, 0.38);
	color: #dcf6ff;
}

.debug-event-stop-all {
	background: rgba(170, 72, 72, 0.18);
	border-color: rgba(229, 171, 171, 0.26);
	color: #ffd9d9;
}

.chat-log-scroll {
	flex: 1 1 auto;
	min-height: 0;
	overflow-y: auto;
	overflow-x: hidden;
	padding-right: 4px;
	scrollbar-width: thin;
	scrollbar-color: rgba(231, 239, 237, 0.28) transparent;
}

.chat-log-lines {
	display: flex;
	flex-direction: column;
	gap: 8px;
	min-height: 100%;
	padding-bottom: 6px;
}

.chat-log-line {
	display: flex;
	gap: 10px;
	align-items: flex-start;
	padding: 8px 10px;
	border-radius: 10px;
	background: rgba(255, 255, 255, 0.04);
	border: 1px solid rgba(255, 255, 255, 0.05);
	transition: opacity 0.18s ease, transform 0.18s ease;
	will-change: opacity;
}

.chat-log-line[data-chat-line-type='event'] {
	border-left: 3px solid rgba(103, 199, 230, 0.72);
	background: rgba(74, 142, 170, 0.12);
}

.chat-log-line[data-chat-line-type='combat'] {
	border-left: 3px solid rgba(235, 108, 108, 0.78);
	background: rgba(119, 43, 43, 0.14);
}

.chat-log-line[data-chat-line-type='unit-chat'] {
	border-left: 3px solid rgba(160, 223, 133, 0.76);
	background: rgba(69, 105, 55, 0.14);
}

.chat-log-line[hidden] {
	display: none;
}

.chat-log-line-type {
	flex: 0 0 auto;
	padding: 2px 6px 1px;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.07);
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--hud-accent-text);
}

.chat-log-line-body {
	display: flex;
	flex-direction: column;
	gap: 4px;
	min-width: 0;
	flex: 1 1 auto;
}

.chat-log-line-text {
	font-size: 13px;
	line-height: 1.3;
	color: var(--hud-text);
	word-break: break-word;
	white-space: normal;
}

.chat-log-line-age {
	font-size: 10px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--hud-muted-text);
}

.interactive {
	pointer-events: auto;
}

#message-box {
	position: absolute;
	top: 20px;
	left: 50%;
	transform: translateX(-50%) translateY(-20px);
	padding: 10px 18px;
	border: 1px solid var(--hud-border-strong);
	border-radius: var(--hud-radius);
	font-size: 14px;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	color: var(--hud-text);
	background: rgba(11, 24, 31, 0.92);
	box-shadow: var(--hud-shadow);
	backdrop-filter: blur(8px);
	opacity: 0;
	transition:
		opacity 0.3s ease,
		transform 0.3s ease;
	z-index: 620;
}

#message-box.show {
	opacity: 1;
	transform: translateX(-50%) translateY(0);
}

#message-box.error {
	background: rgba(126, 37, 47, 0.92);
	border-color: rgba(255, 206, 206, 0.24);
}

#message-box.success {
	background: rgba(37, 104, 78, 0.92);
	border-color: rgba(204, 239, 223, 0.22);
}

#pause-indicator {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%) scale(0.86);
	padding: 10px 16px;
	border: 1px solid var(--hud-border-strong);
	border-radius: 999px;
	background: rgba(8, 18, 24, 0.9);
	box-shadow: var(--hud-shadow);
	color: var(--hud-text);
	font-size: 14px;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	opacity: 0;
	pointer-events: none;
	z-index: 180;
	transition:
		opacity 0.18s ease,
		transform 0.18s ease;
	filter: none;
}

#pause-indicator.visible {
	opacity: 1;
	transform: translate(-50%, -50%) scale(1);
	animation: none;
}

#pause-indicator span {
	display: block;
	animation: none;
	text-shadow: none;
}

#startup-error-root {
	position: absolute;
	inset: 0;
	pointer-events: none;
	z-index: 640;
}

#startup-error-root.visible {
	pointer-events: auto;
}

#faction-overview-root {
	position: absolute;
	inset: 0;
	pointer-events: none;
	z-index: 420;
}

#faction-overview-root.visible {
	pointer-events: auto;
}

.faction-overview-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(4, 10, 14, 0.58);
	backdrop-filter: blur(8px);
	animation: startup-error-fade-in 0.18s ease;
}

.faction-overview-shell {
	position: absolute;
	left: 50%;
	top: 50%;
	transform: translate(-50%, -50%);
	width: min(1080px, calc(100vw - 28px));
	max-height: min(82vh, 780px);
	display: flex;
	flex-direction: column;
	gap: 16px;
	padding: 20px;
	border-radius: 20px;
	border: 1px solid rgba(221, 241, 242, 0.22);
	background:
		linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.01)),
		rgba(8, 19, 26, 0.94);
	box-shadow: 0 30px 60px rgba(0, 0, 0, 0.34);
	backdrop-filter: blur(14px);
	color: var(--hud-text);
	overflow: hidden;
	pointer-events: auto;
}

.faction-overview-header {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 12px;
}

.faction-overview-title-wrap {
	display: flex;
	flex-direction: column;
	gap: 4px;
	min-width: 0;
}

.faction-overview-kicker {
	margin: 0;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--hud-muted-text);
}

.faction-overview-shell h2 {
	margin: 0;
	font-size: clamp(26px, 4vw, 34px);
	line-height: 1;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--hud-text);
}

.faction-overview-subtitle {
	margin: 0;
	font-size: 13px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--hud-accent-text);
	overflow-wrap: anywhere;
}

.faction-overview-close-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 8px 12px;
	border: 1px solid var(--hud-button-border);
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.05);
	color: var(--hud-text);
	font: inherit;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	cursor: pointer;
	transition:
		background 0.18s ease,
		border-color 0.18s ease,
		transform 0.18s ease;
}

.faction-overview-close-button:hover,
.faction-overview-close-button:focus-visible {
	outline: none;
	background: rgba(255, 255, 255, 0.1);
	border-color: var(--hud-button-border-strong);
	transform: translateY(-1px);
}

.faction-overview-legend {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	padding: 12px 14px;
	border-radius: 14px;
	border: 1px solid rgba(221, 241, 242, 0.12);
	background: rgba(255, 255, 255, 0.03);
}

.faction-overview-legend-chip {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 5px 9px 4px;
	border-radius: 999px;
	border: 1px solid rgba(255, 255, 255, 0.08);
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.faction-overview-legend-chip.is-hostile {
	background: rgba(176, 58, 72, 0.2);
	border-color: rgba(244, 176, 187, 0.2);
	color: #ffe4e8;
}

.faction-overview-legend-chip.is-neutral {
	background: rgba(183, 129, 43, 0.18);
	border-color: rgba(255, 220, 162, 0.18);
	color: #fff0cb;
}

.faction-overview-legend-chip.is-friendly {
	background: rgba(48, 143, 104, 0.2);
	border-color: rgba(171, 242, 214, 0.18);
	color: #dcfff0;
}

.faction-overview-legend-note {
	font-size: 12px;
	line-height: 1.35;
	color: var(--hud-muted-text);
}

.faction-overview-body {
	display: flex;
	flex-direction: column;
	gap: 16px;
	min-height: 0;
	overflow: auto;
	padding-right: 4px;
	scrollbar-width: thin;
	scrollbar-color: rgba(231, 239, 237, 0.28) transparent;
}

.faction-overview-section {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.faction-overview-section-copy h3 {
	margin: 0 0 4px;
	font-size: 18px;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--hud-text);
}

.faction-overview-section-copy p {
	margin: 0;
	font-size: 13px;
	line-height: 1.35;
	color: var(--hud-muted-text);
}

.faction-overview-table-scroll {
	overflow: auto;
	border-radius: 16px;
	border: 1px solid rgba(221, 241, 242, 0.1);
	background: rgba(5, 13, 18, 0.54);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
	scrollbar-width: thin;
	scrollbar-color: rgba(231, 239, 237, 0.28) transparent;
}

.faction-overview-matrix {
	width: max-content;
	min-width: 100%;
	border-collapse: separate;
	border-spacing: 0;
	font-family: 'Trebuchet MS', Verdana, sans-serif;
	font-size: 13px;
}

.faction-overview-matrix th,
.faction-overview-matrix td {
	min-width: 86px;
	padding: 10px 12px;
	border-right: 1px solid rgba(255, 255, 255, 0.05);
	border-bottom: 1px solid rgba(255, 255, 255, 0.05);
	text-align: center;
	vertical-align: middle;
}

.faction-overview-matrix thead th {
	position: sticky;
	top: 0;
	z-index: 2;
	background: rgba(15, 32, 41, 0.96);
	backdrop-filter: blur(10px);
}

.faction-overview-corner-header {
	position: sticky;
	left: 0;
	z-index: 4;
	min-width: 170px;
	text-align: left;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--hud-muted-text);
	background: rgba(15, 32, 41, 0.98);
}

.faction-overview-row-header {
	position: sticky;
	left: 0;
	z-index: 1;
	min-width: 170px;
	text-align: left;
	background: rgba(12, 27, 35, 0.98);
	backdrop-filter: blur(10px);
}

.faction-overview-column-header {
	min-width: 118px;
	max-width: 118px;
	font-size: 12px;
	font-weight: 700;
	color: var(--hud-text);
}

.faction-overview-column-header.race {
	min-width: 92px;
	max-width: 92px;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.faction-overview-axis-label {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-width: 0;
	line-height: 1.2;
	text-align: left;
	color: inherit;
	word-break: break-word;
	white-space: normal;
}

.faction-overview-swatch {
	width: 10px;
	height: 10px;
	border-radius: 999px;
	box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.18);
	flex: 0 0 auto;
}

.faction-overview-matrix-cell {
	font-family: monospace;
	font-size: 16px;
	font-weight: 700;
	letter-spacing: 0.02em;
	color: var(--hud-text);
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
}

.faction-overview-matrix-cell.is-hostile {
	background: rgba(166, 43, 63, 0.22);
	color: #ffe3e8;
}

.faction-overview-matrix-cell.is-neutral {
	background: rgba(173, 118, 34, 0.2);
	color: #fff0cb;
}

.faction-overview-matrix-cell.is-friendly {
	background: rgba(43, 134, 100, 0.22);
	color: #defff1;
}

.faction-overview-matrix-cell.is-self {
	background: rgba(66, 142, 176, 0.24);
	color: #e4f7ff;
}

.faction-overview-matrix-value {
	display: block;
}

.startup-error-backdrop {
	position: absolute;
	inset: 0;
	display: grid;
	place-items: center;
	padding: 24px;
	background: var(--hud-overlay);
	backdrop-filter: blur(6px);
	animation: startup-error-fade-in 0.22s ease;
}

.startup-error-card {
	width: min(760px, 100%);
	max-height: min(78vh, 720px);
	overflow: auto;
	padding: 24px;
	border-radius: 16px;
	border: 1px solid var(--hud-border-strong);
	background: rgba(12, 26, 35, 0.88);
	box-shadow: 0 22px 48px rgba(0, 0, 0, 0.24);
	backdrop-filter: blur(10px);
	color: var(--hud-text);
	pointer-events: auto;
}

.startup-error-kicker {
	margin: 0 0 8px;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--hud-accent-text);
}

.startup-error-card h2 {
	margin: 0 0 10px;
	font-size: clamp(28px, 5vw, 34px);
	line-height: 1;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--hud-text);
}

.startup-error-summary {
	margin: 0 0 16px;
	font-size: 15px;
	line-height: 1.35;
	color: var(--hud-muted-text);
}

.startup-error-details {
	margin: 0 0 18px;
	padding: 16px;
	border-radius: 10px;
	border: 1px solid rgba(255, 216, 210, 0.12);
	background: rgba(5, 13, 18, 0.54);
	font-family: monospace;
	font-size: 13px;
	line-height: 1.45;
	white-space: pre-wrap;
	word-break: break-word;
	color: var(--hud-muted-text);
	overflow: auto;
	max-height: 42vh;
	user-select: text;
}

.startup-error-button {
	min-width: min(280px, 100%);
	margin: 0 auto;
	justify-content: center;
}

@keyframes pause-indicator-float {
	0%,
	100% {
		transform: translate(-50%, -50%) scale(1);
	}
	50% {
		transform: translate(-50%, calc(-50% - 4px)) scale(1.03);
	}
}

@keyframes pause-indicator-glow {
	from {
		text-shadow: 0 0 0 rgba(255, 211, 143, 0.2);
	}
	to {
		text-shadow: 0 0 14px rgba(255, 211, 143, 0.45);
	}
}

@keyframes startup-error-fade-in {
	from {
		opacity: 0;
	}
	to {
		opacity: 1;
	}
}

#world-info {
	position: absolute;
	right: 12px;
	bottom: 12px;
	display: flex;
	flex-direction: column;
	gap: 8px;
	width: min(248px, calc(100vw - 24px));
	padding: 8px;
	border: 1px solid var(--hud-border-strong);
	border-radius: var(--hud-radius);
	background: var(--hud-panel-bg-strong);
	box-shadow: var(--hud-shadow);
	backdrop-filter: blur(8px);
	color: var(--hud-text);
	z-index: 210;
	overflow: hidden;
}

#world-info::after {
	display: none;
}

.world-info-clock {
	width: 100%;
	padding: 6px 8px;
	border: 1px solid var(--hud-border);
	border-radius: 8px;
	background: rgba(255, 255, 255, 0.04);
	color: inherit;
	display: grid;
	grid-template-columns: 44px minmax(0, 1fr);
	gap: 8px;
	align-items: center;
	text-align: left;
	transition:
		background 0.18s ease,
		box-shadow 0.18s ease,
		border-color 0.18s ease;
}

.world-info-clock.interactive {
	cursor: pointer;
}

.world-info-clock.interactive:hover,
.world-info-clock.interactive:focus-visible {
	outline: none;
	background: var(--hud-button-bg-hover);
	border-color: var(--hud-border-strong);
	box-shadow: none;
}

.world-info-copy {
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 3px;
}

.world-info-side-label {
	position: static;
	display: flex;
	flex-direction: row;
	justify-content: space-between;
	align-items: center;
	padding: 0 2px;
	border-left: 0;
	background: none;
	writing-mode: horizontal-tb;
	text-orientation: mixed;
	transform: none;
	font-family: inherit;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--hud-muted-text);
	pointer-events: none;
	user-select: none;
	font-size: 10px;
	line-height: 1.1;
	gap: 6px;
	text-shadow: none;
	order: 2;
	min-width: 0;
	overflow-wrap: anywhere;
}

.world-info-side-title {
	font-size: 11px;
	letter-spacing: 0.12em;
	color: var(--hud-text);
}

.world-info-build-date {
	color: var(--hud-muted-text);
	text-align: right;
}

.world-info-date {
	font-family: monospace;
	font-size: 10px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--hud-muted-text);
}

.world-info-time-row {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 6px;
}

.world-info-time {
	font-family: monospace;
	font-size: 18px;
	font-weight: 700;
	letter-spacing: 0.04em;
	color: var(--hud-text);
}

.world-info-period {
	font-size: 11px;
	letter-spacing: 0.04em;
	color: var(--hud-accent-text);
}

.world-speed-controls.segmented-control {
	margin-top: 0;
	display: flex;
	width: 100%;
	max-width: 100%;
	gap: 6px;
	padding: 0;
	justify-content: stretch;
	flex-wrap: nowrap;
	position: static;
	z-index: auto;
	order: 3;
}

.world-speed-button {
	flex: 1 1 0;
	min-width: 0;
	min-height: 24px;
	padding: 2px 7px;
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	line-height: 1;
}

.world-speed-button[data-segmented-value='0'] {
	letter-spacing: 0.12em;
	padding-inline: 7px 8px;
}

.segmented-control {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: none;
	box-shadow: none;
	pointer-events: auto;
}

.segmented-button {
	border: 1px solid var(--hud-border);
	border-radius: 8px;
	background: var(--hud-button-bg);
	color: var(--hud-text);
	font-family: sans-serif;
	font-weight: 700;
	font-size: 11px;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	line-height: 1;
	padding: 6px 8px;
	cursor: pointer;
	transition:
		background 0.16s ease,
		color 0.16s ease,
		box-shadow 0.16s ease,
		border-color 0.16s ease;
}

.segmented-button:hover,
.segmented-button:focus-visible {
	background: var(--hud-button-bg-hover);
	border-color: var(--hud-border-strong);
	color: var(--hud-text);
	outline: none;
}

.segmented-button.active {
	background: var(--hud-button-bg-active);
	border-color: rgba(244, 251, 250, 0.26);
	color: #0a151c;
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

#toolbar {
	position: absolute;
	left: auto;
	right: 0;
	bottom: 0;
	width: fit-content;
	max-width: calc(100vw - 176px);
	min-height: 70px;
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 12px;
	padding: 8px 12px 10px;
	background: rgba(0, 0, 0, 0.2);
	border: 1px solid rgba(255, 255, 255, 0.08);
	border-right: 0;
	border-bottom: 0;
	border-top-left-radius: 16px;
	border-top: 1px solid rgba(255, 255, 255, 0.08);
	backdrop-filter: blur(8px);
	color: var(--hud-text);
	z-index: 210;
	overflow: visible;
	transition:
		opacity 0.22s ease,
		transform 0.22s ease;
}

#toolbar::after {
	display: none;
}

#toolbar > * {
	position: relative;
	z-index: 1;
}

.toolbar-section {
	display: flex;
	align-items: center;
	height: 100%;
	flex: 0 0 auto;
	min-width: 0;
	gap: 10px;
}

.toolbar-section-left {
	margin-left: 0;
	gap: 8px;
	flex-wrap: wrap;
}

.toolbar-section-center {
	flex: 0 1 auto;
	justify-content: flex-start;
	align-items: center;
	padding: 0;
}

.toolbar-center-controls {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	justify-content: center;
	gap: 6px;
	width: auto;
}

.toolbar-center-buttons {
	display: flex;
	align-items: center;
	justify-content: flex-start;
	gap: 8px;
	flex-wrap: wrap;
	width: auto;
}

.toolbar-center-resources {
	display: flex;
	justify-content: center;
	width: 100%;
	min-width: 0;
}

.crew-area-control {
	display: flex;
	flex-direction: row;
	align-items: center;
	gap: 8px;
	min-width: 0;
}

.crew-area-control-label {
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--hud-muted-text);
	padding-left: 2px;
	white-space: nowrap;
}

.crew-area-control-buttons.segmented-control {
	flex-direction: row;
	align-items: center;
	gap: 4px;
}

.toolbar-section-right {
	margin-left: auto;
	margin-right: 0;
	align-items: flex-end;
}

.toolbar-ship-vitals {
	display: none;
	flex-direction: column;
	justify-content: center;
	gap: 4px;
	min-width: 114px;
	padding: 8px 11px;
	border-radius: 15px;
	border: 1px solid rgba(190, 218, 224, 0.14);
	background:
		linear-gradient(180deg, rgba(14, 25, 36, 0.92) 0%, rgba(7, 13, 22, 0.84) 100%);
	box-shadow:
		0 10px 18px rgba(0, 0, 0, 0.2),
		inset 0 1px 0 rgba(255, 255, 255, 0.06);
	backdrop-filter: blur(10px);
	align-self: center;
}

.toolbar-ship-vitals.visible {
	display: flex;
}

.toolbar-ship-cargo {
	display: none;
	align-items: center;
	flex-wrap: wrap;
	gap: 6px;
	max-width: 320px;
	padding: 7px 10px;
	border-radius: 15px;
	border: 1px solid rgba(190, 218, 224, 0.14);
	background:
		linear-gradient(180deg, rgba(14, 25, 36, 0.88) 0%, rgba(7, 13, 22, 0.8) 100%);
	box-shadow:
		0 10px 18px rgba(0, 0, 0, 0.18),
		inset 0 1px 0 rgba(255, 255, 255, 0.05);
	backdrop-filter: blur(10px);
	align-self: center;
}

.toolbar-ship-cargo.visible {
	display: flex;
}

.toolbar-ship-cargo-item {
	display: inline-flex;
	align-items: baseline;
	gap: 6px;
	padding: 4px 8px 3px;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.04);
	border: 1px solid rgba(221, 241, 242, 0.08);
	min-width: 0;
}

.toolbar-ship-cargo-label {
	color: rgba(228, 239, 237, 0.6);
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	white-space: nowrap;
}

.toolbar-ship-cargo-value {
	color: #f7fcfb;
	font-size: 12px;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}

.toolbar-ship-vitals-row {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 10px;
	min-width: 0;
}

.toolbar-ship-vitals-label {
	color: rgba(228, 239, 237, 0.6);
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	white-space: nowrap;
}

.toolbar-ship-vitals-value {
	color: #f7fcfb;
	font-size: 12px;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}

#toolbar.ui-hidden {
	opacity: 0;
	pointer-events: none;
	transform: translateY(18px);
}

.world-info-clock {
	flex: 0 0 auto;
	min-width: 0;
	height: auto;
	padding: 0;
	border: 0;
	background: transparent;
	color: inherit;
	display: flex;
	align-items: center;
	justify-content: flex-end;
	text-align: left;
	transition:
		background 0.18s ease,
		box-shadow 0.18s ease,
		border-color 0.18s ease;
}

.world-info-clock.interactive {
	cursor: pointer;
}

.world-info-clock.interactive:hover,
.world-info-clock.interactive:focus-visible {
	outline: none;
	background: rgba(255, 255, 255, 0.04);
	box-shadow: none;
}

.toolbar-world-info {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 6px;
	min-width: 0;
}

.world-info-copy {
	min-width: 0;
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 4px;
}

.world-info-date-time-row {
	display: flex;
	flex-wrap: nowrap;
	align-items: baseline;
	justify-content: flex-end;
	gap: 6px;
	white-space: nowrap;
}

.world-info-meta-row {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 8px;
	flex-wrap: wrap;
	min-width: 0;
	font-size: 10px;
	line-height: 1.1;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--hud-muted-text);
	overflow-wrap: anywhere;
}

.world-info-date,
.world-info-time,
.world-info-period {
	font-family: monospace;
	font-size: 13px;
	letter-spacing: 0.04em;
	color: var(--hud-text);
}

.world-info-period {
	color: var(--hud-accent-text);
}

.world-info-build-date {
	color: var(--hud-muted-text);
}

#unit-freedom-controls-ship,
#world-speed-controls-ship {
	flex: 0 0 auto;
	min-width: 0;
}

#unit-freedom-controls-ship {
	max-width: 100%;
	align-self: stretch;
}

#world-speed-controls-ship {
	align-self: flex-end;
}

.toolbar-control-group.segmented-control {
	display: flex;
	width: auto;
	gap: 6px;
	padding: 0;
	justify-content: flex-end;
	flex-wrap: nowrap;
	position: static;
	z-index: auto;
}

.world-speed-button,
.unit-freedom-button {
	flex: 0 1 auto;
	min-height: 28px;
	padding: 4px 10px;
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	line-height: 1;
}


.unit-freedom-button {
	width: auto;
	min-width: 68px;
	justify-content: center;
}

#toolbar-grid-ship,
#player-inventory-grid-ship,
#ship-inventory-grid-ship {
	position: relative;
	z-index: 1;
}

#inventory-panels {
	position: absolute;
	left: 50%;
	bottom: calc(100% + 8px);
	transform: translateX(-50%);
	display: flex;
	align-items: flex-start;
	justify-content: center;
	gap: 8px;
	width: max-content;
	max-width: min(calc(100vw - 24px), 1040px);
	flex-wrap: wrap;
	pointer-events: none;
}

.inventory-panel {
	display: none;
	animation: inventory-panel-enter 0.18s ease;
	pointer-events: auto;
}

.inventory-panel.visible {
	display: block;
}

.hud-icon-button {
	position: relative;
	min-width: 60px;
	height: 48px;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 4px;
	padding: 8px 10px;
	border-radius: 10px;
	background: var(--hud-button-bg);
	border: 1px solid var(--hud-border);
	color: var(--hud-text);
	box-shadow: none;
	cursor: pointer;
	transition:
		transform 0.12s ease,
		background 0.12s ease,
		box-shadow 0.12s ease,
		border-color 0.12s ease;
}

.hud-icon-button:hover {
	background: var(--hud-button-bg-hover);
	border-color: var(--hud-border-strong);
	transform: none;
}

.hud-icon-button:active {
	transform: none;
	background: var(--hud-slot-bg-active);
	box-shadow: none;
}

.hud-icon-button.active {
	background: var(--hud-button-bg);
	border-color: var(--hud-border-strong);
	box-shadow: none;
	color: var(--hud-text);
	transform: none;
}

.hud-icon-button svg {
	width: 16px;
	height: 16px;
}

.hud-icon-button-label {
	color: inherit;
	font-size: 10px;
	font-weight: 700;
	text-align: center;
	line-height: 1;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.hud-icon-hotkey {
	position: absolute;
	top: 5px;
	right: 6px;
	padding: 1px 4px;
	border-radius: 999px;
	background: rgba(7, 16, 22, 0.58);
	border: 1px solid rgba(226, 239, 237, 0.14);
	font-family: monospace;
	font-size: 9px;
	line-height: 1;
	color: var(--hud-muted-text);
}

.item-grid-control-root {
	position: relative;
}

.item-grid-control {
	--item-grid-slot-size: clamp(40px, 5.4vw, 54px);
	--item-grid-gap: 6px;
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 8px;
	background: var(--hud-panel-bg-strong);
	border: 1px solid var(--hud-border-strong);
	border-radius: var(--hud-radius);
	box-shadow: var(--hud-shadow);
	backdrop-filter: blur(8px);
	min-width: min-content;
}

.item-grid-control::after {
	display: none;
}

.item-grid-control > * {
	position: relative;
	z-index: 1;
}

.item-grid-control.is-compact {
	--item-grid-slot-size: clamp(28px, 5vw, 34px);
	padding: 6px;
	gap: 6px;
}

.item-grid-kind-toolbar .item-grid-header {
	display: none;
}

.item-grid-header {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 8px;
}

.item-grid-title-group {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.item-grid-title {
	margin: 0;
	font-family: inherit;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--hud-text);
}

.item-grid-subtitle {
	margin: 0;
	font-size: 10px;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--hud-muted-text);
}

.item-grid-scroll-viewport {
	max-height: calc(
		var(--item-grid-visible-rows) * var(--item-grid-slot-size) +
		max(0px, (var(--item-grid-visible-rows) - 1) * var(--item-grid-gap))
	);
	overflow-x: hidden;
	overflow-y: auto;
	scrollbar-gutter: stable;
	scrollbar-width: thin;
	scrollbar-color: rgba(221, 241, 242, 0.22) transparent;
}

.item-grid-scroll-viewport::-webkit-scrollbar {
	width: 10px;
}

.item-grid-scroll-viewport::-webkit-scrollbar-track {
	background: rgba(255, 255, 255, 0.04);
	border-radius: 999px;
}

.item-grid-scroll-viewport::-webkit-scrollbar-thumb {
	background: rgba(221, 241, 242, 0.24);
	border-radius: 999px;
	border: 2px solid transparent;
}

.item-grid-control.has-scroll-viewport .item-grid-scroll-viewport {
	padding-right: 4px;
}

.item-grid-slots {
	display: grid;
	grid-template-columns: repeat(var(--item-grid-columns), minmax(0, var(--item-grid-slot-size)));
	grid-template-rows: repeat(var(--item-grid-rows), minmax(0, var(--item-grid-slot-size)));
	gap: var(--item-grid-gap);
}

.item-grid-slot {
	position: relative;
	width: var(--item-grid-slot-size);
	height: var(--item-grid-slot-size);
	padding: 0;
	border: 1px solid var(--hud-border);
	border-radius: 8px;
	background: var(--hud-slot-bg);
	box-shadow: none;
	cursor: pointer;
	transition:
		transform 0.12s ease,
		border-color 0.12s ease,
		background 0.12s ease,
		box-shadow 0.12s ease;
}

.item-grid-slot:hover {
	transform: none;
	border-color: var(--hud-border-strong);
	background: var(--hud-slot-bg-hover);
}

.item-grid-slot:active {
	transform: none;
	background: var(--hud-slot-bg-active);
	box-shadow: none;
}

.item-grid-slot.is-selected {
	border-color: rgba(239, 248, 245, 0.28);
	background: var(--hud-slot-selected-bg);
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.item-grid-slot.is-selected::before {
	content: '';
	position: absolute;
	left: 6px;
	right: 6px;
	top: 4px;
	height: 1px;
	border-radius: 999px;
	background: rgba(239, 248, 245, 0.5);
	opacity: 0.9;
	pointer-events: none;
}

.item-grid-slot.is-unavailable {
	border-style: solid;
	opacity: 0.42;
	cursor: default;
	box-shadow: none;
	background: var(--hud-slot-unavailable-bg);
}

.item-grid-slot.is-unavailable::after {
	content: '';
	position: absolute;
	inset: 7px;
	border: 1px dashed rgba(226, 239, 237, 0.12);
	pointer-events: none;
}

.item-grid-slot-label {
	position: absolute;
	left: 6px;
	top: 5px;
	font-family: monospace;
	font-size: 9px;
	line-height: 1;
	color: rgba(226, 239, 237, 0.64);
	pointer-events: none;
	text-shadow: none;
}

.item-grid-item {
	position: relative;
	display: flex;
	align-items: stretch;
	justify-content: stretch;
	width: 100%;
	height: 100%;
	padding: 6px;
	cursor: grab;
	user-select: none;
	touch-action: none;
}

.item-grid-item.is-fixed,
.item-grid-item.is-locked {
	cursor: default;
}

.item-grid-slot-empty {
	position: absolute;
	inset: 0;
	opacity: 0;
	pointer-events: none;
}

.item-grid-item-visual {
	position: relative;
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 6px;
	background: rgba(255, 255, 255, 0.04);
	box-shadow: none;
	color: var(--hud-text);
	overflow: hidden;
}

.item-grid-item-visual svg {
	width: 70%;
	height: 70%;
	filter: none;
}

.item-grid-kind-toolbar .item-grid-item-visual svg {
	width: 76%;
	height: 76%;
}

.item-grid-item-count {
	position: absolute;
	top: 3px;
	right: 4px;
	min-width: 16px;
	padding: 1px 4px;
	border-radius: 999px;
	background: rgba(6, 15, 21, 0.72);
	border: 1px solid rgba(226, 239, 237, 0.14);
	color: #ffffff;
	font-family: monospace;
	font-size: 10px;
	font-weight: 700;
	line-height: 1.2;
	text-align: center;
	text-shadow: none;
	pointer-events: none;
}

.item-grid-slot.drop-move {
	border-color: rgba(182, 236, 225, 0.28);
	background: rgba(95, 162, 150, 0.3);
	box-shadow: none;
}

.item-grid-slot.drop-swap {
	border-color: rgba(248, 228, 178, 0.28);
	background: rgba(170, 140, 85, 0.32);
	box-shadow: none;
}

.item-grid-slot.drop-reject {
	border-color: rgba(255, 202, 202, 0.3);
	background: rgba(162, 76, 76, 0.34);
	box-shadow: none;
}

.item-grid-slot.drop-swap::after,
.item-grid-slot.drop-reject::after {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	font-family: monospace;
	font-size: 14px;
	font-weight: 700;
	line-height: 1;
	text-shadow: none;
	pointer-events: none;
}

.item-grid-slot.drop-swap::after {
	content: '\21C4';
	color: rgba(255, 248, 220, 0.94);
}

.item-grid-slot.drop-reject::after {
	content: 'X';
	color: rgba(255, 232, 232, 0.98);
}

#item-grid-overlay-root {
	position: fixed;
	inset: 0;
	pointer-events: none;
	z-index: 320;
}

.item-grid-drag-ghost,
.item-grid-travel-token {
	position: fixed;
	margin: 0;
	pointer-events: none;
	z-index: 321;
	transform-origin: top left;
	transition:
		transform 0.18s ease,
		opacity 0.18s ease;
	filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.16));
}

.item-grid-drag-ghost {
	opacity: 0.96;
	transform: scale(1.06);
}

@keyframes inventory-panel-enter {
	from {
		opacity: 0;
		transform: translateY(8px) scale(0.98);
	}
	to {
		opacity: 1;
		transform: translateY(0) scale(1);
	}
}

#debug-info {
	position: absolute;
	top: 8px;
	left: 8px;
	display: flex;
	flex-direction: column;
	gap: 6px;
	max-width: min(760px, calc(100vw - 16px));
	color: var(--hud-text);
	font-family: monospace;
	font-size: 13px;
	background: rgba(8, 18, 24, 0.78);
	padding: 8px 10px;
	border-radius: 8px;
	border: 1px solid var(--hud-border);
	box-shadow: var(--hud-shadow);
	z-index: 200;
	pointer-events: none;
	transition:
		opacity 0.25s ease,
		filter 0.25s ease;
}

#debug-top-row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px 12px;
}

#debug-toggle {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-family: sans-serif;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.02em;
	pointer-events: auto;
	user-select: none;
}

#debug-toggle input {
	margin: 0;
}

#debug-summary {
	flex: 1 1 320px;
	min-width: 0;
	white-space: normal;
}

#debug-details {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

#debug-event-controls {
	display: flex;
	flex-direction: column;
	gap: 6px;
	pointer-events: auto;
	padding: 6px 0 2px;
	border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.debug-event-header {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 6px 10px;
}

.debug-event-title {
	font-family: sans-serif;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: rgba(229, 231, 235, 0.86);
}

.debug-event-summary {
	font-size: 11px;
	color: rgba(229, 231, 235, 0.72);
	white-space: normal;
}

.debug-event-actions,
.debug-event-grid {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.debug-event-grid {
	max-width: 100%;
}


#debug-summary[hidden],
#debug-details[hidden] {
	display: none;
}

.debug-chart-wrap {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

#debug-charts {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 6px;
}

.debug-chart-label {
	color: rgba(229, 231, 235, 0.72);
	font-size: 11px;
}

.debug-chart {
	display: block;
	position: relative;
	height: 48px;
	width: 100%;
	overflow: hidden;
	padding: 4px;
	border: 1px solid var(--hud-border);
	border-radius: 8px;
	background: repeating-linear-gradient(to top, rgba(226, 232, 240, 0.08) 0 1px, transparent 1px 12px), rgba(255, 255, 255, 0.04);
}

.debug-chart-canvas {
	display: block;
	width: 100%;
	height: 100%;
}

.debug-frame-bar {
	flex: 1 1 0;
	min-width: 0;
	border-radius: 1px 1px 0 0;
	opacity: 0.95;
}

#menu-root {
	position: absolute;
	inset: 0;
	pointer-events: none;
	z-index: 500;
}

#menu-root.visible {
	pointer-events: auto;
}

.menu-overlay {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: clamp(10px, 1.6vh, 18px);
	overflow: auto;
	background: var(--hud-overlay);
	backdrop-filter: blur(6px);
}

.menu-shell {
	display: flex;
	align-items: center;
	justify-content: center;
	max-width: min(1020px, 100%);
	width: 100%;
	margin: auto;
	transition: transform 0.28s ease;
}

.menu-card {
	width: min(344px, 92vw);
	max-height: calc(100vh - 24px);
	padding: 18px 18px 14px;
	border-radius: 16px;
	border: 1px solid var(--hud-border-strong);
	background: rgba(12, 26, 35, 0.88);
	box-shadow: 0 22px 48px rgba(0, 0, 0, 0.24);
	backdrop-filter: blur(10px);
	position: relative;
	overflow: auto;
	scrollbar-gutter: stable;
}

.menu-card::before {
	display: none;
}

.menu-brand {
	position: relative;
	z-index: 1;
	margin-bottom: 10px;
}

.menu-kicker {
	margin: 0 0 2px;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--hud-accent-text);
	text-shadow: none;
}

.menu-brand h1 {
	margin: 0;
	font-family: inherit;
	font-size: clamp(28px, 5vw, 34px);
	font-weight: 700;
	line-height: 1;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	white-space: normal;
	color: var(--hud-text);
	text-shadow: none;
}

.menu-subtitle {
	margin: 10px 0 0;
	font-size: 15px;
	line-height: 1.35;
	color: var(--hud-muted-text);
	text-wrap: balance;
}

.menu-actions-stack {
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.menu-action-button {
	--menu-action-bg-start: rgba(123, 165, 173, 0.22);
	--menu-action-bg-end: rgba(123, 165, 173, 0.22);
	--menu-action-text: var(--hud-text);
	--menu-action-border: var(--hud-border);
	--menu-action-sheen: transparent;
	--menu-action-shadow-base: transparent;
	--menu-action-shadow-depth: transparent;
	--menu-action-shadow-inset: transparent;
	--menu-action-hover-shadow-base: transparent;
	--menu-action-hover-shadow-depth: transparent;
	--menu-action-hover-shadow-inset: transparent;
	--menu-action-active-shadow-base: transparent;
	--menu-action-active-shadow-depth: transparent;
	--menu-action-active-shadow-inset: transparent;
	--menu-action-disabled-shadow-base: transparent;
	--menu-action-disabled-shadow-depth: transparent;
	--menu-action-label-shadow: none;
	--menu-action-detail-color: var(--hud-muted-text);
	--menu-action-detail-shadow: none;
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 48px;
	padding: 10px 14px;
	border: 1px solid var(--menu-action-border);
	border-radius: 10px;
	background: var(--menu-action-bg-start);
	color: var(--menu-action-text);
	text-align: left;
	letter-spacing: 0.04em;
	box-shadow: none;
	transition:
		transform 0.12s ease,
		box-shadow 0.12s ease,
		filter 0.12s ease,
		background 0.12s ease;
	cursor: pointer;
	overflow: hidden;
}

.menu-action-button.has-panel-indicator {
	padding-right: 44px;
}

.menu-action-button::before {
	display: none;
}

.menu-action-button:hover {
	transform: none;
	box-shadow: none;
	filter: none;
	background: var(--hud-button-bg-hover);
	border-color: var(--hud-border-strong);
}

.menu-action-button.active {
	background: var(--hud-button-bg-active);
	border-color: rgba(244, 251, 250, 0.26);
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
	color: #0a151c;
	transform: none;
}

.menu-action-button:active {
	transform: none;
	box-shadow: none;
	background: var(--hud-slot-bg-active);
}

.menu-action-button:disabled {
	opacity: 0.52;
	cursor: not-allowed;
	transform: none;
	box-shadow: none;
	background: rgba(102, 127, 138, 0.14);
}

.menu-action-button.tone-accent {
	--menu-action-bg-start: rgba(176, 164, 104, 0.28);
	--menu-action-bg-end: rgba(176, 164, 104, 0.28);
}

.menu-action-button.tone-success {
	--menu-action-bg-start: rgba(93, 147, 124, 0.28);
	--menu-action-bg-end: rgba(93, 147, 124, 0.28);
}

.menu-action-button.tone-discord {
	--menu-action-bg-start: rgba(117, 138, 196, 0.28);
	--menu-action-bg-end: rgba(117, 138, 196, 0.28);
}

.menu-action-button.tone-steam {
	--menu-action-bg-start: rgba(84, 118, 141, 0.28);
	--menu-action-bg-end: rgba(84, 118, 141, 0.28);
}

.menu-action-button.tone-danger {
	--menu-action-bg-start: rgba(158, 86, 86, 0.3);
	--menu-action-bg-end: rgba(158, 86, 86, 0.3);
}

.menu-action-button.ghost {
	--menu-action-bg-start: rgba(102, 127, 138, 0.18);
	--menu-action-bg-end: rgba(102, 127, 138, 0.18);
}

.menu-action-content {
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	justify-content: center;
	width: 100%;
	text-align: left;
}

.menu-action-button.centered .menu-action-content {
	align-items: center;
	text-align: center;
}

.menu-action-label {
	width: 100%;
	font-size: 18px;
	font-weight: 700;
	line-height: 1.1;
	text-transform: uppercase;
	text-shadow: none;
}

.menu-action-detail {
	display: block;
	margin-top: 2px;
	padding: 0;
	width: 100%;
	font-size: 12px;
	line-height: 1.3;
	color: var(--menu-action-detail-color);
	text-shadow: var(--menu-action-detail-shadow);
	border: 0;
	background: none;
	box-shadow: none;
}

.menu-action-arrow {
	position: absolute;
	right: 14px;
	top: 50%;
	width: 8px;
	height: 8px;
	border-top: 2px solid currentColor;
	border-right: 2px solid currentColor;
	opacity: 0.36;
	transform: translateY(-50%) rotate(45deg) scale(0.72);
	transition:
		opacity 0.14s ease,
		transform 0.14s ease;
	pointer-events: none;
	filter: none;
}

.menu-action-button.active .menu-action-arrow {
	opacity: 0.82;
	transform: translateY(-50%) rotate(45deg) scale(1);
}

.menu-panel-wrap {
	width: 0;
	min-width: 0;
	margin-left: 0;
	opacity: 0;
	transform: translateX(-22px);
	overflow: hidden;
	transition:
		width 0.28s ease,
		margin-left 0.28s ease,
		opacity 0.22s ease,
		transform 0.28s ease;
}

.menu-panel-wrap.visible {
	width: min(400px, calc(100vw - 404px));
	min-width: min(400px, calc(100vw - 404px));
	margin-left: 12px;
	opacity: 1;
	transform: translateX(0);
}

.menu-panel-inner {
	max-height: calc(100vh - 24px);
	overflow: auto;
	padding: 18px 18px 16px;
	border-radius: 16px;
	border: 1px solid var(--hud-border-strong);
	background: rgba(12, 26, 35, 0.88);
	box-shadow: 0 22px 48px rgba(0, 0, 0, 0.24);
	backdrop-filter: blur(10px);
	scrollbar-gutter: stable;
}

.menu-panel-header h2,
.menu-dialog h3 {
	margin: 0;
	font-family: inherit;
	font-size: clamp(28px, 5vw, 34px);
	font-weight: 700;
	line-height: 1;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--hud-text);
}

.menu-panel-header-row {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 12px;
}

.menu-panel-close {
	flex: 0 0 auto;
	min-width: 34px;
	height: 34px;
	padding: 0;
	border: 1px solid var(--hud-border);
	border-radius: 8px;
	background: var(--hud-button-bg);
	color: var(--hud-text);
	font-size: 15px;
	line-height: 1;
	box-shadow: none;
	cursor: pointer;
	transition:
		transform 0.12s ease,
		box-shadow 0.12s ease,
		border-color 0.12s ease;
}

.menu-panel-close:hover {
	transform: none;
	border-color: var(--hud-border-strong);
	background: var(--hud-button-bg-hover);
	box-shadow: none;
}

.menu-panel-close:active {
	transform: none;
	box-shadow: none;
	background: var(--hud-slot-bg-active);
}

.menu-panel-header p,
.menu-dialog p,
.menu-note,
.empty-saves-state {
	margin: 8px 0 0;
	font-size: 15px;
	line-height: 1.35;
	color: var(--hud-muted-text);
}

.menu-field,
.toggle-field,
.range-field {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin-top: 14px;
}

.menu-field > span,
.toggle-field span {
	font-size: 15px;
	font-weight: 700;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	color: var(--hud-text);
}

.menu-field input,
.menu-field select {
	width: 100%;
	padding: 10px 12px;
	font-size: 16px;
	border: 1px solid var(--hud-border);
	border-radius: 8px;
	background: var(--hud-input-bg);
	color: var(--hud-text);
	outline: none;
	box-shadow: none;
	transition:
		border-color 0.12s ease,
		box-shadow 0.12s ease;
}

.menu-field input:focus,
.menu-field select:focus {
	border-color: var(--hud-border-strong);
	box-shadow: 0 0 0 2px rgba(223, 242, 243, 0.1);
}

.seed-input-row {
	display: grid;
	grid-template-columns: 1fr auto;
	gap: 10px;
}

.seed-roll-button {
	min-width: 78px;
	padding: 0 14px;
	border: 1px solid var(--hud-border);
	border-radius: 8px;
	background: var(--hud-button-bg);
	color: var(--hud-text);
	box-shadow: none;
	cursor: pointer;
	transition:
		transform 0.12s ease,
		box-shadow 0.12s ease;
}

.seed-roll-button:hover {
	transform: none;
	box-shadow: none;
	background: var(--hud-button-bg-hover);
	border-color: var(--hud-border-strong);
}

.seed-roll-button:active {
	transform: none;
	box-shadow: none;
	background: var(--hud-slot-bg-active);
}

.menu-panel-actions,
.menu-dialog-actions {
	display: flex;
	gap: 10px;
	margin-top: 18px;
}

.menu-panel-actions .menu-action-button,
.menu-dialog-actions .menu-action-button {
	flex: 1 1 0;
	min-height: 54px;
}

.save-slot-list {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin-top: 18px;
	max-height: 350px;
	overflow: auto;
	padding-right: 4px;
}

.save-slot-row {
	display: grid;
	grid-template-columns: 1fr auto;
	gap: 10px;
}

.save-slot-button,
.save-slot-trash,
.ui-tab-control-button {
	border: 1px solid var(--hud-border);
	border-radius: 8px;
	background: var(--hud-button-bg);
	color: var(--hud-text);
	box-shadow: none;
	transition:
		transform 0.12s ease,
		border-color 0.12s ease,
		background 0.12s ease,
		box-shadow 0.12s ease;
	cursor: pointer;
}

.save-slot-button:hover,
.save-slot-trash:hover,
.ui-tab-control-button:hover,
.ui-tab-control-button.active {
	transform: none;
	border-color: var(--hud-border-strong);
	background: var(--hud-button-bg-hover);
	box-shadow: none;
}

.save-slot-button {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	padding: 10px 12px;
	text-align: left;
}

.save-slot-name {
	font-size: 15px;
	font-weight: 700;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	color: var(--hud-text);
	line-height: 1;
}

.save-slot-date {
	margin-top: 4px;
	font-size: 15px;
	color: var(--hud-muted-text);
}

.save-slot-trash {
	min-width: 58px;
	padding: 0 10px;
	font-size: 14px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.ui-tab-control {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin-top: 12px;
}

.ui-tab-control-list {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.ui-tab-control-panel-frame {
	border: 1px solid var(--hud-border);
	border-radius: 12px;
	background: rgba(255, 255, 255, 0.04);
	box-shadow: none;
	padding: 14px;
}

.ui-tab-control-panel[hidden] {
	display: none;
}

.settings-tabs-row {
	justify-content: flex-start;
}

.settings-tab {
	padding: 9px 11px;
	font-size: 14px;
}

.settings-tab-frame {
	padding: 14px;
}

.settings-grid {
	display: flex;
	flex-direction: column;
	margin-top: 0;
}

.segmented-field {
	gap: 10px;
}

.settings-segmented-control {
	width: 100%;
	justify-content: stretch;
	border-radius: 0;
	background: none;
	border-color: transparent;
}

.settings-segmented-button {
	flex: 1 1 calc(33.333% - 4px);
	min-width: 0;
	padding: 10px 12px;
	font-size: 14px;
	line-height: 1.1;
	color: var(--hud-text);
}

.settings-segmented-button.active {
	background: var(--hud-button-bg-active);
	color: #0a151c;
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.toggle-field {
	flex-direction: row;
	align-items: flex-start;
	gap: 10px;
}

.toggle-field input {
	margin-top: 3px;
	accent-color: #d7e9e0;
}

.range-field output {
	font-size: 14px;
	color: var(--hud-muted-text);
}

.menu-key-grid {
	display: grid;
	grid-template-columns: auto 1fr;
	gap: 8px 14px;
	margin-top: 16px;
	padding: 12px;
	border-radius: 12px;
	background: rgba(255, 255, 255, 0.04);
	border: 1px solid var(--hud-border);
	font-size: 14px;
}

.menu-key-grid div {
	display: contents;
}

.menu-key-grid span:first-child {
	color: var(--hud-accent-text);
	text-transform: uppercase;
	letter-spacing: 0.08em;
}

#selected-machine-root {
	position: fixed;
	inset: 0;
	display: none;
	place-items: center;
	padding: 24px;
	z-index: 420;
	pointer-events: none;
}

#selected-machine-root.visible {
	display: grid;
}

.selected-machine-panel {
	width: min(420px, calc(100vw - 48px));
	max-height: min(80vh, 720px);
	overflow: auto;
	display: flex;
	flex-direction: column;
	gap: 12px;
	padding: 16px;
	border-radius: var(--hud-radius);
	border: 1px solid var(--hud-border-strong);
	background: var(--hud-panel-bg-strong);
	box-shadow: var(--hud-shadow);
	color: var(--hud-text);
	clip-path: var(--hud-frame-shape);
	pointer-events: auto;
}

.selected-machine-header {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 12px;
}

.selected-machine-kicker {
	margin: 0;
	font-size: 11px;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--hud-muted-text);
}

.selected-machine-panel h2 {
	margin: 0;
	font-size: 24px;
	line-height: 1;
	color: var(--hud-text);
}

.selected-machine-tier {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 4px 9px;
	border-radius: 999px;
	border: 1px solid rgba(255, 220, 163, 0.26);
	background: rgba(232, 154, 55, 0.16);
	color: #ffe3be;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	white-space: nowrap;
}

.selected-machine-status,
.selected-machine-description {
	margin: 0;
	font-size: 14px;
}

.selected-machine-status {
	color: var(--hud-accent-text);
}

.selected-machine-description {
	color: var(--hud-muted-text);
}

.selected-machine-fact-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 8px;
	padding: 10px;
	border-radius: 10px;
	background: rgba(255, 255, 255, 0.03);
	border: 1px solid rgba(255, 255, 255, 0.05);
}

.selected-machine-fact-row {
	display: flex;
	flex-direction: column;
	gap: 4px;
	min-width: 0;
}

.selected-machine-fact-label {
	font-size: 10px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--hud-muted-text);
}

.selected-machine-fact-value {
	font-size: 13px;
	font-weight: 700;
	color: var(--hud-text);
	word-break: break-word;
}

.selected-machine-targeting-section {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 10px;
	border-radius: 10px;
	background: rgba(255, 255, 255, 0.03);
	border: 1px solid rgba(255, 255, 255, 0.05);
}

.selected-machine-targeting-section[hidden] {
	display: none;
}

.selected-machine-targeting-kicker {
	margin: 0;
	font-size: 10px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--hud-muted-text);
}

.selected-machine-targeting-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 8px;
}

.selected-machine-action-card {
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding: 12px;
	border-radius: 12px;
	border: 1px solid rgba(255, 255, 255, 0.08);
	background: rgba(255, 255, 255, 0.04);
}

.selected-machine-action-card.recycle {
	background: rgba(255, 224, 178, 0.05);
	border-color: rgba(255, 213, 128, 0.12);
}

.selected-machine-action-copy {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.selected-machine-action-kicker,
.selected-machine-action-title,
.selected-machine-action-description {
	margin: 0;
}

.selected-machine-action-kicker {
	font-size: 10px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--hud-muted-text);
}

.selected-machine-action-title {
	font-size: 14px;
	font-weight: 700;
	color: var(--hud-text);
}

.selected-machine-action-description {
	font-size: 13px;
	color: var(--hud-muted-text);
}

.selected-machine-action-button {
	padding: 10px 12px;
	border-radius: 10px;
	border: 1px solid var(--hud-border);
	background: var(--hud-button-bg);
	color: var(--hud-text);
	font: inherit;
	font-size: 13px;
	text-align: center;
	cursor: pointer;
	transition: background 120ms ease, border-color 120ms ease, color 120ms ease;
}

.selected-machine-action-button:hover,
.selected-machine-action-button:focus-visible {
	outline: none;
	background: var(--hud-button-bg-hover);
	border-color: var(--hud-border-strong);
}

.selected-machine-action-button.recycle {
	background: rgba(180, 83, 9, 0.18);
	border-color: rgba(251, 191, 36, 0.16);
	color: #ffe6bf;
}

.selected-machine-action-button.recycle:hover,
.selected-machine-action-button.recycle:focus-visible {
	background: rgba(180, 83, 9, 0.28);
	border-color: rgba(251, 191, 36, 0.24);
}

.selected-machine-action-button:disabled {
	cursor: default;
	opacity: 0.58;
	background: rgba(255, 255, 255, 0.03);
	border-color: rgba(255, 255, 255, 0.06);
	color: var(--hud-muted-text);
}

#selected-ship-root {
	position: fixed;
	left: 20px;
	top: 108px;
	z-index: 35;
	display: none;
	pointer-events: none;
}

#selected-ship-root.visible {
	display: block;
}

.selected-ship-panel {
	width: min(340px, calc(100vw - 40px));
	max-height: min(80vh, 760px);
	display: flex;
	flex-direction: column;
	gap: 12px;
	padding: 16px;
	border-radius: var(--hud-radius);
	border: 1px solid var(--hud-border-strong);
	background: var(--hud-panel-bg-strong);
	box-shadow: var(--hud-shadow);
	color: var(--hud-text);
	clip-path: var(--hud-frame-shape);
	overflow: hidden;
	pointer-events: auto;
}

.selected-ship-kicker {
	margin: 0;
	font-size: 11px;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--hud-muted-text);
}

.selected-ship-header {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 12px;
}

.selected-ship-panel h2 {
	margin: 0;
	font-size: 24px;
	line-height: 1;
	color: var(--hud-text);
}

.selected-ship-relation-chip {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 4px 9px;
	border-radius: 999px;
	border: 1px solid rgba(208, 233, 236, 0.2);
	background: rgba(255, 255, 255, 0.06);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	white-space: nowrap;
	color: var(--hud-accent-text);
}

.selected-ship-relation-chip.is-hostile {
	border-color: rgba(248, 113, 113, 0.36);
	background: rgba(127, 29, 29, 0.36);
	color: #fecaca;
}

.selected-ship-relation-chip.is-neutral {
	border-color: rgba(251, 191, 36, 0.28);
	background: rgba(120, 53, 15, 0.28);
	color: #fde68a;
}

.selected-ship-relation-chip.is-friendly {
	border-color: rgba(74, 222, 128, 0.28);
	background: rgba(20, 83, 45, 0.28);
	color: #bbf7d0;
}

.selected-ship-faction {
	margin: 0;
	font-size: 13px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--hud-muted-text);
}

.selected-ship-class {
	margin: -4px 0 0;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--hud-accent-text);
}

.selected-ship-stat-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 8px;
	padding: 10px;
	border-radius: 10px;
	background: rgba(255, 255, 255, 0.03);
	border: 1px solid rgba(255, 255, 255, 0.05);
}

.selected-ship-stat-row {
	display: flex;
	flex-direction: column;
	gap: 4px;
	min-width: 0;
}

.selected-ship-stat-label {
	font-size: 10px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--hud-muted-text);
}

.selected-ship-stat-value {
	font-size: 13px;
	font-weight: 700;
	color: var(--hud-text);
	word-break: break-word;
}

.selected-ship-action-row {
	display: flex;
	gap: 8px;
}

.selected-ship-action-row[hidden] {
	display: none;
}

.selected-ship-action-button,
.selected-ship-follow-button {
	padding: 10px 12px;
	border-radius: 10px;
	border: 1px solid var(--hud-border);
	background: var(--hud-button-bg);
	color: var(--hud-text);
	font: inherit;
	font-size: 13px;
	text-align: center;
	cursor: pointer;
	transition: background 120ms ease, border-color 120ms ease, color 120ms ease;
}

.selected-ship-action-button:hover,
.selected-ship-action-button:focus-visible,
.selected-ship-follow-button:hover,
.selected-ship-follow-button:focus-visible {
	outline: none;
	background: var(--hud-button-bg-hover);
	border-color: var(--hud-border-strong);
}

.selected-ship-action-button.active,
.selected-ship-follow-button.active {
	background: var(--hud-button-bg-active);
	border-color: var(--hud-border-strong);
	color: #0a151c;
}

.selected-ship-action-button.active {
	background: rgba(239, 68, 68, 0.7);
	border-color: rgba(254, 202, 202, 0.4);
	color: #fff7f7;
}

.selected-ship-follow-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 8px;
}

.selected-ship-follow-grid[hidden] {
	display: none;
}

.selected-ship-targeting-section[hidden] {
	display: none;
}

.selected-ship-machine-section {
	display: flex;
	flex-direction: column;
	gap: 8px;
	min-height: 0;
}

.selected-ship-machine-section-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 8px;
}

.selected-ship-machine-section-header h3 {
	margin: 0;
	font-size: 11px;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--hud-muted-text);
}

.selected-ship-machine-list {
	display: flex;
	flex-direction: column;
	gap: 8px;
	max-height: min(40vh, 360px);
	overflow: auto;
	padding-right: 4px;
	scrollbar-width: thin;
	scrollbar-color: rgba(231, 239, 237, 0.28) transparent;
}

.selected-ship-machine-item {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: 10px;
	align-items: center;
	padding: 11px 12px;
	border-radius: 12px;
	border: 1px solid rgba(208, 233, 236, 0.12);
	background: rgba(255, 255, 255, 0.035);
	transition:
		border-color 120ms ease,
		background 120ms ease,
		transform 120ms ease,
		box-shadow 120ms ease;
}

.selected-ship-machine-item.is-highlighted {
	border-color: rgba(148, 210, 255, 0.38);
	background: rgba(56, 118, 150, 0.14);
	box-shadow: inset 0 0 0 1px rgba(153, 209, 255, 0.08);
}

.selected-ship-machine-item.is-focus-target {
	border-color: rgba(248, 113, 113, 0.44);
	background: rgba(127, 29, 29, 0.18);
	box-shadow: inset 0 0 0 1px rgba(254, 202, 202, 0.08);
}

.selected-ship-machine-copy {
	display: flex;
	flex-direction: column;
	gap: 6px;
	min-width: 0;
}

.selected-ship-machine-header-row {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 10px;
	min-width: 0;
}

.selected-ship-machine-role,
.selected-ship-machine-label,
.selected-ship-machine-stats {
	margin: 0;
}

.selected-ship-machine-role {
	font-size: 10px;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--hud-muted-text);
}

.selected-ship-machine-label {
	font-size: 15px;
	line-height: 1.15;
	color: var(--hud-text);
	word-break: break-word;
}

.selected-ship-machine-tier {
	flex: 0 0 auto;
	padding: 4px 8px;
	border-radius: 999px;
	border: 1px solid rgba(208, 233, 236, 0.16);
	background: rgba(255, 255, 255, 0.04);
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--hud-accent-text);
}

.selected-ship-machine-stats {
	font-size: 12px;
	line-height: 1.4;
	color: rgba(233, 244, 242, 0.82);
	word-break: break-word;
}

.selected-ship-machine-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	font-size: 11px;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--hud-muted-text);
}

.selected-ship-machine-health,
.selected-ship-machine-ammo,
.selected-ship-machine-status {
	padding: 3px 6px;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.04);
	border: 1px solid rgba(208, 233, 236, 0.08);
	font-variant-numeric: tabular-nums;
}

.selected-ship-machine-status {
	color: var(--hud-accent-text);
}

.selected-ship-machine-focus-button {
	padding: 8px 10px;
	border-radius: 10px;
	border: 1px solid rgba(208, 233, 236, 0.16);
	background: rgba(255, 255, 255, 0.05);
	color: var(--hud-text);
	font: inherit;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	cursor: pointer;
	transition: background 120ms ease, border-color 120ms ease, color 120ms ease;
}

.selected-ship-machine-focus-button:hover,
.selected-ship-machine-focus-button:focus-visible {
	outline: none;
	background: rgba(255, 255, 255, 0.1);
	border-color: rgba(244, 251, 250, 0.26);
}

.selected-ship-machine-focus-button.active {
	background: rgba(239, 68, 68, 0.72);
	border-color: rgba(254, 202, 202, 0.42);
	color: #fff7f7;
}

.selected-ship-machine-empty {
	margin: 0;
	padding: 16px 12px;
	border-radius: 12px;
	border: 1px dashed rgba(208, 233, 236, 0.14);
	background: rgba(255, 255, 255, 0.02);
	font-size: 11px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--hud-muted-text);
	text-align: center;
}

#selected-unit-root {
	position: fixed;
	right: 20px;
	top: 108px;
	z-index: 35;
	display: none;
	pointer-events: none;
}

#selected-unit-root.visible {
	display: block;
}

.selected-unit-panel {
	width: min(320px, calc(100vw - 40px));
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding: 16px;
	border-radius: var(--hud-radius);
	border: 1px solid var(--hud-border-strong);
	background: var(--hud-panel-bg-strong);
	box-shadow: var(--hud-shadow);
	color: var(--hud-text);
	clip-path: var(--hud-frame-shape);
	pointer-events: auto;
}

.selected-unit-kicker {
	margin: 0;
	font-size: 11px;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--hud-muted-text);
}

.selected-unit-panel h2 {
	margin: 0;
	font-size: 24px;
	line-height: 1;
	color: var(--hud-text);
}

.selected-unit-faction,
.selected-unit-race {
	margin: 0;
	font-size: 13px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--hud-muted-text);
}

.selected-unit-activity {
	margin: 0;
	font-size: 14px;
	color: var(--hud-muted-text);
}

.selected-unit-status {
	margin: 0;
	font-size: 14px;
	color: var(--hud-accent-text);
}

.selected-unit-transfer {
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding: 8px 10px;
	border-radius: 10px;
	background: rgba(250, 204, 21, 0.08);
	border: 1px solid rgba(250, 204, 21, 0.2);
}

.selected-unit-transfer[hidden] {
	display: none;
}

.selected-unit-transfer-label {
	margin: 0;
	font-size: 13px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: #fde68a;
}

.selected-unit-transfer-bar {
	position: relative;
	height: 8px;
	border-radius: 999px;
	overflow: hidden;
	background: rgba(38, 25, 3, 0.75);
	box-shadow: inset 0 0 0 1px rgba(250, 204, 21, 0.16);
}

.selected-unit-transfer-fill {
	height: 100%;
	border-radius: inherit;
	background: linear-gradient(90deg, #facc15 0%, #fde68a 100%);
	box-shadow: 0 0 10px rgba(250, 204, 21, 0.28);
	transition: width 100ms linear;
}

.selected-unit-priority-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 8px;
}

.selected-unit-priority-grid[hidden] {
	display: none;
}

.selected-unit-priority-button {
	padding: 10px 12px;
	border-radius: 10px;
	border: 1px solid var(--hud-border);
	background: var(--hud-button-bg);
	color: var(--hud-text);
	font: inherit;
	font-size: 13px;
	text-align: left;
	cursor: pointer;
	transition: background 120ms ease, border-color 120ms ease, color 120ms ease;
}

.selected-unit-priority-button:hover {
	background: var(--hud-button-bg-hover);
	border-color: var(--hud-border-strong);
}

.selected-unit-priority-button.active {
	background: var(--hud-button-bg-active);
	border-color: var(--hud-border-strong);
	color: #0a151c;
}

@media (max-width: 800px) {
	.faction-overview-shell {
		width: calc(100vw - 16px);
		max-height: calc(100vh - 28px);
		padding: 16px;
	}

	.faction-overview-header {
		flex-direction: column;
	}

	.faction-overview-close-button {
		width: 100%;
	}

	.faction-overview-matrix th,
	.faction-overview-matrix td {
		min-width: 74px;
		padding: 9px 10px;
	}

	.faction-overview-corner-header,
	.faction-overview-row-header {
		min-width: 138px;
	}

	.faction-overview-column-header {
		min-width: 96px;
		max-width: 96px;
	}

	.faction-overview-column-header.race {
		min-width: 80px;
		max-width: 80px;
	}

	#selected-machine-root {
		padding: 12px;
	}

	.selected-machine-panel {
		width: min(420px, calc(100vw - 24px));
		max-height: min(84vh, 720px);
	}

	#selected-ship-root {
		left: 12px;
		top: auto;
		bottom: 18px;
	}

	.selected-ship-panel {
		width: min(340px, calc(100vw - 24px));
	}

	.selected-ship-follow-grid {
		grid-template-columns: 1fr;
	}

	.selected-ship-machine-list {
		max-height: min(34vh, 280px);
	}

	.selected-ship-machine-item {
		grid-template-columns: 1fr;
	}

	#selected-unit-root {
		right: 12px;
		top: auto;
		bottom: 18px;
	}

	.selected-unit-panel {
		width: min(320px, calc(100vw - 24px));
	}
}

.menu-dialog-backdrop {
	position: absolute;
	inset: 0;
	display: grid;
	place-items: center;
	padding: 24px;
	background: var(--hud-overlay);
	backdrop-filter: blur(6px);
}

.menu-dialog {
	width: min(420px, 92vw);
	padding: 24px 22px;
	border-radius: 16px;
	border: 1px solid var(--hud-border-strong);
	background: rgba(12, 26, 35, 0.88);
	box-shadow: 0 22px 48px rgba(0, 0, 0, 0.24);
	backdrop-filter: blur(10px);
}

@media (max-width: 960px) {
	#inventory-panels {
		max-width: calc(100vw - 16px);
	}

	.item-grid-control {
		--item-grid-slot-size: clamp(36px, 6.8vw, 46px);
	}

	.item-grid-control.is-compact {
		--item-grid-slot-size: clamp(26px, 4.9vw, 32px);
	}

	.menu-overlay {
		padding: 18px;
	}

	.menu-shell {
		flex-direction: column;
	}

	.menu-panel-wrap,
	.menu-panel-wrap.visible {
		width: min(92vw, 520px);
		min-width: 0;
		margin-left: 0;
		margin-top: 16px;
		transform: translateY(-18px);
	}

	.menu-panel-wrap.visible {
		transform: translateY(0);
	}

	#debug-charts {
		grid-template-columns: 1fr;
	}

	#toolbar {
		left: auto;
		right: 0;
		bottom: 0;
		width: fit-content;
		max-width: calc(100vw - 96px);
		min-height: 80px;
		padding: 8px 10px 10px;
		gap: 8px;
		flex-wrap: wrap;
	}

	#chat-log-panel {
		left: 8px;
		bottom: 104px;
		width: min(340px, calc(100vw - 16px));
		height: min(240px, calc(100vh - 196px));
	}

	.toolbar-section-left {
		margin-left: 0;
		flex: 0 1 auto;
		justify-content: flex-start;
		flex-wrap: wrap;
	}

	.toolbar-build-cluster {
		flex: 0 1 auto;
		justify-content: flex-start;
		flex-wrap: wrap;
	}

	.toolbar-section-center {
		order: 0;
		flex: 0 1 auto;
		padding: 0;
	}

	.toolbar-section-right {
		margin-right: 0;
		width: auto;
		justify-content: flex-end;
	}

	.toolbar-ship-vitals {
		min-width: 108px;
		padding: 7px 9px;
	}

	.toolbar-ship-cargo {
		padding: 6px 8px;
	}

	.toolbar-world-info {
		align-items: flex-start;
	}

	.world-info-clock {
		justify-content: flex-start;
	}

	.world-info-date-time-row,
	.world-info-meta-row,
	.toolbar-control-group.segmented-control {
		justify-content: flex-start;
	}

	.world-info-time {
		font-size: 14px;
	}

	.world-info-period {
		font-size: 10px;
	}

	.world-info-side-label {
		flex-direction: column;
		align-items: flex-start;
		gap: 2px;
	}
}

@media (max-width: 680px) {
	#build-panel-root {
		bottom: 102px;
		width: min(100vw - 16px, 760px);
	}

	.build-panel-shell {
		padding: 14px;
		gap: 12px;
	}

	.build-panel-header {
		flex-direction: column;
		align-items: stretch;
	}

	.build-panel-scroll {
		max-height: min(42vh, 380px);
	}

	.build-recipe-grid {
		grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
	}

	#toolbar {
		left: auto;
		right: 0;
		bottom: 0;
	}

	#toolbar-bar {
		gap: 6px;
		padding: 0;
	}

	#inventory-panels {
		flex-direction: column;
		align-items: stretch;
	}

	.item-grid-control {
		--item-grid-slot-size: clamp(34px, 7.8vw, 42px);
	}

	.item-grid-control.is-compact {
		--item-grid-slot-size: clamp(24px, 6.1vw, 29px);
	}

	.hud-icon-button {
		min-width: 50px;
		height: 42px;
	}

	#toolbar {
		width: fit-content;
		max-width: calc(100vw - 8px);
		min-height: 80px;
		padding: 8px 10px 10px;
		gap: 8px;
		flex-wrap: wrap;
	}

	#chat-log-panel {
		left: 8px;
		bottom: 104px;
		width: min(340px, calc(100vw - 16px));
		height: min(240px, calc(100vh - 196px));
	}

	.toolbar-section-left {
		margin-left: 0;
		flex: 0 1 auto;
		justify-content: flex-start;
		flex-wrap: wrap;
	}

	.toolbar-build-cluster {
		flex: 0 1 auto;
		justify-content: flex-start;
		flex-wrap: wrap;
	}

	.toolbar-section-center {
		order: 0;
		flex: 0 1 auto;
		padding: 0;
	}

	.toolbar-section-right {
		margin-right: 0;
		width: auto;
		justify-content: flex-end;
	}

	.toolbar-ship-vitals {
		min-width: 102px;
		padding: 6px 8px;
	}

	.toolbar-ship-cargo {
		max-width: min(260px, 100%);
		padding: 6px 8px;
	}

	.toolbar-world-info {
		align-items: flex-start;
	}

	.world-info-clock {
		justify-content: flex-start;
	}

	.world-info-date-time-row,
	.world-info-meta-row,
	.toolbar-control-group.segmented-control {
		justify-content: flex-start;
	}

	.world-info-time {
		font-size: 14px;
	}

	.world-info-period {
		font-size: 10px;
	}

	.world-info-side-label {
		flex-direction: column;
		align-items: flex-start;
		text-align: left;
		font-size: 9px;
	}

	#debug-event-controls {
		gap: 8px;
	}

	.world-info-side-title {
		font-size: 9px;
	}

	.world-speed-button,
	.unit-freedom-button {
		font-size: 9px;
		padding: 2px 6px;
	}

	.settings-segmented-button {
		flex-basis: calc(50% - 4px);
		font-size: 15px;
	}

	.menu-card,
	.menu-panel-inner {
		width: min(92vw, 520px);
	}

	.menu-action-label {
		font-size: 16px;
	}

	.menu-action-detail,
	.menu-panel-header p,
	.menu-dialog p,
	.menu-note,
	.empty-saves-state,
	.save-slot-date,
	.settings-tab,
	.menu-key-grid,
	.range-field output {
		font-size: 13px;
	}

	.menu-field > span,
	.toggle-field span,
	.save-slot-name {
		font-size: 14px;
	}

	.menu-panel-actions,
	.menu-dialog-actions {
		flex-direction: column;
	}

	.seed-input-row {
		grid-template-columns: 1fr;
	}
}
