/* 수정: 데스크톱 인덱스의 작품 카드를 갤러리 목록과 같은 4:3 이미지·하단 정보형으로 표시한다. */
.desktop-index-page .new-gallery-frame > .index-gallery-card,
.desktop-index-layout-test .new-gallery-frame > .index-gallery-card {
    position: relative;
    display: flex;
    flex: 1 1 calc((100% - 30px) / 4);
    min-width: 0;
    max-width: calc((100% - 30px) / 4);
    flex-direction: column;
    background: transparent;
}

.index-gallery-card-image {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border: 1px solid var(--theme-thumbnail-border, #6b7280);
    border-radius: 1px;
    background: var(--theme-surface-alt, #eeeeee);
}

.index-gallery-card-image > img:first-child {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.index-gallery-card-image > img.new-gallery-thumb-portrait-figure {
    object-position: 50% 30%;
}

.index-gallery-card-bom {
    position: absolute;
    top: 8px;
    right: 8px;
    display: block;
    width: 22px;
    height: 22px;
}

.index-gallery-card-bom img { display: block; width: 100%; height: 100%; }

.index-gallery-card-info {
    display: flex;
    min-width: 0;
    padding: 10px 2px 0;
    align-items: flex-start;
    flex-direction: column;
}

.index-gallery-card-title {
    display: block;
    width: 100%;
    overflow: hidden;
    color: var(--theme-title-text, #202124);
    font: 700 16px/1.35 var(--mmz-ui-font, sans-serif);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.index-gallery-card-meta {
    display: flex;
    width: 100%;
    min-width: 0;
    margin-top: 7px;
    align-items: flex-start;
    gap: 2px;
    flex-direction: column;
}

.index-gallery-card-author-row {
    display: flex;
    width: 100%;
    min-width: 0;
    align-items: center;
    gap: 8px;
}

.index-gallery-card-author {
    min-width: 0;
    max-width: calc(100% - 52px);
    overflow: hidden;
    color: var(--theme-normal-text, #292929);
    font: 400 16px/1.35 var(--mmz-ui-font, sans-serif);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.index-gallery-card-date {
    color: var(--theme-sub-text, #666666);
    font: 400 16px/1.35 var(--mmz-ui-font, sans-serif);
}

/* 수정: 카드 전체 링크보다 하트 버튼을 위에 두어 버튼 클릭이 글 이동으로 바뀌지 않게 한다. */
.index-gallery-card-like {
    position: relative;
    z-index: 2;
    display: inline-flex;
    min-height: 32px;
    padding: 2px 6px;
    border: 0;
    border-radius: 8px;
    align-items: center;
    gap: 4px;
    background: transparent;
    color: var(--theme-normal-text, #292929);
    font: 700 16px/1.25 var(--mmz-ui-font, sans-serif);
    cursor: pointer;
}

.index-gallery-card-like:hover,
.index-gallery-card-like:focus-visible { background: #eeeeee; color: #111111; outline: 2px solid currentColor; }
.index-gallery-card-like.is-liked { background: #ffe2e7; color: #7d1428; }
.index-gallery-card-like:disabled { cursor: wait; opacity: .62; }

html[data-mmz-theme="dark"] .index-gallery-card-like { color: #eeeeee; }
html[data-mmz-theme="dark"] .index-gallery-card-like:hover,
html[data-mmz-theme="dark"] .index-gallery-card-like:focus-visible { background: #4a4a4a; color: #ffffff; }
html[data-mmz-theme="dark"] .index-gallery-card-like.is-liked { background: #5b2731; color: #ffffff; }

.index-gallery-card .new_ai_board_preix { font-size: 16px; }
