/* OJS Favorites — compact table/shelf layout, not oversized cards. v0.8.0 */
@media (min-width: 840px){
  html body.home #cols,
  html body.home #sh-fav #cols,
  html body.home .sheet.ojs-favorites-ui .cols,
  html body.home #sh-fav .cols {
    display:flex!important;flex-flow:row wrap!important;justify-content:center!important;
    align-items:flex-start!important;align-content:flex-start!important;
    grid-template-columns:none!important;column-gap:10px!important;row-gap:12px!important;
    width:100%!important;max-width:100%!important;margin-left:auto!important;margin-right:auto!important;
  }
  html body.home #cols>.grp,
  html body.home #sh-fav #cols>.grp,
  html body.home .sheet.ojs-favorites-ui .cols>.grp {
    flex:0 0 148px!important;flex-basis:148px!important;width:148px!important;
    min-width:0!important;max-width:148px!important;min-height:0!important;
    box-sizing:border-box!important;margin:0!important;
  }
}
/* Compact cards look like mini tables with subtle seasonal background. */
html body.home #sh-fav,
html body.home .sheet.ojs-favorites-ui {
  background:linear-gradient(140deg,#f5faf8 0%,#f9fbff 46%,#fff9f2 100%)!important;
}
html body.home #cols>.grp,
html body.home #sh-fav .cols>.grp {
  background:rgba(255,255,255,.91)!important;border-radius:10px!important;
  border:1px solid #dfe7e7!important;border-top:3px solid var(--gc,#348778)!important;
  box-shadow:0 2px 6px rgba(34,61,72,.05)!important;
  padding:6px!important;overflow:hidden!important;
}
html body.home #sh-fav .cols>.grp .ghead,
html body.home #cols>.grp .ghead {
  width:100%!important;box-sizing:border-box!important;min-width:0!important;
  padding:5px 3px 7px!important;margin:0!important;
  min-height:24px!important;gap:3px!important;
  background:transparent!important;border-bottom:1px solid #e1e9e7!important;
}
html body.home #sh-fav .cols>.grp .ghead :is(.gname, strong),
html body.home #cols>.grp .ghead :is(.gname, strong) {
  font-size:11px!important;line-height:1.3!important;letter-spacing:-.035em!important;
  white-space:nowrap!important;text-overflow:ellipsis!important;overflow:hidden!important;
}
html body.home #sh-fav .cols>.grp .ghead :is(.gcount,.gedit),
html body.home #cols>.grp .ghead :is(.gcount,.gedit){font-size:9px!important;}
html body.home #sh-fav .cols>.grp .links,
html body.home #cols>.grp .links {width:100%!important;box-sizing:border-box!important;min-width:0!important;padding:0!important;margin:0!important;}
html body.home #sh-fav .cols>.grp .links>.lk,
html body.home #cols>.grp .links>.lk {
  display:flex!important;align-items:center!important;box-sizing:border-box!important;
  width:100%!important;min-width:0!important;min-height:29px!important;
  gap:4px!important;padding:3px 3px!important;margin:0!important;
  background:transparent!important;border:0!important;border-bottom:1px solid #edf0f0!important;
  border-radius:0!important;box-shadow:none!important;font-size:11px!important;
}
html body.home #sh-fav .cols>.grp .lk :is(.ojs-fav-name,.ojs-fav-label),
html body.home #cols>.grp .lk :is(.ojs-fav-name,.ojs-fav-label) {
  flex:1 1 auto!important;display:block!important;min-width:0!important;max-width:100%!important;
  font-size:11px!important;line-height:1.32!important;font-weight:500!important;
  white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;
}
html body.home #sh-fav .cols>.grp .lk :is(.ico,.fav-ico,.ojs-fav-icon),
html body.home #cols>.grp .lk :is(.ico,.fav-ico,.ojs-fav-icon){font-size:10px!important;width:16px!important;min-width:16px!important;}
html body.home #sh-fav .cols>.grp .links>.lk:hover,
html body.home #cols>.grp .links>.lk:hover {background:#f1f8f6!important;}
html body.home #cols>.grp[hidden],html body.home #sh-fav .cols>.grp[hidden]{display:none!important;}
html body.home .ojs-fav-compact-hint {font-size:10px;letter-spacing:.02em;color:#58746d;margin-left:8px;padding:3px 7px;background:#e9f2ef;border:1px solid #d8e8df;border-radius:6px;vertical-align:middle;}
@media (min-width:620px) and (max-width:839px){
  html body.home #cols,html body.home #sh-fav .cols {display:flex!important;flex-flow:row wrap!important;justify-content:center!important;gap:9px!important;grid-template-columns:none!important;}
  html body.home #cols>.grp,html body.home #sh-fav .cols>.grp{flex:0 0 148px!important;width:148px!important;min-width:0!important;max-width:148px!important;}
}
@media (max-width:619px){
  html body.home #cols,html body.home #sh-fav .cols {display:flex!important;flex-flow:row wrap!important;justify-content:center!important;gap:8px!important;grid-template-columns:none!important;}
  html body.home #cols>.grp,html body.home #sh-fav .cols>.grp {flex:0 0 min(46%,170px)!important;width:min(46%,170px)!important;min-width:0!important;max-width:170px!important;}
  html body.home #sh-fav .cols>.grp .ghead :is(.gname,strong){font-size:10px!important;}
}

/* Selector fallback for custom OJS homepage with no #sh-fav and no #cols IDs. */
html body.home section.sheet.ojs-favorites-ui .grp {
  box-sizing:border-box!important;border-radius:10px!important;border:1px solid #dfe7e7!important;
  border-top:3px solid var(--gc,#348778)!important;background:rgba(255,255,255,.92)!important;
  box-shadow:0 2px 6px rgba(34,61,72,.05)!important;padding:6px!important;
  margin:0!important;overflow:hidden!important;max-width:148px!important;
}
html body.home section.sheet.ojs-favorites-ui .grp .ghead {
  display:flex!important;align-items:center!important;box-sizing:border-box!important;
  width:100%!important;min-width:0!important;padding:5px 3px 7px!important;
  margin:0!important;min-height:24px!important;gap:3px!important;
  background:transparent!important;border-bottom:1px solid #e1e9e7!important;
}
html body.home section.sheet.ojs-favorites-ui .grp .ghead :is(.gname,strong){
  font-size:11px!important;line-height:1.3!important;font-weight:700!important;
  white-space:nowrap!important;text-overflow:ellipsis!important;overflow:hidden!important;
}
html body.home section.sheet.ojs-favorites-ui .grp .links{width:100%!important;box-sizing:border-box!important;min-width:0!important;padding:0!important;margin:0!important;}
html body.home section.sheet.ojs-favorites-ui .grp .links>.lk{
  display:flex!important;align-items:center!important;width:100%!important;min-width:0!important;
  box-sizing:border-box!important;min-height:29px!important;gap:4px!important;
  padding:3px 3px!important;margin:0!important;background:transparent!important;
  border:0!important;border-bottom:1px solid #edf0f0!important;border-radius:0!important;
  box-shadow:none!important;font-size:11px!important;
}
html body.home section.sheet.ojs-favorites-ui .grp .lk .ojs-fav-name{
  display:block!important;flex:1 1 auto!important;min-width:0!important;max-width:100%!important;
  font-size:11px!important;line-height:1.3!important;white-space:nowrap!important;
  overflow:hidden!important;text-overflow:ellipsis!important;
}
html body.home section.sheet.ojs-favorites-ui .grp[hidden]{display:none!important;}
@media(max-width:619px){html body.home section.sheet.ojs-favorites-ui .grp{max-width:170px!important;}}
