/* GemLooM Diamond Engine R5R14 - browser functional/UI closure. */
html,body{overflow-x:hidden!important;}
html[data-diamond-theme] .container{overflow:visible!important;}

/* Compact GemLooM title: logo + product name only. */
.gl-r5r14-page-brand{display:flex;align-items:center;gap:10px;min-width:0;}
.gl-r5r14-page-brand img{width:34px;height:34px;object-fit:contain;background:transparent;border:0;flex:0 0 auto;}
.gl-r5r14-page-brand h3{margin:0!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}

/* Sticky context must remain sticky at every supported viewport. */
.gl-r5r9-identity-bar{
  grid-column:1 / -1!important;
  position:sticky!important;
  top:8px!important;
  z-index:6000!important;
  grid-template-columns:minmax(215px,1.3fr) repeat(7,minmax(92px,.65fr)) auto!important;
  background:color-mix(in srgb,var(--gl-surface) 97%, transparent)!important;
}
.gl-r5r14-brand{display:flex;align-items:center;gap:8px;}
.gl-r5r14-brand img{width:30px;height:30px;object-fit:contain;flex:0 0 auto;background:transparent;border:0;}
.gl-r5r14-brand strong{font-size:13.5px!important;line-height:1.15;}
.gl-r5r14-analysis-cell strong[data-state="stale"]{color:#b45309!important;}
.gl-r5r14-analysis-cell strong[data-state="current"]{color:#15803d!important;}

/* Top display/session controls stay in the heading, never float over the page. */
#glDiamondThemeControl{flex-wrap:wrap!important;justify-content:flex-end!important;}
#glDiamondThemeControl .gl-r5r14-session-user{max-width:120px!important;}
#glDiamondThemeControl .gl-r5r14-logout{font-weight:850!important;}

/* Make visual panels explicit about data basis. */
#glR5R9TwinSvg{overflow:visible;}
#glR5R9MeshCanvas{width:100%;height:248px;display:block;}

@media(max-width:1450px){
  .gl-r5r9-identity-bar{grid-template-columns:minmax(205px,1.2fr) repeat(5,minmax(90px,.7fr)) auto!important;}
  .gl-r5r9-id-cell:nth-of-type(6),.gl-r5r9-id-cell:nth-of-type(7){display:none!important;}
}
@media(max-width:1050px){
  .gl-r5r9-identity-bar{grid-template-columns:minmax(185px,1.15fr) repeat(4,minmax(86px,.72fr)) auto!important;}
  .gl-r5r9-id-cell:nth-of-type(5){display:none!important;}
}
@media(max-width:700px){
  .gl-r5r9-identity-bar{position:sticky!important;top:4px!important;grid-template-columns:1fr 1fr!important;padding:8px!important;gap:6px!important;}
  .gl-r5r9-brand{grid-column:1/-1!important;}
  .gl-r5r9-id-cell{display:block!important;padding-left:7px!important;}
  .gl-r5r9-id-cell:nth-of-type(6),.gl-r5r9-id-cell:nth-of-type(7){display:none!important;}
  .gl-r5r14-analysis-cell{display:block!important;}
  .gl-r5r9-attention{grid-column:1/-1;justify-self:start!important;}
  .gl-panel-heading{align-items:stretch!important;}
  .gl-r5r14-page-brand h3{font-size:18px!important;}
  #glDiamondThemeControl{justify-content:flex-start!important;}
}
