/* "선물함" 메뉴 — 그림(gallery) 모달과 카드/그리드 표현이 완전히 같다.
   homepage.css의 .window[data-root="gallery"] 전용 규칙들을 선물함
   ([data-root="received"] / [data-received-grid])에도 그대로 적용한다. */

.window[data-root="received"] [data-received-grid] {
  grid-template-columns: repeat(auto-fill, minmax(min(max(240px, calc((100% - 48px) / 5)), 100%), 1fr));
}

@media (max-width: 640px) {
  .window[data-root="received"] [data-received-grid] {
    grid-template-columns: repeat(auto-fill, minmax(min(max(150px, calc((100% - 12px) / 5)), 100%), 1fr));
    gap: 3px;
  }
}

.window[data-root="received"] .grid-cell {
  min-width: 0;
  padding: 7px;
  border-radius: 9px;
  cursor: pointer;
  background: transparent;
  transition: .15s;
}

.window[data-root="received"] .grid-cell-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.window[data-root="received"] .grid-cell-meta span {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

/* 카드 작성자 칩(= 그림을 준 사람) */
.received-card-author {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  margin: 3px 0 1px;
}
.received-card-author-avatar {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: rgba(var(--system-c-content-rgb), var(--system-c-content-alpha)) center / cover no-repeat;
  color: var(--system-c-desc-color);
}
.received-card-author-avatar svg { width: 11px; height: 11px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.received-card-author-avatar.is-profile-ref,
.received-card-author-name.is-profile-ref { cursor: pointer; }
.received-card-author-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  color: var(--system-c-font-color);
}
.received-card-author-name.is-profile-ref:hover { text-decoration: underline; }
.received-card-author-id { color: var(--system-c-desc-color); margin-left: 2px; }

/* 상세 헤더: 작성자(좌) · 메타(우)를 한 줄에(homepage.ui.js openPost의
   .post-header-row). 좁으면 줄바꿈. */
.window[data-root="received"] .blog-post > .post-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin: 2px 0 10px;
}
.window[data-root="received"] .blog-post > .post-header-row > .post-meta {
  margin: 0;
}
.window[data-root="received"] .blog-post .post-author {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}
.window[data-root="received"] .blog-post > .post-author .entry-avatar { width: 26px; height: 26px; }
.window[data-root="received"] .blog-post > .post-author .post-author-name {
  font-weight: 600;
}
.window[data-root="received"] .blog-post > .post-author .post-author-name.is-profile-ref { cursor: pointer; }
.window[data-root="received"] .blog-post > .post-author .post-author-name.is-profile-ref:hover { text-decoration: underline; }
.window[data-root="received"] .blog-post > .post-author .post-author-id { color: var(--system-c-desc-color); font-weight: 400; margin-left: 3px; }
