.descened-game {
	--game-ink: #12232c;
	--game-muted: #65747b;
	--game-line: #dce5e6;
	--game-panel: #ffffff;
	--game-soft: #f2f7f6;
	--game-aqua: #0d7080;
	--game-coral: #ed6b4d;
	--game-sage: #5f8d75;
	--game-sand: #f0c987;
	overflow: hidden;
	border: 1px solid rgba(18, 35, 44, 0.1);
	border-radius: 26px;
	background: #eaf1ef;
	box-shadow: 0 30px 90px rgba(18, 35, 44, 0.18);
	color: var(--game-ink);
	font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

.descened-game button {
	color: inherit;
	font: inherit;
}

.descened-game button:focus-visible {
	outline: 3px solid rgba(237, 107, 77, 0.35);
	outline-offset: 2px;
}

.descened-game__topbar {
	display: grid;
	min-height: 64px;
	padding: 0.8rem 1.2rem;
	grid-template-columns: 1fr auto 1fr;
	align-items: center;
	gap: 1rem;
	background: #112b35;
	color: #f8fbfa;
}

.descened-game__topbar > div:first-child {
	display: flex;
	align-items: center;
	gap: 0.75rem;
}

.descened-game__brand {
	font-size: 0.74rem;
	font-weight: 850;
	letter-spacing: 0.13em;
}

.descened-game__season,
.descened-game__topbar p {
	color: rgba(248, 251, 250, 0.62);
	font-size: 0.66rem;
}

.descened-game__topbar p {
	margin: 0;
	text-align: right;
}

.descened-game__presence {
	display: flex;
	align-items: center;
	gap: 0.45rem;
	font-size: 0.72rem;
}

.descened-game__signal {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--game-sand);
	box-shadow: 0 0 0 5px rgba(240, 201, 135, 0.12);
}

.descened-game.is-connected .descened-game__signal {
	background: #69d096;
	box-shadow: 0 0 0 5px rgba(105, 208, 150, 0.12);
}

.descened-game__districts {
	display: grid;
	padding: 0 1rem;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	border-bottom: 1px solid var(--game-line);
	background: var(--game-panel);
}

.descened-game__districts button {
	display: flex;
	min-height: 62px;
	padding: 0.75rem 1rem;
	align-items: center;
	justify-content: center;
	gap: 0.7rem;
	border: 0;
	border-right: 1px solid var(--game-line);
	background: transparent;
	color: var(--game-muted);
	font-size: 0.78rem;
	font-weight: 750;
	cursor: pointer;
}

.descened-game__districts button:last-child {
	border-right: 0;
}

.descened-game__districts button span {
	display: grid;
	width: 27px;
	height: 27px;
	place-items: center;
	border: 1px solid var(--game-line);
	border-radius: 50%;
	font-size: 0.61rem;
}

.descened-game__districts button:hover,
.descened-game__districts button.is-active {
	color: var(--game-aqua);
}

.descened-game__districts button.is-active {
	box-shadow: inset 0 -3px 0 var(--game-coral);
}

.descened-game__districts button.is-active span {
	border-color: var(--game-coral);
	background: var(--game-coral);
	color: #fff;
}

.descened-game__workspace {
	display: grid;
	grid-template-columns: 245px minmax(0, 1fr) 285px;
	min-height: 680px;
}

.descened-game__workspace > * {
	min-width: 0;
}

.descened-game__catalog,
.descened-game__inspector {
	padding: 1.2rem;
	background: var(--game-panel);
}

.descened-game__catalog {
	border-right: 1px solid var(--game-line);
}

.descened-game__inspector {
	border-left: 1px solid var(--game-line);
}

.descened-game__panel-heading {
	display: flex;
	margin-bottom: 0.9rem;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	color: var(--game-ink);
	font-size: 0.72rem;
	font-weight: 850;
	letter-spacing: 0.09em;
	text-transform: uppercase;
}

.descened-game__panel-heading small {
	color: var(--game-muted);
	font-size: 0.61rem;
	font-weight: 700;
	letter-spacing: 0;
	text-transform: none;
}

.descened-game__instruction {
	margin: 0 0 1rem;
	color: var(--game-muted);
	font-size: 0.72rem;
	line-height: 1.55;
}

