ui-grid.models {
  height: 20vh;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  grid-template-rows: repeat(auto-fill, minmax(60px, 1fr));
  overflow-y: auto;
  overflow-x: hidden;
}
ui-grid.models>* {
  height: 60px;
  padding: 0;
  position: relative;
  transition: transform ease-out 100ms;
  border-radius: 10px;
  box-shadow: 0 0 5px rgba(0,0,0,.5);
  margin: 0;
  display: flex;
}
ui-grid.models>* h2 {
  font-size: .8em;
  font-weight: bold;
  margin: 0;
  background: transparent;
  border: none;
  box-shadow: none;
  color: white;
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  background: rgba(0,0,0,.5);
  padding: .2em .4em;
  border-radius: 0 0 10px 10px;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}
ui-grid.models>* h3 {
  font-size: .8em;
  margin: 0;
  display: none;
}
ui-grid.models>* img {
  width: 100%;
  max-height: 100%;
  border-radius: .5em;
  margin: 0 auto;
  display: block;
  object-fit: contain;
}
ui-grid.models>* a {
  margin: 0;
  padding: 0;
  flex: 1 1;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  text-decoration: none;
  color: white;
}
ui-grid.models>* p {
  display: none;
  font-size: .8em;
}
ui-grid.models>*:hover p {
  position: absolute;
  display: none;
  width: 100%;
  background: rgba(0,0,0,.5);
  border: 1px solid black;
}
ui-grid.models>*:hover {
  transform: scale(1.1);
  position: relative;
  z-index: 1;
}
/*
#pagination {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  text-align: center;
}
ui-input {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 5;
  padding: .5em;
}
*/
janus-ui-inventory>ui-tabs>ui-tab {
  height: 40vh;
  padding: 0;
}
janus-ui-inventory ui-flexpanel {
  padding: 0;
  max-height: 20vh;
  width: 100%;
}

janus-ui-inventory-roomassets {
  display: block;
  height: 20vh;
  overflow-x: hidden;
  overflow-y: scroll;
}
janus-ui-inventory-roomassets ui-grid.models {
  height: auto;
  overflow-x: visible;
  overflow-y: visible;
}

/* ---- unified asset inventory (controls + provenance badges) ---- */
janus-ui-inventory {
  display: flex;
  flex-direction: column;
  min-height: 0;
}
janus-ui-inventory > h3 { margin: 0 0 .3em; }
.inv-controls { display: flex; gap: .4em; margin-bottom: .4em; }
.inv-search {
  flex: 1 1 auto; min-width: 0; padding: .3em .5em;
  background: #111; color: #eee; border: 1px solid #333; border-radius: 5px;
}
.inv-sort {
  flex: 0 0 auto; padding: .3em; background: #111; color: #eee;
  border: 1px solid #333; border-radius: 5px;
}
.inv-chips { display: flex; flex-wrap: wrap; gap: .3em; margin-bottom: .4em; }
.inv-chip {
  font-size: .75em; padding: .15em .55em; border-radius: 999px; cursor: pointer;
  background: #1a1a1a; color: #bbb; border: 1px solid #333; text-transform: capitalize;
  opacity: .6;
}
.inv-chip:hover { color: #fff; border-color: #555; opacity: .85; }
/* Two independent dimensions. A chip's background is its identity (source chips
   carry their source color via .inv-badge-*; type chips stay neutral), and
   selection is layered on top as a bright ring + full opacity — so a selected
   chip keeps its own color instead of all turning teal and clashing with Room. */
.inv-chip.active {
  opacity: 1; color: #fff; border-color: #fff;
  box-shadow: 0 0 0 1px rgba(255,255,255,.2);
}

/* grid is now the main, growable element rather than a fixed-height tab body */
ui-grid.inv-grid { flex: 1 1 auto; height: auto; min-height: 0; }

.inv-type-icon {
  font-size: 1.8em; line-height: 1; opacity: .85;
  display: flex; align-items: center; justify-content: center; width: 100%; height: 100%;
}
/* Shape-primitive icons drawn from the engine object-icon sprite sheet
   (objecticons-small.png, 20px cells), scaled up so the small source icon
   fills the card. */
.inv-prim-icon {
  width: 20px; height: 20px;
  background-image: url('./objecticons-small.png');
  background-repeat: no-repeat;
  image-rendering: auto;
  transform: scale(2);
  transform-origin: center;
}
.inv-prim-plane    { background-position: 0      -20px; }
.inv-prim-cube     { background-position: -21px  -20px; }
.inv-prim-sphere   { background-position: -63px  -20px; }
.inv-prim-cylinder,
.inv-prim-pipe,
.inv-prim-capsule  { background-position: -147px -20px; }
.inv-prim-torus    { background-position: -168px -20px; }
.inv-prim-cone,
.inv-prim-pyramid  { background-position: -189px -20px; }
.inv-badges { position: absolute; top: 2px; left: 2px; display: flex; gap: 2px; z-index: 2; pointer-events: none; }
.inv-badge {
  font-size: .6em; line-height: 1; padding: .15em .35em; border-radius: 4px;
  background: rgba(0,0,0,.6); color: #fff; text-transform: capitalize; max-width: 6em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.inv-badge-room { background: rgba(29,233,182,.85); color: #06241d; }
.inv-badge-primitive { background: rgba(120,120,120,.85); }
.inv-badge-fse-assets { background: rgba(124,77,255,.9); }
.inv-empty { padding: 1em .5em; color: #666; font-size: .85em; line-height: 1.4; }
