.ff-fence-wrap {
	padding: 24px 0;
}

.ff-fence-block + .ff-fence-block {
	margin-top: 40px;
}

.ff-fence-row {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
	grid-auto-rows: auto;
	align-items: start;
	gap: 0;
	padding: 14px 0;
	position: relative;
}

.ff-fence-row::before,
.ff-fence-row::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	height: 10px;
	background: linear-gradient(180deg, #5b3a1d 0%, #4a2f18 100%);
	z-index: 0;
}

.ff-fence-row::before { top: 0; }
.ff-fence-row::after { bottom: 0; }

/* Exactly 10 track units so 3-board and 10-board chunks align contiguously */
.ff-fence-row-spotlight {
	grid-template-columns: repeat(10, minmax(0, 1fr));
	min-width: 0;
}

/* Pickets: width : height = span : 2.5 (1 board wide × 2.5 tall; multi-span shares same picket height). */
.ff-board {
	--ff-board-span: 1;
	--ff-picket-height-ratio: 2.5;
	grid-column: span var(--ff-board-span);
	width: 100%;
	min-width: 0;
	aspect-ratio: var(--ff-board-span) / var(--ff-picket-height-ratio);
	border: 0;
	padding: 0;
	box-sizing: border-box;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	background:
		var(--ff-board-bg,
			linear-gradient(180deg, #b07840 0%, #8c5c2e 40%, #7a4e26 100%)
		);
	background-size: cover;
	background-position: center;
	box-shadow:
		inset 1px 0 0 rgba(255, 255, 255, 0.07),
		inset -1px 0 0 rgba(0, 0, 0, 0.10);
	position: relative;
	z-index: 1;
}

.ff-board img {
	display: block;
	width: 100%;
	object-fit: cover;
}

.ff-board-fallback {
	display: block;
	font-weight: 700;
	color: #f4e6d0;
	text-align: center;
}

.ff-modal[hidden] {
	display: none !important;
}

.ff-modal {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 999999;
	overflow-x: hidden;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
}

body.ff-modal-open {
	overflow: hidden !important;
}

.ff-modal-backdrop {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(0, 0, 0, 0.6);
	z-index: 1;
}

.ff-modal-panel {
	position: relative;
	width: 92%;
	max-width: 940px;
	margin: 5vh auto;
	background: #fff;
	padding: 28px 32px;
	border-radius: 8px;
	z-index: 2;
	box-sizing: border-box;
}

.ff-modal-close {
	position: absolute;
	top: 10px;
	right: 14px;
	border: 0;
	background: transparent;
	font-size: 32px;
	line-height: 1;
	cursor: pointer;
	color: #333;
}

.ff-modal-close:hover {
	color: #000;
}

.ff-modal-grid {
	display: grid;
	grid-template-columns: minmax(260px, 45%) minmax(280px, 1fr);
	gap: 24px;
	align-items: start;
}

.ff-modal-image-wrap img {
	width: 100%;
	height: auto;
	display: block;
}

.ff-modal-name {
	font-size: 1.8rem;
	line-height: 1.2;
	margin: 0 0 4px;
}

.ff-modal-year {
	font-size: 1.25rem;
	line-height: 1.3;
	color: #555;
	margin: 0 0 12px;
	font-weight: 400;
}

.ff-modal-subtitle {
	margin-bottom: 12px;
	font-size: 1rem;
}

.ff-modal-support {
	display: inline-block;
	padding: 4px 10px;
	border-radius: 6px;
	background: #eee;
	font-size: 0.9rem;
	margin-bottom: 12px;
}

.ff-modal-location {
	margin-top: 16px;
	padding-top: 14px;
	border-top: 1px solid #e0e0e0;
}

.ff-modal-section-label {
	font-size: 0.8rem;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: #888;
	margin-bottom: 2px;
}

.ff-modal-section {
	font-size: 1rem;
	margin-bottom: 8px;
}

.ff-modal-maps-btn {
	display: inline-block;
	padding: 6px 14px;
	background: #4a7c3f;
	color: #fff;
	text-decoration: none;
	border-radius: 4px;
	font-size: 0.85rem;
}

.ff-modal-maps-btn:hover {
	background: #3d6834;
	color: #fff;
}

@media (max-width: 768px) {
	.ff-modal-panel {
		width: 96%;
		padding: 20px 16px;
	}

	.ff-modal-grid {
		grid-template-columns: 1fr;
	}

	.ff-modal-name {
		font-size: 1.4rem;
	}

	.ff-modal-year {
		font-size: 1.1rem;
	}
}
