body {
    background: url('photo/sweater.png') no-repeat center center fixed; /* Set the background image and position */
    background-size: cover; /* Ensures the image covers the entire background */
    position: relative; /* Enable positioning for child elements */
    overflow: hidden; /* Disables scrolling on the site */
}

#background-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1; /* Place behind all other content */
    object-fit: cover; /* Ensure the image covers the entire area */
}

.grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: auto;
    gap: 0;
    width: 100vmin; /* Ensures the grid fits within the viewport */
    height: auto;
    justify-content: center;
    align-items: start; /* Aligns the grid to the top */
    position: absolute;
    top: 0; /* Aligns the top of the grid to the top of the site */
    left: 50%;
    transform: translateX(-50%); /* Centers the grid horizontally */
}

.cube {
    border: none; /* Makes the block borders invisible */
    box-sizing: border-box;
    aspect-ratio: 1 / 1; /* Ensures each block is a square */
    display: flex;
    justify-content: center;
    align-items: center;
}

.cube img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensures the image fits within the cube without distortion */
    pointer-events: none; /* Prevents direct interaction with the image */
    user-select: none; /* Disables text/image selection */
}

/* Adjustments for merged cells */
#A2 {
    display: flex;
    flex-direction: column;
}

.sub-cube {
    flex: 1;
    border: 1px solid black;
    box-sizing: border-box;
}

#head {
    display: flex;
    justify-content: center; /* Center horizontally */
    align-items: start; /* Align to the top */
    grid-column: span 1; /* Ensure proper grid alignment */
    grid-row: span 1; /* Ensure proper grid alignment */
}

#head img {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain; /* Ensure the image fits properly */
}