.descened-game__proposal-list {
	display: grid;
	gap: 0.45rem;
}

.descened-game__proposal {
	display: grid;
	width: 100%;
	min-height: 59px;
	padding: 0.5rem 0.55rem;
	grid-template-columns: 35px 1fr 15px;
	align-items: center;
	gap: 0.6rem;
	border: 1px solid transparent;
	border-radius: 12px;
	background: transparent;
	text-align: left;
	cursor: grab;
	transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.descened-game__proposal:hover,
.descened-game__proposal.is-active {
	border-color: #cbdcdb;
	background: var(--game-soft);
	transform: translateX(2px);
}

.descened-game__proposal.is-active {
	border-color: rgba(13, 112, 128, 0.35);
	box-shadow: inset 3px 0 0 var(--game-aqua);
}

.descened-game__proposal-icon {
	display: grid;
	width: 35px;
	height: 35px;
	place-items: center;
	border-radius: 10px;
	background: #dcebea;
	color: var(--game-aqua);
	font-size: 0.65rem;
	font-weight: 900;
	letter-spacing: 0.03em;
}

.descened-game__proposal strong,
.descened-game__proposal small {
	display: block;
}

.descened-game__proposal strong {
	font-size: 0.73rem;
	line-height: 1.25;
}

.descened-game__proposal small {
	margin-top: 0.12rem;
	color: var(--game-muted);
	font-size: 0.6rem;
}

.descened-game__drag {
	color: #aebbbc;
	font-size: 0.75rem;
	letter-spacing: -0.2em;
}

.descened-game__map-shell {
	display: grid;
	grid-template-rows: auto minmax(560px, 1fr);
	background: #d9e5e2;
}

.descened-game__map-toolbar {
	display: flex;
	min-height: 78px;
	padding: 0.85rem 1rem;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	border-bottom: 1px solid rgba(18, 35, 44, 0.12);
	background: rgba(247, 251, 250, 0.92);
}

.descened-game__eyebrow {
	display: block;
	margin-bottom: 0.25rem;
	color: var(--game-aqua);
	font-size: 0.57rem;
	font-weight: 850;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

.descened-game__map-toolbar h3 {
	margin: 0;
	font-size: clamp(1.1rem, 2vw, 1.45rem);
	font-weight: 780;
	letter-spacing: -0.025em;
}

.descened-game__legend {
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-end;
	gap: 0.7rem;
	color: var(--game-muted);
	font-size: 0.6rem;
}

.descened-game__legend span {
	display: flex;
	align-items: center;
	gap: 0.3rem;
}

.descened-game__legend i {
	width: 8px;
	height: 8px;
	border: 2px solid var(--game-aqua);
	border-radius: 50%;
}

.descened-game__legend .is-claimed {
	background: var(--game-sand);
	border-color: var(--game-sand);
}

.descened-game__legend .is-built {
	background: var(--game-coral);
	border-color: var(--game-coral);
}

.descened-game__map {
	position: relative;
	min-height: 560px;
	overflow: hidden;
	background:
		linear-gradient(145deg, rgba(7, 47, 59, 0.03), rgba(237, 107, 77, 0.05)),
		url("../baja-community-map-v2.png") center / cover no-repeat;
	isolation: isolate;
}

.descened-game__real-map {
	position: absolute;
	z-index: 0;
	inset: 0;
	overflow: hidden;
background: #d9e5e2;
}

.descened-game__real-map .maplibregl-map,
.descened-game__real-map .maplibregl-canvas-container,
.descened-game__real-map .maplibregl-canvas {
	width: 100%;
	height: 100%;
}

.descened-game.has-map-fallback .descened-game__real-map {
	display: none;
}

.descened-game__map-vignette {
	position: absolute;
	z-index: 1;
	inset: 0;
	background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(17, 43, 53, 0.08));
	pointer-events: none;
}

.descened-game__map::after {
	position: absolute;
	z-index: 1;
	inset: 0;
	background-image: radial-gradient(rgba(255, 255, 255, 0.36) 0.8px, transparent 0.8px);
	background-size: 12px 12px;
	content: "";
	opacity: 0.22;
	pointer-events: none;
}

.descened-game.has-real-map .descened-game__map::after {
	opacity: 0.08;
}

.descened-game__plot-marker {
	display: grid;
	width: 58px;
	height: 58px;
	place-items: center;
}

.descened-game__plot {
	position: absolute;
	z-index: 2;
	top: var(--plot-y);
	left: var(--plot-x);
	display: grid;
	width: 58px;
	height: 58px;
	place-items: center;
	border: 2px solid rgba(13, 112, 128, 0.72);
	border-radius: 18px;
	background: rgba(255, 255, 255, 0.86);
	box-shadow: 0 8px 24px rgba(17, 43, 53, 0.18);
	color: var(--game-aqua);
	cursor: pointer;
	transform: translate(-50%, -50%);
	transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
	backdrop-filter: blur(5px);
}

.descened-game__plot:hover,
.descened-game__plot.is-selected,
.descened-game__plot.is-drop-target {
	z-index: 4;
	border-color: var(--game-coral);
	box-shadow: 0 0 0 5px rgba(237, 107, 77, 0.18), 0 12px 30px rgba(17, 43, 53, 0.24);
	transform: translate(-50%, -50%) scale(1.08);
}

.descened-game.has-real-map .descened-game__plot {
	position: relative;
	z-index: auto;
	top: auto;
	left: auto;
	transform: none;
}

.descened-game.has-real-map .descened-game__plot:hover,
.descened-game.has-real-map .descened-game__plot.is-selected,
.descened-game.has-real-map .descened-game__plot.is-drop-target {
	transform: scale(1.08);
}

.descened-game__plot.is-claimed {
	border-color: #d7a84f;
	background: rgba(255, 244, 218, 0.92);
	color: #8a671f;
}

.descened-game__plot.is-yours {
	box-shadow: 0 0 0 4px rgba(13, 112, 128, 0.18), 0 8px 24px rgba(17, 43, 53, 0.2);
}

.descened-game__plot.is-built {
	border-color: var(--game-coral);
	background: var(--game-coral);
	color: #fff;
}

.descened-game__plot.is-approved {
	border-color: #4d9b70;
	background: #4d9b70;
}

.descened-game__plot-number {
	font-size: 0.62rem;
	font-weight: 850;
}

.descened-game__plot-project {
	display: none;
	font-size: 0.72rem;
	font-weight: 900;
}

.descened-game__plot.is-built .descened-game__plot-number {
	display: none;
}

.descened-game__plot.is-built .descened-game__plot-project {
	display: block;
}

.descened-game.is-dragging .descened-game__plot:not(.is-built) {
	animation: descened-pulse 1.2s ease-in-out infinite;
}

.descened-game__map-note {
	position: absolute;
	z-index: 3;
	right: 0.8rem;
	bottom: 0.8rem;
	display: grid;
	max-width: 210px;
	padding: 0.6rem 0.75rem;
	border: 1px solid rgba(255, 255, 255, 0.5);
	border-radius: 12px;
	background: rgba(17, 43, 53, 0.82);
	color: rgba(255, 255, 255, 0.75);
	font-size: 0.56rem;
	line-height: 1.4;
	backdrop-filter: blur(8px);
}

.descened-game__map-note span {
	color: #fff;
	font-weight: 800;
	text-transform: uppercase;
}

.descened-game.has-real-map .descened-game__map-note {
	top: 0.8rem;
	right: auto;
	bottom: auto;
	left: 0.8rem;
}

.descened-game__real-map .maplibregl-ctrl-group {
	border: 1px solid rgba(17, 43, 53, 0.12);
	border-radius: 12px;
	box-shadow: 0 6px 18px rgba(17, 43, 53, 0.16);
	overflow: hidden;
}

.descened-game__real-map .maplibregl-ctrl-group button {
	width: 34px;
	height: 34px;
}

.descened-game__real-map .maplibregl-ctrl-scale {
	border-color: rgba(17, 43, 53, 0.64);
	background: rgba(255, 255, 255, 0.76);
	color: #112b35;
	font-size: 0.58rem;
	backdrop-filter: blur(6px);
}

.descened-game__real-map .maplibregl-ctrl-attrib {
	background: rgba(255, 255, 255, 0.82);
	font-size: 10px;
}

.descened-game__plot-title {
	display: grid;
	margin: 1.2rem 0 0.8rem;
	grid-template-columns: 52px 1fr;
	align-items: center;
	gap: 0.8rem;
}

.descened-game__plot-title > span {
	display: grid;
	width: 52px;
	height: 52px;
	place-items: center;
	border-radius: 16px;
	background: var(--game-aqua);
	color: #fff;
	font-size: 1rem;
	font-weight: 850;
}

.descened-game__plot-title small {
	color: var(--game-coral);
	font-size: 0.58rem;
	font-weight: 800;
	letter-spacing: 0.1em;
	text-transform: uppercase;
}

.descened-game__plot-title h3 {
	margin: 0.15rem 0 0;
	font-size: 1.25rem;
	font-weight: 800;
	letter-spacing: -0.025em;
}

.descened-game__plot-detail {
	margin: 0;
	color: var(--game-muted);
	font-size: 0.76rem;
	line-height: 1.55;
}

.descened-game__impact {
	display: flex;
	margin: 0.9rem 0 1.2rem;
	flex-wrap: wrap;
	gap: 0.4rem;
}

.descened-game__impact span {
	padding: 0.32rem 0.55rem;
	border-radius: 999px;
	background: rgba(95, 141, 117, 0.12);
	color: #3f7259;
	font-size: 0.6rem;
	font-weight: 750;
}

.descened-game__impact span:last-child {
	background: rgba(237, 107, 77, 0.11);
	color: #b44831;
}

.descened-game__learning {
	margin: 1rem 0;
	padding: 0.9rem;
	border-radius: 15px;
	background: var(--game-soft);
}

.descened-game__learning > span {
	color: var(--game-aqua);
	font-size: 0.58rem;
	font-weight: 850;
	letter-spacing: 0.1em;
	text-transform: uppercase;
}

.descened-game__learning p {
	margin: 0.45rem 0;
	font-size: 0.71rem;
	line-height: 1.45;
}

.descened-game__learning small {
	display: block;
	color: var(--game-muted);
	font-size: 0.58rem;
	line-height: 1.4;
}

.descened-game__primary-action {
	width: 100%;
	min-height: 44px;
	padding: 0.65rem 0.8rem;
	border: 0;
	border-radius: 12px;
	background: var(--game-coral);
	color: #fff !important;
	font-size: 0.7rem !important;
	font-weight: 850 !important;
	cursor: pointer;
}

.descened-game__primary-action:hover {
	background: #d9583d;
}

.descened-game__primary-action:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

.descened-game__vote {
	margin-top: 1rem;
	padding-top: 1rem;
	border-top: 1px solid var(--game-line);
}

.descened-game__vote-heading,
.descened-game__vote-counts {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.5rem;
}

.descened-game__vote-heading {
	font-size: 0.68rem;
	font-weight: 850;
}

.descened-game__vote-heading small {
	color: var(--game-muted);
	font-size: 0.56rem;
	font-weight: 650;
}

.descened-game__vote-counts {
	margin: 0.75rem 0;
	font-size: 0.67rem;
}

.descened-game__vote-counts strong {
	font-size: 1rem;
}

.descened-game__vote-actions {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0.45rem;
}

.descened-game__vote-actions button {
	min-height: 38px;
	border: 1px solid var(--game-line);
	border-radius: 10px;
	background: #fff;
	font-size: 0.64rem;
	font-weight: 800;
	cursor: pointer;
}

.descened-game__vote-actions button:first-child:hover {
	border-color: var(--game-sage);
	background: rgba(95, 141, 117, 0.1);
}

.descened-game__vote-actions button:last-child:hover {
	border-color: var(--game-coral);
	background: rgba(237, 107, 77, 0.1);
}

.descened-game__vote-actions button:disabled {
	opacity: 0.45;
	cursor: not-allowed;
}

.descened-game__vote > p {
	margin: 0.6rem 0 0;
	color: var(--game-muted);
	font-size: 0.56rem;
	line-height: 1.4;
}

.descened-game__metrics {
	display: grid;
	padding: 0.95rem 1.2rem;
	grid-template-columns: repeat(7, minmax(0, 1fr));
	gap: 0.75rem;
	border-top: 1px solid var(--game-line);
	background: #f8fbfa;
}

.descened-game__metric {
	display: grid;
	grid-template-columns: 1fr auto;
	gap: 0.25rem 0.5rem;
}

.descened-game__metric > span {
	overflow: hidden;
	color: var(--game-muted);
	font-size: 0.58rem;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.descened-game__metric strong {
	font-size: 0.65rem;
}

.descened-game__metric i {
	display: block;
	height: 4px;
	grid-column: 1 / -1;
	overflow: hidden;
	border-radius: 99px;
	background: #dce5e6;
}

.descened-game__metric i span {
	display: block;
	height: 100%;
	border-radius: inherit;
	background: linear-gradient(90deg, var(--game-aqua), #54a88a);
	transition: width 240ms ease;
}

.descened-game-missing {
	padding: 3rem;
	border: 1px dashed rgba(18, 35, 44, 0.2);
	border-radius: 20px;
	background: #f8fbfa;
	text-align: center;
}

@keyframes descened-pulse {
	50% {
		box-shadow: 0 0 0 7px rgba(237, 107, 77, 0.15), 0 8px 24px rgba(17, 43, 53, 0.18);
	}
}

@media (max-width: 1120px) {
	.descened-game__workspace {
		grid-template-columns: 220px minmax(0, 1fr);
	}

	.descened-game__inspector {
		display: grid;
		grid-column: 1 / -1;
		grid-template-columns: 1fr 1.2fr 1fr;
		gap: 1rem;
		border-top: 1px solid var(--game-line);
		border-left: 0;
	}

	.descened-game__inspector > .descened-game__panel-heading,
	.descened-game__plot-title {
		grid-column: 1;
	}

	.descened-game__plot-detail,
	.descened-game__impact,
	.descened-game__learning {
		grid-column: 2;
	}

	.descened-game__actions,
	.descened-game__vote {
		grid-column: 3;
	}

	.descened-game__vote {
		margin-top: 0;
		padding-top: 0;
		border-top: 0;
	}
}

@media (max-width: 780px) {
	.descened-game {
		border-radius: 18px;
	}

	.descened-game__topbar {
		grid-template-columns: 1fr auto;
	}

	.descened-game__season,
	.descened-game__topbar p {
		display: none;
	}

	.descened-game__districts {
		padding: 0;
	}

	.descened-game__districts button {
		min-height: 55px;
		padding: 0.55rem 0.35rem;
		flex-direction: column;
		gap: 0.25rem;
		font-size: 0.65rem;
	}

	.descened-game__districts button span {
		width: 22px;
		height: 22px;
	}

	.descened-game__workspace {
		grid-template-columns: 1fr;
	}

	.descened-game__catalog {
		overflow: hidden;
		border-right: 0;
		border-bottom: 1px solid var(--game-line);
	}

	.descened-game__proposal-list {
		display: flex;
		padding-bottom: 0.35rem;
		overflow-x: auto;
		scroll-snap-type: x mandatory;
	}

	.descened-game__proposal {
		flex: 0 0 175px;
		scroll-snap-align: start;
	}

	.descened-game__map-shell {
		grid-template-rows: auto minmax(520px, 68vh);
	}

	.descened-game__map {
		min-height: 520px;
	}

	.descened-game__map-toolbar {
		align-items: flex-start;
		flex-direction: column;
	}

	.descened-game__legend {
		justify-content: flex-start;
	}

	.descened-game__plot {
		width: 50px;
		height: 50px;
		border-radius: 15px;
	}

	.descened-game__plot-marker {
		width: 50px;
		height: 50px;
	}

	.descened-game__inspector {
		display: block;
	}

	.descened-game__metrics {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 460px) {
	.descened-game__brand {
		font-size: 0.65rem;
		letter-spacing: 0.09em;
	}

	.descened-game__map-shell {
		grid-template-rows: auto minmax(460px, 65vh);
	}

	.descened-game__map {
		min-height: 460px;
	}

	.descened-game__plot {
		width: 44px;
		height: 44px;
		border-radius: 13px;
	}

	.descened-game__plot-marker {
		width: 44px;
		height: 44px;
	}

	.descened-game__map-note {
		max-width: 165px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.descened-game *,
	.descened-game *::before,
	.descened-game *::after {
		animation-duration: 0.01ms !important;
		transition-duration: 0.01ms !important;
	}
}
