.home-grid {
	flex: 1;
	overflow-y: auto;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
	gap: 0.8em;
	padding: 0.8em;
	align-content: start;
}

.home-empty {
	flex: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--muted);
	padding: 2em;
	text-align: center;
}

.home-empty[hidden] {
	display: none;
}

.map-card {
	border: 1px solid var(--border);
	border-radius: 8px;
	overflow: hidden;
	background: var(--surface);
	display: flex;
	flex-direction: column;
	cursor: pointer;
	text-align: left;
	padding: 0;
}

.map-card img {
	width: 100%;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	display: block;
	background: var(--border);
}

.map-card .map-card-body {
	padding: 0.3em 0.2em 0.3em 0.5em;
	display: flex;
	align-items: center;
	gap: 0.3em;
}

.map-card .map-card-name {
	flex: 1;
	font-weight: 600;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.map-card .map-card-menu-btn {
	flex: none;
}

.add-map-tile {
	align-items: center;
	justify-content: center;
	gap: 0.4em;
	min-height: 160px;
	color: var(--muted);
	background: var(--bg);
	border-style: dashed;
}

.add-map-tile:hover,
.add-map-tile:focus-visible {
	border-color: var(--accent);
	color: var(--accent);
}

.add-map-tile-icon {
	font-size: 2.5em;
	line-height: 1;
}

.add-map-tile-label {
	font-weight: 600;
}

.add-map-dialog {
	max-width: 22em;
	width: calc(100% - 2em);
	border: 1px solid var(--border);
	border-radius: 10px;
	padding: 1.2em 1.4em;
	background: var(--bg);
	color: var(--fg);
}

.add-map-dialog::backdrop {
	background: rgba(0, 0, 0, 0.5);
}

.add-map-dialog h2 {
	margin-top: 0;
}

.add-map-menu {
	display: flex;
	flex-direction: column;
	gap: 0.6em;
	margin-bottom: 0.8em;
}

.add-map-menu button {
	padding: 0.9em;
	font-size: 1.05em;
}
