#gallery {
    grid-area: 1 / 1 / 1 / 1;
    width: 100%;
    height: 100%;
    overflow-y: scroll;
    touch-action: none;
    background-color: antiquewhite;
    z-index: 800;
    box-sizing: border-box;
    padding: 20px;
    font-family: Georgia, 'Times New Roman', Times, serif;
    line-height: 1.2em;
    position: relative;
}

#gallery::-webkit-scrollbar {
    display: none;
}

.gallery-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

#gallery-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 30px;
}

.gallery-entry {
    background: #f8f8f8;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease-in-out;
}

.gallery-entry:hover {
    transform: translate(0px, -3px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.gallery-content {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.gallery-thumbnail {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 6px;
    overflow: hidden;
    background: #e8e8e8;
    border: 2px solid #8B6914;
    box-sizing: border-box;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

.gallery-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transform: scale(1.03);
}

.gallery-info {
    margin-bottom: 0.5rem;
}

.gallery-date {
    color: #666;
    font-size: 0.9rem;
    margin: 0;
    margin-bottom: 0.25rem;
}

.gallery-stats {
    font-size: 0.85rem;
    margin: 0;
    color: #444;
}

.gallery-value {
    font-size: 0.9rem;
    margin: 0.25rem 0 0;
    color: #8B6914;
    font-weight: bold;
}

.gallery-actions {
    display: flex;
    gap: 0.5rem;
}

.gallery-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 2rem;
    color: #666;
    font-style: italic;
}

@media screen and (min-width: 600px) {
    #gallery-container {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
}

@media screen and (min-width: 900px) {
    #gallery {
        grid-area: 2 / 1 / 4 / 1;
        max-height: 75vh;
    }
}
