/* ギャラリーカードのスタイル */

.home-card {
    background: var(--color-soft-white);
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    display: inline-block;
    width: 100%;
    position: relative;
}

.home-media {
    width: 100%;
    position: relative;
    aspect-ratio: var(--media-aspect-ratio, 1 / 1);
    background: var(--color-gray-100);
}

.home-media img,
.home-media video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.home-media.is-error {
    background: var(--color-gray-200);
}

.home-media-empty {
    width: 100%;
    height: 100%;
}

/* ホバー動画プレビュー */
.home-media video.home-media-preview {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.home-media video.home-media-preview.is-playing {
    opacity: 1;
}

/* ホバーオーバーレイ（プレビュー動画より上に表示） */
.home-card-hover-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    /* background: rgba(0, 0, 0, 0.35); */
    opacity: 0;
    transition: opacity 0.2s ease;
    padding: 10px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 4px;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.35) 0%,
        rgba(0, 0, 0, 0.15) 70%,
        rgba(0, 0, 0, 0) 100%
    );
    height: fit-content;
    padding-bottom: 40px;
}

.home-card:hover .home-card-hover-overlay {
    opacity: 1;
}

/* タイトルスタイル */
.home-card-title {
    font-family: var(--font-base);
    font-size: 12px;
    font-weight: 400;
    line-height: 1.5;
    color: var(--color-soft-white);
    text-shadow: rgba(0, 0, 0, 0.25) 0px 0px 4px;
    margin: 0;
}

/* 作成者ボックス */
.home-card-account-box {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* アバター */
.home-card-avatar {
    width: 12px;
    height: 12px;
    border-radius: 25px;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--color-basic-white);
}

.home-card-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 作成者名 */
.home-card-author-name {
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex-shrink: 0;
}

.home-card-author-name p {
    font-family: var(--font-base);
    font-size: 10px;
    font-weight: 400;
    line-height: 1.2;
    color: var(--color-soft-white);
    text-shadow: rgba(0, 0, 0, 0.25) 0px 0px 4px;
    margin: 0;
    white-space: nowrap;
}

