body {
	min-height: 100vh;
}

.theme-bg-layer {
	position: fixed;
	inset: 0;
	z-index: 0;
	pointer-events: none;
	overflow: hidden;
}

.theme-bg-layer:before {
	content: "";
	position: absolute;
	inset: 0;
	background-image: var(--theme-bg-image, none);
	background-size: cover;
	background-position: center center;
	background-repeat: no-repeat;
	opacity: var(--theme-bg-opacity, 0);
	filter: saturate(var(--theme-bg-saturate, 1)) blur(var(--theme-bg-blur, 0px));
	transform: scale(1.03);
}

.theme-bg-layer:after {
	content: "";
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, var(--theme-bg-darken, 0));
}

.game-shell {
	min-height: 100vh;
	position: relative;
	z-index: 1;
}

.compact-shell {
	position: relative;
	z-index: 1;
}

.game-main-frame > .theme-mainframe-bg {
	position: absolute !important;
	inset: 18px;
	z-index: var(--theme-main-bg-z, 1) !important;
	border-radius: 8px;
	pointer-events: none;
	overflow: hidden;
	mix-blend-mode: var(--theme-main-bg-mix, normal);
	opacity: var(--theme-main-bg-layer-opacity, 1);
}

.game-main-frame > .theme-mainframe-bg:before {
	content: "";
	position: absolute;
	inset: 0;
	background-image: var(--theme-main-bg-image, none);
	background-size: cover;
	background-position: center center;
	background-repeat: no-repeat;
	opacity: var(--theme-main-bg-opacity, 0);
	filter: saturate(var(--theme-main-bg-saturate, 1)) blur(var(--theme-main-bg-blur, 0px));
	transform: scale(1.02);
}

.game-main-frame > .theme-mainframe-bg:after {
	content: "";
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, var(--theme-main-bg-darken, 0));
}

.game-sidebar {
	padding: 0.75rem;
	border-right: 1px solid rgba(255,255,255,0.12);
}

.game-content {
	padding: 0.75rem 1rem;
}

.mobile-topbar {
	border-bottom: 1px solid rgba(255,255,255,0.15);
}

.game-ad-slot {
	margin-bottom: 0.75rem;
	text-align: center;
}

.statsbar {
	width: 100%;
	border-collapse: collapse;
	margin-bottom: 0.4rem;
}

.statsbar .statsbar-row td {
	color: inherit !important;
	padding: 0.22rem 0.35rem;
	font-weight: 600;
}

.statsbar .statsbar-row a,
.statsbar .statsbar-row a:hover,
.statsbar .statsbar-row a:visited,
.statsbar .statsbar-row b {
	color: inherit !important;
}

.statsbar .statsbar-row a:hover {
	background: transparent !important;
	text-decoration: underline;
}

.game-sidebar-frame,
.game-main-frame {
	height: 100%;
}

.turn-panel-narrow {
	max-width: 720px;
	width: 100%;
	margin: 0 auto;
}

.turn-panel-wide {
	max-width: 980px;
	width: 100%;
	margin: 0 auto;
}

.medieval-badge {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	font-weight: 600;
}

.ui-icon {
	width: 1.25rem;
	height: 1.25rem;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	border: 1px solid currentColor;
	font-size: 0.72rem;
	line-height: 1;
}

.ui-icon:before {
	content: attr(data-icon);
}

.medieval-divider {
	height: 1px;
	margin: 0.5rem 0 0.75rem;
	background: currentColor;
	opacity: 0.2;
}

.card {
	background: rgba(255,255,255,0.04);
	border: 1px solid rgba(255,255,255,0.2);
	color: inherit;
}

.card-header {
	background: rgba(255,255,255,0.08);
	color: inherit;
}

.table {
	color: inherit;
	--bs-table-bg: transparent;
	--bs-table-color: inherit;
	--bs-table-border-color: rgba(255,255,255,0.12);
	--bs-table-striped-bg: rgba(255,255,255,0.04);
	--bs-table-striped-color: inherit;
	--bs-table-hover-bg: rgba(255,255,255,0.08);
	--bs-table-hover-color: inherit;
}

.table > :not(caption) > * > * {
	color: inherit;
	background-color: transparent !important;
	border-bottom-color: rgba(255,255,255,0.12);
}

.table-hover > tbody > tr:hover > * {
	background-color: rgba(255,255,255,0.08) !important;
}

.game-sidebar .menus {
	width: 100%;
}

img {
	max-width: 100%;
	height: auto;
}

input[type="text"],
input[type="password"],
input[type="number"],
textarea,
select {
	max-width: 100%;
}

.form-control,
.form-select {
	max-width: 100%;
}

@media (max-width: 767.98px) {
	.game-sidebar {
		border-right: 0;
		border-bottom: 1px solid rgba(255,255,255,0.12);
	}

	.game-content {
		padding: 0.75rem;
	}

	.game-sidebar .menus td,
	.game-sidebar .menus th {
		padding: 0.35rem 0.4rem;
	}
}
