/* V40 tiny (~1%) tightening of Rubik pages, no cube shrink. */
@media(min-width:1101px){body.rubik-hub-page .rubik-shell{width:min(1870px,calc(100% - 46px))}}
body.rubik-hub-page .rubik-overlay-cube-view{background:var(--studio-cube-background,#ffffff)!important;transition:background .12s ease}
body.rubik-hub-page .rubik-studio-view .rubik-overlay-cube-view .rubik-studio-move-strip{background:none!important}

/* V45 compact Rubik reading width and genuinely grouped desktop navigation. */
@media(min-width:1101px){
 body.rubik-hub-page .rubik-shell{width:min(1760px,calc(100% - 104px))}
 .rubik-top-inner{gap:10px;min-height:66px;flex-wrap:nowrap}
 .rubik-top-inner>nav:not(.rubik-topic-nav){flex:0 0 auto;gap:5px;white-space:nowrap}
 .rubik-top-inner>nav:not(.rubik-topic-nav) a{padding:7px 10px;font-size:12px}
 .rubik-top-inner .rubik-topic-nav{
  flex:1 1 auto;min-width:0;position:static;top:auto;justify-content:center;
  display:flex;flex-wrap:nowrap;gap:3px;overflow-x:auto;scrollbar-width:thin;
  padding:3px;border:0;box-shadow:none;border-radius:9px
 }
 .rubik-top-inner .rubik-topic-nav button{
  flex:0 0 auto;padding:7px 10px;font-size:12px;white-space:nowrap
 }
 #rubikLangBtn{padding:7px 10px}
}
@media(min-width:651px) and (max-width:1100px){
 .rubik-top-inner{gap:10px;flex-wrap:wrap;padding-block:8px}
 .rubik-top-inner>nav:not(.rubik-topic-nav){flex:0 0 auto}
 .rubik-top-inner .rubik-topic-nav{
  order:3;flex:1 1 100%;justify-content:center;position:static;
  top:auto;flex-wrap:wrap;gap:3px;padding:3px
 }
 .rubik-top-inner .rubik-topic-nav button{flex:0 0 auto;padding:7px 11px;font-size:12px}
}
/* Never transform native mouse wheel into artificial delayed smooth scroll. */
html:has(body.rubik-hub-page){scroll-behavior:auto}

/* V46: V37's ID-qualified flex:1 1 auto rule stretched the actual button
   hit boxes by ~200px despite 3px borders. Override it with an equally
   specific selector; compact the LABELS, not just the box gap. */
@media(min-width:1101px){
 body.rubik-hub-page .rubik-top-inner #rubikTopicNav{
  flex:0 1 auto;justify-content:flex-start;gap:4px;max-width:calc(100% - 260px);
  min-width:0;overflow-x:auto;scrollbar-width:thin
 }
 body.rubik-hub-page .rubik-top-inner #rubikTopicNav button{
  flex:0 0 auto;width:auto;min-width:0;padding:7px 9px;font-size:12px;
 }
}
@media(min-width:651px) and (max-width:1100px){
 body.rubik-hub-page .rubik-top-inner #rubikTopicNav{
  flex:1 1 100%;justify-content:flex-start;gap:4px
 }
 body.rubik-hub-page .rubik-top-inner #rubikTopicNav button{
  flex:0 0 auto;width:auto;min-width:0;padding:7px 9px;font-size:12px
 }
}
