
body {
    margin-top: 1.75rem;
    font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Noto Sans", Meiryo, sans-serif;
}

#gallery {
    display: grid;
    align-content: center;
    justify-content: center;
    line-height: 0;
    grid-gap: 1rem 2rem;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); /* 自動で列数調整 */
}

.media-item {
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 200px; 
}

.media-item:hover {
    transform: scale(1.05); /* ホバー時に少し拡大 */
}

.media-item:active {
    transform: scale(0.92, 0.92);
}


img {
    object-fit: contain;
    height: 200px;
    width: 100%;
    background-color: white;
    border: 1px solid rgba(0, 0, 0, 0);
    box-shadow: 1px 1px 5px 1px #666;
    overflow: hidden;
    transition: 0.2s all;
}

/*
img:hover {
    border: 1px solid #777;
}

img:active {
    transform: scale(0.92, 0.92);
}
*/

video {
    width: 100%;
    height: auto;
    border: 1px solid rgba(0, 0, 0, 0);
    box-shadow: 1px 1px 5px 1px #666;
    background-color: black; /* 動画が読み込まれる前に黒い背景を表示 */
}

/*
video:active {
    transform: scale(0.92, 0.92);
}
*/

.notice {
    position: fixed;
    right: 2rem;
    padding: 0.25rem 0.5rem;
    font-weight: bold;
    color: #03ae39;
    background: #e9feee;
    border: 2px solid #98d8a8;
    border-radius: 5px;
    z-index: 1;
}

.fade-out {
    opacity: 0;
    transition: 0.5s all;
}

.cursor-pointer {
    cursor: pointer;
    cursor: -moz-pointer;
    cursor: -webkit-pointer;
}

.unselectable {
    user-select: none;
    -moz-user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
}

.undraggable {
    -moz-user-drag: none;
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -o-user-drag: none;
}
