#town-view {
    padding: 1.5rem; /* Keep padding */
    height: calc(100vh - 5rem); /* Keep height */
    background-color: var(--clay-darkest); /* Use theme variable */
    display: flex; /* Keep layout */
    flex-direction: column; /* Keep layout */
    align-items: center; /* Keep layout */
}

#town-layout {
    display: grid; /* Keep layout */
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); /* Use auto-fill */
    gap: 1.5rem; /* Keep spacing */
    width: 100%; /* Keep layout */
    max-width: 1200px; /* Keep layout */
    padding-top: 1rem; /* Add padding */
}

.town-facility {
    background: var(--gradient-surface); /* Use theme variable */
    border: 1px solid var(--clay-border); /* Use theme variable */
    border-radius: 0.75rem; /* Keep rounding */
    padding: 1.5rem; /* Keep padding */
    box-shadow: var(--clay-shadow); /* Use theme variable */
    text-align: center; /* Keep layout */
    cursor: pointer; /* Keep interaction */
    transition: transform 0.2s, box-shadow 0.2s, filter 0.2s, opacity 0.2s; /* Added filter/opacity transition */
    display: flex; /* Keep layout */
    flex-direction: column; /* Keep layout */
    align-items: center; /* Keep layout */
    color: var(--clay-text-primary); /* Use theme variable */
    position: relative; /* Keep layout - Needed for lock icon positioning */
}

/* REMOVED HOVER EFFECT FOR TOWN FACILITY
.town-facility:hover {
    transform: translateY(-4px);
    box-shadow: var(--clay-shadow-heavy);
    border-color: var(--clay-border-light);
} */

.facility-image {
    width: 100px; /* Adjusted size */
    height: 100px; /* Adjusted size */
    object-fit: contain; /* Adjusted fit */
    margin-bottom: 1rem; /* Keep spacing */
    border-radius: 0.5rem; /* Keep rounding */
}

.town-facility h2 {
    font-size: 1.1rem; /* Adjusted size */
    font-weight: 600; /* Adjusted weight */
    margin-bottom: 0.5rem; /* Keep spacing */
    color: var(--clay-text-primary); /* Ensure color */
}

/* --- Locked facilities styles --- */
.town-facility.locked {
    filter: grayscale(80%); /* Added grayscale */
    opacity: 0.6; /* Keep opacity */
    cursor: not-allowed; /* Keep cursor */
}

/* REMOVED HOVER EFFECT for locked facility */

.town-facility.locked::after {
    content: '🔒'; /* Lock emoji */
    position: absolute; /* Position relative to the card */
    top: 8px; /* Adjust position from top */
    right: 8px; /* Adjust position from right */
    font-size: 1.5rem; /* Adjust size */
    padding: 2px 4px; /* Add slight padding */
    line-height: 1; /* Adjust line height for better centering */
    color: var(--clay-text-primary); /* Ensure visibility */
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7); /* Add shadow for contrast */
}

