.hgeml-app { width:100%; box-sizing:border-box; }
.hgeml-app *, .hgeml-app *::before, .hgeml-app *::after { box-sizing:border-box; }
.hgeml-tabs { display:flex; gap:.5rem; flex-wrap:wrap; margin:0 0 1.25rem; border-bottom:1px solid rgba(127,127,127,.35); padding-bottom:.6rem; }
.hgeml-tab, .hgeml-button, .hgeml-alpha-btn, .hgeml-category-item, .hgeml-chip { font:inherit; color:inherit; }
.hgeml-tab { border:1px solid rgba(127,127,127,.4); background:transparent; padding:.55rem .95rem; cursor:pointer; border-radius:4px; }
.hgeml-tab.is-active { font-weight:700; border-color:currentColor; }
.hgeml-view[hidden] { display:none !important; }
.hgeml-heading { margin-top:0; }
.hgeml-results { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:1.25rem; }
.hgeml-card { margin:0; min-width:0; border:1px solid rgba(127,127,127,.25); background:rgba(255,255,255,.02); overflow:hidden; }
.hgeml-media { width:100%; aspect-ratio:16/9; display:block; position:relative; background:rgba(127,127,127,.12); overflow:hidden; text-decoration:none; }
.hgeml-media img { width:100%; height:100%; object-fit:cover; display:block; }
.hgeml-placeholder { width:100%; height:100%; display:flex; align-items:center; justify-content:center; font-size:4rem; line-height:1; opacity:.55; }
.hgeml-card-body { padding:.75rem .85rem .9rem; }
.hgeml-title { font-size:1rem; line-height:1.35; margin:0 0 .45rem; }
.hgeml-title a { color:inherit; text-decoration:none; }
.hgeml-title a:hover, .hgeml-title a:focus { text-decoration:underline; }
.hgeml-meta { font-size:.86rem; opacity:.75; }
.hgeml-category-line { margin-top:.35rem; font-size:.82rem; opacity:.72; line-height:1.35; }
.hgeml-pagination { display:grid; grid-template-columns:1fr auto 1fr; align-items:center; gap:.75rem; margin:1.4rem 0 .25rem; }
.hgeml-pagination > :first-child { justify-self:start; }
.hgeml-pagination > :last-child { justify-self:end; }
.hgeml-page-label { font-size:.9rem; opacity:.8; }
.hgeml-button { border:1px solid rgba(127,127,127,.5); background:transparent; padding:.55rem .85rem; cursor:pointer; border-radius:4px; }
.hgeml-primary { font-weight:700; border-color:currentColor; }
.hgeml-field { margin-bottom:1rem; }
.hgeml-label { display:block; font-weight:700; margin-bottom:.35rem; }
.hgeml-input { width:100%; max-width:560px; font:inherit; padding:.6rem .7rem; border:1px solid rgba(127,127,127,.5); background:transparent; color:inherit; border-radius:4px; }
.hgeml-search-actions { display:flex; gap:.6rem; flex-wrap:wrap; margin:.5rem 0 1.2rem; }
.hgeml-category-picker { position:relative; max-width:720px; }
.hgeml-suggestions { position:absolute; z-index:30; left:0; top:calc(100% - .9rem); width:min(560px,100%); max-height:260px; overflow:auto; background:#fff; color:#111; border:1px solid #bbb; box-shadow:0 4px 16px rgba(0,0,0,.18); }
.hgeml-suggestions button { display:block; width:100%; text-align:left; border:0; border-bottom:1px solid #eee; background:#fff; color:#111; padding:.55rem .7rem; cursor:pointer; }
.hgeml-suggestions button:hover, .hgeml-suggestions button:focus { background:#f4f4f4; }
.hgeml-selected-categories { display:flex; flex-wrap:wrap; gap:.4rem; margin-top:.6rem; }
.hgeml-chip { border:1px solid currentColor; background:transparent; border-radius:999px; padding:.3rem .6rem; cursor:pointer; }
.hgeml-summary { margin:.5rem 0 1rem; font-weight:700; }
.hgeml-category-tools { margin-bottom:1rem; }
.hgeml-alpha { display:flex; gap:.3rem; flex-wrap:wrap; margin-top:.8rem; }
.hgeml-alpha-btn { min-width:2rem; border:1px solid rgba(127,127,127,.4); background:transparent; padding:.3rem .45rem; cursor:pointer; border-radius:3px; }
.hgeml-alpha-btn.is-active { font-weight:700; border-color:currentColor; }
.hgeml-category-list { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:.5rem; }
.hgeml-category-item { display:flex; justify-content:space-between; gap:.75rem; align-items:center; text-align:left; border:1px solid rgba(127,127,127,.3); background:transparent; padding:.6rem .7rem; cursor:pointer; }
.hgeml-category-item small { opacity:.7; }
.hgeml-loading, .hgeml-empty { grid-column:1/-1; padding:1.5rem 0; opacity:.75; }
@media (max-width: 900px) {
  .hgeml-results, .hgeml-category-list { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width: 600px) {
  .hgeml-results, .hgeml-category-list { grid-template-columns:1fr; }
  .hgeml-pagination { grid-template-columns:1fr 1fr; }
  .hgeml-page-label { grid-row:2; grid-column:1/-1; justify-self:center; }
}

.hgeml-search-alpha { max-width:720px; margin-top:.65rem; }
