.sjgsm-wp-live,
.sjgsm-wp-live * { box-sizing: border-box; }

.sjgsm-wp-live {
	--gold: #bd8b2c;
	--gold-light: #e2c06f;
	--ivory: #e9dfca;
	--muted: #918675;
	--line: rgba(189, 139, 44, .30);
	--green: #83a95c;
	--red: #bd6458;
	--cyan: #6e9da3;
	position: relative;
	isolation: isolate;
	overflow: hidden;
	container-type: inline-size;
	width: 100%;
	min-width: 0;
	max-width: 390px;
	margin: 0 auto;
	padding: 8px;
	border: 1px solid #806021;
	border-radius: 13px;
	background:
		radial-gradient(circle at 50% 5%, rgba(144, 98, 24, .12), transparent 25%),
		linear-gradient(160deg, #17130d 0%, #090a09 48%, #050606 100%);
	box-shadow: 0 8px 20px rgba(25, 14, 4, .32), inset 0 0 0 1px rgba(235, 204, 133, .04);
	color: var(--ivory);
	font-family: Arial, Helvetica, sans-serif;
	font-size: 10px;
	font-variant-numeric: tabular-nums;
	line-height: 1.15;
}

.sjgsm-wp-live::before,
.sjgsm-wp-live::after {
	position: absolute;
	z-index: -1;
	content: "";
	pointer-events: none;
}

.sjgsm-wp-live::before {
	inset: 4px;
	border: 1px solid rgba(189, 139, 44, .10);
	border-radius: 9px;
}

.sjgsm-wp-live::after {
	inset: 0;
	opacity: .15;
	background-image: repeating-linear-gradient(0deg, transparent 0 3px, rgba(235, 207, 146, .018) 4px);
}

.sjgsm-wp-live p,
.sjgsm-wp-live h2,
.sjgsm-wp-live small,
.sjgsm-wp-live strong,
.sjgsm-wp-live em { margin: 0; }

.sjgsm-wp-live__map-panel {
	position: relative;
	overflow: hidden;
	width: 100%;
	height: auto;
	aspect-ratio: 2 / 1;
	margin: 0 0 7px;
	border: 1px solid rgba(212, 164, 67, .82);
	border-radius: 8px;
	background:
		radial-gradient(ellipse at center, rgba(87, 60, 16, .20), transparent 62%),
		linear-gradient(180deg, #0a0c0b, #060707);
	box-shadow:
		0 0 0 1px rgba(58, 40, 11, .92),
		0 0 8px rgba(189, 139, 44, .12),
		inset 0 0 0 1px rgba(244, 210, 126, .12),
		inset 0 0 18px rgba(0, 0, 0, .75);
}

.sjgsm-wp-live__map-panel::after {
	position: absolute;
	inset: 0;
	content: "";
	pointer-events: none;
	background:
		radial-gradient(ellipse at center, transparent 20%, rgba(0, 0, 0, .20) 72%),
		linear-gradient(180deg, rgba(0, 0, 0, .06), transparent 44%, rgba(0, 0, 0, .30));
}

.sjgsm-wp-live__map-panel > img {
	position: absolute;
	z-index: 1;
	left: 0;
	top: 0;
	display: block;
	width: 100%;
	max-width: none !important;
	height: 100%;
	margin: 0 !important;
	object-fit: contain;
	object-position: center;
	opacity: .88;
	filter: saturate(.83) contrast(1.08) brightness(.82);
}

.sjgsm-wp-live__counter-wrap {
	position: absolute;
	z-index: 3;
	left: 50%;
	top: 50%;
	width: 100%;
	padding: 0 5px;
	transform: translate(-50%, -50%);
	border: 0;
	background: transparent;
	box-shadow: none;
	text-align: center;
}

.sjgsm-wp-live__population {
	display: block;
	color: #f2eadb;
	font-family: Georgia, "Times New Roman", serif;
	font-size: 21px;
	font-weight: 700;
	letter-spacing: -.025em;
	line-height: 1.05;
	text-shadow: 0 2px 2px #000, 0 0 7px #000, 0 0 12px rgba(224, 192, 111, .16);
	white-space: nowrap;
}

.sjgsm-wp-live__counter-meta {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 4px;
	margin-top: 4px;
	color: #d0c4a9;
	font-size: 5.4px;
	font-weight: 700;
	letter-spacing: .11em;
}

.sjgsm-wp-live__counter-meta b {
	width: 3px;
	height: 3px;
	border-radius: 50%;
	background: #8eb75f;
	box-shadow: 0 0 5px rgba(142, 183, 95, .65);
}

.sjgsm-wp-live__today-heading,
.sjgsm-wp-live__year-heading {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 6px;
	margin: 0 1px 5px;
	color: var(--gold);
	font-size: 5.7px;
	font-weight: 700;
	letter-spacing: .11em;
}

.sjgsm-wp-live__today-heading time {
	color: #776e5f;
	font-style: normal;
	letter-spacing: .03em;
	white-space: nowrap;
}

.sjgsm-wp-live__metrics {
	overflow: hidden;
	border-top: 1px solid rgba(189, 139, 44, .25);
	border-bottom: 1px solid rgba(189, 139, 44, .25);
	background: transparent;
}

.sjgsm-wp-live__metric {
	--metric: var(--gold);
	display: grid;
	grid-template-columns: 10px minmax(54px, 1fr) auto auto;
	align-items: center;
	gap: 5px;
	min-width: 0;
	min-height: 31px;
	padding: 5px 3px;
	border-bottom: 1px solid rgba(189, 139, 44, .16);
}

.sjgsm-wp-live__metric:last-child { border-bottom: 0; }
.sjgsm-wp-live__metric--births { --metric: var(--green); }
.sjgsm-wp-live__metric--deaths { --metric: var(--red); }
.sjgsm-wp-live__metric--growth { --metric: var(--cyan); }

.sjgsm-wp-live__metric-icon {
	color: var(--metric);
	font-size: 6px;
	line-height: 1;
	text-align: center;
}

.sjgsm-wp-live__metric small {
	overflow: hidden;
	color: #9f9584;
	font-size: 6.4px;
	font-weight: 700;
	letter-spacing: .08em;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.sjgsm-wp-live__metric strong {
	color: #e9e1d2;
	font-size: 10px;
	font-weight: 700;
	white-space: nowrap;
}

.sjgsm-wp-live__metric em {
	color: var(--metric);
	font-size: 5.3px;
	font-style: normal;
	font-weight: 700;
	white-space: nowrap;
}

.sjgsm-wp-live__year-heading {
	position: relative;
	margin-top: 8px;
	padding-bottom: 4px;
	border-bottom: 1px solid rgba(189, 139, 44, .18);
}

.sjgsm-wp-live__year-heading i {
	position: absolute;
	left: 0;
	bottom: -1px;
	display: block;
	width: 0;
	height: 1px;
	background: var(--gold-light);
	box-shadow: 0 0 4px rgba(226, 192, 111, .38);
	transition: width .4s ease;
}

.sjgsm-wp-live__year-grid,
.sjgsm-wp-live__outlook {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	overflow: hidden;
	border-top: 1px solid rgba(189, 139, 44, .22);
	border-bottom: 1px solid rgba(189, 139, 44, .22);
	background: transparent;
}

.sjgsm-wp-live__year-stat,
.sjgsm-wp-live__outlook > div {
	min-width: 0;
	padding: 7px 3px 6px;
	border-right: 1px solid rgba(189, 139, 44, .17);
	text-align: center;
}

.sjgsm-wp-live__year-stat:last-child,
.sjgsm-wp-live__outlook > div:last-child { border-right: 0; }

.sjgsm-wp-live__year-stat small,
.sjgsm-wp-live__outlook small {
	display: block;
	margin-bottom: 3px;
	color: #807767;
	font-size: 5px;
	font-weight: 700;
	letter-spacing: .07em;
	white-space: nowrap;
}

.sjgsm-wp-live__year-stat strong,
.sjgsm-wp-live__outlook strong {
	display: block;
	overflow: hidden;
	color: #d6cbb5;
	font-size: 7.6px;
	font-weight: 700;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.sjgsm-wp-live__year-stat--births strong { color: var(--green); }
.sjgsm-wp-live__year-stat--deaths strong { color: var(--red); }
.sjgsm-wp-live__year-stat--growth strong { color: var(--cyan); }

.sjgsm-wp-live__outlook {
	margin-top: 6px;
	background: rgba(45, 31, 13, .07);
}

.sjgsm-wp-live__outlook strong {
	color: var(--gold-light);
	font-family: Georgia, "Times New Roman", serif;
	font-size: 9px;
}

.sjgsm-wp-live__footer {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 5px;
	margin-top: 7px;
	color: var(--gold);
	font-size: 5.2px;
	font-weight: 700;
	letter-spacing: .035em;
}

.sjgsm-wp-live__footer > span { display: inline; }

@keyframes sjgsm-pop-live {
	0%, 100% { opacity: .45; }
	50% { opacity: 1; }
}

@container (max-width: 210px) {
	.sjgsm-wp-live__population { font-size: 16px; }
	.sjgsm-wp-live__metric { grid-template-columns: 9px minmax(49px, 1fr) auto; }
	.sjgsm-wp-live__metric em { display: none; }
	.sjgsm-wp-live__footer small,
	.sjgsm-wp-live__footer i { display: none; }
}

@container (max-width: 170px) {
	.sjgsm-wp-live__population { font-size: 14px; }
	.sjgsm-wp-live__year-grid { grid-template-columns: 1fr; }
	.sjgsm-wp-live__year-stat { display: flex; align-items: center; justify-content: space-between; padding: 5px 7px; border-right: 0; border-bottom: 1px solid rgba(189,139,44,.14); }
	.sjgsm-wp-live__year-stat:last-child { border-bottom: 0; }
	.sjgsm-wp-live__year-stat small { margin: 0; }
}

@media (prefers-reduced-motion: reduce) {
	.sjgsm-wp-live *,
	.sjgsm-wp-live *::before,
	.sjgsm-wp-live *::after { animation: none !important; transition: none !important; }
}
