.emot-flg{ display:flex; flex-wrap:wrap; }
.emot-flg__item{ min-width:0; }
.emot-flg__item > :not(style):not(script){ display:block; }
.emot-flg__card{ height:100%; display:flex; flex-direction:column; }
.emot-flg__fallback{ height:100%; display:flex; flex-direction:column; }
.emot-flg__thumb{ flex:0 0 auto; }
.emot-flg__title{ flex:0 0 auto; }
.emot-flg__excerpt{ flex:1 1 auto; }
.emot-flg__fallback{ padding:8px; background:#fff; border:1px solid #eee; border-radius:6px; }
.emot-flg__title{ font-size:1rem; margin:0 0 .5em; }
.emot-flg__thumb{ margin:0 0 .5em; line-height:0; }
.emot-flg__excerpt{ color:#444; font-size:.9rem; }
.emot-flg__empty{ opacity:.7; }

/* Pagination */
.emot-flg__pagination { margin-top: 1rem; }
.emot-flg__pagination .page-numbers { display:inline-block; padding:.4em .7em; margin:.15em; border:1px solid #ddd; border-radius:4px; text-decoration:none; color:#333; background:#fff; }
.emot-flg__pagination .page-numbers.current { background:#0073aa; color:#fff; border-color:#0073aa; }
.emot-flg__pagination .page-numbers:hover { border-color:#aaa; }
.emot-flg__prev-next { display:flex; gap:.5rem; margin-top: .5rem; }
.emot-flg__prev-next a { display:inline-block; padding:.5em .9em; border:1px solid #ddd; border-radius:4px; text-decoration:none; color:#333; background:#fff; }
.emot-flg__prev-next a:hover { border-color:#aaa; }

/* Infinite UI */
.emot-flg__loader, .emot-flg__error { display:flex; align-items:center; gap:.5rem; margin-top:.75rem; }
.emot-flg__spinner { width:18px; height:18px; border:2px solid #ccc; border-top-color:#0073aa; border-radius:50%; display:inline-block; animation: emot-flg-spin 1s linear infinite; }
@keyframes emot-flg-spin { to { transform: rotate(360deg); } }
.emot-flg__error { color:#b30000; }
.emot-flg__retry { padding:.35em .8em; border:1px solid #c77; background:#fff5f5; color:#900; border-radius:4px; cursor:pointer; }
.emot-flg__retry:hover { background:#ffecec; }

/* Elementorのアニメーション初期状態による不可視を無効化（グリッド内のみ） */
.emot-flg .elementor-invisible {
	opacity: 1 !important;
	visibility: visible !important;
	transform: none !important;
}

/* Toolbar (outside of grid) right align helper */
.emot-flg__toolbar{
	display:inline-flex !important;
	align-items:center !important;
	flex-direction:row !important;
	gap:12px;
	margin:0 0 12px;
	width:auto !important;          /* avoid full width */
	max-width:100% !important;
	white-space:nowrap !important;  /* keep in one line */
	flex-wrap:nowrap !important;    /* do not wrap children */
	margin-left:auto !important;    /* right align within parent */
	flex:0 0 auto !important;       /* do not grow */
}
.emot-flg__sort-label{ margin-right:4px; white-space:nowrap; flex:0 0 auto; }
.emot-flg__sort-select{ min-width:180px; width:auto !important; display:inline-block; max-width:100%; flex:0 0 auto; }
.emot-flg__count{ white-space:nowrap; opacity:.85; }

/* Toolbar row wrapper to control width/alignment */
.emot-flg__toolbar-row{ display:flex !important; justify-content:flex-end !important; width:100% !important; }

@media (max-width: 767px){
  /* グリッド外のツールバーはモバイルで非表示 */
  .emot-flg__toolbar-row{ display:none !important; }
}

/* Ensure children do not wrap into multiple rows */
.emot-flg__toolbar > * { flex:0 0 auto !important; width:auto !important; display:inline-flex !important; }

/* 既存定義の直後に、hidden属性を尊重するルールを追加 */
.emot-flg__loader[hidden], .emot-flg__error[hidden]{
  display: none !important;
}
